From 198319231f55bf7783b6473e3898fe0482ef2858 Mon Sep 17 00:00:00 2001 From: shoogle Date: Sat, 25 Jul 2015 00:26:54 +0100 Subject: [PATCH] fix #57736 and improve Debian packaging to enable Ubuntu nightlies - Flag unstable builds more obviously - Add SUFFIX to filenames to prevent conflicts when installing multiple mscore versions in PATH. - Update references to files with SUFFIX. - Compress man page with highest gzip compression (Debian requirement) - Display version in title bar of main window. - fix #57736: enable/disable LAME mp3 support via Makefile option. - Makefile option to not update MIME and icon cache on Linux. - rename linux files for consistency with other CMake config files - Label special builds in title bar (e.g. nightly builds). - Create symlink aliases for mscore and man pages. - Correct MimeType associations for nightlies in desktop file. - Don't manually set RPATH, let CMake handle it automatically. - Makefile option to not set RPATH at all (Debian requirement). --- CMakeLists.txt | 60 ++++++++++++++++++----- Makefile | 48 +++++++++++++----- build/config.h.in | 7 +-- build/{mscore.1 => mscore.1.in} | 6 +-- build/mscore.desktop | 16 ------ build/mscore.desktop.in | 16 ++++++ build/{musescore.xml => musescore.xml.in} | 8 +-- mscore/CMakeLists.txt | 39 ++++++++++----- mscore/musescore.cpp | 8 +-- 9 files changed, 144 insertions(+), 64 deletions(-) rename build/{mscore.1 => mscore.1.in} (95%) delete mode 100644 build/mscore.desktop create mode 100644 build/mscore.desktop.in rename build/{musescore.xml => musescore.xml.in} (82%) diff --git a/CMakeLists.txt b/CMakeLists.txt index f6d2e3d732b2..a03c01a6568b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,7 @@ option(OCR "enable OCR, requires OMR" OFF) # requires tesser option(SOUNDFONT3 "ogg vorbis compressed fonts" ON) # enable ogg vorbis compressed fonts, require ogg & vorbis option(HAS_AUDIOFILE "enable audio export" ON) # requires libsndfile option(USE_SYSTEM_QTSINGLEAPPLICATION "Use system QtSingleApplication" OFF) -option(BUILD_LAME "enable mp3 export" ON) # requires libmp3lame +option(BUILD_LAME "enable mp3 export" ON) # requires libmp3lame (non-free), call CMake with -DBUILD_LAME="OFF" to disable SET(JACK_LONGNAME "jack (jack audio connection kit)") SET(JACK_MIN_VERSION "0.98.0") @@ -131,7 +131,7 @@ else (APPLE) endif(APPLE) set(CMAKE_INCLUDE_CURRENT_DIR TRUE) -set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) +set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) # Call CMake with option -DCMAKE_SKIP_RPATH to not set RPATH (Debian packaging requirement) set(CMAKE_SKIP_RULE_DEPENDENCY TRUE) # The Mscore version number. @@ -146,6 +146,14 @@ SET(MUSESCORE_NAME_VERSION "${MUSESCORE_NAME} ${MUSESCORE_VERSION_MAJOR}") # SET(MUSESCORE_VERSION_FULL "${MUSESCORE_VERSION}.${MUSESCORE_VERSION_PATCH}") +if (MUSESCORE_LABEL) + SET (MUSESCORE_NAME_VERSION "${MUSESCORE_NAME_VERSION} ${MUSESCORE_LABEL}") +endif (MUSESCORE_LABEL) + +if (MSCORE_UNSTABLE) + SET (MUSESCORE_NAME_VERSION "${MUSESCORE_NAME_VERSION} (${MUSESCORE_VERSION_FULL} unstable)") +endif (MSCORE_UNSTABLE) + if (MINGW OR APPLE) if(MINGW) SET(Mscore_INSTALL_NAME "") @@ -155,7 +163,7 @@ if (MINGW OR APPLE) SET(Mscore_SHARE_NAME "mscore.app/") endif(MINGW) else (MINGW OR APPLE) - SET(Mscore_INSTALL_NAME "mscore-${MUSESCORE_VERSION}/") + SET(Mscore_INSTALL_NAME "mscore${MSCORE_INSTALL_SUFFIX}-${MUSESCORE_VERSION}/") SET(Mscore_SHARE_NAME "share/") endif (MINGW OR APPLE) @@ -395,31 +403,44 @@ configure_file ( ) if (NOT MINGW 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 # - set (CMAKE_EXE_LINKER_FLAGS "-Wl,-rpath=${_qt5Core_install_prefix}/lib") - # install desktop file - install( FILES build/mscore.desktop DESTINATION share/applications) + SET(CMAKE_INSTALL_RPATH "${_qt5Core_install_prefix}/lib") # ignored if CMAKE_SKIP_RPATH="TRUE" + # install desktop file (perform variable substitution first) + configure_file(build/mscore.desktop.in mscore${MSCORE_INSTALL_SUFFIX}.desktop) + install( FILES ${PROJECT_BINARY_DIR}/mscore${MSCORE_INSTALL_SUFFIX}.desktop DESTINATION share/applications) + # substitute variables within man pages + set(MAN_NAME mscore) + set(MAN_ALIAS musescore) + set(MAN_EXTENSION .1) + set(MAN_FULL_NAME ${MAN_NAME}${MSCORE_INSTALL_SUFFIX}${MAN_EXTENSION}) + set(MAN_FULL_ALIAS ${MAN_ALIAS}${MSCORE_INSTALL_SUFFIX}${MAN_EXTENSION}) + set(MAN_TARGET ${PROJECT_SOURCE_DIR}/build/${MAN_NAME}${MAN_EXTENSION}.in) + set(MAN_BUILD ${PROJECT_BINARY_DIR}/${MAN_FULL_NAME}) + 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 - set(MAN_TARGET ${PROJECT_SOURCE_DIR}/build/mscore.1) 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_BUILD ${PROJECT_BINARY_DIR}/mscore.1.gz) + set(MAN_TARGET ${MAN_BUILD}) + set(MAN_EXTENSION ${MAN_EXTENSION}.gz) + set(MAN_FULL_NAME ${MAN_NAME}${MSCORE_INSTALL_SUFFIX}${MAN_EXTENSION}) + set(MAN_FULL_ALIAS ${MAN_ALIAS}${MSCORE_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} < ${MAN_TARGET} > ${MAN_BUILD} + COMMAND ${GZIP_EXECUTABLE} -9 < ${MAN_TARGET} > ${MAN_BUILD} ) add_custom_target(manpages DEPENDS ${MAN_BUILD} COMMAND echo "Man pages have been compressed ready for installation." VERBATIM ) - set(MAN_TARGET ${MAN_BUILD}) 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.") @@ -432,9 +453,24 @@ if (NOT MINGW AND NOT APPLE) ) endif (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD") # install man pages in either compressed or uncompressed form - install( FILES ${MAN_TARGET} DESTINATION share/man/man1 COMPONENT doc) + 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 and .MSCX to MIME database (informs system that filetypes .MSCZ & .MSCX are MuseScore files) - install( FILES ${PROJECT_SOURCE_DIR}/build/musescore.xml DESTINATION share/mime/packages COMPONENT doc) + configure_file(build/musescore.xml.in musescore${MSCORE_INSTALL_SUFFIX}.xml) + install( FILES ${PROJECT_BINARY_DIR}/musescore${MSCORE_INSTALL_SUFFIX}.xml DESTINATION share/mime/packages COMPONENT doc) # Note: must now run "update-mime-database" to apply changes. This is done in the Makefile. endif (NOT MINGW AND NOT APPLE) diff --git a/Makefile b/Makefile index 3d61cf584ed1..aca94157143d 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,14 @@ PREFIX = "/usr/local" VERSION = "2.1b-${REVISION}" #VERSION = 2.1.0 +# Override SUFFIX and LABEL when multiple versions are installed to avoid conflicts. +SUFFIX=""# E.g.: SUFFIX="dev" --> "mscore" becomes "mscoredev" +LABEL=""# E.g.: LABEL="Development Build" --> "MuseScore 2" becomes "MuseScore 2 Development Build" + +BUILD_LAME="ON"# Non-free, required for MP3 support. Override with "OFF" to disable. +UPDATE_CACHE="TRUE"# Override if building a DEB or RPM, or when installing to a non-standard location. +NO_RPATH="FALSE"# Package maintainers may want to override this (e.g. Debian) + # # change path to include your Qt5 installation # @@ -39,9 +47,14 @@ release: cd build.release; \ export PATH=${BINPATH}; \ cmake -DCMAKE_BUILD_TYPE=RELEASE \ - -DCMAKE_INSTALL_PREFIX="${PREFIX}" ..; \ + -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ + -DMSCORE_INSTALL_SUFFIX="${SUFFIX}" \ + -DMUSESCORE_LABEL="${LABEL}" \ + -DBUILD_LAME="${BUILD_LAME}" \ + -DCMAKE_SKIP_RPATH="${NO_RPATH}" ..; \ make lrelease; \ make manpages; \ + make mscore_alias; \ make -j ${CPUS}; \ @@ -49,10 +62,15 @@ debug: if test ! -d build.debug; then mkdir build.debug; fi; \ cd build.debug; \ export PATH=${BINPATH}; \ - cmake -DCMAKE_BUILD_TYPE=DEBUG \ - -DCMAKE_INSTALL_PREFIX="${PREFIX}" ..; \ + cmake -DCMAKE_BUILD_TYPE=DEBUG \ + -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ + -DMSCORE_INSTALL_SUFFIX="${SUFFIX}" \ + -DMUSESCORE_LABEL="${LABEL}" \ + -DBUILD_LAME="${BUILD_LAME}" \ + -DCMAKE_SKIP_RPATH="${NO_RPATH}" ..; \ make lrelease; \ make manpages; \ + make mscore_alias; \ make -j ${CPUS}; \ @@ -97,26 +115,34 @@ version: install: release cd build.release \ && make install/strip \ - && update-mime-database "${PREFIX}/share/mime" \ - && gtk-update-icon-cache -f -t "${PREFIX}/share/icons/hicolor" + && if [ ${UPDATE_CACHE} = "TRUE" ]; then \ + update-mime-database "${PREFIX}/share/mime"; \ + gtk-update-icon-cache -f -t "${PREFIX}/share/icons/hicolor"; \ + fi installdebug: debug cd build.debug \ && make install \ - && update-mime-database "${PREFIX}/share/mime" \ - && gtk-update-icon-cache -f -t "${PREFIX}/share/icons/hicolor" + && if [ ${UPDATE_CACHE} = "TRUE" ]; then \ + update-mime-database "${PREFIX}/share/mime"; \ + gtk-update-icon-cache -f -t "${PREFIX}/share/icons/hicolor"; \ + fi uninstall: cd build.release \ && xargs rm < install_manifest.txt \ - && update-mime-database "${PREFIX}/share/mime" \ - && gtk-update-icon-cache -f -t "${PREFIX}/share/icons/hicolor" + && if [ ${UPDATE_CACHE} = "TRUE" ]; then \ + update-mime-database "${PREFIX}/share/mime"; \ + gtk-update-icon-cache -f -t "${PREFIX}/share/icons/hicolor"; \ + fi uninstalldebug: cd build.debug \ && xargs rm < install_manifest.txt \ - && update-mime-database "${PREFIX}/share/mime" \ - && gtk-update-icon-cache -f -t "${PREFIX}/share/icons/hicolor" + && if [ ${UPDATE_CACHE} = "TRUE" ]; then \ + update-mime-database "${PREFIX}/share/mime"; \ + gtk-update-icon-cache -f -t "${PREFIX}/share/icons/hicolor"; \ + fi # # linux diff --git a/build/config.h.in b/build/config.h.in index 93e79f215c1c..d9410d0dbf80 100644 --- a/build/config.h.in +++ b/build/config.h.in @@ -32,9 +32,10 @@ #cmakedefine HAS_AUDIOFILE #cmakedefine USE_SSE -#define INSTALL_NAME "${Mscore_INSTALL_NAME}" -#define INSTPREFIX "${CMAKE_INSTALL_PREFIX}" -#define VERSION "${MUSESCORE_VERSION_FULL}" +#define MUSESCORE_NAME_VERSION "${MUSESCORE_NAME_VERSION}" +#define INSTALL_NAME "${Mscore_INSTALL_NAME}" +#define INSTPREFIX "${CMAKE_INSTALL_PREFIX}" +#define VERSION "${MUSESCORE_VERSION_FULL}" #cmakedefine AEOLUS #cmakedefine ZERBERUS diff --git a/build/mscore.1 b/build/mscore.1.in similarity index 95% rename from build/mscore.1 rename to build/mscore.1.in index e126c60f0dae..8701e62ed994 100644 --- a/build/mscore.1 +++ b/build/mscore.1.in @@ -19,13 +19,13 @@ .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. -.SH NAME -\fBmscore\fP \- MuseScore sheet music editor. +.SH NAME@Variables_substituted_by_CMAKE_on_installation@ +\fBmscore@MSCORE_INSTALL_SUFFIX@\fP \- @MUSESCORE_NAME_VERSION@ sheet music editor. MuseScore is a free and open source WYSIWYG typesetting program for musical scores, released under the GNU General Public Licence. .SH SYNOPSIS -.B mscore +.B mscore@MSCORE_INSTALL_SUFFIX@ .RI [ options ] .RI [ filename(s) ] diff --git a/build/mscore.desktop b/build/mscore.desktop deleted file mode 100644 index fea1926b4a50..000000000000 --- a/build/mscore.desktop +++ /dev/null @@ -1,16 +0,0 @@ -[Desktop Entry] -Version=2.0 -Comment=Create, play and print sheet music -Comment[ru]=Визуальный редактор нотных партитур -Comment[fr]=Gravure de partitions musicales -Exec=mscore %F -GenericName=Music notation -GenericName[de]=Notensatz -GenericName[fr]=Notation musicale -Icon=mscore -Name=MuseScore -StartupNotify=true -Terminal=false -Type=Application -Categories=Qt;Audio;Sequencer;Midi;AudioVideoEditing;Music;AudioVideo; -MimeType=application/x-musescore;application/x-musescore+xml;application/vnd.recordare.musicxml;application/vnd.recordare.musicxml+xml; diff --git a/build/mscore.desktop.in b/build/mscore.desktop.in new file mode 100644 index 000000000000..2830680938da --- /dev/null +++ b/build/mscore.desktop.in @@ -0,0 +1,16 @@ +[Desktop Entry] +Version=1.1@This_is_version_of_Desktop_Entry_Specification@@It_is_NOT_MuseScore_version@ +Name=@MUSESCORE_NAME_VERSION@@Variables_substituted_by_CMAKE_on_installation@ +GenericName=Music notation +GenericName[de]=Notensatz +GenericName[fr]=Notation musicale +Comment=Create, play and print sheet music +Comment[ru]=Визуальный редактор нотных партитур +Comment[fr]=Gravure de partitions musicales +Exec=mscore@MSCORE_INSTALL_SUFFIX@ %F +Icon=mscore@MSCORE_INSTALL_SUFFIX@ +StartupNotify=true +Terminal=false +Type=Application +Categories=Qt;Audio;Sequencer;Midi;AudioVideoEditing;Music;AudioVideo; +MimeType=application/x-musescore@MSCORE_INSTALL_SUFFIX@;application/x-musescore@MSCORE_INSTALL_SUFFIX@+xml;application/vnd.recordare.musicxml@MSCORE_INSTALL_SUFFIX@;application/vnd.recordare.musicxml@MSCORE_INSTALL_SUFFIX@+xml; diff --git a/build/musescore.xml b/build/musescore.xml.in similarity index 82% rename from build/musescore.xml rename to build/musescore.xml.in index 459116517325..56fe05bd37a7 100644 --- a/build/musescore.xml +++ b/build/musescore.xml.in @@ -1,16 +1,16 @@ - + @Variables_substituted_by_CMAKE_on_installation@ MuseScore file - + uncompressed MuseScore file - + <_comment>MusicXML file @@ -19,7 +19,7 @@ - + <_comment>uncompressed MusicXML file diff --git a/mscore/CMakeLists.txt b/mscore/CMakeLists.txt index f25040775d03..1beb4f38f267 100644 --- a/mscore/CMakeLists.txt +++ b/mscore/CMakeLists.txt @@ -310,6 +310,8 @@ target_link_libraries(mscore if (MINGW) set(MSCORE_OUTPUT_NAME ${MUSESCORE_NAME}) +elseif (MSCORE_INSTALL_SUFFIX) + set(MSCORE_OUTPUT_NAME "${ExecutableName}${MSCORE_INSTALL_SUFFIX}") endif (MINGW) #if MSCORE_OUTPUT_NAME is set (e.g, when cmake is called by the user), the output executable will be @@ -525,28 +527,43 @@ else (MINGW) install (FILES data/mscore.icns DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}) install (FILES data/musescoreDocument.icns DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}) else (APPLE) - # Linux: install mscore executable (package maintainers may add "MuseScore" and/or "musescore" aliases that symlink to mscore) + #### PACKAGING for Linux and BSD based systems (more in top-level CMakeLists.txt) #### + # install mscore executable (package maintainers may add "MuseScore" and/or "musescore" aliases that symlink to mscore) install( TARGETS mscore RUNTIME DESTINATION bin ) + if (LN_EXECUTABLE) + add_custom_target(mscore_alias + DEPENDS mscore + COMMAND echo "Creating symlink alias for mscore executable." + COMMAND ${LN_EXECUTABLE} -sf "mscore${MSCORE_INSTALL_SUFFIX}" "musescore${MSCORE_INSTALL_SUFFIX}" + COMMAND echo 'Symlink alias: musescore${MSCORE_INSTALL_SUFFIX} -> mscore${MSCORE_INSTALL_SUFFIX}' + ) + install( FILES ${PROJECT_BINARY_DIR}/mscore/musescore${MSCORE_INSTALL_SUFFIX} DESTINATION bin) + else (LN_EXECUTABLE) + add_custom_target(mscore_alias + COMMAND echo "No symlink aliases will be created." + VERBATIM + ) + endif (LN_EXECUTABLE) # install MuseScore icons (use SVGs where possible, but install PNGs as backup for systems that don't support SVG) - install( FILES ../assets/musescore-icon-round.svg RENAME mscore.svg DESTINATION share/icons/hicolor/scalable/apps) - install( FILES ../assets/musescore-icon-round-64.png RENAME mscore.png DESTINATION share/icons/hicolor/64x64/apps) + install( FILES ../assets/musescore-icon-round.svg RENAME mscore${MSCORE_INSTALL_SUFFIX}.svg DESTINATION share/icons/hicolor/scalable/apps) + install( FILES ../assets/musescore-icon-round-64.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/64x64/apps) # install MIME (filetype) icons for each mimetype on Linux - install( FILES ../assets/mscz-icon.svg RENAME application-x-musescore.svg + install( FILES ../assets/mscz-icon.svg RENAME application-x-musescore${MSCORE_INSTALL_SUFFIX}.svg DESTINATION share/icons/hicolor/scalable/mimetypes) # SVG icon for .MSCZ files - install( FILES ../assets/mscz-icon-48.png RENAME application-x-musescore.png + install( FILES ../assets/mscz-icon-48.png RENAME application-x-musescore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/48x48/mimetypes) # PNG icon for .MSCZ files - install( FILES ../assets/mscx-icon.svg RENAME application-x-musescore+xml.svg + install( FILES ../assets/mscx-icon.svg RENAME application-x-musescore${MSCORE_INSTALL_SUFFIX}+xml.svg DESTINATION share/icons/hicolor/scalable/mimetypes) # SVG icon for .MSCX files - install( FILES ../assets/mscx-icon-48.png RENAME application-x-musescore+xml.png + install( FILES ../assets/mscx-icon-48.png RENAME application-x-musescore${MSCORE_INSTALL_SUFFIX}+xml.png DESTINATION share/icons/hicolor/48x48/mimetypes) # PNG icon for .MSCX files # use a custom icon for MusicXML files (there isn't a standard icon for MusicXML files) - install( FILES ../assets/mxl-icon.svg RENAME application-vnd.recordare.musicxml.svg + install( FILES ../assets/mxl-icon.svg RENAME application-vnd.recordare.musicxml${MSCORE_INSTALL_SUFFIX}.svg DESTINATION share/icons/hicolor/scalable/mimetypes) # SVG icon for .MXL (compressed MusicXML) files - install( FILES ../assets/mxl-icon-48.png RENAME application-vnd.recordare.musicxml.png + install( FILES ../assets/mxl-icon-48.png RENAME application-vnd.recordare.musicxml${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/48x48/mimetypes) # PNG icon for .MXL (compressed MusicXML) files - install( FILES ../assets/xml-icon.svg RENAME application-vnd.recordare.musicxml+xml.svg + install( FILES ../assets/xml-icon.svg RENAME application-vnd.recordare.musicxml${MSCORE_INSTALL_SUFFIX}+xml.svg DESTINATION share/icons/hicolor/scalable/mimetypes) # SVG icon for .XML (MusicXML) files - install( FILES ../assets/xml-icon-48.png RENAME application-vnd.recordare.musicxml+xml.png + install( FILES ../assets/xml-icon-48.png RENAME application-vnd.recordare.musicxml${MSCORE_INSTALL_SUFFIX}+xml.png DESTINATION share/icons/hicolor/48x48/mimetypes) # PNG icon for .XML (MusicXML) files # Note: must now run "gtk-update-icon-cache" to set the new icons. This is done in the Makefile. endif (APPLE) diff --git a/mscore/musescore.cpp b/mscore/musescore.cpp index 52261db3706d..fe7deff3938c 100644 --- a/mscore/musescore.cpp +++ b/mscore/musescore.cpp @@ -342,7 +342,7 @@ MuseScore::MuseScore() : QMainWindow() { _sstate = STATE_INIT; - setWindowTitle(QString("MuseScore")); + setWindowTitle(QString(MUSESCORE_NAME_VERSION)); setIconSize(QSize(preferences.iconWidth * guiScaling, preferences.iconHeight * guiScaling)); ucheck = new UpdateChecker(); @@ -1357,7 +1357,7 @@ void MuseScore::setCurrentScoreView(ScoreView* view) } #endif if (!cs) { - setWindowTitle("MuseScore"); + setWindowTitle(MUSESCORE_NAME_VERSION); if (_navigator && _navigator->widget()) { navigator()->setScoreView(view); navigator()->setScore(0); @@ -1408,9 +1408,9 @@ void MuseScore::setCurrentScoreView(ScoreView* view) mag->setCurrentIndex(int(view->magIdx())); if (cs->parentScore()) - setWindowTitle("MuseScore: " + cs->parentScore()->name() + "-" + cs->name()); + setWindowTitle(MUSESCORE_NAME_VERSION ": " + cs->parentScore()->name() + "-" + cs->name()); else - setWindowTitle("MuseScore: " + cs->name()); + setWindowTitle(MUSESCORE_NAME_VERSION ": " + cs->name()); QAction* a = getAction("concert-pitch"); a->setChecked(cs->styleB(StyleIdx::concertPitch));