diff options
| author | René de Hesselle <dehesselle@web.de> | 2019-04-06 14:17:27 +0000 |
|---|---|---|
| committer | René de Hesselle <dehesselle@web.de> | 2019-04-09 21:31:35 +0000 |
| commit | a5fe26cad43f9c83f81e83b90a08fb927b1ee674 (patch) | |
| tree | 0e33cc6cd3ca970c10a69bf73646346796110d9e /packaging | |
| parent | LPE mirror symmetry: Clarify some strings (diff) | |
| download | inkscape-a5fe26cad43f9c83f81e83b90a08fb927b1ee674.tar.gz inkscape-a5fe26cad43f9c83f81e83b90a08fb927b1ee674.zip | |
Add build pipeline for macOS
Diffstat (limited to 'packaging')
| -rwxr-xr-x | packaging/macos/010-vars.sh | 75 | ||||
| -rwxr-xr-x | packaging/macos/020-funcs.sh | 100 | ||||
| -rwxr-xr-x | packaging/macos/110-jhbuild-bootstrap.sh | 66 | ||||
| -rwxr-xr-x | packaging/macos/120-jhbuild-python2.sh | 33 | ||||
| -rwxr-xr-x | packaging/macos/130-jhbuild-gtk3.sh | 23 | ||||
| -rwxr-xr-x | packaging/macos/140-jhbuild-inkdeps.sh | 64 | ||||
| -rwxr-xr-x | packaging/macos/210-inkscape.sh | 86 | ||||
| -rw-r--r-- | packaging/macos/README.md | 77 | ||||
| -rwxr-xr-x | packaging/macos/create_buildenv.sh | 10 | ||||
| -rw-r--r-- | packaging/macos/inkscape.bundle | 123 | ||||
| -rw-r--r-- | packaging/macos/inkscape.plist | 556 |
11 files changed, 1213 insertions, 0 deletions
diff --git a/packaging/macos/010-vars.sh b/packaging/macos/010-vars.sh new file mode 100755 index 000000000..b54b11efe --- /dev/null +++ b/packaging/macos/010-vars.sh @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# This file is part of the build pipeline for Inkscape on macOS. +# +# ### 010-vars.sh ### +# This file contains all the global variables (as in: configuration for the +# build pipeline) and gets sourced by all the other scripts. +# If you want to override settings, the suggested way is that you create a +# `0nn-custom.sh` file and put them there. All files named '0nn-*.sh' get +# sourced in order of appearance. + +[ -z $VARS_INCLUDED ] && VARS_INCLUDED=true || return # include guard + +### source .profile ############################################################ + +# This is necessary on the first run and after changing directory settings. +# So, we're better safe than sorry and source it. + +source $HOME/.profile + +### general settings ########################################################### + +CORES=$(sysctl -n hw.ncpu) # use all available cores +export MAKEFLAGS="-j $CORES" + +XZ_OPT=-T0 # use all available cores + +### workspace/build environment paths ########################################## + +WRK_DIR=$HOME/work +OPT_DIR=$WRK_DIR/opt +BIN_DIR=$OPT_DIR/bin +TMP_DIR=$OPT_DIR/tmp +SRC_DIR=$OPT_DIR/src +LIB_DIR=$OPT_DIR/lib + +RAMDISK_ENABLE=true # mount ramdisk to $WRK_DIR +RAMDISK_SIZE=10 # unit is GiB + +### application bundle paths ################################################### + +APP_DIR=$WRK_DIR/Inkscape.app # keep in sync with 'inkscape.bundle' +APP_RES_DIR=$APP_DIR/Contents/Resources +APP_LIB_DIR=$APP_RES_DIR/lib +APP_BIN_DIR=$APP_RES_DIR/bin +APP_EXE_DIR=$APP_DIR/Contents/MacOS +APP_PLIST=$APP_DIR/Contents/Info.plist + +### downlad URLs ############################################################### + +URL_BOOST=https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.bz2 +URL_DOUBLE_CONVERSION=https://github.com/google/double-conversion/archive/v3.1.4.tar.gz +URL_FREETYPE=https://download.savannah.gnu.org/releases/freetype/freetype-2.10.0.tar.bz2 +URL_GC=https://github.com/ivmai/bdwgc/releases/download/v8.0.4/gc-8.0.4.tar.gz +URL_GDL=https://github.com/GNOME/gdl/archive/GDL_3_28_0.tar.gz +URL_GSL=http://ftp.fau.de/gnu/gsl/gsl-2.5.tar.gz +URL_GTK_MAC_BUNDLER=https://gitlab.gnome.org/GNOME/gtk-mac-bundler/-/archive/727793cfae08dec0e1e2621078d53a02ec5f7fb3.tar.gz +URL_GTK_OSX=https://raw.githubusercontent.com/dehesselle/gtk-osx/inkscape +URL_GTK_OSX_BUILD_SETUP=$URL_GTK_OSX/gtk-osx-build-setup.sh +URL_GTK_OSX_MODULESET=$URL_GTK_OSX/modulesets-stable/gtk-osx.modules +URL_LIBPSL=https://github.com/rockdaboot/libpsl/releases/download/libpsl-0.20.2/libpsl-0.20.2.tar.gz +URL_LIBSOUP=https://ftp.gnome.org/pub/GNOME/sources/libsoup/2.65/libsoup-2.65.92.tar.xz +URL_OPENJPEG=https://github.com/uclouvain/openjpeg/archive/v2.3.0.tar.gz +URL_OPENSSL=https://www.openssl.org/source/openssl-1.1.1b.tar.gz +URL_POPPLER=https://gitlab.freedesktop.org/poppler/poppler/-/archive/poppler-0.74.0/poppler-poppler-0.74.0.tar.gz +# Inkscape Git +URL_INKSCAPE=https://gitlab.com/inkscape/inkscape +# TODO icon in icns format +# This is the only binary file in the build pipeline and it's roughly 1 MiB in +# size. I do not want to merge that to Inkscape because it's a temporary +# workarond: a future version of the build pipeline will generate the icns from +# an already present png file on-the-fly. But until that's been implemented, +# download the icns from the original "macOS Inkscape build and package" +# repository. +URL_INKSCAPE_ICNS=https://github.com/dehesselle/mibap/raw/master/inkscape.icns diff --git a/packaging/macos/020-funcs.sh b/packaging/macos/020-funcs.sh new file mode 100755 index 000000000..124938cd4 --- /dev/null +++ b/packaging/macos/020-funcs.sh @@ -0,0 +1,100 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# This file is part of the build pipeline for Inkscape on macOS. +# +# ### 020-vars.sh ### +# This file contains all the functions used by the other scripts. It helps +# modularizing functionalities and keeping the scripts that do the real work +# as clean as possible. + +[ -z $FUNCS_INCLUDED ] && FUNCS_INCLUDED=true || return # include guard + +SELF_DIR=$(cd $(dirname "${BASH_SOURCE[0]}"); pwd -P) +source $SELF_DIR/010-vars.sh + +### get repository version string ############################################## + +function get_repo_version +{ + local repo=$1 + #echo $(git -C $repo describe --tags --dirty) + echo $(git -C $repo log --pretty=format:'%h' -n 1) +} + +### get compression flag by filename extension ################################# + +function get_comp_flag +{ + local file=$1 + + local extension=${file##*.} + + case $extension in + gz) echo "z" ;; + bz2) echo "j" ;; + xz) echo "J" ;; + *) echo "ERROR unknown extension $extension" + esac +} + +### download and extract source tarball ######################################## + +function get_source +{ + local url=$1 + local log=$TMP_DIR/$FUNCNAME.log + + cd $SRC_DIR + + # This downloads a file and pipes it directly into tar (file is not saved + # to disk) to extract it. Output is saved temporarily to determine + # the directory the files have been extracted to. + curl -L $url | tar xv$(get_comp_flag $url) 2>$log + cd $(head -1 $log | awk '{ print $2 }') + rm $log +} + +### make, make install in jhbuild environment ################################## + +function make_makeinstall +{ + jhbuild run make + jhbuild run make install +} + +### configure, make, make install in jhbuild environment ####################### + +function configure_make_makeinstall +{ + local flags="$*" + + jhbuild run ./configure --prefix=$OPT_DIR $flags + make_makeinstall +} + +### cmake, make, make install in jhbuild environment ########################### + +function cmake_make_makeinstall +{ + local flags="$*" + + mkdir builddir + cd builddir + jhbuild run cmake -DCMAKE_INSTALL_PREFIX=$OPT_DIR $flags .. + make_makeinstall +} + +### create and mount ramdisk ################################################### + +function create_ramdisk +{ + local dir=$1 # mountpoint + local size=$2 # unit is GiB + + if [ $(mount | grep $dir | wc -l) -eq 0 ]; then + local device=$(hdiutil attach -nomount ram://$(expr $size \* 1024 \* 2048)) + newfs_hfs -v "RAMDISK" $device + mount -o noatime,nobrowse -t hfs $device $dir + fi +} + diff --git a/packaging/macos/110-jhbuild-bootstrap.sh b/packaging/macos/110-jhbuild-bootstrap.sh new file mode 100755 index 000000000..d5368cc1b --- /dev/null +++ b/packaging/macos/110-jhbuild-bootstrap.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: GPL-2.0-or-later +# +# This file is part of the build pipeline for Inkscape on macOS. +# +# ### 110-jhbuild-bootstrap.sh ### +# Bootstrap the jhbuild environment. + +SELF_DIR=$(cd $(dirname "$0"); pwd -P) +for script in $SELF_DIR/0??-*.sh; do source $script; done + +### create our work directory ################################################## + +[ ! -d $WRK_DIR ] && mkdir -p $WRK_DIR + +# Use a ramdisk to speed up things. +if $RAMDISK_ENABLE; then + create_ramdisk $WRK_DIR $RAMDISK_SIZE +fi + +### setup path ################################################################# + +# WARNING: Operations like this are the reason that you're supposed to use +# a dedicated machine for building. This script does not care for your +# data. +echo "export PATH=$BIN_DIR:/usr/bin:/bin:/usr/sbin:/sbin" > ~/.profile +source ~/.profile + +### setup directories for jhbuild ############################################## + +mkdir -p $TMP_DIR +mkdir -p $SRC_DIR/checkout # extracted tarballs +mkdir -p $SRC_DIR/download # downloaded tarballs + +# WARNING: Operations like this are the reason that you're supposed to use +# a dedicated machine for building. This script does not care for your +# data. +rm -rf ~/.cache ~/.local ~/Source # remove remnants of previous run +ln -sf $TMP_DIR ~/.cache # link to our workspace +ln -sf $OPT_DIR ~/.local # link to our workspace +ln -sf $SRC_DIR ~/Source # link to our workspace + +### install and configure jhbuild ############################################## + +cd $WRK_DIR +bash <(curl -s $URL_GTK_OSX_BUILD_SETUP) # run jhbuild setup script + +JHBUILDRC=$HOME/.jhbuildrc-custom +if [ -f $JHBUILDRC ]; then # remove previous configuration from end of file + LINE_NO=$(grep -n "# And more..." $JHBUILDRC | awk -F ":" '{ print $1 }') + head -n +$LINE_NO $JHBUILDRC >$JHBUILDRC.clean + mv $JHBUILDRC.clean $JHBUILDRC + unset LINE_NO +fi + +# configure jhbuild +echo "checkoutroot = '$SRC_DIR/checkout'" >> $JHBUILDRC +echo "prefix = '$OPT_DIR'" >> $JHBUILDRC +echo "tarballdir = '$SRC_DIR/download'" >> $JHBUILDRC +echo "quiet_mode = True" >> $JHBUILDRC # suppress all build output +echo "progress_bar = True" >> $JHBUILDRC +echo "moduleset = '$URL_GTK_OSX_MODULESET'" >> $JHBUILDRC + +### bootstrap jhbuild environment ############################################## + +jhbuild bootstrap diff --git a/packaging/macos/120-jhbuild-python2.sh b/packaging/macos/120-jhbuild-python2.sh new file mode 100755 index 000000000..aa91b0a7a --- /dev/null +++ b/packaging/macos/120-jhbuild-python2.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: GPL-2.0-or-later +# +# This file is part of the build pipeline for Inkscape on macOS. +# +# ### 120-jhbuild-python2.sh ### +# Install a current complete release of Python 2 w/SSL. + +SELF_DIR=$(cd $(dirname "$0"); pwd -P) +for script in $SELF_DIR/0??-*.sh; do source $script; done + +### install OpenSSL ############################################################ + +# Build OpenSSL as dedicated step because we need to link our system +# configuration and certs (/etc/ssl) to it. Otherwise https downloads +# will fail with certification validation issues. + +jhbuild build openssl +mkdir -p $OPT_DIR/etc +ln -sf /etc/ssl $OPT_DIR/etc # link system config to our OpenSSL + +### install Python 2 ########################################################### + +# Some packages complain about non-exiting development headers when you rely +# solely on the macOS-provided Python installation. This also enables +# system-wide installations of packages without permission issues. + +jhbuild build python + +cd $SRC_DIR +curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py +jhbuild run python get-pip.py +jhbuild run pip install six # required for a package in meta-gtk-osx-bootstrap diff --git a/packaging/macos/130-jhbuild-gtk3.sh b/packaging/macos/130-jhbuild-gtk3.sh new file mode 100755 index 000000000..78b184955 --- /dev/null +++ b/packaging/macos/130-jhbuild-gtk3.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: GPL-2.0-or-later +# +# This file is part of the build pipeline for Inkscape on macOS. +# +# ### 130-jhbuild-gtk3.sh ### +# Install GTK3 libraries. + +SELF_DIR=$(cd $(dirname "$0"); pwd -P) +for script in $SELF_DIR/0??-*.sh; do source $script; done + +### install GTK3 libraries ##################################################### + +# meta-gtk-osx-freetype is included to fix a breakage in meta-gtk-osx-gtk3 +# due to missing headers. +# source: <TODO - there is/was a link, but I need to find it again> + +jhbuild build \ + meta-gtk-osx-bootstrap \ + meta-gtk-osx-freetype \ + meta-gtk-osx-gtk3 \ + meta-gtk-osx-gtkmm3 + diff --git a/packaging/macos/140-jhbuild-inkdeps.sh b/packaging/macos/140-jhbuild-inkdeps.sh new file mode 100755 index 000000000..a2bdd9871 --- /dev/null +++ b/packaging/macos/140-jhbuild-inkdeps.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: GPL-2.0-or-later +# +# This file is part of the build pipeline for Inkscape on macOS. +# +# ### 140-jhbuild-inkdeps.sh ### +# Install additional dependencies into our jhbuild environment required for +# building Inkscape. + +SELF_DIR=$(cd $(dirname "$0"); pwd -P) +for script in $SELF_DIR/0??-*.sh; do source $script; done + +### install GNU Scientific Library ############################################# + +get_source $URL_GSL +configure_make_makeinstall + +### install additional GNOME libraries ######################################### + +# libsoup - GNOME http client/server library +# adwaita-icon-theme - icons used by Inkscape/GTK + +jhbuild build adwaita-icon-theme libsoup + +### install Garbage Collector for C/C++ ######################################## + +get_source $URL_GC +configure_make_makeinstall + +### install GNOME Docking Library ############################################## + +get_source $URL_GDL +jhbuild run ./autogen.sh +configure_make_makeinstall + +### install boost ############################################################## + +get_source $URL_BOOST +jhbuild run ./bootstrap.sh --prefix=$OPT_DIR +jhbuild run ./b2 -j$CORES install + +### install OpenJPEG ########################################################### + +get_source $URL_OPENJPEG +cmake_make_makeinstall + +### install Poppler ############################################################ + +get_source $URL_POPPLER +cmake_make_makeinstall -DENABLE_UNSTABLE_API_ABI_HEADERS=ON + +### install gtk-mac-bundler #################################################### + +get_source $URL_GTK_MAC_BUNDLER +make install +cp $SRC_DIR/gtk-mac-bundler*/examples/gtk3-launcher.sh $SELF_DIR + +### install double-conversion ################################################## + +# Required by lib2geom. + +get_source $URL_DOUBLE_CONVERSION +cmake_make_makeinstall + diff --git a/packaging/macos/210-inkscape.sh b/packaging/macos/210-inkscape.sh new file mode 100755 index 000000000..38a47c691 --- /dev/null +++ b/packaging/macos/210-inkscape.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: GPL-2.0-or-later +# +# This file is part of the build pipeline for Inkscape on macOS. +# +# ### 210-inkscape.sh ### +# Build Inscape and create an application bundle. + +SELF_DIR=$(cd $(dirname "$0"); pwd -P) +for script in $SELF_DIR/0??-*.sh; do source $script; done + +### build Inkscape ############################################################# + +if [ -z $CI_JOB_ID ]; then # running standalone + cd $SRC_DIR + git clone --depth 1 $URL_INKSCAPE + #git clone $URL_INKSCAPE # this is a >1.6 GiB download + mkdir inkscape_build + cd inkscape_build + cmake -DCMAKE_PREFIX_PATH=$OPT_DIR -DCMAKE_INSTALL_PREFIX=$OPT_DIR -DWITH_OPENMP=OFF ../inkscape +else # running as CI job + if [ -d $SELF_DIR/../../build ]; then # cleanup previous run + rm -rf $SELF_DIR/../../build + fi + mkdir $SELF_DIR/../../build + cd $SELF_DIR/../../build + cmake -DCMAKE_PREFIX_PATH=$OPT_DIR -DCMAKE_INSTALL_PREFIX=$OPT_DIR -DWITH_OPENMP=OFF .. +fi + +make +make install + +# patch library locations before packaging +install_name_tool -change @rpath/libpoppler.85.dylib $LIB_DIR/libpoppler.85.dylib $BIN_DIR/inkscape +install_name_tool -change @rpath/libpoppler-glib.8.dylib $LIB_DIR/libpoppler-glib.8.dylib $BIN_DIR/inkscape + +### package Inkscape ########################################################### + +if [ ! -z $CI_JOB_ID ]; then # running as CI job + # $SELF_DIR is different between "standalone" and "CI job" + cp $SRC_DIR/gtk-mac-bundler*/examples/gtk3-launcher.sh $SELF_DIR +fi + +cd $SELF_DIR +jhbuild run gtk-mac-bundler inkscape.bundle + +# patch library locations +install_name_tool -change @rpath/libinkscape_base.dylib @executable_path/../Resources/lib/inkscape/libinkscape_base.dylib $APP_EXE_DIR/Inkscape-bin +install_name_tool -change @rpath/libpoppler.85.dylib @executable_path/../Resources/lib/libpoppler.85.dylib $APP_LIB_DIR/libpoppler-glib.8.dylib +install_name_tool -change @rpath/libpoppler.85.dylib @executable_path/../Resources/lib/libpoppler.85.dylib $APP_LIB_DIR/inkscape/libinkscape_base.dylib +install_name_tool -change @rpath/libpoppler-glib.8.dylib @executable_path/../Resources/lib/libpoppler-glib.8.dylib $APP_LIB_DIR/inkscape/libinkscape_base.dylib + +# add INKSCAPE_DATADIR to launch script +# TODO +# - instead of deleting and re-inserting, insert with "sed before" pattern +# - As follow-up to https://gitlab.com/inkscape/inkscape/merge_requests/612, +# it should not be necessary to rely on $INKSCAPE_DATADIR. Paths in +# 'path-prefix.h' are supposed to work. Needs to be looked into with @ede123. +sed -i '' -e '$d' $APP_EXE_DIR/Inkscape +sed -i '' -e '$d' $APP_EXE_DIR/Inkscape +echo 'export INKSCAPE_DATADIR=$bundle_data' >> $APP_EXE_DIR/Inkscape +echo '$EXEC "$bundle_contents/MacOS/$name-bin" "$@" $EXTRA_ARGS' >> $APP_EXE_DIR/Inkscape + +# add icon +curl -L -o $APP_RES_DIR/inkscape.icns $URL_INKSCAPE_ICNS + +set -e # TODO kind of cheap, need better error handling + +if [ -z $CI_JOB_ID ]; then # running standalone + # update version information + /usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString '1.0alpha-g$(get_repo_version $SRC_DIR/inkscape)'" $APP_PLIST + /usr/libexec/PlistBuddy -c "Set CFBundleVersion '1.0alpha-g$(get_repo_version $SRC_DIR/inkscape)'" $APP_PLIST +else # running as CI job + # update version information + /usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString '1.0alpha-g$(get_repo_version $SELF_DIR)'" $APP_PLIST + /usr/libexec/PlistBuddy -c "Set CFBundleVersion '1.0alpha-g$(get_repo_version $SELF_DIR)'" $APP_PLIST +fi + +### create disk image for distribution ######################################### + +# TODO + +if [ ! -z $CI_JOB_ID ]; then # create build artifcat for CI job + cd $WRK_DIR + tar c $(basename $APP_DIR) | xz > $SELF_DIR/../../build/Inkscape.tar.xz +fi diff --git a/packaging/macos/README.md b/packaging/macos/README.md new file mode 100644 index 000000000..4d2bf133d --- /dev/null +++ b/packaging/macos/README.md @@ -0,0 +1,77 @@ +# macOS build pipeline + +This folder contains the scripts that make up the build pipeline for Inkscape on macOS. + +## Requirements + +- Use a __dedicated, clean macOS installation__ as build machine. "clean" as in "freshly installed + Xcode CLI tools". Nothing more, nothing less. + - Especially no MacPorts, no Fink, no Homebrew, ... because they could interfere with the build system we're using. + - macOS 10.13.6 with Xcode 10.1. + - Other versions might work but haven't been tested. + - A full Xcode installation won't hurt, but is not required. + +- __Use a dedicated user account__ unless you're prepared that these scripts will delete and overwrite your data in the following locations: +_(comments based on default configuration)_ + + ```bash + $HOME/.cache # will be symlinked to $HOME/work/tmp + $HOME/.local # will be symlinked to $HOME/work/opt + $HOME/.profile # will be overwritten + $HOME/Source # will be symlinked to $HOME/work/opt/src + ``` + +- __16 GiB RAM__, since we're using a 10 GiB ramdisk to build everything. + - Using a ramdisk speeds up the process significantly and avoids wearing out your ssd. + - You can choose to not use a ramdisk by overriding `RAMDISK_ENABLE=false` in a e.g. `011-custom.sh` file. + - The build environment takes up ~6.5 GiB of disk space, the Inkscape Git repository ~1.8 GiB. Subject to change and YMMV. +- somewhat decent __internet connection__ for all the downloads + +## Usage + +### standalone + +> TODO: These scripts were initially designed as part of a dedicated repository, not the Inkscape repository itself. Therefore they contain a step that shallow-clones the Inkscape repository to build. This behaviour will be improved upon in a future version. + +Run: + +```bash +./build_everything.sh +``` + +This will run all the `nnn-*.sh` scripts consecutively. + +### GitLab CI + +#### manual task: setup build environment + +For now, the CI pipeline is designed to be run on a persistent machine since it does not setup the required build environment itself. This is a manual task you have to perform beforehand by running + +```bash +./create_buildenv.sh +```` + +This will setup the build environment in `$HOME/work` as a ramdisk. + +#### configuration example `.gitlab-runner/config.toml` + +```toml +[[runners]] + name = "<YOUR RUNNER'S NAME>" + url = "https://gitlab.com/" + token = "<YOUR TOKEN>" + executor = "shell" + builds_dir = "/Users/<YOUR DEDICATED USER>/work/builds" + cache_dir = "/Users/<YOUR DEDICATED USER>/work/cache" +``` + +#### configuration example `.gitlab-ci.yml` + +```yaml +buildmacos: + script: + - packaging/macos/210-inkscape.sh +``` + +## Status + +This is still a work in progress and actively being worked on. Use at your own risk. diff --git a/packaging/macos/create_buildenv.sh b/packaging/macos/create_buildenv.sh new file mode 100755 index 000000000..5e9ac9db6 --- /dev/null +++ b/packaging/macos/create_buildenv.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# create_buildenv.sh +# https://github.com/dehesselle/mibap +# +# create jhbuild environment for Inkscape + +for script in 1??-*.sh; do + ./$script +done + diff --git a/packaging/macos/inkscape.bundle b/packaging/macos/inkscape.bundle new file mode 100644 index 000000000..147e8a778 --- /dev/null +++ b/packaging/macos/inkscape.bundle @@ -0,0 +1,123 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<app-bundle> + + <meta> + <!-- Where to pick up the GTK+ installation, icon themes, + etc. Note that "${env:JHBUILD_PREFIX}" is evaluated to the + value of the environment variable JHBUILD_PREFIX. You can + define additional prefixes and refer to them in paths + throughout this file on the form "${prefix:name}". This is + useful for installing certain libraries or even the + application itself separately. Note that JHBUILD_PREFIX is + defined by jhbuild, so it you are not using jhbuild you can + either define your own or just hardcode the path here. + --> + <prefix name="default">${env:JHBUILD_PREFIX}</prefix> + + <!-- The project directory is the default location of the created + app. If you leave out the path, the current directory is + used. Note the usage of an environment variable here again. + --> + <destination overwrite="yes">${env:HOME}/work</destination> + + <image> + <!-- Not implemented yet (DMG image). --> + </image> + + <!-- Comment this out to keep the install names in binaries --> + <run-install-name-tool/> + + <!-- Optionally specify a launcher script to use. If the + application sets up everything needed itself, like + environment variable, linker paths, etc, a launcher script is + not needed. If the source path is left out, the default + script will be used. + --> + <launcher-script>${project}/gtk3-launcher.sh</launcher-script > + + <!-- Not implemented: Optional runtime, could be python or mono + for example. + --> + <!-- runtime copy="yes">/usr/bin/python</runtime --> + <!-- Indicate the active gtk version to use. This is needed only + for gtk+-3.0 projects. --> + <gtk>gtk+-3.0</gtk> + </meta> + + <!-- The special macro "${project}" refers to the directory where + this bundle file is located. The application name and bundle + identifier are taken from the plist file. + --> + <plist>${project}/inkscape.plist</plist> + + <main-binary>${prefix}/bin/inkscape</main-binary> + + <!-- Copy in the input methods. Dunno if they actually work with + OSX. Note the ${gtkdir} macro, which expands to the correct + library subdirectory for the specified gtk version. --> + <binary> + ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/immodules/*.so + </binary> + +<!-- And the print backends --> + <binary> + ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/printbackends/*.so + </binary> + +<!-- Starting with 2.24, gdk-pixbuf installs into its own directory. --> + <binary> + ${prefix}/lib/gdk-pixbuf-2.0/${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}/loaders/*.so + </binary> + +<!-- No longer needed for pango >= 1.38 + <binary> + ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/ + </binary> +--> + <binary> + ${prefix}/lib/inkscape/libinkscape_base.dylib + </binary> + + <!-- Translation filenames, one for each program or library that you + want to copy in to the bundle. The "dest" attribute is + optional, as usual. Bundler will find all translations of that + library/program under the indicated directory and copy them.--> + <translations name="gtk30"> + ${prefix}/share/locale + </translations> + + + <!-- Data to copy in, usually Glade/UI files, images, sounds files + etc. The destination inside the bundle can be specified if the + files should end up at a different location, by using the + "dest" property. The destination must then start with the macro + "${bundle}", which refers to the bundle root directory. + --> + <!-- data> + ${prefix}/share/gtk3-demo + </data --> + + <!-- Copy in the themes data. You may want to trim this to save space + in your bundle. --> + <data> + ${prefix}/share/themes + </data> + + <data> + ${prefix}/share/icons + </data> + + <data> + ${prefix}/share/inkscape + </data> + + <!-- Copy icons. Note that the .icns file is an Apple format which + contains up to 4 sizes of icon. You can use + /Developer/Applications/Utilities/Icon Composer.app to import + artwork and create the file. > + <data dest="${bundle}/Contents/Resources"> + ${project}/Giggle.icns + </data --> + + </app-bundle> + diff --git a/packaging/macos/inkscape.plist b/packaging/macos/inkscape.plist new file mode 100644 index 000000000..8c8088de8 --- /dev/null +++ b/packaging/macos/inkscape.plist @@ -0,0 +1,556 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleDocumentTypes</key> + <array> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>svg</string> + <string>SVG</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>image-svg+xml.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>image/svg+xml</string> + </array> + <key>CFBundleTypeName</key> + <string>Scalable Vector Graphics Image</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>SVG </string> + </array> + <key>CFBundleTypeRole</key> + <string>Editor</string> + <key>LSHandlerRank</key> + <string>Owner</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>svgz</string> + <string>SVGZ</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>image-svg+xml-compressed.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>image/svg+xml-compressed</string> + </array> + <key>CFBundleTypeName</key> + <string>Compressed Scalable Vector Graphics Image</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>SVGZ</string> + </array> + <key>CFBundleTypeRole</key> + <string>Editor</string> + <key>LSHandlerRank</key> + <string>Owner</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>eps</string> + <string>epsi</string> + <string>EPS</string> + <string>EPSI</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>image-x-eps.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/postscript</string> + <string>image/x-eps</string> + </array> + <key>CFBundleTypeName</key> + <string>PostScript Document</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>EPS </string> + <string>EPSI</string> + </array> + <key>CFBundleTypeRole</key> + <string>Editor</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + <key>LSItemContentTypes</key> + <array> + <string>com.adobe.encapsulated-postscript</string> + </array> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>ps</string> + <string>PS</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>image-x-ps.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/postscript</string> + <string>image/x-ps</string> + </array> + <key>CFBundleTypeName</key> + <string>PostScript Document</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>PS </string> + </array> + <key>CFBundleTypeRole</key> + <string>Editor</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + <key>LSItemContentTypes</key> + <array> + <string>com.adobe.postscript</string> + </array> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>ai</string> + <string>AI</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>application-illustrator.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/illustrator</string> + <string>application/pdf</string> + </array> + <key>CFBundleTypeName</key> + <string>Adobe Illustrator Document</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>AI </string> + </array> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + <key>LSItemContentTypes</key> + <array> + <string>com.adobe.illustrator.ai-image</string> + </array> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>aisvg</string> + <string>AISVG</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>application-illustrator-svg.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/illustrator-svg</string> + </array> + <key>CFBundleTypeName</key> + <string>Adobe Illustrator SVG Document</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>AISVG</string> + </array> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>wmf</string> + <string>WMF</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>image-vnd.windows-metafile.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>image/vnd.windows-metafile</string> + </array> + <key>CFBundleTypeName</key> + <string>Windows MetaFile</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>WMF </string> + </array> + <key>CFBundleTypeRole</key> + <string>Editor</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>pdf</string> + <string>PDF</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>application-pdf.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/pdf</string> + </array> + <key>CFBundleTypeName</key> + <string>NSPDFPboardType</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>PDF </string> + </array> + <key>CFBundleTypeRole</key> + <string>Editor</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + <key>LSItemContentTypes</key> + <array> + <string>com.adobe.pdf</string> + </array> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>ggr</string> + <string>GGR</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>application-gimp-gradient.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/x-gimp-gradient</string> + </array> + <key>CFBundleTypeName</key> + <string>Gimp Gradient</string> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + <key>LSItemContentTypes</key> + <array> + <string>org.gimp.ggr</string> + </array> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>ccx</string> + <string>CCX</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>application-vnd.corel-draw-compressed.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/vnd.corel-draw-compressed</string> + </array> + <key>CFBundleTypeName</key> + <string>Corel Draw Compressed Document</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>CCX </string> + </array> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>cdt</string> + <string>CDT</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>application-vnd.corel-draw-template.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/vnd.corel-draw-template</string> + </array> + <key>CFBundleTypeName</key> + <string>Corel Draw Template</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>CDT </string> + </array> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>cdr</string> + <string>CDR</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>application-vnd.corel-draw.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/vnd.corel-draw</string> + </array> + <key>CFBundleTypeName</key> + <string>Corel Draw Compressed Document</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>CDR </string> + </array> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>xaml</string> + <string>XAML</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>application-vnd.ms.xaml.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>appliction/vnd.ms.xaml</string> + </array> + <key>CFBundleTypeName</key> + <string>Extensible Application Markup Language (XAML)</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>XAML</string> + </array> + <key>CFBundleTypeRole</key> + <string>Editor</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>dxf</string> + <string>DXF</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>image-vnd.dxf.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>image/vnd.dxf</string> + </array> + <key>CFBundleTypeName</key> + <string>AutoCAD Document</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>DXF </string> + </array> + <key>CFBundleTypeRole</key> + <string>Editor</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>sk1</string> + <string>SK1</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>image-vnd.sk1.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>image/vnd.sk1</string> + </array> + <key>CFBundleTypeName</key> + <string>Sketch Document</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>SK1 </string> + </array> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>wpg</string> + <string>WPG</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>application-vnd.wordperfect-graphic.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/vnd.wordperfect-graphic</string> + <string>image/x-wpg</string> + </array> + <key>CFBundleTypeName</key> + <string>WordPerfect Graphics</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>WPG </string> + </array> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>emf</string> + <string>EMF</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>Inkscape-Generic.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>image/emf</string> + </array> + <key>CFBundleTypeName</key> + <string>Windows Enhanced Metafile document</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>EMF </string> + </array> + <key>CFBundleTypeRole</key> + <string>Editor</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>vsd</string> + <string>VSD</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>Inkscape-Generic.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/vnd.visio</string> + </array> + <key>CFBundleTypeName</key> + <string>Microsoft Visio Diagram</string> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>vdx</string> + <string>VDX</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>Inkscape-Generic.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/vnd.visio</string> + </array> + <key>CFBundleTypeName</key> + <string>Microsoft Visio XML Diagram</string> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>vsdm</string> + <string>VSDM</string> + <string>vsdx</string> + <string>VSDX</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>Inkscape-Generic.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/vnd.visio</string> + </array> + <key>CFBundleTypeName</key> + <string>Microsoft Visio 2013 drawing</string> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>plt</string> + <string>PLT</string> + <string>hpgl</string> + <string>hpgl</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>Inkscape-Generic.icons</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/vnd.hp-HPGL</string> + <string>image/hpgl</string> + <string>image/plt</string> + <string>image/x-plt</string> + </array> + <key>CFBundleTypeName</key> + <string>HP Graphics Language file</string> + <key>CFBundleTypeRole</key> + <string>Editor</string> + <key>LSHandlerRank</key> + <string>Alternate</string> + </dict> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>png</string> + <string>PNG</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>Inkscape-Generic.icns</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>image/png</string> + </array> + <key>CFBundleTypeName</key> + <string>Portable Network Graphics Image</string> + <key>CFBundleTypeOSTypes</key> + <array> + <string>PNGf</string> + </array> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSHandlerRank</key> + <string>None</string> + </dict> + </array> + <key>CFBundleExecutable</key> + <string>Inkscape</string> + <key>CFBundleIconFile</key> + <string>inkscape.icns</string> + <key>CFBundleIdentifier</key> + <string>org.inkscape.Inkscape</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>1.0alpha</string> + <key>CFBundleSignature</key> + <string>Inks</string> + <key>CFBundleVersion</key> + <string>1.0alpha</string> + <key>NSHumanReadableCopyright</key> + <string>Copyright 2019 Inkscape Developers, GNU General Public License.</string> + <key>LSApplicationCategoryType</key> + <string>public.app-category.graphics-design</string> + <key>LSMinimumSystemVersion</key> + <string>10.13</string> + <key>GtkOSXLaunchScriptFile</key> + <string>gtk_launcher.py</string> + <key>NSHighResolutionCapable</key> + <true/> +</dict> +</plist> + |
