diff options
author | Davide Beatrici <git@davidebeatrici.dev> | 2020-08-11 05:03:16 +0300 |
---|---|---|
committer | Davide Beatrici <git@davidebeatrici.dev> | 2020-08-11 05:03:16 +0300 |
commit | 847bdb70797a0913ceba4065accd38f729d8499b (patch) | |
tree | d20536ef26f8aa14023ba9327b04e8792de745d6 /cmake | |
parent | 62c4523bc18849083f616989e9965265dd0e8f26 (diff) |
FIX(cmake): set CMAKE_WIX_UPGRADE_GUID and generate CMAKE_WIX_PRODUCT_GUID
This commit fixes two issues:
1. The installer ignoring Mumble < 1.4.0 installations. This resulted in two separate entries in the installed programs list and a cluttered installation folder.
2. The installer thinking that the product is already installed even if it's a different build.
The first problem was caused by CMAKE_WIX_UPGRADE_GUID being explicitely set to a wrong value, due to an extra line in the file.
The second problem was caused by CMAKE_WIX_PRODUCT_GUID being explicitely set to a static value due to us misunderstanding the "ProjectGuid" variable in the WiX project we used until 1.4.0.
We thought it referred to the MSI product GUID, but instead it's just the MSBuild project identifier.
Also, CMake's WiX documentation clearly says that the installer will abort if it detects a pre-existing installation that uses the same GUID: https://cmake.org/cmake/help/latest/cpack_gen/wix.html#variable:CPACK_WIX_PRODUCT_GUID
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/packaging.cmake | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cmake/packaging.cmake b/cmake/packaging.cmake index bb544109f..06a8baaf0 100644 --- a/cmake/packaging.cmake +++ b/cmake/packaging.cmake @@ -7,16 +7,15 @@ if(WIN32) set(CPACK_GENERATOR WIX) if(64_BIT) - set(CPACK_WIX_PRODUCT_GUID "E028BDFC-3FE2-4BEE-A33B-EB9C80611555") + set(CPACK_WIX_UPGRADE_GUID "E028BDFC-3FE2-4BEE-A33B-EB9C80611555") elseif(32_BIT) - set(CPACK_WIX_PRODUCT_GUID "B0EEFCC7-8A9C-4471-AB10-CBD35BE3161D") + set(CPACK_WIX_UPGRADE_GUID "B0EEFCC7-8A9C-4471-AB10-CBD35BE3161D") endif() set(CPACK_WIX_CULTURES "en-us") set(CPACK_WIX_LCID "1033") set(CPACK_WIX_UI_BANNER "${CMAKE_SOURCE_DIR}/installer/bannrbmp.bmp") set(CPACK_WIX_UI_DIALOG "${CMAKE_SOURCE_DIR}/installer/dlgbmp.bmp") - set(CPACK_WIX_PRODUCT_GUID "84afea8b-15e5-4cc7-b77d-27dd17030944") set(CPACK_WIX_PRODUCT_ICON "${CMAKE_SOURCE_DIR}/icons/mumble.ico") set(CPACK_WIX_EXTENSIONS "WiXUtilExtension") set(CPACK_WIX_TEMPLATE "wix-template.xml") @@ -53,8 +52,7 @@ endif() if(server) if(NOT client) if(WIN32) - set(CPACK_WIX_PRODUCT_GUID "ccc5eaa4-0b88-4197-9e54-580d37003903") - set(CPACK_WIX_UPGRADE_GUID "03e9476f-0f75-4661-bfc9-a9daeb23d3a0") + set(CPACK_WIX_UPGRADE_GUID "03E9476F-0F75-4661-BFC9-A9DAEB23D3A0") endif() set(CPACK_PACKAGE_NAME "Mumble (server)") @@ -101,7 +99,6 @@ if(client AND server) endif() if(WIN32) - set(CPACK_WIX_UPGRADE_GUID ${CPACK_WIX_PRODUCT_GUID}) configure_file("${CMAKE_SOURCE_DIR}/installer/wix-template.xml" ${CMAKE_CURRENT_BINARY_DIR}) endif() |