summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrejbasket <39080670+rejbasket@users.noreply.github.com>2023-07-30 16:01:43 +0200
committerGitHub <noreply@github.com>2023-07-30 16:01:43 +0200
commit96df68c46f495de0f63d36b5130e7dfdc773198a (patch)
treea67c5b56318c8a64ad2bdd6f7e192aadab607b27
parent647f0121907e3679448c37bebb98a8966555054e (diff)
add windows 64bit version (#2413)
* test build for windows 64bit * testing build for windows 64bit * fixed arch check for windows file name added electron 64bit for windows * blocked 64bit installer to be installed in 32bit windows --------- Co-authored-by: rejbasket <rejbasket@users.noreply.github.com>
-rw-r--r--.github/workflows/build.yml63
-rwxr-xr-xbin/build-electron7
-rwxr-xr-xbin/build-windows-installer13
-rwxr-xr-xinstaller_scripts/template.iss2
4 files changed, 76 insertions, 9 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ec4864ec..3a0a50b1 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -90,7 +90,7 @@ jobs:
with:
name: inkstitch-linux
path: artifacts
- windows:
+ windows32:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
@@ -141,7 +141,54 @@ jobs:
folder: 'artifacts'
- uses: actions/upload-artifact@v3
with:
- name: inkstitch-windows
+ name: inkstitch-windows32
+ path: artifacts
+ windows64:
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: recursive
+ - uses: actions/setup-node@v3
+ with:
+ node-version: '16.x'
+ - uses: actions/setup-python@v4
+ with:
+ python-version: '3.8.x'
+ architecture: 'x64'
+ - uses: microsoft/setup-msbuild@v1.3.1
+ - name: install dependencies
+ shell: bash
+ run: |
+ git config --system core.longpaths true
+ python -m pip install --upgrade pip
+ python -m pip install wheel
+ python -m pip install -r requirements.txt
+ python -m pip install pyinstaller
+
+ echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH
+ - shell: bash
+ run: |
+ make dist
+ env:
+ BUILD: windows
+ - uses: dlemstra/code-sign-action@v1
+ with:
+ certificate: '${{ secrets.INKSTITCH_CODE_SIGNING_CERTIFICATE }}'
+ folder: 'dist'
+ recursive: true
+ - shell: bash
+ run: |
+ bash bin/build-windows-installer
+ env:
+ BUILD: windows
+ - uses: dlemstra/code-sign-action@v1
+ with:
+ certificate: '${{ secrets.INKSTITCH_CODE_SIGNING_CERTIFICATE }}'
+ folder: 'artifacts'
+ - uses: actions/upload-artifact@v3
+ with:
+ name: inkstitch-windows64
path: artifacts
mac:
runs-on: macos-11
@@ -204,7 +251,7 @@ jobs:
release:
runs-on: ubuntu-latest
- needs: [linux, windows, mac]
+ needs: [linux, windows32, windows64, mac]
if: always()
steps:
- name: determine release info
@@ -227,10 +274,16 @@ jobs:
with:
name: 'inkstitch-linux'
path: 'artifacts/'
- - name: download windows
+ - name: download windows32
+ uses: actions/download-artifact@v3
+ with:
+ name: 'inkstitch-windows32'
+ path: 'artifacts/'
+ if: always()
+ - name: download windows64
uses: actions/download-artifact@v3
with:
- name: 'inkstitch-windows'
+ name: 'inkstitch-windows64'
path: 'artifacts/'
if: always()
- name: download mac
diff --git a/bin/build-electron b/bin/build-electron
index cdc98f9d..51bb7de4 100755
--- a/bin/build-electron
+++ b/bin/build-electron
@@ -1,10 +1,15 @@
#!/bin/bash
+ARCH=$(python -c "import platform; n = platform.architecture()[0]; print(n)")
set -e
set -x
if [ "$BUILD" = "windows" ]; then
- args="-w --ia32"
+ if [ "$ARCH" = "32bit" ]; then
+ args="-w --ia32"
+ else
+ args="-w --x64"
+ fi
elif [ "$BUILD" = "linux" ]; then
args="-l"
elif [ "$BUILD" = "osx" ]; then
diff --git a/bin/build-windows-installer b/bin/build-windows-installer
index 90f72d71..bf7b8288 100755
--- a/bin/build-windows-installer
+++ b/bin/build-windows-installer
@@ -1,6 +1,7 @@
#!/bin/bash
VERSION="${VERSION:-$(echo ${GITHUB_REF} | sed -e 's|refs/heads/||' -e 's|refs/tags/||' -e 's|/|-|g')}"
OS="${BUILD:-$(uname)}"
+ARCH=$(python -c "import platform; n = platform.architecture()[0]; print(n)")
# Create windows installer
mkdir win
cp installer_scripts/template.iss win/win_build.iss
@@ -10,12 +11,20 @@ copyright_year="#define COPYRIGHT \""${info_year}"\""
version_block="#define VERSION \""${VERSION}"\""
sed -i'' -e '/;inkstitch-year/ a\'$'\n'"${copyright_year}"'' win/win_build.iss
sed -i'' -e '/;inkstitch-version/ a\'$'\n'"${version_block}"'' win/win_build.iss
+# set installer to stop 64bit version to be installed in 32bit Windows
+if [[ ${ARCH} == "64bit" ]]; then
+ echo "64"
+ sed -i'' -e '/;arch-allowed/ a\'$'\n'"ArchitecturesAllowed=x64 arm64"'' win/win_build.iss
+else
+ echo "32"
+ sed -i'' -e '/;arch-allowed/ a\'$'\n'"ArchitecturesAllowed=x86 x64 arm64"'' win/win_build.iss
+fi
iscc win/win_build.iss
-mv win/inkstitch.exe artifacts/inkstitch-${VERSION}-${OS}.exe
+mv win/inkstitch.exe artifacts/inkstitch-${VERSION}-${OS}-${ARCH}.exe
cd dist
echo "Creating zip"
# 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}.zip *
+7z a ../artifacts/inkstitch-${VERSION}-${OS}-${ARCH}.zip *
cd ..
diff --git a/installer_scripts/template.iss b/installer_scripts/template.iss
index 0dc18041..99ae6d33 100755
--- a/installer_scripts/template.iss
+++ b/installer_scripts/template.iss
@@ -23,9 +23,9 @@ AppUpdatesURL={#URL}
DefaultDirName={userappdata}\inkscape\extensions\
DefaultGroupName={#PROGRAMNAME}
; Remove the following line to run in administrative install mode (install for all users.)
-ArchitecturesAllowed=x64 x86 arm64
PrivilegesRequired=lowest
OutputBaseFilename=inkstitch
+;arch-allowed
OutputDir=.
Compression=lzma
SolidCompression=yes