Skip to content

dehesselle/mibap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

building and packaging Inkscape on macOS

mibap_icon pipeline status Latest Release

This repository (on GitLab, GitHub) is the development platform for building and packaging Inkscape 1.x on macOS. It creates a disk image containing all dependencies and provides the build scripts that are being used in Inkscape's CI.

Its working title was/is "mibap" (short for "macOS Inkscape build and package") which is still being used in a few places.

Under the hood

The build system being used is JHBuild with a custom moduleset based on 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, in the end it's just another orchestration tool to perform "configure; make; make install" and manage dependencies.

Building Inkscape's dependencies

Prerequisites

  • A clean environment is key. This is the most inconvenient requirement as it will likely conflict with how you are currently using your Mac, but it is vital.

    • Software and libraries - usually installed via package managers like Homebrew, MacPorts, Fink etc. - are known to cause problems depending on installation prefix. You cannot have software installed in the following locations:
      • /usr/local
      • /opt/homebrew
      • /opt/local
    • Uninstall Xquartz.
    • Use a dedicated user account to avoid any interference with the environment.
      • No customizations in dotfiles like .profile, .bashrc etc.
  • There are version recommendations based on a known working setup (used in CI), targeting the minimum supported OS versions (see sys.sh).

    • macOS Monterey 12.6.x
    • Xcode 14.0.1 (last version containing Monterey 12.3 SDK)
    • macOS High Sierra 10.13.4 SDK (from Xcode 9.4.1) for x86_64 architecture
    • macOS Big Sur 11.3 SDK (from Xcode 13.0) for arm64 architecture
  • An internet connection for all the downloads.

Steps

  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).

    # Optional. Avoid spaces.
    export WRK_DIR=$HOME/my_build_dir
  3. (optional) Use a specific SDK (default: xcodebuild -version -sdk macosx Path).

    # Optional. Avoid spaces.
    export SDKROOT=$HOME/MacOSX10.13.sdk
  4. Build all dependencies.

    ./build_toolset.sh

    This will

    • build everything in your $WRK_DIR
    • take some time!

Building Inkscape

Prerequisites

  • The precompiled toolset requires /Users/Shared/work as build directory.

Steps

  1. Clone this repository and cd into it. Checkout the latest tag, do not use master. Initialize and update the submodules.

    git clone https://github.com/dehesselle/mibap
    cd mibap
    # checkout tag with highest version number
    git checkout $(git tag | grep "^v" | sort -V | tail -1)
    # pull in submodules
    git submodule update --init --recursive
  2. Install the dependencies.

    jhb/usr/bin/archive install_dmg

    This will

    • download the latest release (about 300 MiB) to /Users/Shared/work/repo
    • mount the disk image to /Users/Shared/work/mibap-N.N

    The mounted volume won't show up in Finder (on purpose) but you can see it using diskutil list.
    A temporary file ending in .dmg.shadow will be created in /Users/Shared/work and will be automatically discarded when uninstalling.

  3. Set INK_DIR to your clone of Inkscape's repository and start the build.

    # Clone Inkscape's sources if you haven't done this yet:
    # git clone --recurse-submodules https://gitlab.com/inkscape/inkscape $HOME/inkscape
    export INK_DIR=$HOME/inkscape
    ./build_inkscape.sh

    This will

    • build and install Inkscape to /Users/Shared/work/mibap-<version>
    • create Inkscape*.dmg in your working directory
  4. Uninstall the dependencies.

    jhb/usr/bin/archive uninstall_dmg

Contact

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

Credits

The mibap icon uses a red apple and gears from Openclipart, licensed under CC0-1.0.

License

GPL-2.0-or-later