Compare commits

...

12 Commits

Author SHA1 Message Date
Casper Jeukendrup 5c5886ee72
Another attempt 2023-09-14 23:37:28 +02:00
Casper Jeukendrup b08fa4e4e1
Update SetupWindowsPackaging.cmake 2023-09-14 23:23:09 +02:00
Casper Jeukendrup ca933a68f2
Windows installer cleanup: remove the now-unnecessary PACKAGE_FILE_ASSOCIATION option 2023-09-14 22:32:09 +02:00
Casper Jeukendrup 9f8f7b5b39
Windows Installer cleanup: fix passing variables to WiX 2023-09-14 22:30:33 +02:00
Casper Jeukendrup 1415cdbf68
MSI packaging: add log files to artifact even if WiX crashed 2023-09-14 22:23:03 +02:00
Casper Jeukendrup aa1f8911d0
Windows installer: clean up file associations and add URL associations 2023-09-14 22:23:02 +02:00
Casper Jeukendrup 539de2077c
Clean up variables in SetupWindowsPackaging.cmake 2023-09-14 22:23:02 +02:00
Casper Jeukendrup b0d71050dc
Make MUSESCORE_NAME_VERSION more consistent 2023-09-14 22:23:02 +02:00
Casper Jeukendrup 371d70459a
CMake cleanup: clarify names of MUSESCORE_VERSION variables 2023-09-14 22:23:02 +02:00
Casper Jeukendrup f394fc33c8
Windows installer cleanup: move/clean Packaging.cmake
It's only used on Windows, so non-Windows stuff can go.
2023-09-14 22:23:01 +02:00
Casper Jeukendrup ea144c5b86
Windows installer cleanup: get rid of hardcoded number 2023-09-14 22:23:01 +02:00
Casper Jeukendrup 79f9d1a3f3
Windows installer cleanup: clean SetupAppImagePackaging 2023-09-14 22:23:01 +02:00
13 changed files with 430 additions and 381 deletions

View File

@ -101,7 +101,6 @@ option(MUE_DOWNLOAD_SOUNDFONT "Download the latest soundfont version as part of
# === Pack ===
option(MUE_RUN_LRELEASE "Generate .qm files" ON)
option(MUE_ENABLE_FILE_ASSOCIATION "File types association (using for package)" OFF)
option(MUE_INSTALL_SOUNDFONT "Install sound font" ON)
# === Tests ===
@ -213,7 +212,7 @@ if (OS_IS_LIN)
endif(OS_IS_LIN)
if (OS_IS_WIN)
include(Packaging)
include(SetupWindowsPackaging)
endif(OS_IS_WIN)
###########################################

View File

@ -46,14 +46,14 @@ string(TOUPPER ${MUSESCORE_BUILD_MODE} BUILD_MODE)
if(BUILD_MODE MATCHES "DEV")
set(MUSESCORE_UNSTABLE ON)
set(MUSESCORE_VERSION_LABEL "dev")
set(MUSESCORE_NAME_VERSION "${MUSESCORE_NAME} ${MUSESCORE_VERSION_MAJOR}")
set(MUSESCORE_NAME_VERSION "${MUSESCORE_NAME} ${MUSESCORE_VERSION_MAJOR} ${MUSESCORE_VERSION_LABEL}")
set(MUSESCORE_ALLOW_UPDATE_ON_PRERELEASE OFF)
endif()
if(BUILD_MODE MATCHES "TESTING")
set(MUSESCORE_UNSTABLE OFF)
set(MUSESCORE_VERSION_LABEL "Testing")
set(MUSESCORE_NAME_VERSION "${MUSESCORE_NAME} ${MUSESCORE_VERSION_MAJOR}.${MUSESCORE_VERSION_MINOR} ${MUSESCORE_VERSION_LABEL}")
set(MUSESCORE_NAME_VERSION "${MUSESCORE_NAME} ${MUSESCORE_VERSION_MAJOR} ${MUSESCORE_VERSION_LABEL}")
set(MUSESCORE_ALLOW_UPDATE_ON_PRERELEASE ON)
endif()
@ -63,10 +63,6 @@ if(BUILD_MODE MATCHES "RELEASE")
set(MUSESCORE_ALLOW_UPDATE_ON_PRERELEASE OFF)
endif()
if (MUSESCORE_UNSTABLE)
set (MUSESCORE_NAME_VERSION "${MUSESCORE_NAME_VERSION} (${MUSESCORE_VERSION_FULL} unstable)")
endif()
###########################################
# Setup paths
###########################################
@ -77,7 +73,7 @@ elseif (OS_IS_WIN)
SET(Mscore_INSTALL_NAME "")
SET(Mscore_SHARE_NAME "./")
else()
SET(Mscore_INSTALL_NAME "mscore${MUSESCORE_INSTALL_SUFFIX}-${MUSESCORE_VERSION}/")
SET(Mscore_INSTALL_NAME "mscore${MUSESCORE_INSTALL_SUFFIX}-${MUSESCORE_VERSION_MAJ_MIN}/")
SET(Mscore_SHARE_NAME "share/")
endif()
@ -227,7 +223,7 @@ endif()
add_definitions(-DMUSESCORE_REVISION="${MUSESCORE_REVISION}")
add_definitions(-DMUSESCORE_BUILD_NUMBER="${CMAKE_BUILD_NUMBER}")
add_definitions(-DMUSESCORE_VERSION="${MUSESCORE_VERSION_FULL}")
add_definitions(-DMUSESCORE_VERSION="${MUSESCORE_VERSION}")
add_definitions(-DMUSESCORE_VERSION_LABEL="${MUSESCORE_VERSION_LABEL}")
add_definitions(-DMUSESCORE_INSTALL_SUFFIX="${MUSESCORE_INSTALL_SUFFIX}")
add_definitions(-DMUSESCORE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")

View File

@ -101,10 +101,10 @@
<image>https://raw.githubusercontent.com/flathub/org.musescore.MuseScore/master/screenshots/07-new-score-wizard.png</image>
</screenshot>
</screenshots>
<translation type="qt">mscore@MUSESCORE_INSTALL_SUFFIX@-@MUSESCORE_VERSION@/locale/instruments</translation>
<translation type="qt">mscore@MUSESCORE_INSTALL_SUFFIX@-@MUSESCORE_VERSION@/locale/musescore</translation>
<translation type="qt">mscore@MUSESCORE_INSTALL_SUFFIX@-@MUSESCORE_VERSION@/locale/qt</translation>
<translation type="qt">mscore@MUSESCORE_INSTALL_SUFFIX@-@MUSESCORE_VERSION@/locale/qtbase</translation>
<translation type="qt">mscore@MUSESCORE_INSTALL_SUFFIX@-@MUSESCORE_VERSION_MAJ_MIN@/locale/instruments</translation>
<translation type="qt">mscore@MUSESCORE_INSTALL_SUFFIX@-@MUSESCORE_VERSION_MAJ_MIN@/locale/musescore</translation>
<translation type="qt">mscore@MUSESCORE_INSTALL_SUFFIX@-@MUSESCORE_VERSION_MAJ_MIN@/locale/qt</translation>
<translation type="qt">mscore@MUSESCORE_INSTALL_SUFFIX@-@MUSESCORE_VERSION_MAJ_MIN@/locale/qtbase</translation>
<content_rating type="oars-1.1"/>
<!-- GNOME extensions -->
<kudos>

View File

@ -1,108 +0,0 @@
##
## create package target
##
include (InstallRequiredSystemLibraries)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MuseScore is a full featured WYSIWYG score editor")
set(CPACK_PACKAGE_VENDOR "MuseScore BVBA and Others")
set(CPACK_PACKAGE_VERSION_MAJOR "${MUSESCORE_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${MUSESCORE_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${MUSESCORE_VERSION_PATCH}")
set(CPACK_PACKAGE_VERSION_BUILD "${CMAKE_BUILD_NUMBER}")
set(CPACK_PACKAGE_VERSION "${MUSESCORE_VERSION_MAJOR}.${MUSESCORE_VERSION_MINOR}.${MUSESCORE_VERSION_PATCH}.${CPACK_PACKAGE_VERSION_BUILD}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "MuseScore ${MUSESCORE_VERSION_MAJOR}.${MUSESCORE_VERSION_MINOR}")
message("CPACK_PACKAGE_VERSION: ${CPACK_PACKAGE_VERSION}")
set(git_date_string "")
if (MUSESCORE_UNSTABLE)
find_program(GIT_EXECUTABLE git PATHS ENV PATH)
if (GIT_EXECUTABLE)
execute_process(
COMMAND "${GIT_EXECUTABLE}" log -1 --date=short --format=%cd
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
OUTPUT_VARIABLE git_date
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if (git_date)
string(REGEX REPLACE "-" "" git_date "${git_date}")
set(git_date_string "~git${git_date}")
endif()
endif (MUSESCORE_UNSTABLE)
if (MINGW OR MSVC)
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${MUSESCORE_NAME_VERSION})
set(CPACK_PACKAGE_NAME ${MUSESCORE_NAME})
set(MSCORE_EXECUTABLE_NAME ${MUSESCORE_NAME}${MUSESCORE_VERSION_MAJOR})
# File types association:
message(STATUS "[Packaging.cmake] PACKAGE_FILE_ASSOCIATION: ${MUE_ENABLE_FILE_ASSOCIATION}")
if (MUE_ENABLE_FILE_ASSOCIATION)
list(APPEND CPACK_WIX_CANDLE_EXTRA_FLAGS -dCPACK_WIX_FILE_ASSOCIATION=ON)
else()
list(APPEND CPACK_WIX_CANDLE_EXTRA_FLAGS -dCPACK_WIX_FILE_ASSOCIATION=OFF)
endif()
file(TO_CMAKE_PATH $ENV{PROGRAMFILES} PROGRAMFILES)
set(CPACK_WIX_ROOT "${PROGRAMFILES}/WiX Toolset v3.11")
set(CPACK_WIX_PRODUCT_GUID "00000000-0000-0000-0000-000000000000")
message(STATUS "[Packaging.cmake] CPACK_WIX_PRODUCT_GUID: ${CPACK_WIX_PRODUCT_GUID}")
set(CPACK_WIX_UPGRADE_GUID "11111111-1111-1111-1111-111111111111")
message(STATUS "[Packaging.cmake] CPACK_WIX_UPGRADE_GUID: ${CPACK_WIX_UPGRADE_GUID}")
set(CPACK_WIX_LICENSE_RTF "${PROJECT_SOURCE_DIR}/build/packaging/LICENSE.rtf")
set(CPACK_WIX_PRODUCT_ICON "${PROJECT_SOURCE_DIR}/share/icons/AppIcon/MS4_AppIcon.ico")
set(CPACK_WIX_UI_BANNER "${PROJECT_SOURCE_DIR}/build/packaging/installer_banner_wix.png")
set(CPACK_WIX_UI_DIALOG "${PROJECT_SOURCE_DIR}/build/packaging/installer_background_wix.png")
set(CPACK_WIX_PROGRAM_MENU_FOLDER "${MUSESCORE_NAME_VERSION}")
set(CPACK_CREATE_DESKTOP_LINKS "${MUSESCORE_NAME_VERSION}")
set(CPACK_WIX_EXTENSIONS "WixUtilExtension")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/packaging" ${CMAKE_MODULE_PATH}) # Use custom version of WIX.template.in
set(CPACK_PACKAGE_EXECUTABLES "${MSCORE_EXECUTABLE_NAME}" "${MUSESCORE_NAME_VERSION}") # exe name, label
set(CPACK_CREATE_DESKTOP_LINKS "${MSCORE_EXECUTABLE_NAME}" "${MUSESCORE_NAME_VERSION}") #exe name, label
set(CPACK_PACKAGE_FILE_NAME "${MUSESCORE_NAME}-${MUSESCORE_VERSION_FULL}${git_date_string}")
else(MINGW OR MSVC)
set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/mscore/data/mscore.bmp")
set(CPACK_STRIP_FILES "${MSCORE_OUTPUT_NAME}")
set(CPACK_SOURCE_STRIP_FILES "")
set(CPACK_PACKAGE_EXECUTABLES "mscore" "MuseScore")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "mscore")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${MUSESCORE_VERSION_FULL}${git_date_string}")
endif(MINGW OR MSVC)
set(CPACK_DEBIAN_PACKAGE_NAME "mscore")
set(CPACK_DEBIAN_PACKAGE_VERSION "${MUSESCORE_VERSION_FULL}${git_date_string}")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "tsmithe@ubuntu.com")
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "")
set(CPACK_DEBIAN_PACKAGE_SUGGESTS "")
set(CPACK_PACKAGE_CONTACT "info@musescore.org")
if (MINGW OR MSVC)
set(CPACK_GENERATOR "WIX")
else (MINGW OR MSVC)
if (NOT APPLE)
set(CPACK_GENERATOR "DEB;TBZ2")
set(CPACK_DEB "on")
endif (NOT APPLE)
endif (MINGW OR MSVC)
if (CPACK_DEB)
find_program(DPKG_EXECUTABLE dpkg PATHS ENV PATH)
if (DPKG_EXECUTABLE)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS "ON")
execute_process(
COMMAND "${DPKG_EXECUTABLE} --print-architecture"
OUTPUT_VARIABLE dpkg_architecture
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${dpkg_architecture}")
endif (DPKG_EXECUTABLE)
endif (CPACK_DEB)
include (CPack)

View File

@ -19,8 +19,8 @@ Freeware=true
CommercialUse=true
[Version]
PackageVersion=@MUSESCORE_VERSION_FULL@.1
DisplayVersion=@MUSESCORE_VERSION_FULL@
PackageVersion=@MUSESCORE_VERSION@.1
DisplayVersion=@MUSESCORE_VERSION@
[Control]
Icons=1

View File

@ -0,0 +1,87 @@
include(GetPlatformInfo)
if(NOT OS_IS_WIN)
return()
endif()
include(InstallRequiredSystemLibraries)
set(CPACK_PACKAGE_NAME ${MUSESCORE_NAME})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MuseScore is a full featured WYSIWYG score editor")
set(CPACK_PACKAGE_VENDOR "MuseScore BVBA and Others")
set(CPACK_PACKAGE_CONTACT "info@musescore.org")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://musescore.org")
set(CPACK_PACKAGE_VERSION_MAJOR "${MUSESCORE_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${MUSESCORE_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${MUSESCORE_VERSION_PATCH}")
set(CPACK_PACKAGE_VERSION_BUILD "${CMAKE_BUILD_NUMBER}")
set(CPACK_PACKAGE_VERSION "${MUSESCORE_VERSION_MAJOR}.${MUSESCORE_VERSION_MINOR}.${MUSESCORE_VERSION_PATCH}.${CPACK_PACKAGE_VERSION_BUILD}")
message("CPACK_PACKAGE_VERSION: ${CPACK_PACKAGE_VERSION}")
set(git_date_string "")
if(MUSESCORE_UNSTABLE)
find_program(GIT_EXECUTABLE git PATHS ENV PATH)
if(GIT_EXECUTABLE)
execute_process(
COMMAND "${GIT_EXECUTABLE}" log -1 --date=short --format=%cd
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
OUTPUT_VARIABLE git_date
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(git_date)
string(REGEX REPLACE "-" "" git_date "${git_date}")
set(git_date_string "~git${git_date}")
endif()
endif(MUSESCORE_UNSTABLE)
set(CPACK_PACKAGE_FILE_NAME "${MUSESCORE_NAME}-${MUSESCORE_VERSION}${git_date_string}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${MUSESCORE_NAME_VERSION})
set(MSCORE_EXECUTABLE_NAME ${MUSESCORE_NAME}${MUSESCORE_VERSION_MAJOR})
set(CPACK_PACKAGE_EXECUTABLES "${MSCORE_EXECUTABLE_NAME}" "${MUSESCORE_NAME_VERSION}") # exe name, label
set(CPACK_CREATE_DESKTOP_LINKS "${MSCORE_EXECUTABLE_NAME}" "${MUSESCORE_NAME_VERSION}") # exe name, label
# Wix-specific options
set(CPACK_GENERATOR "WIX")
file(TO_CMAKE_PATH $ENV{PROGRAMFILES} PROGRAMFILES)
set(CPACK_WIX_ROOT "${PROGRAMFILES}/WiX Toolset v3.11")
# Use custom version of WIX.template.in
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/packaging" ${CMAKE_MODULE_PATH})
if(NOT CPACK_WIX_PRODUCT_GUID)
set(CPACK_WIX_PRODUCT_GUID "00000000-0000-0000-0000-000000000000")
endif()
message(STATUS "[SetupWindowsPackaging.cmake] CPACK_WIX_PRODUCT_GUID: ${CPACK_WIX_PRODUCT_GUID}")
if(NOT CPACK_WIX_UPGRADE_GUID)
set(CPACK_WIX_UPGRADE_GUID "11111111-1111-1111-1111-111111111111")
endif()
message(STATUS "[SetupWindowsPackaging.cmake] CPACK_WIX_UPGRADE_GUID: ${CPACK_WIX_UPGRADE_GUID}")
set(CPACK_WIX_LICENSE_RTF "${PROJECT_SOURCE_DIR}/build/packaging/LICENSE.rtf")
set(CPACK_WIX_PRODUCT_ICON "${PROJECT_SOURCE_DIR}/share/icons/AppIcon/MS4_AppIcon.ico")
set(CPACK_WIX_UI_BANNER "${PROJECT_SOURCE_DIR}/build/packaging/installer_banner_wix.png")
set(CPACK_WIX_UI_DIALOG "${PROJECT_SOURCE_DIR}/build/packaging/installer_background_wix.png")
set(CPACK_WIX_PROGRAM_MENU_FOLDER "${MUSESCORE_NAME_VERSION}")
set(CPACK_WIX_EXTENSIONS "WixUtilExtension")
# Extra CPack variables
list(APPEND CPACK_WIX_CANDLE_EXTRA_FLAGS
"-dCPACK_PACKAGE_VERSION_MAJOR=ON"
"-dMUSESCORE_NAME_VERSION=\\\"${MUSESCORE_NAME_VERSION}\\\""
"-dMUSESCORE_VERSION_LABEL=\\\"${MUSESCORE_VERSION_LABEL}\\\""
)
if (MUSESCORE_UNSTABLE)
list(APPEND CPACK_WIX_CANDLE_EXTRA_FLAGS "-dMUSESCORE_UNSTABLE=ON")
endif()
include(CPack)

View File

@ -26,10 +26,9 @@ ARTIFACTS_DIR="build.artifacts" # default output dir
if [ -z "$2" ]; then OUT_DIR=${ARTIFACTS_DIR}/env; fi
export MUSESCORE_VERSION=$(cmake -P version.cmake | sed -n -e 's/^.*MUSESCORE_VERSION_FULL *//p')
export MUSESCORE_VERSION=$(cmake -P version.cmake | sed -n -e 's/^.*MUSESCORE_VERSION *//p')
MUSESCORE_VERSION_FULL=$MUSESCORE_VERSION.$BUILD_NUMBER
echo ${MUSESCORE_VERSION_FULL} > ${OUT_DIR}/build_version.env
cat ${OUT_DIR}/build_version.env

View File

@ -149,18 +149,14 @@ SET /p PACKAGE_UUID=<uuid.txt
ECHO on
ECHO "PACKAGE_UUID: %PACKAGE_UUID%"
ECHO off
sed -i 's/00000000-0000-0000-0000-000000000000/%PACKAGE_UUID%/' build/Packaging.cmake
sed -i 's/11111111-1111-1111-1111-111111111111/%UPGRADE_UUID%/' build/Packaging.cmake
SET PACKAGE_FILE_ASSOCIATION=OFF
IF %BUILD_MODE% == stable_build (
SET PACKAGE_FILE_ASSOCIATION=ON
)
cd "%BUILD_DIR%"
cmake -DMUE_ENABLE_FILE_ASSOCIATION=%PACKAGE_FILE_ASSOCIATION% ..
cmake -DCPACK_WIX_PRODUCT_GUID=%PACKAGE_UUID% ^
-DCPACK_WIX_UPGRADE_GUID=%UPGRADE_UUID% ^
..
SET PATH=%WIX_DIR%;%PATH%
cmake --build . --target package || GOTO END_ERROR
cmake --build . --target package || SET WIX_ERROR=1
cd ..
ECHO "Create logs dir"
@ -176,6 +172,10 @@ ECHO "Copy from %WIX_LOGS_PATH% to %ARTIFACTS_DIR%\logs\WIX"
ECHO .msi > excludedmsi.txt
XCOPY /Y /EXCLUDE:excludedmsi.txt %WIX_LOGS_PATH% %ARTIFACTS_DIR%\logs\WIX
IF DEFINED WIX_ERROR (
GOTO END_ERROR
)
:: find the MSI file without the hardcoded version
for /r %%i in (%BUILD_DIR%\*.msi) do (
SET "FILEPATH=%%i"d

View File

@ -1,136 +1,155 @@
include(GetPlatformInfo)
if (NOT MINGW AND NOT MSVC AND NOT APPLE)
#### PACKAGING for Linux and BSD based systems (more in mscore/CMakeLists.txt) ####
#
# set library search path for runtime linker to load the same
# qt libraries as we used at compile time
#
if(NOT(OS_IS_LIN OR OS_IS_FBSD))
return()
endif()
if (MUSESCORE_UNSTABLE)
# Use short name to avoid truncation by GNOME launcher. Save room for
# a suffix in case multiple dev/nightly builds are installed.
set(DESKTOP_LAUNCHER_NAME "MU ${MUSESCORE_VERSION}") # MU X.Y
else (MUSESCORE_UNSTABLE)
# Use full name for stable releases
set(DESKTOP_LAUNCHER_NAME "${MUSESCORE_NAME} ${MUSESCORE_VERSION}") # MuseScore X.Y
endif(MUSESCORE_UNSTABLE)
# ### PACKAGING for Linux and BSD based systems (more in mscore/CMakeLists.txt) ####
#
# set library search path for runtime linker to load the same
# qt libraries as we used at compile time
#
if(MUSESCORE_UNSTABLE)
# Use short name to avoid truncation by GNOME launcher. Save room for
# a suffix in case multiple dev/nightly builds are installed.
set(DESKTOP_LAUNCHER_NAME "MU ${MUSESCORE_VERSION_MAJ_MIN}") # MU X.Y
else(MUSESCORE_UNSTABLE)
# Use full name for stable releases
set(DESKTOP_LAUNCHER_NAME "${MUSESCORE_NAME} ${MUSESCORE_VERSION_MAJ_MIN}") # MuseScore X.Y
endif(MUSESCORE_UNSTABLE)
if (${MUSESCORE_INSTALL_SUFFIX} MATCHES "dev")
set(DESKTOP_LAUNCHER_NAME "${DESKTOP_LAUNCHER_NAME} Dev")
elseif (${MUSESCORE_INSTALL_SUFFIX} MATCHES "nightly")
set(DESKTOP_LAUNCHER_NAME "${DESKTOP_LAUNCHER_NAME} Nightly")
elseif (${MUSESCORE_INSTALL_SUFFIX} MATCHES "testing")
set(DESKTOP_LAUNCHER_NAME "${DESKTOP_LAUNCHER_NAME} Testing")
endif(${MUSESCORE_INSTALL_SUFFIX} MATCHES "dev")
if(${MUSESCORE_INSTALL_SUFFIX} MATCHES "dev")
set(DESKTOP_LAUNCHER_NAME "${DESKTOP_LAUNCHER_NAME} Dev")
elseif(${MUSESCORE_INSTALL_SUFFIX} MATCHES "nightly")
set(DESKTOP_LAUNCHER_NAME "${DESKTOP_LAUNCHER_NAME} Nightly")
elseif(${MUSESCORE_INSTALL_SUFFIX} MATCHES "testing")
set(DESKTOP_LAUNCHER_NAME "${DESKTOP_LAUNCHER_NAME} Testing")
endif(${MUSESCORE_INSTALL_SUFFIX} MATCHES "dev")
if (${MUSESCORE_INSTALL_SUFFIX} MATCHES "portable") # Note: "portableanything" would match
set(DESKTOP_LAUNCHER_NAME "${DESKTOP_LAUNCHER_NAME} Portable") # distinguish our build from distro packages
# Build portable AppImage as per https://github.com/probonopd/AppImageKit
add_subdirectory(build/Linux+BSD/portable)
if (NOT DEFINED ARCH)
execute_process(COMMAND arch OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)# Get architecture (strip trailing newline)
endif (NOT DEFINED ARCH)
get_filename_component(PORTABLE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} PATH)# Get path (dirname)
get_filename_component(PORTABLE_INSTALL_NAME ${CMAKE_INSTALL_PREFIX} NAME)# Strip path (basename)
if (NOT MUSESCORE_UNSTABLE)
set(PORTABLE_INSTALL_NAME "${PORTABLE_INSTALL_NAME}-${MUSESCORE_VERSION_FULL}") # Append version info.
endif (NOT MUSESCORE_UNSTABLE)
set(PORTABLE_INSTALL_NAME "${PORTABLE_INSTALL_NAME}-${ARCH}") # Append system architecture.
set(CMAKE_INSTALL_PREFIX ${PORTABLE_INSTALL_PATH}/${PORTABLE_INSTALL_NAME}.AppDir) # E.g. "MuseScore-X.Y.Z-x86_64.AppDir"
execute_process(COMMAND echo ${CMAKE_INSTALL_PREFIX} OUTPUT_FILE PREFIX.txt)
# Prepare portable scripts:
configure_file(build/Linux+BSD/portable/AppRun.in AppRun @ONLY)
configure_file(build/Linux+BSD/portable/portable-utils.in portable-utils @ONLY)
install(PROGRAMS ${PROJECT_BINARY_DIR}/AppRun DESTINATION . COMPONENT portable)
install(PROGRAMS ${PROJECT_BINARY_DIR}/portable-utils
build/Linux+BSD/portable/ldd-recursive
build/rm-empty-dirs DESTINATION bin COMPONENT portable)
install(FILES build/Linux+BSD/portable/qt.conf DESTINATION bin COMPONENT portable)
else (${MUSESCORE_INSTALL_SUFFIX} MATCHES "portable")
set(MAN_PORTABLE ".\\\"") # comment out lines in man page that are only relevant to the portable version
endif (${MUSESCORE_INSTALL_SUFFIX} MATCHES "portable")
if(${MUSESCORE_INSTALL_SUFFIX} MATCHES "portable") # Note: "portableanything" would match
set(DESKTOP_LAUNCHER_NAME "${DESKTOP_LAUNCHER_NAME} Portable") # distinguish our build from distro packages
# Identify MuseScore's main window so that it receives the correct name
# and icon in the OS dock / taskbar. Run `xprop WM_CLASS` and click on
# MuseScore's main window to find out what string to use here.
if (MUSESCORE_UNSTABLE)
set(WINDOW_MANAGER_CLASS "MuseScore4Development")
else (MUSESCORE_UNSTABLE)
set(WINDOW_MANAGER_CLASS "MuseScore4")
endif(MUSESCORE_UNSTABLE)
# Build portable AppImage as per https://github.com/probonopd/AppImageKit
add_subdirectory(build/Linux+BSD/portable)
# Install desktop file (perform variable substitution first)
configure_file(build/Linux+BSD/org.musescore.MuseScore.desktop.in org.musescore.MuseScore${MUSESCORE_INSTALL_SUFFIX}.desktop)
install( FILES ${PROJECT_BINARY_DIR}/org.musescore.MuseScore${MUSESCORE_INSTALL_SUFFIX}.desktop DESTINATION share/applications)
# Install appdata file (perform variable substitution first)
if ("${MUSESCORE_INSTALL_SUFFIX}" MATCHES "-")
message(FATAL_ERROR
"MUSESCORE_INSTALL_SUFFIX='${MUSESCORE_INSTALL_SUFFIX}'\n"
"MUSESCORE_INSTALL_SUFFIX must not contain hyphen characters. It will be used "
"inside the <id> tag in *.appdata.xml and hyphens are discouraged there."
)
endif ("${MUSESCORE_INSTALL_SUFFIX}" MATCHES "-")
configure_file(build/Linux+BSD/org.musescore.MuseScore.appdata.xml.in org.musescore.MuseScore${MUSESCORE_INSTALL_SUFFIX}.appdata.xml)
install( FILES ${PROJECT_BINARY_DIR}/org.musescore.MuseScore${MUSESCORE_INSTALL_SUFFIX}.appdata.xml DESTINATION share/metainfo)
# Substitute variables within man pages
set(MAN_NAME mscore)
set(MAN_ALIAS musescore)
set(MAN_EXTENSION .1)
if(NOT DEFINED ARCH)
execute_process(COMMAND arch OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) # Get architecture (strip trailing newline)
endif(NOT DEFINED ARCH)
get_filename_component(PORTABLE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} PATH) # Get path (dirname)
get_filename_component(PORTABLE_INSTALL_NAME ${CMAKE_INSTALL_PREFIX} NAME) # Strip path (basename)
if(NOT MUSESCORE_UNSTABLE)
set(PORTABLE_INSTALL_NAME "${PORTABLE_INSTALL_NAME}-${MUSESCORE_VERSION}") # Append version info.
endif(NOT MUSESCORE_UNSTABLE)
set(PORTABLE_INSTALL_NAME "${PORTABLE_INSTALL_NAME}-${ARCH}") # Append system architecture.
set(CMAKE_INSTALL_PREFIX ${PORTABLE_INSTALL_PATH}/${PORTABLE_INSTALL_NAME}.AppDir) # E.g. "MuseScore-X.Y.Z-x86_64.AppDir"
execute_process(COMMAND echo ${CMAKE_INSTALL_PREFIX} OUTPUT_FILE PREFIX.txt)
# Prepare portable scripts:
configure_file(build/Linux+BSD/portable/AppRun.in AppRun @ONLY)
configure_file(build/Linux+BSD/portable/portable-utils.in portable-utils @ONLY)
install(PROGRAMS ${PROJECT_BINARY_DIR}/AppRun DESTINATION . COMPONENT portable)
install(PROGRAMS ${PROJECT_BINARY_DIR}/portable-utils
build/Linux+BSD/portable/ldd-recursive
build/rm-empty-dirs DESTINATION bin COMPONENT portable)
install(FILES build/Linux+BSD/portable/qt.conf DESTINATION bin COMPONENT portable)
else(${MUSESCORE_INSTALL_SUFFIX} MATCHES "portable")
set(MAN_PORTABLE ".\\\"") # comment out lines in man page that are only relevant to the portable version
endif(${MUSESCORE_INSTALL_SUFFIX} MATCHES "portable")
# Identify MuseScore's main window so that it receives the correct name
# and icon in the OS dock / taskbar. Run `xprop WM_CLASS` and click on
# MuseScore's main window to find out what string to use here.
if(MUSESCORE_UNSTABLE)
set(WINDOW_MANAGER_CLASS "MuseScore4Development")
else(MUSESCORE_UNSTABLE)
set(WINDOW_MANAGER_CLASS "MuseScore4")
endif(MUSESCORE_UNSTABLE)
# Install desktop file (perform variable substitution first)
configure_file(build/Linux+BSD/org.musescore.MuseScore.desktop.in org.musescore.MuseScore${MUSESCORE_INSTALL_SUFFIX}.desktop)
install(FILES ${PROJECT_BINARY_DIR}/org.musescore.MuseScore${MUSESCORE_INSTALL_SUFFIX}.desktop DESTINATION share/applications)
# Install appdata file (perform variable substitution first)
if("${MUSESCORE_INSTALL_SUFFIX}" MATCHES "-")
message(FATAL_ERROR
"MUSESCORE_INSTALL_SUFFIX='${MUSESCORE_INSTALL_SUFFIX}'\n"
"MUSESCORE_INSTALL_SUFFIX must not contain hyphen characters. It will be used "
"inside the <id> tag in *.appdata.xml and hyphens are discouraged there."
)
endif("${MUSESCORE_INSTALL_SUFFIX}" MATCHES "-")
configure_file(build/Linux+BSD/org.musescore.MuseScore.appdata.xml.in org.musescore.MuseScore${MUSESCORE_INSTALL_SUFFIX}.appdata.xml)
install(FILES ${PROJECT_BINARY_DIR}/org.musescore.MuseScore${MUSESCORE_INSTALL_SUFFIX}.appdata.xml DESTINATION share/metainfo)
# Substitute variables within man pages
set(MAN_NAME mscore)
set(MAN_ALIAS musescore)
set(MAN_EXTENSION .1)
set(MAN_FULL_NAME ${MAN_NAME}${MUSESCORE_INSTALL_SUFFIX}${MAN_EXTENSION})
set(MAN_FULL_ALIAS ${MAN_ALIAS}${MUSESCORE_INSTALL_SUFFIX}${MAN_EXTENSION})
set(MAN_TARGET ${PROJECT_SOURCE_DIR}/build/Linux+BSD/${MAN_NAME}${MAN_EXTENSION}.in)
set(MAN_BUILD ${PROJECT_BINARY_DIR}/${MAN_FULL_NAME})
string(TOUPPER "mscore${MUSESCORE_INSTALL_SUFFIX}" MAN_MSCORE_UPPER) # Command name shown in uppercase in man pages by convention
configure_file(${MAN_TARGET} ${MAN_BUILD})
# Compress man pages if gzip is installed (don't on OpenBSD)
# Note: Compressing man pages is normal on Linux but not OpenBSD
find_program(GZIP_EXECUTABLE gzip DOC "A tool for compressing manpages (optional).")
if(GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
message(STATUS "Found 'gzip'. Man pages will be compressed.")
set(MAN_TARGET ${MAN_BUILD})
set(MAN_EXTENSION ${MAN_EXTENSION}.gz)
set(MAN_FULL_NAME ${MAN_NAME}${MUSESCORE_INSTALL_SUFFIX}${MAN_EXTENSION})
set(MAN_FULL_ALIAS ${MAN_ALIAS}${MUSESCORE_INSTALL_SUFFIX}${MAN_EXTENSION})
set(MAN_TARGET ${PROJECT_SOURCE_DIR}/build/Linux+BSD/${MAN_NAME}${MAN_EXTENSION}.in)
set(MAN_BUILD ${PROJECT_BINARY_DIR}/${MAN_FULL_NAME})
string(TOUPPER "mscore${MUSESCORE_INSTALL_SUFFIX}" MAN_MSCORE_UPPER) # Command name shown in uppercase in man pages by convention
configure_file(${MAN_TARGET} ${MAN_BUILD})
# Compress man pages if gzip is installed (don't on OpenBSD)
# Note: Compressing man pages is normal on Linux but not OpenBSD
find_program( GZIP_EXECUTABLE gzip DOC "A tool for compressing manpages (optional)." )
if (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
message(STATUS "Found 'gzip'. Man pages will be compressed.")
set(MAN_TARGET ${MAN_BUILD})
set(MAN_EXTENSION ${MAN_EXTENSION}.gz)
set(MAN_FULL_NAME ${MAN_NAME}${MUSESCORE_INSTALL_SUFFIX}${MAN_EXTENSION})
set(MAN_FULL_ALIAS ${MAN_ALIAS}${MUSESCORE_INSTALL_SUFFIX}${MAN_EXTENSION})
set(MAN_BUILD ${PROJECT_BINARY_DIR}/${MAN_FULL_NAME})
add_custom_command(
OUTPUT ${MAN_BUILD}
DEPENDS ${MAN_TARGET}
COMMAND ${GZIP_EXECUTABLE} -9 < ${MAN_TARGET} > ${MAN_BUILD}
)
add_custom_target(manpages ALL
DEPENDS ${MAN_BUILD}
COMMAND echo "Man pages have been compressed ready for installation."
VERBATIM
)
else (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
message(STATUS "System is OpenBSD: Man pages will not be compressed.")
else (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
message(STATUS "'gzip' not found (it is optional). Man pages will not be compressed.")
endif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
add_custom_target(manpages ALL
COMMAND echo "Man pages will be installed uncompressed."
VERBATIM
)
endif (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
# Install man pages in either compressed or uncompressed form
install( FILES ${MAN_BUILD} DESTINATION share/man/man1 COMPONENT doc)
# Create symlink alias for man pages so `man musescore` = `man mscore`
find_program( LN_EXECUTABLE ln DOC "A tool for creating symbolic link aliases (optional)." )
if (LN_EXECUTABLE)
message(STATUS "Found 'ln'. Symlink aliases will be created for MuseScore executable and the man pages.")
add_custom_command(
TARGET manpages
COMMAND echo "Creating symlink alias for man pages."
COMMAND ${LN_EXECUTABLE} -sf "${MAN_FULL_NAME}" "${MAN_FULL_ALIAS}"
COMMAND echo 'Symlink alias: ${MAN_FULL_ALIAS} -> ${MAN_FULL_NAME}'
)
install( FILES ${PROJECT_BINARY_DIR}/${MAN_FULL_ALIAS} DESTINATION share/man/man1 COMPONENT doc)
else (LN_EXECUTABLE)
message(STATUS "'ln' not found (it is optional). No symlink aliases will be created.")
endif (LN_EXECUTABLE)
# Add .MSCZ, .MSCX and .MSCS to MIME database (informs system that filetypes .MSCZ, .MSCX and .MSCS are MuseScore files)
configure_file(build/Linux+BSD/musescore.xml.in musescore${MUSESCORE_INSTALL_SUFFIX}.xml)
install( FILES ${PROJECT_BINARY_DIR}/musescore${MUSESCORE_INSTALL_SUFFIX}.xml DESTINATION share/mime/packages COMPONENT doc)
# Note: Must now run "update-mime-database" to apply changes.
endif (NOT MINGW AND NOT MSVC AND NOT APPLE)
add_custom_command(
OUTPUT ${MAN_BUILD}
DEPENDS ${MAN_TARGET}
COMMAND ${GZIP_EXECUTABLE} -9 < ${MAN_TARGET} > ${MAN_BUILD}
)
add_custom_target(manpages ALL
DEPENDS ${MAN_BUILD}
COMMAND echo "Man pages have been compressed ready for installation."
VERBATIM
)
else(GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
message(STATUS "System is OpenBSD: Man pages will not be compressed.")
else(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
message(STATUS "'gzip' not found (it is optional). Man pages will not be compressed.")
endif(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
add_custom_target(manpages ALL
COMMAND echo "Man pages will be installed uncompressed."
VERBATIM
)
endif(GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
# Install man pages in either compressed or uncompressed form
install(FILES ${MAN_BUILD} DESTINATION share/man/man1 COMPONENT doc)
# Create symlink alias for man pages so `man musescore` = `man mscore`
find_program(LN_EXECUTABLE ln DOC "A tool for creating symbolic link aliases (optional).")
if(LN_EXECUTABLE)
message(STATUS "Found 'ln'. Symlink aliases will be created for MuseScore executable and the man pages.")
add_custom_command(
TARGET manpages
COMMAND echo "Creating symlink alias for man pages."
COMMAND ${LN_EXECUTABLE} -sf "${MAN_FULL_NAME}" "${MAN_FULL_ALIAS}"
COMMAND echo 'Symlink alias: ${MAN_FULL_ALIAS} -> ${MAN_FULL_NAME}'
)
install(FILES ${PROJECT_BINARY_DIR}/${MAN_FULL_ALIAS} DESTINATION share/man/man1 COMPONENT doc)
else(LN_EXECUTABLE)
message(STATUS "'ln' not found (it is optional). No symlink aliases will be created.")
endif(LN_EXECUTABLE)
# Add .MSCZ, .MSCX and .MSCS to MIME database (informs system that filetypes .MSCZ, .MSCX and .MSCS are MuseScore files)
configure_file(build/Linux+BSD/musescore.xml.in musescore${MUSESCORE_INSTALL_SUFFIX}.xml)
install(FILES ${PROJECT_BINARY_DIR}/musescore${MUSESCORE_INSTALL_SUFFIX}.xml DESTINATION share/mime/packages COMPONENT doc)
# Note: Must now run "update-mime-database" to apply changes.

View File

@ -1,6 +0,0 @@
The Wix.template.in file contains one absolute path to the exe file. It needs to be changed.
<?define ExeId="CM_FP_bin.$(var.CPACK_PACKAGE_NAME).exe" ?>
To create new version, the 3 digits version of MuseScore needs to be
changed and the product ID as well (see Packaging.cmake)

View File

@ -2,17 +2,19 @@
<?include "cpack_variables.wxi"?>
<?define ShortVersion="$(var.CPACK_PACKAGE_VERSION)" ?>
<?define VShortVersion="4" ?>
<?define ProdName="$(var.CPACK_PACKAGE_NAME) $(var.VShortVersion)" ?>
<?define ShortProdName="$(var.CPACK_PACKAGE_NAME)$(var.VShortVersion)" ?>
<?define ExeName="$(var.ShortProdName).exe" ?>
<?define ExeKey="$(var.ShortProdName).exe" ?>
<?define ExeId="CM_FP_bin.$(var.ShortProdName).exe" ?>
<?define RegistryRoot="HKMU" ?> <!--HKCU / HKLM-->
<?define ProdName="$(var.MUSESCORE_NAME_VERSION)"?>
<?define ShortProdName="$(var.CPACK_PACKAGE_NAME)$(var.CPACK_PACKAGE_VERSION_MAJOR)$(var.MUSESCORE_VERSION_LABEL)"?>
<?define ExeName="$(var.CPACK_PACKAGE_NAME)$(var.CPACK_PACKAGE_VERSION_MAJOR).exe"?>
<?define ExeKey="$(var.ShortProdName).exe"?>
<?define RegistryRoot="HKMU"?> <!--HKCU / HKLM-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
RequiredVersion="3.6.3303.0">
<?if "$(var.MUSESCORE_VERSION_LABEL)" != ""?>
<?define ProgIdSuffix="$(var.CPACK_PACKAGE_VERSION_MAJOR).$(var.MUSESCORE_VERSION_LABEL)"?>
<?else?>
<?define ProgIdSuffix="$(var.CPACK_PACKAGE_VERSION_MAJOR)"?>
<?endif?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" RequiredVersion="3.6.3303.0">
<Product Id="$(var.CPACK_WIX_PRODUCT_GUID)"
Name="$(var.ProdName)"
@ -21,140 +23,202 @@
Manufacturer="$(var.CPACK_PACKAGE_VENDOR)"
UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)">
<Package InstallerVersion="301" Compressed="yes"/>
<Package InstallerVersion="301" Compressed="yes" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" CompressionLevel="high"/>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" CompressionLevel="high" />
<MajorUpgrade
AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />
<WixVariable Id="WixUILicenseRtf" Value="$(var.CPACK_WIX_LICENSE_RTF)"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT"/>
<WixVariable Id="WixUILicenseRtf" Value="$(var.CPACK_WIX_LICENSE_RTF)" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT" />
<!-- See https://docs.microsoft.com/ru-ru/windows/win32/msi/reinstallmode that explains different modes -->
<Property Id='REINSTALLMODE' Value='dmus'/>
<Property Id='REINSTALLMODE' Value='dmus' />
<?ifdef CPACK_WIX_PRODUCT_ICON?>
<Property Id="ARPPRODUCTICON">ProductIcon.ico</Property>
<Icon Id="ProductIcon.ico" SourceFile="$(var.CPACK_WIX_PRODUCT_ICON)"/>
<Icon Id="ProductIcon.ico" SourceFile="$(var.CPACK_WIX_PRODUCT_ICON)" />
<?endif?>
<?ifdef CPACK_WIX_UI_BANNER?>
<WixVariable Id="WixUIBannerBmp" Value="$(var.CPACK_WIX_UI_BANNER)"/>
<WixVariable Id="WixUIBannerBmp" Value="$(var.CPACK_WIX_UI_BANNER)" />
<?endif?>
<?ifdef CPACK_WIX_UI_DIALOG?>
<WixVariable Id="WixUIDialogBmp" Value="$(var.CPACK_WIX_UI_DIALOG)"/>
<WixVariable Id="WixUIDialogBmp" Value="$(var.CPACK_WIX_UI_DIALOG)" />
<?endif?>
<Property Id='ARPCONTACT'>http://musescore.org</Property>
<Property Id='ARPHELPLINK'>http://musescore.org</Property>
<Property Id='ARPURLINFOABOUT'>http://musescore.org</Property>
<Property Id='ARPCONTACT'>https://musescore.org</Property>
<Property Id='ARPHELPLINK'>https://musescore.org</Property>
<Property Id='ARPURLINFOABOUT'>https://musescore.org</Property>
<!-- Add to checkbox to launch program after install ²-->
<UI>
<UIRef Id='WixUI_InstallDir'/>
<UIRef Id='WixUI_InstallDir' />
<Publish Dialog="ExitDialog"
Control="Finish"
Event="DoAction"
Control="Finish"
Event="DoAction"
Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
</UI>
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch $(var.ProdName)"/>
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1"/>
<Property Id="WixShellExecTarget" Value="[#CM_FP_bin.$(var.ShortProdName).exe]" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch $(var.ProdName)" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
<Property Id="WixShellExecTarget" Value="[#CM_FP_bin.$(var.ExeName)]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
<!-- Add to application menu -->
<Component Id="RegisterTypes" Directory="TARGETDIR" Guid="76707452-ee26-4f9a-9650-2cf2c70a6448">
<!-- File association-->
<!-- Capabilities keys for Vista/7 "Set Program Access and Defaults" -->
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\$(var.ShortProdName)\Capabilities" Name="ApplicationDescription" Value="$(var.ProdName)" Type="string" KeyPath="yes"/>
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\$(var.ShortProdName)\Capabilities" Name="ApplicationIcon" Value="[INSTALL_ROOT]bin\$(var.ExeName),0" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\$(var.ShortProdName)\Capabilities" Name="ApplicationName" Value="$(var.ProdName)" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\$(var.ShortProdName)\Capabilities\DefaultIcon" Value="[INSTALL_ROOT]bin\$(var.ExeName),1" Type="string" />
<?if $(var.CPACK_WIX_FILE_ASSOCIATION) = ON ?>
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\$(var.ShortProdName)\Capabilities\FileAssociations" Name=".mscz" Value="MuseScore.mscz" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\$(var.ShortProdName)\Capabilities\FileAssociations" Name=".mscx" Value="MuseScore.mscx" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\$(var.ShortProdName)\Capabilities\FileAssociations" Name=".mscs" Value="MuseScore.mscs" Type="string" />
<!-- In order to work with Default Programs -->
<?define CapabilitiesKey="SOFTWARE\$(var.ShortProdName)\Capabilities"?>
<RegistryKey Root="$(var.RegistryRoot)" Key="$(var.CapabilitiesKey)">
<!-- Application info -->
<RegistryValue Name="ApplicationDescription" Value="$(var.ProdName)" Type="string" KeyPath="yes" />
<RegistryValue Name="ApplicationIcon" Value="[INSTALL_ROOT]bin\$(var.ExeName),0" Type="string" />
<RegistryValue Name="ApplicationName" Value="$(var.ProdName)" Type="string" />
<RegistryValue Key="DefaultIcon" Value="[INSTALL_ROOT]bin\$(var.ExeName),1" Type="string" />
<!-- TODO add more types?-->
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\$(var.ShortProdName)\Capabilities\MIMEAssociations" Name="application/x-musescore" Value="MuseScore.mscz" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\$(var.ShortProdName)\Capabilities\MIMEAssociations" Name="application/x-musescore+xml" Value="MuseScore.mscx" Type="string" />
<?endif?>
<!-- File associations -->
<RegistryKey Key="FileAssociations">
<RegistryValue Name=".mscz" Value="MuseScore.mscz.$(var.ProgIdSuffix)" Type="string" />
<RegistryValue Name=".mscx" Value="MuseScore.mscx.$(var.ProgIdSuffix)" Type="string" />
<RegistryValue Name=".mscs" Value="MuseScore.mscs.$(var.ProgIdSuffix)" Type="string" />
<!-- TODO: Add other file types here too? -->
</RegistryKey>
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\$(var.ShortProdName)\Capabilities\shell\open\command" Value="&quot;[INSTALL_ROOT]bin\$(var.ExeName)&quot; &quot;%1&quot;" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\RegisteredApplications" Name="$(var.ProdName)" Value="SOFTWARE\$(var.ShortProdName)\Capabilities" Type="string" />
<!-- MIME associations -->
<RegistryKey Key="MIMEAssociations">
<RegistryValue Name="application/x-musescore" Value="MuseScore.mscz.$(var.ProgIdSuffix)" Type="string" />
<RegistryValue Name="application/x-musescore+xml" Value="MuseScore.mscx.$(var.ProgIdSuffix)" Type="string" />
</RegistryKey>
<!-- URL associations -->
<RegistryKey Key="UrlAssociations">
<RegistryValue Name="musescore" Value="MuseScore.Url.musescore.$(var.ProgIdSuffix)" Type="string" />
</RegistryKey>
<!-- Open verb (TODO: this entry does not seem to be mentioned anywhere in the documentation, so does it make sense?) -->
<RegistryValue Key="shell\open\command" Value="&quot;[INSTALL_ROOT]bin\$(var.ExeName)&quot; &quot;%1&quot;" Type="string" />
</RegistryKey>
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\RegisteredApplications" Name="$(var.ProdName)" Value="$(var.CapabilitiesKey)" Type="string" />
<!-- App Paths to support Start,Run -> "myapp" -->
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\$(var.ExeKey)" Value="[INSTALL_ROOT]bin\$(var.ExeName)" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\$(var.ExeKey)" Name="Path" Value="[INSTALL_ROOT]bin" Type="string" />
<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\$(var.ExeKey)">
<RegistryValue Value="[INSTALL_ROOT]bin\$(var.ExeName)" Type="string" />
<RegistryValue Name="Path" Value="[INSTALL_ROOT]bin" Type="string" />
</RegistryKey>
<!-- Extend to the "open with" list + Win7 jump menu pinning -->
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".mscz" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".mscx" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".mscs" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".xml" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".musicxml" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".mxl" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".cap" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".capx" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".scw" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".bww" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".mid" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".midi" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".kar" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".ove" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".sgu" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".mgu" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".md" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".gtp" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".gp3" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".gp4" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".gp5" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".gpx" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".gp" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".ptb" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".sf2" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\SupportedTypes" Name=".sf3" Value="" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)" Name="FriendlyAppName" Value="$(var.ProdName)" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\shell\open" Name="FriendlyAppName" Value="$(var.ProdName)" Type="string" />
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)\shell\open\command" Value="&quot;[INSTALL_ROOT]bin\$(var.ExeName)&quot; &quot;%1&quot;" Type="string" />
<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)">
<RegistryKey Key="SupportedTypes">
<RegistryValue Name=".mscz" Value="" Type="string" />
<RegistryValue Name=".mscx" Value="" Type="string" />
<RegistryValue Name=".mscs" Value="" Type="string" />
<RegistryValue Name=".xml" Value="" Type="string" />
<RegistryValue Name=".musicxml" Value="" Type="string" />
<RegistryValue Name=".mxl" Value="" Type="string" />
<RegistryValue Name=".cap" Value="" Type="string" />
<RegistryValue Name=".capx" Value="" Type="string" />
<RegistryValue Name=".scw" Value="" Type="string" />
<RegistryValue Name=".bww" Value="" Type="string" />
<RegistryValue Name=".mid" Value="" Type="string" />
<RegistryValue Name=".midi" Value="" Type="string" />
<RegistryValue Name=".kar" Value="" Type="string" />
<RegistryValue Name=".ove" Value="" Type="string" />
<RegistryValue Name=".sgu" Value="" Type="string" />
<RegistryValue Name=".mgu" Value="" Type="string" />
<RegistryValue Name=".md" Value="" Type="string" />
<RegistryValue Name=".gtp" Value="" Type="string" />
<RegistryValue Name=".gp3" Value="" Type="string" />
<RegistryValue Name=".gp4" Value="" Type="string" />
<RegistryValue Name=".gp5" Value="" Type="string" />
<RegistryValue Name=".gpx" Value="" Type="string" />
<RegistryValue Name=".gp" Value="" Type="string" />
<RegistryValue Name=".ptb" Value="" Type="string" />
<RegistryValue Name=".sf2" Value="" Type="string" />
<RegistryValue Name=".sf3" Value="" Type="string" />
</RegistryKey>
<!-- MyApp.Document ProgIDs -->
<?if $(var.CPACK_WIX_FILE_ASSOCIATION) = ON ?>
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.mscz" Value="MuseScore File" Type="string"/>
<ProgId Id="MuseScore.mscz" Description="Compressed MuseScore File" Advertise="no" Icon="$(var.ExeId)" IconIndex="1">
<Extension Id="mscz" Advertise="no">
<Verb Id="open" TargetFile="$(var.ExeId)" Command="Open" Argument="&quot;%1&quot;" />
<MIME Advertise="no" ContentType="application/x-musescore" Default="yes" />
</Extension>
</ProgId>
<RegistryValue Name="FriendlyAppName" Value="$(var.ProdName)" Type="string" />
<RegistryValue Key="shell\open" Name="FriendlyAppName" Value="$(var.ProdName)" Type="string" />
<RegistryValue Key="shell\open\command" Value="&quot;[INSTALL_ROOT]bin\$(var.ExeName)&quot; &quot;%1&quot;" Type="string" />
</RegistryKey>
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.mscx" Value="MuseScore Uncompressed File" Type="string" />
<ProgId Id="MuseScore.mscx" Description="MuseScore File" Advertise="no" Icon="$(var.ExeId)" IconIndex="2">
<Extension Id="mscx" Advertise="no">
<Verb Id="open" TargetFile="$(var.ExeId)" Command="Open" Argument="&quot;%1&quot;" />
<MIME Advertise="no" ContentType="application/x-musescore+xml" Default="no" />
</Extension>
</ProgId>
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.mscs" Value="MuseScore Uncompressed File" Type="string" />
<ProgId Id="MuseScore.mscs" Description="MuseScore File" Advertise="no" Icon="$(var.ExeId)" IconIndex="1">
<Extension Id="mscs" Advertise="no">
<Verb Id="open" TargetFile="$(var.ExeId)" Command="Open" Argument="&quot;%1&quot;" />
</Extension>
</ProgId>
<!-- Register ProgIDs -->
<!-- Instead of using WiX's/MSI's ProgId functionality, we use the registry directly for more control -->
<!-- MSCZ -->
<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.mscz.$(var.ProgIdSuffix)">
<RegistryValue Value="MuseScore File" Type="string" />
<RegistryValue Key="DefaultIcon" Value="[INSTALL_ROOT]bin\$(var.ExeName),1" Type="string" />
<RegistryValue Key="shell\open\command" Value="&quot;[INSTALL_ROOT]bin\$(var.ExeName)&quot; &quot;%1&quot;" Type="string" />
</RegistryKey>
<?ifndef MUSESCORE_UNSTABLE?>
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.mscz\CurVer" Value="MuseScore.mscz.$(var.ProgIdSuffix)" Type="string" />
<?endif?>
<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\.mscz">
<?ifndef MUSESCORE_UNSTABLE?>
<RegistryValue Value="MuseScore.mscz.$(var.ProgIdSuffix)" Type="string" />
<?endif?>
<RegistryValue Name="Content Type" Value="application/x-musescore" Type="string" />
</RegistryKey>
<!-- MSCX -->
<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.mscx.$(var.ProgIdSuffix)">
<RegistryValue Value="MuseScore Uncompressed File" Type="string" />
<RegistryValue Key="DefaultIcon" Value="[INSTALL_ROOT]bin\$(var.ExeName),2" Type="string" />
<RegistryValue Key="shell\open\command" Value="&quot;[INSTALL_ROOT]bin\$(var.ExeName)&quot; &quot;%1&quot;" Type="string" />
</RegistryKey>
<?ifndef MUSESCORE_UNSTABLE?>
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.mscx\CurVer" Value="MuseScore.mscx.$(var.ProgIdSuffix)" Type="string" />
<?endif?>
<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\.mscx">
<?ifndef MUSESCORE_UNSTABLE?>
<RegistryValue Value="MuseScore.mscx.$(var.ProgIdSuffix)" Type="string" />
<?endif?>
<RegistryValue Name="Content Type" Value="application/x-musescore+xml" Type="string" />
</RegistryKey>
<!-- MSCS -->
<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.mscs.$(var.ProgIdSuffix)">
<RegistryValue Value="MuseScore Uncompressed File" Type="string" />
<RegistryValue Key="DefaultIcon" Value="[INSTALL_ROOT]bin\$(var.ExeName),1" Type="string" />
<RegistryValue Key="shell\open\command" Value="&quot;[INSTALL_ROOT]bin\$(var.ExeName)&quot; &quot;%1&quot;" Type="string" />
</RegistryKey>
<?ifndef MUSESCORE_UNSTABLE?>
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.mscs\CurVer" Value="MuseScore.mscs.$(var.ProgIdSuffix)" Type="string" />
<?endif?>
<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\.mscs">
<?ifndef MUSESCORE_UNSTABLE?>
<RegistryValue Value="MuseScore.mscs.$(var.ProgIdSuffix)" Type="string" />
<?endif?>
<RegistryValue Name="Content Type" Value="application/x-musescore+xml" Type="string" />
</RegistryKey>
<!-- musescore URL scheme -->
<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.Url.musescore.$(var.ProgIdSuffix)">
<RegistryValue Value="MuseScore URL" Type="string" />
<RegistryValue Key="DefaultIcon" Value="[INSTALL_ROOT]bin\$(var.ExeName),1" Type="string" />
<RegistryValue Key="shell\open\command" Value="&quot;[INSTALL_ROOT]bin\$(var.ExeName)&quot; &quot;%1&quot;" Type="string" />
</RegistryKey>
<?ifndef MUSESCORE_UNSTABLE?>
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.Url.musescore\CurVer" Value="MuseScore.Url.musescore.$(var.ProgIdSuffix)" Type="string" />
<?endif?>
<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\musescore">
<RegistryValue Name="URL Protocol" Value="" Type="string" />
<RegistryValue Value="URL:MuseScore URL" Type="string" />
</RegistryKey>
</Component>
<FeatureRef Id="ProductFeature">
<!-- Step 3: Tell WiX to install the shortcut and types -->
<ComponentRef Id="RegisterTypes" />
</FeatureRef>
<?include "properties.wxi"?>
<?include "product_fragment.wxi"?>
</Product>
</Wix>

View File

@ -68,8 +68,8 @@ elseif(OS_IS_MAC)
set(MACOSX_BUNDLE_ICON_FILE AppIcon.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.musescore.${MUSESCORE_NAME})
set(MACOSX_BUNDLE_BUNDLE_NAME ${MUSESCORE_NAME})
set(MACOSX_BUNDLE_LONG_VERSION_STRING ${MUSESCORE_VERSION_FULL})
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${MUSESCORE_VERSION_FULL})
set(MACOSX_BUNDLE_LONG_VERSION_STRING ${MUSESCORE_VERSION})
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${MUSESCORE_VERSION})
set(MACOSX_BUNDLE_BUNDLE_VERSION ${CMAKE_BUILD_NUMBER})
set(MACOSX_BUNDLE_COPYRIGHT "Copyright © 1999-2023 MuseScore BVBA and others. Published under the GNU General Public License version 3.")

View File

@ -18,12 +18,12 @@
#=============================================================================
set(MUSESCORE_NAME "MuseScore")
set(MUSESCORE_VERSION_MAJOR "4")
set(MUSESCORE_VERSION_MINOR "2")
set(MUSESCORE_VERSION_PATCH "0")
set(MUSESCORE_VERSION "${MUSESCORE_VERSION_MAJOR}.${MUSESCORE_VERSION_MINOR}")
set(MUSESCORE_VERSION_FULL "${MUSESCORE_VERSION}.${MUSESCORE_VERSION_PATCH}")
set(MUSESCORE_VERSION_LABEL "")
set(MUSESCORE_VERSION_MAJOR "4")
set(MUSESCORE_VERSION_MINOR "2")
set(MUSESCORE_VERSION_PATCH "0")
set(MUSESCORE_VERSION_MAJ_MIN "${MUSESCORE_VERSION_MAJOR}.${MUSESCORE_VERSION_MINOR}")
set(MUSESCORE_VERSION "${MUSESCORE_VERSION_MAJ_MIN}.${MUSESCORE_VERSION_PATCH}")
set(MUSESCORE_VERSION_LABEL "")
if(MUSESCORE_BUILD_MODE MATCHES "dev")
set(MUSESCORE_RELEASE_CHANNEL "devel")
@ -39,5 +39,4 @@ endif()
# Print variables which are needed by CI build scripts.
message(STATUS "MUSESCORE_RELEASE_CHANNEL ${MUSESCORE_RELEASE_CHANNEL}")
message(STATUS "MUSESCORE_VERSION_FULL ${MUSESCORE_VERSION_FULL}")
message(STATUS "MUSESCORE_VERSION ${MUSESCORE_VERSION}")