mclegrand / mibap

build and package Inkscape on macOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

macOS Inkscape build and package

build

This repository is the development platform for building and packaging Inkscape 1.x on macOS. That means updates happen here more frequently and in smaller steps than what is pushed (in accumulated/squashed form) to Inkscape's sources (packaging/macos).

The build system being used is JHBuild in conjunction with our own custom moduleset based off gtk-osx. If you have never heard about these two, take a look at GTK's documentation; it is important to understand that this is neither Homebrew nor MacPorts. But don't worry, everything has been automated to the point that you only have to run shell scripts.

Build instructions

Building Inkscape is a two-step process:

  1. Setup a build environment with all the dependencies ("toolset"). There are two options:

    a. Build everything from scratch. This encompasses a lot of libraries and helper tools, therefore this is time consuming and can be error-prone if you don't stick to the recommendations.

    or

    b. Use a precompiled version of the toolset. You can practically fast forward to the next step.

  2. Build Inkscape.

Prerequisites

  • A clean environment is key.

    • Software and libraries installed via package managers (e.g. Homebrew, MacPorts, Fink) can cause problems depending on their installation directory.
      • Rule of thumb: clear out /usr/local.
    • Use a dedicated user account to avoid any interference with the environment.
      • Rule of thumb: no customizations in dotfiles like .profile, .bashrc etc.
  • There are version recommendations based on a known working setup.

    • macOS Catalina 10.15.7
    • Xcode 12.3
    • OS X El Capitan 10.11 SDK (from Xcode 7.3.1)
  • An internet connection for all the downloads.

step 1a: build the toolset

  1. Clone this repository and cd into it.

    git clone --recurse-submodules https://github.com/dehesselle/mibap
    cd mibap
  2. (optional) Set a build directory (default: /Users/Shared/work).

    # Don't blindly copy/paste this. No spaces allowed.
    echo "WRK_DIR=$HOME/my_build_dir" > 015-customdir.sh
  3. (optional) Set the SDK to be used (default: xcodebuild -version -sdk macosx Path).

    # Don't blindly copy/paste this. No spaces allowed.
    echo "SDKROOT=$HOME/MacOSX10.11.sdk" > 015-sdkroot.sh
  4. Build the toolset.

    ./build_toolset.sh

    This will

    • run all the 1nn-prefixed scripts consecutively
    • populate $WRK_DIR/$TOOLSET_VER

Time for ☕, this will take a while!

step 1b: install a precompiled toolset

  1. Acknowledge that the precompiled toolset requires WRK_DIR=/Users/Shared/work as build directory. (It's the default, no need to configure this.)

  2. Clone this repository and cd into it.

    git clone --recurse-submodules https://github.com/dehesselle/mibap
    cd mibap
  3. Install the toolset.

    ./install_toolset.sh

    This will

    • download a disk image (about 1.6 GiB) to /Users/Shared/work/repo
    • mount the (read-only) disk image to /Users/Shared/work/$TOOLSET_VER
    • union mount a ramdisk (3 GiB) to /Users/Shared/work/$TOOLSET_VER

    The mounted volumes won't show up in Finder but you can see them using diskutil list.

    Once you're done building Inkscape, use uninstall_toolset.sh to eject them. This does not delete the contents of /Users/Shared/work/repo.

step 2: build Inkscape

  1. Build Inkscape.

    ./build_inkscape.sh

    This will

    • run all the 2nn-prefixed scripts consecutively
    • produce $WRK_DIR/$TOOLSET_VER/artifacts/Inkscape.dmg

GitHub CI

Under investigation - GitHub hosted runners do not provide a clean environment as per the requirements above.

known issues

Besides what you may find in the issue tracker:

  • If you're logged in to the desktop when building the toolset, you may get multiple popups asking to install Java. They're triggered by at least gettext and cmake checking for the presence of Java during their configuration stages and can be safely ignored.

Status

This project is still a work in progress (hence 0.x version).

Contact

If you want to reach out, join #team_devel_mac on Inkscape's RocketChat.

License

GPL-2.0-or-later

About

build and package Inkscape on macOS

License:GNU General Public License v2.0


Languages

Language:Shell 52.3%Language:Python 47.7%