aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/nsis
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2023-06-05 20:51:09 +0100
committerJoão Valverde <j@v6e.pt>2023-06-06 11:23:34 +0000
commit3f348f5cace207038e7b910db89c9be2a767104e (patch)
tree2eb282790a1ce93af87ce5863641e97c3b59a39b /packaging/nsis
parent9cbc6377eb1b73e310f65ca3c704743593ccfe9c (diff)
CMake: Update some options
Try to autodetect ENABLE_SIGNED_NSIS and enable it if sign-wireshark.bat is detected on the path. Instead of skipping the whole Qt deployment, including things like translations, just skip the DLLs in the manifest. This is useful if the target machine has Qt installed and the static DLL list for cross-compiling is not adequate.
Diffstat (limited to 'packaging/nsis')
-rw-r--r--packaging/nsis/CMakeLists.txt7
-rw-r--r--packaging/nsis/wireshark-config.nsh.in1
-rw-r--r--packaging/nsis/wireshark.nsi3
3 files changed, 7 insertions, 4 deletions
diff --git a/packaging/nsis/CMakeLists.txt b/packaging/nsis/CMakeLists.txt
index 0953df178f..ac3f9edff5 100644
--- a/packaging/nsis/CMakeLists.txt
+++ b/packaging/nsis/CMakeLists.txt
@@ -14,7 +14,7 @@ set(WIRESHARK_NSIS_GENERATED_FILES
${CMAKE_CURRENT_BINARY_DIR}/wireshark-manifest.nsh
${CMAKE_CURRENT_BINARY_DIR}/wireshark-config.nsh
)
-if(NOT SKIP_NSIS_QT_DEPLOYMENT)
+if(NOT SKIP_NSIS_QT_DLLS)
list(APPEND WIRESHARK_NSIS_GENERATED_FILES ${CMAKE_CURRENT_BINARY_DIR}/wireshark-qt-manifest.nsh)
endif()
set(WIRESHARK_NSIS_GENERATED_FILES ${WIRESHARK_NSIS_GENERATED_FILES} PARENT_SCOPE)
@@ -65,7 +65,7 @@ set (MMDBRESOLVE_EXE ${MAXMINDDB_FOUND})
set (PRODUCT_VERSION ${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}.${PROJECT_BUILD_VERSION})
set (LOG_PRODUCT_VERSION ${LOG_PROJECT_MAJOR_VERSION}.${LOG_PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}.${PROJECT_BUILD_VERSION})
-if((BUILD_wireshark OR BUILD_logray) AND QT_FOUND AND NOT SKIP_NSIS_QT_DEPLOYMENT)
+if((BUILD_wireshark OR BUILD_logray) AND QT_FOUND)
set (QT_DIR "\${STAGING_DIR}")
endif()
@@ -277,7 +277,7 @@ macro( ADD_NSIS_PACKAGE_TARGETS )
# command-line-only installer packages.
if(BUILD_wireshark)
# wireshark-qt-manifest.nsh. Created using Wireshark.exe.
- if(NOT SKIP_NSIS_QT_DEPLOYMENT)
+ if(NOT SKIP_NSIS_QT_DLLS)
if (USE_REPOSITORY)
add_custom_command(OUTPUT ${_nsis_binary_dir}/wireshark-qt-manifest.nsh
COMMAND set "PATH=${QT_BIN_PATH};%PATH%"
@@ -335,7 +335,6 @@ macro( ADD_NSIS_PACKAGE_TARGETS )
COMMAND ${MAKENSIS_EXECUTABLE} ${NSIS_OPTIONS}
$<$<CONFIG:Debug>:-DBUNDLE_DEBUG_DLLS>
$<$<BOOL:${MSVC}>:-DUSE_VCREDIST>
- $<$<BOOL:${SKIP_NSIS_UNINSTALLER}>:-DSKIP_UNINSTALLER>
wireshark.nsi
WORKING_DIRECTORY ${_nsis_source_dir}
)
diff --git a/packaging/nsis/wireshark-config.nsh.in b/packaging/nsis/wireshark-config.nsh.in
index ace70b9520..713649b10e 100644
--- a/packaging/nsis/wireshark-config.nsh.in
+++ b/packaging/nsis/wireshark-config.nsh.in
@@ -37,3 +37,4 @@
#cmakedefine QT_DIR "@QT_DIR@"
#cmakedefine ENABLE_SIGNED_NSIS
+#cmakedefine SKIP_NSIS_QT_DLLS
diff --git a/packaging/nsis/wireshark.nsi b/packaging/nsis/wireshark.nsi
index 9e2d29b746..9bd677713b 100644
--- a/packaging/nsis/wireshark.nsi
+++ b/packaging/nsis/wireshark.nsi
@@ -1005,7 +1005,10 @@ File "${QT_DIR}\${PROGRAM_NAME_PATH}"
; Write an entry for ShellExecute
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH}" "" '$INSTDIR\${PROGRAM_NAME_PATH}'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${PROGRAM_NAME_PATH}" "Path" '$INSTDIR'
+
+!ifndef SKIP_NSIS_QT_DLLS
!include wireshark-qt-manifest.nsh
+!endif
${!defineifexist} TRANSLATIONS_FOLDER "${QT_DIR}\translations"
SetOutPath $INSTDIR