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>
pull/2461/head
rejbasket 2023-07-30 16:01:43 +02:00 zatwierdzone przez GitHub
rodzic 647f012190
commit 96df68c46f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 76 dodań i 9 usunięć

Wyświetl plik

@ -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-windows'
name: 'inkstitch-windows32'
path: 'artifacts/'
if: always()
- name: download windows64
uses: actions/download-artifact@v3
with:
name: 'inkstitch-windows64'
path: 'artifacts/'
if: always()
- name: download mac

Wyświetl plik

@ -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

Wyświetl plik

@ -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 ..

Wyświetl plik

@ -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