summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-distribution-archives27
-rwxr-xr-xbin/build-electron20
-rwxr-xr-xbin/build-python (renamed from bin/build-dist)0
3 files changed, 47 insertions, 0 deletions
diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives
new file mode 100755
index 00000000..1015d246
--- /dev/null
+++ b/bin/build-distribution-archives
@@ -0,0 +1,27 @@
+# TRAVIS_BRANCH is the branch name or the name of the tag.
+VERSION="$(echo ${TRAVIS_BRANCH} | tr / -)"
+OS="${TRAVIS_OS_NAME}"
+ARCH="$(uname -m)"
+
+cp -a images/examples palettes symbols fonts dist/inkstitch
+cp -a icons locales print dist/inkstitch/bin
+
+if [ "$BUILD" = "osx" ]; then
+ cp -a electron/dist/mac dist/inkstitch/electron
+else
+ cp -a electron/dist/*-unpacked dist/inkstitch/electron
+fi
+
+for d in inx/*; do
+ lang=${d%.*}
+ lang=${lang#*/}
+ cp $d/*.inx dist
+
+ cd dist
+ if [ "$BUILD" = "windows" ]; then
+ zip -r ../inkstitch-${VERSION}-win32-${lang}.zip *
+ else
+ tar zcf ../inkstitch-${VERSION}-${OS}-${ARCH}-$lang.tar.gz *
+ fi
+ cd ..
+done \ No newline at end of file
diff --git a/bin/build-electron b/bin/build-electron
new file mode 100755
index 00000000..d8ce78b8
--- /dev/null
+++ b/bin/build-electron
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+if [ "$BUILD" = "windows" -o "$BUILD" = "linux" ]; then
+ if [ "$BUILD" = "windows" ]; then
+ args="-w --ia32"
+ else
+ args="-l --x64"
+ fi
+
+ docker run --rm \
+ -e ELECTRON_CACHE=$HOME/.cache/electron \
+ -v ${PWD}/electron:/project \
+ -v ~/.cache/electron:/root/.cache/electron \
+ electronuserland/builder:wine \
+ /bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn run dist ${args}"
+else
+ cd electron
+ npm install
+ npm run dist
+fi
diff --git a/bin/build-dist b/bin/build-python
index c740c782..c740c782 100755
--- a/bin/build-dist
+++ b/bin/build-python