summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorrejbasket <39080670+rejbasket@users.noreply.github.com>2023-05-22 22:33:19 +0200
committerGitHub <noreply@github.com>2023-05-22 22:33:19 +0200
commitef6f6580df6e8fbce913eecc1fe7e0f8caf1315b (patch)
treec1119a5d1affd44ad27e60cc6981ac98534c518d /bin
parentda54f104e6bf5d0e98f7479cf1d060c76e0b01f2 (diff)
Update electron version to v14.2.9 (#2214)
Authored-by: rejbasket Co-authored-by: Kaalleen Co-authored-by: Lex Neva
Diffstat (limited to 'bin')
-rw-r--r--bin/build-distribution-archives4
-rwxr-xr-xbin/build-electron9
-rwxr-xr-xbin/build-python25
-rwxr-xr-x[-rw-r--r--]bin/build-windows-installer2
-rwxr-xr-xbin/generate-flaskserverport-file12
-rw-r--r--bin/notarize-app46
6 files changed, 16 insertions, 82 deletions
diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives
index a79ad641..b44cad46 100644
--- a/bin/build-distribution-archives
+++ b/bin/build-distribution-archives
@@ -1,4 +1,4 @@
-VERSION="$(echo ${GITHUB_REF} | sed -e 's|refs/heads/||' -e 's|refs/tags/||' -e 's|/|-|g')"
+VERSION="${VERSION:-$(echo ${GITHUB_REF} | sed -e 's|refs/heads/||' -e 's|refs/tags/||' -e 's|/|-|g')}"
OS="${BUILD:-$(uname)}"
ARCH="$(uname -m)"
mkdir artifacts
@@ -6,7 +6,7 @@ mkdir artifacts
if [ "$BUILD" = "osx" ]; then
cp -a icons locales print LICENSE VERSION images/examples palettes symbols fonts tiles dbus inx dist/inkstitch.app/Contents/Resources
# adding version to Info.plist
- sed -i '' 's/0.0.0/'${VERSION}'/' dist/inkstitch.app/Contents/Info.plist
+ plutil -replace CFBundleShortVersionString -string ${VERSION} dist/inkstitch.app/Contents/Info.plist
rm -rf dist/inkstitch/
# Install location for pkgbuild
PKG_INSTALL_PATH="/tmp/inkstitch/"
diff --git a/bin/build-electron b/bin/build-electron
index b0e93572..cdc98f9d 100755
--- a/bin/build-electron
+++ b/bin/build-electron
@@ -2,15 +2,6 @@
set -e
set -x
-ARCH="$(uname -m)"
-# Check for cpu arch to build mac and linux electron arch
-if [[ "$ARCH" = "arm64" ]] || [[ "$ARCH" = "aarch64" ]]; then
- echo "Found ARM"
- sed -i'' -e 's/CPU_ARCH/'arm64'/' electron/package.json
-else
- echo "Found x64"
- sed -i'' -e 's/CPU_ARCH/'x64'/' electron/package.json
-fi
if [ "$BUILD" = "windows" ]; then
args="-w --ia32"
diff --git a/bin/build-python b/bin/build-python
index 92e1802a..b8dd61ba 100755
--- a/bin/build-python
+++ b/bin/build-python
@@ -2,26 +2,6 @@
set -e
info_year=$( date "+%Y" )
-site_packages="$(python -c "import os; print(os.path.dirname(os.__file__) + '/site-packages')")"
-arch=$(uname -m)
-if [ "$BUILD" = "linux" ]; then
- pyinstaller_args+="--add-binary /usr/lib/"$arch"-linux-gnu/gio/modules/libgiolibproxy.so:. "
- pyinstaller_args+="--add-binary /usr/lib/"$arch"-linux-gnu/libproxy.so.1:. "
- pyinstaller_args+="--add-binary /lib/"$arch"-linux-gnu/libnsl.so.1:. "
- pyinstaller_args+="--add-binary /usr/lib/"$arch"-linux-gnu/libxcb.so.1:. "
-fi
-
-# This one's tricky. ink/stitch doesn't actually _use_ gi.repository.Gtk,
-# but it does use GTK (through wxPython). pyinstaller has some special
-# logic to handle GTK apps that is engaged when you import
-# gi.repository.Gtk that pulls in things like themes, icons, etc. Without
-# that, the Params dialog is unthemed and barely usable. This hidden
-# import option is actually the only reason we had to install python-gi
-# above!
-pyinstaller_args+="--hidden-import gi.repository.Gtk "
-
-# mac and windows build seem to miss wx import
-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:
@@ -29,9 +9,6 @@ if [ "$BUILD" = "osx" -o "$BUILD" = "windows" ]; then
pyinstaller_args+="--windowed "
fi
-# This lets pyinstaller see inkex.py, etc.
-pyinstaller_args+="-p inkscape/share/extensions "
-
# output useful debugging info that helps us trace library dependency issues
pyinstaller_args+="--log-level DEBUG "
@@ -67,7 +44,7 @@ if [ "$BUILD" = "windows" ]; then
pyinstaller_args+="--version-file installer_scripts/file_version_info.txt "
python -m PyInstaller $pyinstaller_args inkstitch.py
else
- LD_LIBRARY_PATH="${site_packages}/wx" python -m PyInstaller $pyinstaller_args --strip inkstitch.py;
+ python -m PyInstaller $pyinstaller_args --strip inkstitch.py;
fi
# pyinstaller put a whole mess of libraries under dist/inkstitch. We'd like
diff --git a/bin/build-windows-installer b/bin/build-windows-installer
index a2d421ce..90f72d71 100644..100755
--- a/bin/build-windows-installer
+++ b/bin/build-windows-installer
@@ -1,5 +1,5 @@
#!/bin/bash
-VERSION="$(echo ${GITHUB_REF} | sed -e 's|refs/heads/||' -e 's|refs/tags/||' -e 's|/|-|g')"
+VERSION="${VERSION:-$(echo ${GITHUB_REF} | sed -e 's|refs/heads/||' -e 's|refs/tags/||' -e 's|/|-|g')}"
OS="${BUILD:-$(uname)}"
# Create windows installer
mkdir win
diff --git a/bin/generate-flaskserverport-file b/bin/generate-flaskserverport-file
new file mode 100755
index 00000000..d13239e9
--- /dev/null
+++ b/bin/generate-flaskserverport-file
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+
+import os
+from json import dump
+from os.path import dirname
+
+path = os.path.join(dirname(dirname(__file__)), 'electron', 'src', 'lib', 'flaskserverport.json')
+
+data = {"_comment1" : "port should not be declared when commiting"}
+# write data to font.json into the same directory as the font file
+with open(path, 'w', encoding="utf8") as output:
+ dump(data, output, indent=4, ensure_ascii=False)
diff --git a/bin/notarize-app b/bin/notarize-app
deleted file mode 100644
index 4a2bbc41..00000000
--- a/bin/notarize-app
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh -u
-# source of this code: https://github.com/rednoah/notarize-app
-ASC_PROVIDER="$1"
-ASC_USERNAME="$2"
-ASC_PASSWORD="$3"
-
-BUNDLE_ID="$4"
-BUNDLE_PKG="$5"
-
-
-# create temporary files
-NOTARIZE_APP_LOG=$(mktemp -t notarize-app)
-NOTARIZE_INFO_LOG=$(mktemp -t notarize-info)
-
-# delete temporary files on exit
-function finish {
- rm "$NOTARIZE_APP_LOG" "$NOTARIZE_INFO_LOG"
-}
-trap finish EXIT
-
-
-# submit app for notarization
-if xcrun altool --notarize-app --primary-bundle-id "$BUNDLE_ID" --asc-provider "$ASC_PROVIDER" --username "$ASC_USERNAME" --password "$ASC_PASSWORD" -f "$BUNDLE_PKG" > "$NOTARIZE_APP_LOG" 2>&1; then
- cat "$NOTARIZE_APP_LOG"
- RequestUUID=$(awk -F ' = ' '/RequestUUID/ {print $2}' "$NOTARIZE_APP_LOG")
-
- # check status periodically
- while sleep 60 && date; do
- # check notarization status
- if xcrun altool --notarization-info "$RequestUUID" --asc-provider "$ASC_PROVIDER" --username "$ASC_USERNAME" --password "$ASC_PASSWORD" > "$NOTARIZE_INFO_LOG" 2>&1; then
- cat "$NOTARIZE_INFO_LOG"
-
- # once notarization is complete, run stapler and exit
- if ! grep -q "Status: in progress" "$NOTARIZE_INFO_LOG"; then
- xcrun stapler staple "$BUNDLE_PKG"
- exit $?
- fi
- else
- cat "$NOTARIZE_INFO_LOG" 1>&2
- exit 1
- fi
- done
-else
- cat "$NOTARIZE_APP_LOG" 1>&2
- exit 1
-fi