From b62ab4636763ab4571d9bf6c29051e90b6549d64 Mon Sep 17 00:00:00 2001 From: Hernan Martinez Date: Sun, 8 Oct 2023 18:49:53 -0600 Subject: [PATCH 1/7] Fix _qt_paths generation --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2d92cf0e57b35..ecf00a1bedc2c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -614,7 +614,7 @@ IF(WIN32) IF("${QT_PATHS}" STREQUAL "") SET(_qt_paths "") ELSE() - SET(_qt_paths "--qtpaths \"${QTPATHS}\"") + SET(_qt_paths "--qtpaths \"${QT_PATHS}\"") ENDIF() INSTALL(CODE From 9a5c5571f4c7cc7865a9dc6e7f86ffe282f98e64 Mon Sep 17 00:00:00 2001 From: Hernan Martinez Date: Sun, 8 Oct 2023 20:02:40 -0600 Subject: [PATCH 2/7] Workaround QtMultimedia only needed for 6.4.0 only --- src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ecf00a1bedc2c..8352de8bb342b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -589,7 +589,7 @@ IF(APPLE) ) ENDIF() # workaround for https://bugreports.qt.io/browse/QTBUG-105984 - IF(ENABLE_MEDIA AND (${QT_VERSION} VERSION_GREATER_EQUAL "6.4.0")) + IF(ENABLE_MEDIA AND (${QT_VERSION} VERSION_EQUAL "6.4.0")) GET_FILENAME_COMPONENT(_qt_bin_dir "${MACDEPLOYQT_COMMAND}" DIRECTORY) INSTALL(FILES ${_qt_bin_dir}/../plugins/multimedia/libdarwinmediaplugin.dylib DESTINATION PlugIns/multimedia) ENDIF() @@ -653,7 +653,7 @@ IF(WIN32) ) ENDIF() # workaround for https://bugreports.qt.io/browse/QTBUG-105984 - IF(ENABLE_MEDIA AND (${QT_VERSION} VERSION_GREATER_EQUAL "6.4.0")) + IF(ENABLE_MEDIA AND (${QT_VERSION} VERSION_EQUAL "6.4.0")) GET_FILENAME_COMPONENT(_qt_bin_dir "${WINDEPLOYQT_COMMAND}" DIRECTORY) INSTALL(FILES ${_qt_bin_dir}/../plugins/multimedia/windowsmediaplugin.dll DESTINATION ${CMAKE_INSTALL_PREFIX}/qtstuff/multimedia) ENDIF() From 802769c0298c59ca7aba7d4ee5ca7fe67778f716 Mon Sep 17 00:00:00 2001 From: Hernan Martinez Date: Sun, 8 Oct 2023 19:40:50 -0600 Subject: [PATCH 3/7] Simplify QT_PATHS generation now that STELLARIUM_BUILD_ARM64 is used --- .appveyor.yml | 2 +- src/CMakeLists.txt | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 66ed6461eed55..5368c614c8438 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -39,7 +39,7 @@ environment: qtver: 6.5 qtbin: msvc2019_arm64 msvcname: Visual Studio 17 2022 - cmake_args: -A ARM64 -DSTELLARIUM_BUILD_ARM64=ON -DQT_HOST_PATH=C:/Qt/6.5/msvc2019_64 -DQT_PATHS=C:/Qt/6.5/msvc2019_arm64/bin/qtpaths.bat -DENABLE_QTWEBENGINE=OFF + cmake_args: -A ARM64 -DSTELLARIUM_BUILD_ARM64=ON -DQT_HOST_PATH=C:/Qt/6.5/msvc2019_64 -DENABLE_QTWEBENGINE=OFF before_build: - ps: if($env:qtbin.contains('_64')) { $env:BITS=64 } else { $env:BITS=32 } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8352de8bb342b..c602344ec6583 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -611,10 +611,13 @@ IF(WIN32) SET(VIRTUAL_KBD_SETTING "--no-virtualkeyboard") ENDIF() - IF("${QT_PATHS}" STREQUAL "") - SET(_qt_paths "") - ELSE() + IF(STELLARIUM_BUILD_ARM64) + cmake_path(APPEND QT_PATHS ${QT6_INSTALL_PREFIX} "bin" "qtpaths.bat") + ENDIF() + IF(QT_PATHS) SET(_qt_paths "--qtpaths \"${QT_PATHS}\"") + ELSE() + SET(_qt_paths "") ENDIF() INSTALL(CODE From 283ae5a280146855919252e9815c286d4af64f12 Mon Sep 17 00:00:00 2001 From: Hernan Martinez Date: Sun, 8 Oct 2023 20:15:28 -0600 Subject: [PATCH 4/7] Require Qt 6.5.0 or higher for Windows on ARM builds --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a49de2fe2653a..b3c083fcb269d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -615,6 +615,10 @@ IF(WIN32) IF((NOT EXISTS ${OPENSSL_SSL_LIBRARY_DLL}) AND (NOT EXISTS ${OPENSSL_CRYPTO_LIBRARY_DLL})) SET(ISS_OPENSSL_LIBS "; OpenSSL libraries not found") ENDIF() + + IF(STELLARIUM_BUILD_ARM64 AND ${QT_VERSION} VERSION_LESS "6.5.0") + MESSAGE(FATAL_ERROR "Qt 6.5.0 or later is required for Windows on ARM builds.") + ENDIF() ENDIF() IF(APPLE) From f80468da03c7f0109d27e29249254ceae330c183 Mon Sep 17 00:00:00 2001 From: Hernan Martinez Date: Mon, 9 Oct 2023 23:29:00 -0600 Subject: [PATCH 5/7] Do not add OpenSSL to Windows ARM64 installer --- CMakeLists.txt | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3c083fcb269d..19a2feb5576a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -603,17 +603,19 @@ IF(WIN32) FIND_FILE(OPENSSL_CRYPTO_LIBRARY_DLL libcrypto-1_1${OPENSSL_LIBRARY_ARCH}.dll) ENDIF() - SET(ISS_OPENSSL_LIBS "; OpenSSL support") - IF(EXISTS ${OPENSSL_SSL_LIBRARY_DLL}) - MESSAGE(STATUS "Found OpenSSL SSL library: ${OPENSSL_SSL_LIBRARY_DLL}") - SET(ISS_OPENSSL_LIBS "${ISS_OPENSSL_LIBS}\nSource: \"${OPENSSL_SSL_LIBRARY_DLL}\"; DestDir: \"{app}\"; Flags: ignoreversion") - ENDIF() - IF(EXISTS ${OPENSSL_CRYPTO_LIBRARY_DLL}) - MESSAGE(STATUS "Found OpenSSL crypto library: ${OPENSSL_CRYPTO_LIBRARY_DLL}") - SET(ISS_OPENSSL_LIBS "${ISS_OPENSSL_LIBS}\nSource: \"${OPENSSL_CRYPTO_LIBRARY_DLL}\"; DestDir: \"{app}\"; Flags: ignoreversion") - ENDIF() - IF((NOT EXISTS ${OPENSSL_SSL_LIBRARY_DLL}) AND (NOT EXISTS ${OPENSSL_CRYPTO_LIBRARY_DLL})) - SET(ISS_OPENSSL_LIBS "; OpenSSL libraries not found") + IF(NOT STELLARIUM_BUILD_ARM64) + SET(ISS_OPENSSL_LIBS "; OpenSSL support") + IF(EXISTS ${OPENSSL_SSL_LIBRARY_DLL}) + MESSAGE(STATUS "Found OpenSSL SSL library: ${OPENSSL_SSL_LIBRARY_DLL}") + SET(ISS_OPENSSL_LIBS "${ISS_OPENSSL_LIBS}\nSource: \"${OPENSSL_SSL_LIBRARY_DLL}\"; DestDir: \"{app}\"; Flags: ignoreversion") + ENDIF() + IF(EXISTS ${OPENSSL_CRYPTO_LIBRARY_DLL}) + MESSAGE(STATUS "Found OpenSSL crypto library: ${OPENSSL_CRYPTO_LIBRARY_DLL}") + SET(ISS_OPENSSL_LIBS "${ISS_OPENSSL_LIBS}\nSource: \"${OPENSSL_CRYPTO_LIBRARY_DLL}\"; DestDir: \"{app}\"; Flags: ignoreversion") + ENDIF() + IF((NOT EXISTS ${OPENSSL_SSL_LIBRARY_DLL}) AND (NOT EXISTS ${OPENSSL_CRYPTO_LIBRARY_DLL})) + SET(ISS_OPENSSL_LIBS "; OpenSSL libraries not found") + ENDIF() ENDIF() IF(STELLARIUM_BUILD_ARM64 AND ${QT_VERSION} VERSION_LESS "6.5.0") From f9ba0a8bbc9f131abb91391938792af55acfc82d Mon Sep 17 00:00:00 2001 From: Hernan Martinez Date: Tue, 10 Oct 2023 11:51:34 -0600 Subject: [PATCH 6/7] [publish] Add qtpaths.bat workaround --- .appveyor.yml | 4 ++-- src/CMakeLists.txt | 7 ++++--- util/qtpaths_workaround.bat | 2 ++ 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 util/qtpaths_workaround.bat diff --git a/.appveyor.yml b/.appveyor.yml index 5368c614c8438..3169377e303eb 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -36,10 +36,10 @@ environment: msvcname: Visual Studio 15 2017 cmake_args: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - qtver: 6.5 + qtver: 6.5.2 qtbin: msvc2019_arm64 msvcname: Visual Studio 17 2022 - cmake_args: -A ARM64 -DSTELLARIUM_BUILD_ARM64=ON -DQT_HOST_PATH=C:/Qt/6.5/msvc2019_64 -DENABLE_QTWEBENGINE=OFF + cmake_args: -A ARM64 -DSTELLARIUM_BUILD_ARM64=ON -DQT_HOST_PATH=C:/Qt/6.5.2/msvc2019_64 -DENABLE_QTWEBENGINE=OFF -DENABLE_NLS=OFF -DQT_PATHS=%APPVEYOR_BUILD_FOLDER%/util/qtpaths_workaround.bat before_build: - ps: if($env:qtbin.contains('_64')) { $env:BITS=64 } else { $env:BITS=32 } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c602344ec6583..ba9ab4a558fa7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -611,9 +611,10 @@ IF(WIN32) SET(VIRTUAL_KBD_SETTING "--no-virtualkeyboard") ENDIF() - IF(STELLARIUM_BUILD_ARM64) - cmake_path(APPEND QT_PATHS ${QT6_INSTALL_PREFIX} "bin" "qtpaths.bat") - ENDIF() + # Use external workaround until https://github.com/appveyor/ci/issues/3892 is addressed + # IF(STELLARIUM_BUILD_ARM64) + # cmake_path(APPEND QT_PATHS ${QT6_INSTALL_PREFIX} "bin" "qtpaths.bat") + # ENDIF() IF(QT_PATHS) SET(_qt_paths "--qtpaths \"${QT_PATHS}\"") ELSE() diff --git a/util/qtpaths_workaround.bat b/util/qtpaths_workaround.bat new file mode 100644 index 0000000000000..ab3e5c6f6f50b --- /dev/null +++ b/util/qtpaths_workaround.bat @@ -0,0 +1,2 @@ +@echo off +C:\Qt\6.5.2\msvc2019_64\bin\qtpaths6.exe -qtconf "C:\Qt\6.5.2\msvc2019_arm64\bin\target_qt.conf" %* \ No newline at end of file From 6289a9ab2e6c0fbb16377c4ed8c4c659208c59f4 Mon Sep 17 00:00:00 2001 From: Hernan Martinez Date: Tue, 10 Oct 2023 20:06:55 -0600 Subject: [PATCH 7/7] [publish] Do not copy OpenGL ES binaries in Qt 6 builds --- .appveyor.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 3169377e303eb..52368a5ea36e9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -43,7 +43,7 @@ environment: before_build: - ps: if($env:qtbin.contains('_64')) { $env:BITS=64 } else { $env:BITS=32 } - - ps: if($env:qtver.contains('6.')) { $env:SSL="OpenSSL-" } else { $env:SSL="OpenSSL-1-" } + - ps: if($env:qtver.startsWith('6.')) { $env:SSL="OpenSSL-" } else { $env:SSL="OpenSSL-1-" } - set PUBLISH_BINARY=false - set USE_EXT_LIBGLES=false - set SIGNING=false @@ -54,9 +54,9 @@ before_build: - ps: if($env:APPVEYOR_REPO_BRANCH -eq "stellarium-oldstable") { $env:PUBLISH_BINARY = 'true' } - ps: if($env:APPVEYOR_REPO_COMMIT_MESSAGE.contains('[publish]')) { $env:PUBLISH_BINARY = 'true' } - ps: if($env:APPVEYOR_REPO_BRANCH -eq "stellarium-next" -or $env:APPVEYOR_REPO_COMMIT_MESSAGE.contains('[publish]')) { $env:USE_EXTRA_EXE = 'true' } else { $env:USE_EXTRA_EXE = 'false' } - - ps: if($env:PUBLISH_BINARY -eq "true" -and $env:qtver.contains('5.')) { $env:USE_EXT_LIBGLES = 'true' } - - ps: if($env:APPVEYOR_REPO_BRANCH -eq "stellarium-stable" -and $env:qtver.contains('6.')) { $env:SIGNING = 'true' } - - ps: if($env:APPVEYOR_REPO_BRANCH -eq "stellarium-oldstable" -and $env:qtver.contains('5.')) { $env:SIGNING = 'true' } + - ps: if($env:PUBLISH_BINARY -eq "true" -and $env:qtver.startsWith('5.')) { $env:USE_EXT_LIBGLES = 'true' } + - ps: if($env:APPVEYOR_REPO_BRANCH -eq "stellarium-stable" -and $env:qtver.startsWith('6.')) { $env:SIGNING = 'true' } + - ps: if($env:APPVEYOR_REPO_BRANCH -eq "stellarium-oldstable" -and $env:qtver.startsWith('5.')) { $env:SIGNING = 'true' } - if [%PUBLISH_BINARY%]==[true] appveyor DownloadFile https://github.com/Stellarium/stellarium-data/releases/download/guide/guide.pdf -FileName c:\stellarium\guide\guide.pdf - if [%PUBLISH_BINARY%]==[true] mkdir c:\stellarium-OpenSSL - if [%PUBLISH_BINARY%]==[true] set PATH=C:\stellarium-OpenSSL;%PATH%