diff options
| author | rejbasket <39080670+rejbasket@users.noreply.github.com> | 2023-07-30 16:01:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-30 16:01:43 +0200 |
| commit | 96df68c46f495de0f63d36b5130e7dfdc773198a (patch) | |
| tree | a67c5b56318c8a64ad2bdd6f7e192aadab607b27 /bin/build-windows-installer | |
| parent | 647f0121907e3679448c37bebb98a8966555054e (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>
Diffstat (limited to 'bin/build-windows-installer')
| -rwxr-xr-x | bin/build-windows-installer | 13 |
1 files changed, 11 insertions, 2 deletions
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 .. |
