From eda35b676273c693ffa74190202808056b520eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 21 Jan 2024 12:01:27 +0100 Subject: [PATCH] Made the Windows installer more modular Enable separately selecting the Qt6, OpenSSL or ANGLE options. Added ICU option for Qt builds with ICU enabled/required. --- .appveyor.yml | 9 +++---- pkg/windows/gpxsee64.nsi | 54 +++++++++++++++++++++++++++++----------- 2 files changed, 44 insertions(+), 19 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index a890b201..a19118c8 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -11,11 +11,10 @@ environment: matrix: - QTDIR: C:\Qt\5.15\msvc2019_64 OPENSSLDIR: C:\OpenSSL-v111-Win64\bin - OPENSSLVERSION: 1_1 + NSISDEF: /OPENSSL /ANGLE - QTDIR: C:\Qt\6.5\msvc2019_64 OPENSSLDIR: C:\OpenSSL-v30-Win64\bin - OPENSSLVERSION: 3 - NSISDEF: /DQT6 + NSISDEF: /DQT6 /OPENSSL install: - cmd: |- @@ -37,8 +36,8 @@ build_script: xcopy lang\*.qm installer\translations\ /sy xcopy icons\symbols installer\symbols /i copy licence.txt installer - copy %OPENSSLDIR%\libcrypto-%OPENSSLVERSION%-x64.dll installer - copy %OPENSSLDIR%\libssl-%OPENSSLVERSION%-x64.dll installer + copy %OPENSSLDIR%\libcrypto-*-x64.dll installer + copy %OPENSSLDIR%\libssl-*-x64.dll installer makensis.exe %NSISDEF% installer\gpxsee64.nsi diff --git a/pkg/windows/gpxsee64.nsi b/pkg/windows/gpxsee64.nsi index 439649c1..e9e62ca0 100644 --- a/pkg/windows/gpxsee64.nsi +++ b/pkg/windows/gpxsee64.nsi @@ -249,7 +249,7 @@ Section "GPXSee" SEC_APP SectionEnd -Section "QT framework" SEC_QT +Section "Qt framework" SEC_QT SectionIn RO @@ -281,6 +281,7 @@ Section "QT framework" SEC_QT File /r "printsupport" !endif File /r "platforms" + File /r "iconengines" File /r "imageformats" File /r "styles" File /r "sqldrivers" @@ -299,21 +300,30 @@ Section "MSVC runtime" SEC_MSVC SectionEnd +!ifdef ICU +Section "ICU" SEC_ICU + + SectionIn RO + + File "icudt*.dll" + File "icuin*.dll" + File "icuuc*.dll" + +SectionEnd +!endif + +!ifdef OPENSSL Section "OpenSSL" SEC_OPENSSL SectionIn RO -!ifdef QT6 - File "libcrypto-3-x64.dll" - File "libssl-3-x64.dll" -!else - File "libcrypto-1_1-x64.dll" - File "libssl-1_1-x64.dll" -!endif + File "libcrypto-*-x64.dll" + File "libssl-*-x64.dll" SectionEnd +!endif -!ifndef QT6 +!ifdef ANGLE Section "ANGLE" SEC_ANGLE File "libGLESv2.dll" @@ -469,13 +479,24 @@ SectionEnd ; Descriptions ; Language strings +!ifdef QT6 LangString DESC_QT ${LANG_ENGLISH} \ - "QT cross-platform application framework." + "Qt6 cross-platform application framework." +!else +LangString DESC_QT ${LANG_ENGLISH} \ + "Qt5 cross-platform application framework." +!endif LangString DESC_MSVC ${LANG_ENGLISH} \ - "Microsoft Visual C++ 2019 runtime. If already installed, will be skipped." + "Microsoft Visual C++ runtime. If already installed, will be skipped." +!ifdef ICU +LangString DESC_ICU ${LANG_ENGLISH} \ + "ICU library. Required for character set/encoding conversions." +!endif +!ifdef OPENSSL LangString DESC_OPENSSL ${LANG_ENGLISH} \ - "OpenSSL library. Required for HTTPS to work." -!ifndef QT6 + "OpenSSL library. Qt SSL/TLS backend for HTTPS." +!endif +!ifdef ANGLE LangString DESC_ANGLE ${LANG_ENGLISH} \ "ANGLE (OpenGL via Direct3D). Enables OpenGL on systems without native OpenGL drivers." !endif @@ -487,8 +508,13 @@ LangString DESC_LOCALIZATION ${LANG_ENGLISH} \ ; Assign language strings to sections !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SEC_QT} $(DESC_QT) +!ifdef ICU + !insertmacro MUI_DESCRIPTION_TEXT ${SEC_ICU} $(DESC_ICU) +!endif +!ifdef OPENSSL !insertmacro MUI_DESCRIPTION_TEXT ${SEC_OPENSSL} $(DESC_OPENSSL) -!ifndef QT6 +!endif +!ifdef ANGLE !insertmacro MUI_DESCRIPTION_TEXT ${SEC_ANGLE} $(DESC_ANGLE) !endif !insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)