From 13fe706716a383e12b47c0458324580b6b12b84c Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Fri, 15 Nov 2019 13:09:53 -0500 Subject: windows build github action --- bin/build-distribution-archives | 21 +++++++++++++-------- bin/build-electron | 11 +++++------ bin/build-python | 2 +- 3 files changed, 19 insertions(+), 15 deletions(-) (limited to 'bin') diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index bbc61996..d1a30014 100755 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -1,14 +1,16 @@ +#!/bin/bash + # TRAVIS_BRANCH is the branch name or the name of the tag. -VERSION="$(echo ${TRAVIS_BRANCH} | tr / -)" -OS="${TRAVIS_OS_NAME}" +VERSION="$(echo ${TRAVIS_BRANCH:-${GITHUB_REF}} | tr / -)" +OS="${TRAVIS_OS_NAME:-$(uname)}" ARCH="$(uname -m)" MACVERSION="${TRAVIS_OSX_IMAGE}" -if [ ${MACVERSION} = "xcode9.2" ]; then +if [ "${MACVERSION}" = "xcode9.2" ]; then MACVERSION="sierra" -elif [ ${MACVERSION} = "xcode9.4" ]; then +elif [ "${MACVERSION}" = "xcode9.4" ]; then MACVERSION="high_sierra" -elif [ ${MACVERSION} = "xcode10.2" ]; then +elif [ "${MACVERSION}" = "xcode10.2" ]; then MACVERSION="mojave" fi @@ -21,6 +23,8 @@ else cp -a electron/dist/*-unpacked dist/inkstitch/electron fi +mkdir artifacts + for d in inx/*; do lang=${d%.*} lang=${lang#*/} @@ -28,11 +32,12 @@ for d in inx/*; do cd dist if [ "$BUILD" = "windows" ]; then - zip -r ../inkstitch-${VERSION}-win32-${lang}.zip * + echo + python -m zipfile -c ../artifacts/inkstitch-${VERSION}-win32-${lang}.zip * elif [ "$BUILD" = "osx" ]; then - tar zcf ../inkstitch-${VERSION}-${OS}-${MACVERSION}-${ARCH}-$lang.tar.gz * + tar zcf ../artifacts/inkstitch-${VERSION}-${OS}-${MACVERSION}-${ARCH}-$lang.tar.gz * else - tar zcf ../inkstitch-${VERSION}-${OS}-${ARCH}-$lang.tar.gz * + tar zcf ../artifacts/inkstitch-${VERSION}-${OS}-${ARCH}-$lang.tar.gz * fi cd .. done diff --git a/bin/build-electron b/bin/build-electron index d8ce78b8..1b90b556 100755 --- a/bin/build-electron +++ b/bin/build-electron @@ -1,11 +1,10 @@ #!/bin/bash -if [ "$BUILD" = "windows" -o "$BUILD" = "linux" ]; then - if [ "$BUILD" = "windows" ]; then - args="-w --ia32" - else - args="-l --x64" - fi +if [ "$BUILD" = "windows" ]; then + cd electron + yarn --link-duplicates --pure-lockfile && yarn run dist -w --ia32 +elif [ "$BUILD" = "linux" ]; then + args="-l --x64" docker run --rm \ -e ELECTRON_CACHE=$HOME/.cache/electron \ diff --git a/bin/build-python b/bin/build-python index c740c782..7326e371 100755 --- a/bin/build-python +++ b/bin/build-python @@ -35,7 +35,7 @@ pyinstaller_args+="-p inkscape/share/extensions " pyinstaller_args+="--log-level DEBUG " if [ "$BUILD" = "windows" ]; then - wine c:\\Python\\scripts\\pyinstaller.exe $pyinstaller_args inkstitch.py + pyinstaller $pyinstaller_args inkstitch.py else # without the LD_LIBRARY_PATH, it seems that pyinstaller can't find all of # wxpython's shared libraries -- cgit v1.2.3 From 46da97fba53d488cfd807021504de081fcd8fe56 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 19 Dec 2019 22:35:58 -0500 Subject: mac build --- bin/build-distribution-archives | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'bin') diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index d1a30014..4aa83edf 100755 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -2,18 +2,9 @@ # TRAVIS_BRANCH is the branch name or the name of the tag. VERSION="$(echo ${TRAVIS_BRANCH:-${GITHUB_REF}} | tr / -)" -OS="${TRAVIS_OS_NAME:-$(uname)}" +OS="${TRAVIS_OS_NAME:-${BUILD:-$(uname)}}" ARCH="$(uname -m)" -MACVERSION="${TRAVIS_OSX_IMAGE}" -if [ "${MACVERSION}" = "xcode9.2" ]; then - MACVERSION="sierra" -elif [ "${MACVERSION}" = "xcode9.4" ]; then - MACVERSION="high_sierra" -elif [ "${MACVERSION}" = "xcode10.2" ]; then - MACVERSION="mojave" -fi - cp -a images/examples palettes symbols fonts dist/inkstitch cp -a icons locales print dist/inkstitch/bin @@ -31,13 +22,6 @@ for d in inx/*; do cp $d/*.inx dist cd dist - if [ "$BUILD" = "windows" ]; then - echo - python -m zipfile -c ../artifacts/inkstitch-${VERSION}-win32-${lang}.zip * - elif [ "$BUILD" = "osx" ]; then - tar zcf ../artifacts/inkstitch-${VERSION}-${OS}-${MACVERSION}-${ARCH}-$lang.tar.gz * - else - tar zcf ../artifacts/inkstitch-${VERSION}-${OS}-${ARCH}-$lang.tar.gz * - fi + python -m zipfile -c ../artifacts/inkstitch-${VERSION}-${OS}-${lang}.zip * cd .. done -- cgit v1.2.3 From 8614760b743b4bde1e2e148c66c424214c5d1809 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 15:39:45 -0500 Subject: use python -m for pyinstaller --- bin/build-python | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/build-python b/bin/build-python index 7326e371..bbd2af87 100755 --- a/bin/build-python +++ b/bin/build-python @@ -35,11 +35,11 @@ pyinstaller_args+="-p inkscape/share/extensions " pyinstaller_args+="--log-level DEBUG " if [ "$BUILD" = "windows" ]; then - pyinstaller $pyinstaller_args inkstitch.py + python -m PyInstaller $pyinstaller_args inkstitch.py else # without the LD_LIBRARY_PATH, it seems that pyinstaller can't find all of # wxpython's shared libraries - LD_LIBRARY_PATH="${site_packages}/wx" pyinstaller $pyinstaller_args --strip inkstitch.py; + LD_LIBRARY_PATH="${site_packages}/wx" python -m PyInstaller $pyinstaller_args --strip inkstitch.py; fi # pyinstaller put a whole mess of libraries under dist/inkstitch. We'd like -- cgit v1.2.3 From 6573b167958ff1de882466acc455d2dfed767fe1 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 27 Jan 2020 22:22:22 -0500 Subject: remove obselete TRAVIS_ references --- bin/build-distribution-archives | 5 ++--- bin/build-python | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index 4aa83edf..0fcadb59 100755 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -1,8 +1,7 @@ #!/bin/bash -# TRAVIS_BRANCH is the branch name or the name of the tag. -VERSION="$(echo ${TRAVIS_BRANCH:-${GITHUB_REF}} | tr / -)" -OS="${TRAVIS_OS_NAME:-${BUILD:-$(uname)}}" +VERSION="$(echo ${GITHUB_REF} | tr / -)" +OS="${BUILD:-$(uname)}" ARCH="$(uname -m)" cp -a images/examples palettes symbols fonts dist/inkstitch diff --git a/bin/build-python b/bin/build-python index bbd2af87..69058593 100755 --- a/bin/build-python +++ b/bin/build-python @@ -4,7 +4,7 @@ set -e site_packages="$(python -c "import os; print(os.path.dirname(os.__file__) + '/site-packages')")" -if [ "$TRAVIS_OS_NAME" = "linux" -a "$BUILD" != "windows" ]; then +if [ "$BUILD" = "linux" ]; then # pyinstaller misses these two pyinstaller_args+="--add-binary /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so:. " pyinstaller_args+="--add-binary /usr/lib/x86_64-linux-gnu/libproxy.so.1:. " @@ -24,7 +24,7 @@ pyinstaller_args+="--hidden-import wx " # We need to use the precompiled bootloader linked with graphical Mac OS X # libraries if we develop a GUI application for Mac: -if [ "$TRAVIS_OS_NAME" = "osx" ]; then +if [ "$BUILD" = "osx" ]; then pyinstaller_args+="--windowed " fi @@ -52,7 +52,7 @@ mv dist/inkstitch/* dist/bin mv dist/bin dist/inkstitch # on Mac, pyinstaller creates a .app version as well, but we don't need that -if [ "$TRAVIS_OS_NAME" = "osx" ]; then +if [ "$BUILD" = "osx" ]; then rm -rf dist/inkstitch.app/ fi -- cgit v1.2.3 From 6c81429111727cb6bccfa29354396c7782b65e2b Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 30 Jan 2020 23:57:17 -0500 Subject: fix fonts on windows --- bin/build-distribution-archives | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index 0fcadb59..825db510 100755 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -17,10 +17,16 @@ mkdir artifacts for d in inx/*; do lang=${d%.*} - lang=${lang#*/} + lang=${lang#*/} cp $d/*.inx dist cd dist - python -m zipfile -c ../artifacts/inkstitch-${VERSION}-${OS}-${lang}.zip * - cd .. + if [ "$BUILD" = "windows" ]; then + # The python zipfile command line utility can't handle directories + # containing files with UTF-8 names on Windows, so we use 7-zip instead. + 7z a ../artifacts/inkstitch-${VERSION}-${OS}-${lang}.zip * + else + python -m zipfile -c ../artifacts/inkstitch-${VERSION}-${OS}-${lang}.zip * + fi + cd .. done -- cgit v1.2.3