diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/build-distribution-archives | 36 | ||||
| -rwxr-xr-x | bin/build-electron | 11 | ||||
| -rwxr-xr-x | bin/build-python | 10 |
3 files changed, 25 insertions, 32 deletions
diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index bbc61996..825db510 100755 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -1,16 +1,8 @@ -# TRAVIS_BRANCH is the branch name or the name of the tag. -VERSION="$(echo ${TRAVIS_BRANCH} | tr / -)" -OS="${TRAVIS_OS_NAME}" -ARCH="$(uname -m)" +#!/bin/bash -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 +VERSION="$(echo ${GITHUB_REF} | tr / -)" +OS="${BUILD:-$(uname)}" +ARCH="$(uname -m)" cp -a images/examples palettes symbols fonts dist/inkstitch cp -a icons locales print dist/inkstitch/bin @@ -21,18 +13,20 @@ else cp -a electron/dist/*-unpacked dist/inkstitch/electron fi +mkdir artifacts + for d in inx/*; do lang=${d%.*} - lang=${lang#*/} + lang=${lang#*/} cp $d/*.inx dist cd dist - if [ "$BUILD" = "windows" ]; then - zip -r ../inkstitch-${VERSION}-win32-${lang}.zip * - elif [ "$BUILD" = "osx" ]; then - tar zcf ../inkstitch-${VERSION}-${OS}-${MACVERSION}-${ARCH}-$lang.tar.gz * - else - tar zcf ../inkstitch-${VERSION}-${OS}-${ARCH}-$lang.tar.gz * - fi - 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 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..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 @@ -35,11 +35,11 @@ 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 + 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 @@ -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 |
