summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2024-05-01 19:34:25 +0200
committerGitHub <noreply@github.com>2024-05-01 19:34:25 +0200
commit2ee4175437bbfcddf98e5eacba9b019113716ac8 (patch)
treeaff6c7c9adfc27f0f33ab4e14edcf17829dbb282 /bin
parenteb64c88a8bf9c8fe66c33a5309d28e526b994d25 (diff)
Remove electron entirely (#2859)
Co-authored-by: rejbasket
Diffstat (limited to 'bin')
-rw-r--r--bin/build-distribution-archives18
-rwxr-xr-xbin/build-electron27
-rwxr-xr-xbin/build-python8
-rwxr-xr-xbin/generate-flaskserverport-file12
-rwxr-xr-xbin/style-check2
5 files changed, 7 insertions, 60 deletions
diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives
index 3565e3f5..b33aa2e5 100644
--- a/bin/build-distribution-archives
+++ b/bin/build-distribution-archives
@@ -4,21 +4,13 @@ ARCH="$(uname -m)"
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
+ cp -a icons locales print LICENSE VERSION palettes symbols fonts tiles dbus inx dist/inkstitch.app/Contents/Resources
# adding version to 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/"
- # Checking arch of macos and setting path of electron for arm64 or intel
- echo "Checking for macOS arch."
- if [ "${ARCH}" = "arm64" ]; then
- ELECTRON_BUILD_PATH="electron/build/mac-arm64"
- echo "found arm64"
- else
- ELECTRON_BUILD_PATH="electron/build/mac"
- echo "found intel"
- fi
+
# inside the scripts folder are:
# - preinstaller (checks for previously installed inkstitch and deletes it, Inkscape check with error message) and
# - postinstaller (moves inkstitch folder from /tmp to user Inkscape extensions folder in $HOME)
@@ -33,8 +25,6 @@ if [ "$BUILD" = "osx" ]; then
# This code signs and notarize the inkstitch.app
DEV_IDENT="Developer ID Application: Lex Neva (929A568N58)"
echo "Signing of inkstitch.app"
- # Coyping inkstitch-gui.app into inkstitch
- ditto "${ELECTRON_BUILD_PATH}" dist/inkstitch.app/Contents/Frameworks/electron
# signing the binary may fix notary issue
/usr/bin/codesign -s "${DEV_IDENT}" \
--deep \
@@ -55,7 +45,6 @@ if [ "$BUILD" = "osx" ]; then
INSTALLER_IDENT="Developer ID Installer: Lex Neva (929A568N58)"
/usr/bin/pkgbuild --root dist/inkstitch.app \
-s "${INSTALLER_IDENT}" \
- --component-plist installer_scripts/inkstitch.plist \
--ownership recommended \
--identifier org.inkstitch.installer \
--version ${VERSION} \
@@ -90,9 +79,7 @@ if [ "$BUILD" = "osx" ]; then
fi
else
# local builds will not be signed or notarized
- cp -a "${ELECTRON_BUILD_PATH}" dist/inkstitch.app/Contents/Frameworks/electron
pkgbuild --root dist/inkstitch.app \
- --component-plist installer_scripts/inkstitch.plist \
--ownership recommended \
--identifier org.inkstitch.installer \
--version ${VERSION} \
@@ -107,7 +94,6 @@ if [ "$BUILD" = "osx" ]; then
else
cp -a images/examples palettes symbols fonts tiles dbus inx LICENSE VERSION dist/inkstitch
cp -a icons locales print dist/inkstitch/bin
- cp -a electron/build/*-unpacked dist/inkstitch/electron
fi
if [ "$BUILD" = "windows" ]; then
diff --git a/bin/build-electron b/bin/build-electron
deleted file mode 100755
index 51bb7de4..00000000
--- a/bin/build-electron
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-ARCH=$(python -c "import platform; n = platform.architecture()[0]; print(n)")
-
-set -e
-set -x
-
-if [ "$BUILD" = "windows" ]; then
- if [ "$ARCH" = "32bit" ]; then
- args="-w --ia32"
- else
- args="-w --x64"
- fi
-elif [ "$BUILD" = "linux" ]; then
- args="-l"
-elif [ "$BUILD" = "osx" ]; then
- cp installer_scripts/electron-entitlements.plist electron/build/
- args="-m"
-fi
-
-# electron version setting on release
-if [[ "$VERSION" =~ ^v[0-9][.0-9]+$ ]]; then
- sed -i'' -e 's/11.99.11/'"${VERSION#v}"'/' electron/package.json
-fi
-cd electron
-which yarn > /dev/null 2>&1 || npm install -g yarn
-yarn --link-duplicates --pure-lockfile
-yarn run dist ${args}
diff --git a/bin/build-python b/bin/build-python
index cd3e84a2..e6fcf667 100755
--- a/bin/build-python
+++ b/bin/build-python
@@ -17,7 +17,7 @@ pyinstaller_args+="--log-level DEBUG "
# This adds bundle identifier in reverse DSN format for macos
if [ "$BUILD" = "osx" ]; then
pyinstaller_args+="--osx-bundle-identifier org.inkstitch.app "
- pyinstaller_args+="-i electron/build/icons/mac/inkstitch.icns "
+ pyinstaller_args+="-i images/inkstitch/mac/inkstitch.icns "
if [[ -z ${GITHUB_REF} ]]; then
echo "Dev or Local Build"
else
@@ -43,11 +43,11 @@ if [ "$BUILD" = "windows" ]; then
done;
sed -i'' 's/3, 2, 1,/'"${INFO_VERSION[0]}, ${INFO_VERSION[1]}, ${INFO_VERSION[2]},"'/' installer_scripts/file_version_info.txt
fi
- # set year and version in version_info
+ # set year and version in version_info
sed -i'' 's/1.1.1/'"${VERSION#v}"'/' installer_scripts/file_version_info.txt
sed -i'' 's/1234/'"${info_year}"'/' installer_scripts/file_version_info.txt
- # sets icon to inkstitch.exe
- pyinstaller_args+="--i electron/build/icons/win/inkstitch.ico "
+ # sets icon to inkstitch.exe
+ pyinstaller_args+="-i images/inkstitch/win/inkstitch.ico "
pyinstaller_args+="--version-file installer_scripts/file_version_info.txt "
python -m PyInstaller $pyinstaller_args inkstitch.py
elif [ "$BUILD" = "osx" ]; then
diff --git a/bin/generate-flaskserverport-file b/bin/generate-flaskserverport-file
deleted file mode 100755
index d13239e9..00000000
--- a/bin/generate-flaskserverport-file
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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/style-check b/bin/style-check
index 81d237c4..bdac3a76 100755
--- a/bin/style-check
+++ b/bin/style-check
@@ -5,4 +5,4 @@
# Instead of files, "--diff" may be passed to check only the lines changed
# by a diff piped to standard input.
-flake8 --count --max-complexity=10 --max-line-length=150 --statistics --exclude=pyembroidery,__init__.py,electron,build,src,dist,./*-metadata.py,./pyembroidery-format-descriptions.py "${@:-.}"
+flake8 --count --max-complexity=10 --max-line-length=150 --statistics --exclude=pyembroidery,__init__.py,build,src,dist,./*-metadata.py,./pyembroidery-format-descriptions.py "${@:-.}"