mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
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
106 lines
3.7 KiB
CMake
106 lines
3.7 KiB
CMake
# Copyright 2020 The Mumble Developers. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license
|
|
# that can be found in the LICENSE file at the root of the
|
|
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
|
|
|
if(WIN32)
|
|
set(CPACK_GENERATOR WIX)
|
|
|
|
if(64_BIT)
|
|
set(CPACK_WIX_UPGRADE_GUID "E028BDFC-3FE2-4BEE-A33B-EB9C80611555")
|
|
elseif(32_BIT)
|
|
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_ICON "${CMAKE_SOURCE_DIR}/icons/mumble.ico")
|
|
set(CPACK_WIX_EXTENSIONS "WiXUtilExtension")
|
|
set(CPACK_WIX_TEMPLATE "wix-template.xml")
|
|
endif()
|
|
|
|
set(CPACK_PACKAGE_EXECUTABLES "mumble;Mumble" "murmur;Murmur")
|
|
set(CPACK_CREATE_DESKTOP_LINKS "mumble;Mumble" "murmur;Murmur")
|
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Mumble")
|
|
|
|
if(client)
|
|
set(CPACK_PACKAGE_NAME "Mumble (client)")
|
|
set(CPACK_PACKAGE_FILE_NAME "mumble_client-${version}")
|
|
set(CPACK_PACKAGE_VENDOR "Mumble VoIP")
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Mumble is a free, open source, low latency, high quality voice chat application.")
|
|
set(CPACK_PACKAGE_HOMEPAGE_URL "https://mumble.info")
|
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/installer/gpl.rtf")
|
|
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
|
|
set(CPACK_COMPONENTS_ALL mumble_client)
|
|
set(CPACK_COMPONENT_MUMBLE_CLIENT_DISPLAY_NAME "Client")
|
|
set(CPACK_COMPONENT_MUMBLE_CLIENT_DESCRIPTION "The Mumble VoIP Client")
|
|
#set(CPACK_WIX_PATCH_FILE "${CMAKE_SOURCE_DIR}/installer/client-shortcuts.xml")
|
|
set(CPACK_COMPONENT_MUMBLE_CLIENT_REQUIRED ON)
|
|
|
|
install(FILES
|
|
"${CMAKE_SOURCE_DIR}/CHANGES"
|
|
"${CMAKE_SOURCE_DIR}/installer/gpl.txt"
|
|
"${CMAKE_SOURCE_DIR}/installer/qt.txt"
|
|
"${CMAKE_SOURCE_DIR}/installer/speex.txt"
|
|
DESTINATION "."
|
|
COMPONENT mumble_client
|
|
)
|
|
endif()
|
|
|
|
if(server)
|
|
if(NOT client)
|
|
if(WIN32)
|
|
set(CPACK_WIX_UPGRADE_GUID "03E9476F-0F75-4661-BFC9-A9DAEB23D3A0")
|
|
endif()
|
|
|
|
set(CPACK_PACKAGE_NAME "Mumble (server)")
|
|
set(CPACK_PACKAGE_FILE_NAME "mumble_server-${version}")
|
|
set(CPACK_PACKAGE_VENDOR "Mumble VoIP")
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Mumble is a free, open source, low latency, high quality voice chat application.")
|
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/installer/gpl.rtf")
|
|
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README")
|
|
set(CPACK_COMPONENT_MUMBLE_SERVER_REQUIRED ON)
|
|
|
|
install(FILES
|
|
"${CMAKE_SOURCE_DIR}/CHANGES"
|
|
"${CMAKE_SOURCE_DIR}/installer/gpl.txt"
|
|
"${CMAKE_SOURCE_DIR}/installer/qt.txt"
|
|
DESTINATION "."
|
|
COMPONENT mumble_server
|
|
)
|
|
endif()
|
|
|
|
set(CPACK_COMPONENTS_ALL mumble_server)
|
|
set(CPACK_COMPONENT_MUMBLE_SERVER_DISPLAY_NAME "Server")
|
|
set(CPACK_COMPONENT_MUMBLE_SERVER_DESCRIPTION "The Mumble VoIP Server")
|
|
#set(CPACK_WIX_PATCH_FILE "${CMAKE_SOURCE_DIR}/installer/server-shortcuts.xml")
|
|
|
|
if(WIN32)
|
|
install(FILES "${CMAKE_SOURCE_DIR}/scripts/murmur.ini" DESTINATION "." COMPONENT mumble_server)
|
|
endif()
|
|
endif()
|
|
|
|
if(client AND server)
|
|
if(WIN32)
|
|
set(CPACK_PACKAGE_NAME "Mumble")
|
|
set(CPACK_PACKAGE_FILE_NAME "Mumble-${version}")
|
|
set(CPACK_PACKAGE_VENDOR "Mumble VoIP")
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Mumble is a free, open source, low latency, high quality voice chat application.")
|
|
set(CPACK_COMPONENT_MUMBLE_SERVER_DISABLED ON)
|
|
# set(CPACK_WIX_PATCH_FILE
|
|
# "${CMAKE_SOURCE_DIR}/installer/client-shortcuts.xml"
|
|
# "${CMAKE_SOURCE_DIR}/installer/server-shortcuts.xml"
|
|
# )
|
|
endif()
|
|
|
|
set(CPACK_COMPONENTS_ALL mumble_client mumble_server)
|
|
endif()
|
|
|
|
if(WIN32)
|
|
configure_file("${CMAKE_SOURCE_DIR}/installer/wix-template.xml" ${CMAKE_CURRENT_BINARY_DIR})
|
|
endif()
|
|
|
|
include(CPack)
|