Skip to content

Commit 4c57763

Browse files
committed
ci: add win32 build
Closes: #915
1 parent 5319ae6 commit 4c57763

File tree

7 files changed

+91
-16
lines changed

7 files changed

+91
-16
lines changed

‎.github/README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ Seamly2D is open source software released under the GPLv3+ license. Seamly2D is
2222
Learn more about Seamly2D by joining our friendly, active user [forum](https://forum.seamly.net) and reading our [Code of Conduct](CODE_OF_CONDUCT.md). On our forum you may post questions about patternmaking and Seamly2D in any language you choose, as sewing terms are rich with idioms that are not always translatable word-for-word.
2323

2424
## Supported platforms:
25-
* Windows 10 & 11 (64-bit)
25+
* Windows 10 & 11 (32-bit and 64-bit)
2626
* Most current Linux distros via [Flathub](https://flathub.org/apps/details/net.seamly.seamly2d)
2727
* Mac OS X 10.8 (64-bit) or later
2828

2929
## Download Seamly2D:
3030

31-
| Windows | MacOS | Linux AppImage | Linux Flatpak |
32-
| :---: | :---: | :---: | :---: |
33-
| [![Seamly2d-windows.zip](img/Microsoft_logo-60x60px.png)](https://github.com/FashionFreedom/Seamly2D/releases/latest/download/Seamly2D-windows.zip) | [<picture><source media="(prefers-color-scheme: dark)" srcset="img/white-apple-logo-transparent-49x60px.png"><source media="(prefers-color-scheme: light)" srcset="img/Apple_logo_black.png" ><img src="img/Apple_logo_black.png" height="60"></picture>](https://github.com/FashionFreedom/Seamly2D/releases/latest/download/Seamly2D-macos.zip) | [![Seamly2D-x86_64.AppImage](img/Tux_Mono_60x60.png)](https://github.com/FashionFreedom/Seamly2D/releases/latest/download/Seamly2D-x86_64.AppImage) | [<img src="https://flathub.org/assets/badges/flathub-badge-en.svg" alt="Download On Flathub" height="60">](https://flathub.org/apps/details/net.seamly.seamly2d) |
31+
| Windows 64-bit | Windows 32-bit | MacOS | Linux AppImage | Linux Flatpak |
32+
| :---: | :---: | :---: | :---: | :---: |
33+
| [![Seamly2d-windows.zip](img/Microsoft_logo-60x60px.png)](https://github.com/FashionFreedom/Seamly2D/releases/latest/download/Seamly2D-windows.zip) | [![Seamly2d-win32.zip](img/Microsoft_logo-60x60px.png)](https://github.com/FashionFreedom/Seamly2D/releases/latest/download/Seamly2D-win32.zip) | [<picture><source media="(prefers-color-scheme: dark)" srcset="img/white-apple-logo-transparent-49x60px.png"><source media="(prefers-color-scheme: light)" srcset="img/Apple_logo_black.png" ><img src="img/Apple_logo_black.png" height="60"></picture>](https://github.com/FashionFreedom/Seamly2D/releases/latest/download/Seamly2D-macos.zip) | [![Seamly2D-x86_64.AppImage](img/Tux_Mono_60x60.png)](https://github.com/FashionFreedom/Seamly2D/releases/latest/download/Seamly2D-x86_64.AppImage) | [<img src="https://flathub.org/assets/badges/flathub-badge-en.svg" alt="Download On Flathub" height="60">](https://flathub.org/apps/details/net.seamly.seamly2d) |
3434

3535
___________________________________________________
3636
## Seamly2D Community Resources:

‎.github/workflows/ci.yml‎

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ jobs:
171171
if-no-files-found: error
172172

173173
windows:
174-
name: 'Windows: Build'
174+
name: 'Windows 64-Bit: Build'
175175
runs-on: windows-latest
176176
needs: version
177177
env:
@@ -224,10 +224,66 @@ jobs:
224224
path: Seamly2D-windows.zip
225225
if-no-files-found: error
226226

227+
win32:
228+
name: 'Windows 32-Bit: Build'
229+
runs-on: windows-latest
230+
needs: version
231+
env:
232+
VERSION_NUMBER: ${{ needs.version.outputs.version_number }}
233+
234+
steps:
235+
- uses: actions/checkout@v3
236+
237+
- name: install msvc
238+
uses: ilammy/msvc-dev-cmd@v1
239+
with:
240+
# use Visual C++ 2022 latest, 14.34.xxxx
241+
toolset: '14.34'
242+
arch: amd64_x86
243+
244+
- uses: jurplel/install-qt-action@v3
245+
with:
246+
version: ${{ env.QT_VERSION }}
247+
arch: win32_msvc2019
248+
cache: true
249+
250+
- name: update version
251+
shell: bash
252+
run: |
253+
./scripts/version.sh ${VERSION_NUMBER}
254+
255+
- name: make seamly2d.exe and seamlyme.exe
256+
run: |
257+
qmake.exe Seamly2D.pro -config release CONFIG+=noTests
258+
nmake
259+
260+
- name: create seamly2d-installer.exe
261+
# copy seamly2d and seamlyme directory trees prepared by windeployqt and create installer
262+
# uses parameters in seamly2d-installer.nsi to create the installer exe
263+
run: |
264+
mkdir ..\windows-build
265+
Copy-Item -Path 'src\app\seamly2d\bin\*' -Destination ..\windows-build -Recurse
266+
Copy-Item -Path 'src\app\seamlyme\bin\*' -Destination ..\windows-build -Recurse -Force
267+
Copy-Item -Path dist\seamly2d-installer.nsi -Destination ..\windows-build
268+
cd ..\windows-build\
269+
& 'C:\Program Files (x86)\NSIS\makensis.exe' seamly2d-installer.nsi
270+
271+
- name: pack installer file into .zip
272+
run: |
273+
cd ..\windows-build\
274+
C:\"Program Files"\7-Zip\7z.exe a Seamly2D-win32.zip Seamly2D-installer.exe
275+
copy Seamly2D-win32.zip ..\Seamly2D\
276+
277+
- uses: actions/upload-artifact@v3
278+
with:
279+
name: Seamly2D-win32.zip
280+
path: Seamly2D-win32.zip
281+
if-no-files-found: error
282+
227283
publish:
228284
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'push'
229285
runs-on: ubuntu-latest
230-
needs: [version, windows, linux, macos]
286+
needs: [version, windows, win32, linux, macos]
231287
env:
232288
VERSION_NUMBER: ${{ needs.version.outputs.version_number }}
233289

@@ -241,6 +297,9 @@ jobs:
241297
- uses: actions/download-artifact@v3
242298
with:
243299
name: Seamly2D-windows.zip
300+
- uses: actions/download-artifact@v3
301+
with:
302+
name: Seamly2D-win32.zip
244303
- uses: softprops/action-gh-release@v1
245304
with:
246305
tag_name: v${{ env.VERSION_NUMBER }}
@@ -254,3 +313,4 @@ jobs:
254313
Seamly2D-x86_64.AppImage
255314
Seamly2D-macos.zip
256315
Seamly2D-windows.zip
316+
Seamly2D-win32.zip

‎common.pri‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,16 @@ win32{
3232
# customer's computer and tried interfacing with it. The version it found was too old though (from Qt 5.2 onwards v1.0.0
3333
# or later is required).
3434
#
35-
# Our solution was to distribute the OpenSSL DLLs along with our application (~1.65 MB). The alternative is to compile
35+
# Our solution was to distribute the OpenSSL DLLs along with our application (~7 MB). The alternative is to compile
3636
# Qt from scratch without OpenSSL support.
37+
#
38+
# Source of the openssl binaries: http://wiki.overbyte.eu/wiki/index.php/ICS_Download
3739
win32 {
3840
INSTALL_OPENSSL += \
3941
../../../dist/win/libcrypto-1_1-x64.dll \
40-
../../../dist/win/libssl-1_1-x64.dll
42+
../../../dist/win/libcrypto-1_1.dll \
43+
../../../dist/win/libssl-1_1-x64.dll \
44+
../../../dist/win/libssl-1_1.dll
4145
}
4246

4347
CONFIG(debug, debug|release){

‎dist/seamly2d-installer.nsi‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,16 @@ Section "Seamly2D"
2828

2929
SetOutPath $INSTDIR
3030

31-
File "vc_redist.x64.exe"
32-
33-
ExecWait '"$INSTDIR\vc_redist.x64.exe" /norestart'
31+
File /nonfatal "vc_redist.x64.exe"
32+
File /nonfatal "vc_redist.x86.exe"
33+
34+
IfFileExists $INSTDIR\vc_redist.x64.exe 0 vc_redist_x86
35+
ExecWait '"$INSTDIR\vc_redist.x64.exe" /quiet /norestart'
36+
goto after_vc_redist ;
37+
vc_redist_x86:
38+
IfFileExists $INSTDIR\vc_redist.x86.exe 0 after_vc_redist
39+
ExecWait '"$INSTDIR\vc_redist.x86.exe" /quiet /norestart'
40+
after_vc_redist:
3441

3542
; relative to the location of this .nsi file, copy all the files/directories recursively
3643
File /r *

‎dist/win/libcrypto-1_1.dll‎

2.28 MB
Binary file not shown.

‎dist/win/libssl-1_1.dll‎

703 KB
Binary file not shown.

‎src/libs/fervor/fvupdater.cpp‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,15 @@ void FvUpdater::getPLatformSpecificInstaller(QJsonArray assets) {
360360
#ifdef Q_OS_LINUX // Defined on Linux.
361361
auto searchPattern = "AppImage";
362362
#else
363-
#ifdef Q_OS_MAC // Defined on MAC OS (synonym for Darwin).
364-
auto searchPattern = "macos";
365-
#else
366-
auto searchPattern = "windows";
367-
#endif
363+
#ifdef Q_OS_MACOS // Defined on macOS
364+
auto searchPattern = "macos";
365+
#else
366+
#ifdef Q_OS_WIN64 // Defined on Windows 64-bit only.
367+
auto searchPattern = "windows";
368+
#else // Only windows 32-bit left
369+
auto searchPattern = "win32";
370+
#endif
371+
#endif
368372
#endif
369373

370374
for (const QJsonValueRef asset : assets) {

0 commit comments

Comments
 (0)