Skip to content

Commit

Permalink
removed config.h
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkorsukov committed Feb 14, 2023
1 parent a337c00 commit c3fbb9f
Show file tree
Hide file tree
Showing 79 changed files with 310 additions and 535 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci_linux_mu4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ jobs:
- name: Setup environment
if: env.DO_BUILD == 'true'
run: |
echo "============================= gggg ======================="
sudo bash ./build/ci/linux/setup.sh
- name: Generate _en.ts files
if: env.DO_BUILD == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_vtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup environment
run: |
bash ./build/ci/linux/setup.sh
sudo bash ./build/ci/linux/setup.sh
- name: Build
run: |
source $HOME/build_tools/environment.sh
Expand Down
21 changes: 6 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ set(CMAKE_MODULE_PATH
###########################################
# Setup option and build settings
###########################################
set(MUSESCORE_BUILD_CONFIGURE "app" CACHE STRING "Build configure")
# Possible MUSESCORE_BUILD_CONFIGURE values:
set(MUSESCORE_BUILD_CONFIGURATION "app" CACHE STRING "Build configuration")
# Possible MUSESCORE_BUILD_CONFIGURATION values:
# - app - for desktop app
# - app-portable - for desktop portable app (Windows build for PortableApps.com)
# - vtest - for visual tests
# - utest - for unit tests
# - utest - for unit tests (for CI)

set(MUSESCORE_BUILD_MODE "dev" CACHE STRING "Build mode")
# Possible MUSESCORE_BUILD_MODE values:
Expand Down Expand Up @@ -89,7 +89,7 @@ option(MUE_DOWNLOAD_SOUNDFONT "Download the latest soundfont version as part of

# === Pack ===
option(MUE_RUN_LRELEASE "Generate .qm files" ON)
option(MUE_PACKAGE_FILE_ASSOCIATION "File types association" OFF)
option(MUE_ENABLE_FILE_ASSOCIATION "File types association (using for package)" OFF)

# === Tests ===
option(MUE_BUILD_UNIT_TESTS "Build unit tests" ON)
Expand Down Expand Up @@ -123,6 +123,8 @@ option(MUE_ENABLE_ENGRAVING_PAINT_DEBUGGER "Enable diagnostic engraving paint de
###########################################
include(SetupConfigure)

set(THIRDPARTY_DIR ${PROJECT_SOURCE_DIR}/thirdparty)

###########################################
# Setup compiler and build environment
###########################################
Expand All @@ -133,17 +135,6 @@ if (MUE_COMPILE_USE_CCACHE)
include(TryUseCcache)
endif(MUE_COMPILE_USE_CCACHE)

###########################################
# Setup MuseScore config
###########################################

include(${CMAKE_CURRENT_LIST_DIR}/config.cmake)
configure_file (
${PROJECT_SOURCE_DIR}/build/config.h.in
${PROJECT_BINARY_DIR}/config.h
)

set(THIRDPARTY_DIR ${PROJECT_SOURCE_DIR}/thirdparty)

###########################################
# Setup external dependencies
Expand Down
111 changes: 89 additions & 22 deletions SetupConfigure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,70 @@
#=============================================================================

include(GetBuildType)
include(GetPlatformInfo)
include(version)

message(STATUS "MUSESCORE_BUILD_CONFIGURE: ${MUSESCORE_BUILD_CONFIGURE}")


if (NOT MUSESCORE_BUILD_CONFIGURATION)
set(MUSESCORE_BUILD_CONFIGURATION "app")
endif()

if (NOT MUSESCORE_BUILD_MODE)
set(MUSESCORE_BUILD_MODE "dev")
endif()

# Set revision for local builds
# Before need run 'make revision' or 'msvc_build.bat revision'
include(${CMAKE_CURRENT_LIST_DIR}/build/cmake/TryUseLocalRevision.cmake)

message(STATUS "MUSESCORE_BUILD_CONFIGURATION: ${MUSESCORE_BUILD_CONFIGURATION}")
message(STATUS "MUSESCORE_BUILD_MODE: ${MUSESCORE_BUILD_MODE}")
message(STATUS "MUSESCORE_BUILD_NUMBER: ${CMAKE_BUILD_NUMBER}")

string(TOUPPER ${MUSESCORE_BUILD_CONFIGURE} BUILD_CONFIGURE)
string(TOUPPER ${MUSESCORE_BUILD_CONFIGURATION} BUILD_CONFIGURE)
string(TOUPPER ${MUSESCORE_BUILD_MODE} BUILD_MODE)

###########################################
# General
# Setup by mode
###########################################
if(BUILD_MODE MATCHES "DEV")
set(MUSESCORE_UNSTABLE ON)
set(MUSESCORE_VERSION_LABEL "dev")
set(MUSESCORE_NAME_VERSION "${MUSESCORE_NAME} ${MUSESCORE_VERSION_MAJOR}")
endif()

set(QT_SUPPORT ON)

if (NOT MUE_BUILD_AUDIO_MODULE)
set(MUE_BUILD_MUSESAMPLER_MODULE OFF)
set(MUE_BUILD_VST_MODULE OFF)
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}")
endif()

if (NOT MUE_BUILD_IMPORTEXPORT_MODULE)
set(MUE_BUILD_VIDEOEXPORT_MODULE OFF)
if(BUILD_MODE MATCHES "RELEASE")
set(MUSESCORE_UNSTABLE OFF)
set(MUSESCORE_NAME_VERSION "${MUSESCORE_NAME} ${MUSESCORE_VERSION_MAJOR}")
endif()

if (NOT MUE_BUILD_DIAGNOSTICS_MODULE)
set(MUE_BUILD_CRASHPAD_CLIENT OFF)
if (MUSESCORE_UNSTABLE)
set (MUSESCORE_NAME_VERSION "${MUSESCORE_NAME_VERSION} (${MUSESCORE_VERSION_FULL} unstable)")
endif()

if (MUE_BUILD_ASAN)
set(MUE_ENABLE_CUSTOM_ALLOCATOR OFF)
###########################################
# Setup paths
###########################################
if (OS_IS_MAC)
SET(Mscore_INSTALL_NAME "Contents/Resources/")
SET(Mscore_SHARE_NAME "mscore.app/")
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_SHARE_NAME "share/")
endif()

###########################################
# Desktop App
# CONFIGURE: Desktop App
###########################################
set(MUE_GENERAL_APP OFF)
if(BUILD_CONFIGURE MATCHES "APP")
Expand All @@ -68,14 +101,12 @@ if (MUE_GENERAL_APP)
endif()
endif()

if (OS_IS_MAC OR OS_IS_WIN)
if (WIN_PORTABLE)
set(MUE_BUILD_UPDATE_MODULE OFF)
endif()
if (WIN_PORTABLE)
set(MUE_BUILD_UPDATE_MODULE OFF)
endif()

###########################################
# VTest
# CONFIGURE: VTest
###########################################
if(BUILD_CONFIGURE MATCHES "VTEST")
set(MUE_BUILD_AUDIO_MODULE OFF)
Expand All @@ -102,16 +133,53 @@ if(BUILD_CONFIGURE MATCHES "VTEST")
endif()

###########################################
# UTest
# CONFIGURE: UTest
###########################################
if(BUILD_CONFIGURE MATCHES "UTEST")
set(MUE_BUILD_UNIT_TESTS ON)
set(MUE_ENABLE_LOGGER_DEBUGLEVEL ON)
endif()

###########################################
# Subsystem
###########################################

set(QT_SUPPORT ON)

if (NOT MUE_BUILD_AUDIO_MODULE)
set(MUE_BUILD_MUSESAMPLER_MODULE OFF)
set(MUE_BUILD_VST_MODULE OFF)
endif()

if (NOT MUE_BUILD_IMPORTEXPORT_MODULE)
set(MUE_BUILD_VIDEOEXPORT_MODULE OFF)
endif()

if (NOT MUE_BUILD_DIAGNOSTICS_MODULE)
set(MUE_BUILD_CRASHPAD_CLIENT OFF)
endif()

if (MUE_BUILD_ASAN)
set(MUE_ENABLE_CUSTOM_ALLOCATOR OFF)
endif()

###########################################
# Global definitions
###########################################

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_LABEL="${MUSESCORE_VERSION_LABEL}")
add_definitions(-DMUSESCORE_INSTALL_SUFFIX="${MUSESCORE_INSTALL_SUFFIX}")
add_definitions(-DMUSESCORE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
add_definitions(-DMUSESCORE_INSTALL_NAME="${Mscore_INSTALL_NAME}")

if (MUSESCORE_UNSTABLE)
add_definitions(-DMUSESCORE_UNSTABLE)
endif()


function(def_opt name val)
if (${val})
add_definitions(-D${name})
Expand Down Expand Up @@ -153,7 +221,6 @@ if (WIN_PORTABLE)
add_definitions(-DWIN_PORTABLE)
endif()

add_definitions(-DMUSESCORE_REVISION="${MUSESCORE_REVISION}")
add_definitions(-DHAW_PROFILER_ENABLED)

if (MUE_ENABLE_LOAD_QML_FROM_SOURCE)
Expand Down
6 changes: 3 additions & 3 deletions build/Linux+BSD/mscore.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
.Dt @MAN_MSCORE_UPPER@ 1
.Os MuseScore
.Sh NAME@Variables_substituted_by_CMAKE_on_installation@
.Nm mscore@MSCORE_INSTALL_SUFFIX@ ,
.Nm musescore@MSCORE_INSTALL_SUFFIX@
.Nm mscore@MUSESCORE_INSTALL_SUFFIX@ ,
.Nm musescore@MUSESCORE_INSTALL_SUFFIX@
.Nd @MUSESCORE_NAME_VERSION@ sheet music editor
.Sh SYNOPSIS
.Nm
Expand Down Expand Up @@ -80,7 +80,7 @@ GNU General Public Licence (GPLv2).
@MAN_PORTABLE@If MuseScore is installed, the manual can be viewed using
@MAN_PORTABLE@the familiar command:
@[email protected]
@[email protected] man mscore@MSCORE_INSTALL_SUFFIX@
@[email protected] man mscore@MUSESCORE_INSTALL_SUFFIX@
@[email protected] Cm install Oo Fl i Oc Op Ar prefix
@MAN_PORTABLE@Run this without the options to fully integrate MuseScore
@MAN_PORTABLE@with the desktop environment (GNOME, KDE, etc).
Expand Down
2 changes: 1 addition & 1 deletion build/Linux+BSD/mscore.1.preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ esac
sed \
-e 's!@MAN_MSCORE_UPPER@!MSCORE!g' \
-e 's!@Variables_substituted_by_CMAKE_on_installation@!!g' \
-e 's!@MSCORE_INSTALL_SUFFIX@!!g' \
-e 's!@MUSESCORE_INSTALL_SUFFIX@!!g' \
-e 's!@MUSESCORE_NAME_VERSION@!MuseScore 4!g' \
-e 's!@MAN_PORTABLE@!'"$portable"'!g' \
-e 's!@PORTABLE_INSTALL_NAME@!MuseScorePortable!g' \
Expand Down
14 changes: 7 additions & 7 deletions build/Linux+BSD/musescore.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<comment>MuseScore File</comment>
<glob pattern="*.mscz"/>
<sub-class-of type="application/zip"/>
<icon name="application-x-musescore@MSCORE_INSTALL_SUFFIX@"/>
<icon name="application-x-musescore@MUSESCORE_INSTALL_SUFFIX@"/>
</mime-type>

<mime-type type="application/x-musescore+xml">
<comment>MuseScore Uncompressed File</comment>
<glob pattern="*.mscx"/>
<sub-class-of type="application/xml"/>
<root-XML namespaceURI="" localName="museScore"/>
<icon name="application-x-musescore@MSCORE_INSTALL_SUFFIX@+xml"/>
<icon name="application-x-musescore@MUSESCORE_INSTALL_SUFFIX@+xml"/>
<magic>
<match type="string" value="&lt;?xml" offset="0">
<match type="string" value="&lt;museScore" offset="0:128">
Expand All @@ -30,7 +30,7 @@
<glob pattern="*.mscsx"/>
<sub-class-of type="application/xml"/>
<root-XML namespaceURI="" localName="museScore"/>
<icon name="application-x-musescore@MSCORE_INSTALL_SUFFIX@+xml"/>
<icon name="application-x-musescore@MUSESCORE_INSTALL_SUFFIX@+xml"/>
<magic>
<match type="string" value="&lt;?xml" offset="0">
<match type="string" value="&lt;museScore" offset="0:128">
Expand All @@ -44,15 +44,15 @@
<comment>MuseScore compressed backup score</comment>
<glob pattern="*.mscz,"/>
<sub-class-of type="application/zip"/>
<icon name="application-x-musescore@MSCORE_INSTALL_SUFFIX@"/>
<icon name="application-x-musescore@MUSESCORE_INSTALL_SUFFIX@"/>
</mime-type>

<mime-type type="application/x-musescore+xml">
<comment>MuseScore uncompressed backup score</comment>
<glob pattern="*.mscx,"/>
<sub-class-of type="application/xml"/>
<root-XML namespaceURI="" localName="museScore"/>
<icon name="application-x-musescore@MSCORE_INSTALL_SUFFIX@+xml"/>
<icon name="application-x-musescore@MUSESCORE_INSTALL_SUFFIX@+xml"/>
<magic>
<match type="string" value="&lt;?xml" offset="0">
<match type="string" value="&lt;museScore" offset="0:128">
Expand Down Expand Up @@ -105,7 +105,7 @@
<comment>MusicXML compressed score</comment>
<glob pattern="*.mxl"/>
<sub-class-of type="application/zip"/>
<icon name="application-vnd.recordare.musicxml@MSCORE_INSTALL_SUFFIX@"/>
<icon name="application-vnd.recordare.musicxml@MUSESCORE_INSTALL_SUFFIX@"/>
</mime-type>

<mime-type type="application/vnd.recordare.musicxml+xml">
Expand All @@ -116,7 +116,7 @@
<sub-class-of type="application/xml"/>
<root-XML namespaceURI="" localName="score-partwise"/>
<root-XML namespaceURI="" localName="score-timewise"/>
<icon name="application-vnd.recordare.musicxml@MSCORE_INSTALL_SUFFIX@+xml"/>
<icon name="application-vnd.recordare.musicxml@MUSESCORE_INSTALL_SUFFIX@+xml"/>
<magic>
<match type="string" value="&lt;?xml" offset="0">
<match type="string" value="score-partwise" offset="0:128"/>
Expand Down
18 changes: 9 additions & 9 deletions build/Linux+BSD/org.musescore.MuseScore.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
$ appstreamcli validate [filename]
$ appstream-util validate-relax [filename]
-->
<id>org.musescore.MuseScore@MSCORE_INSTALL_SUFFIX@</id>
<id>org.musescore.MuseScore@MUSESCORE_INSTALL_SUFFIX@</id>
<metadata_license>CC0-1.0</metadata_license><!-- License of this file. See <project_license> for MuseScore license. -->
<name>MuseScore</name>
<summary>Create, play and print beautiful sheet music</summary>
<icon type="stock">mscore@MSCORE_INSTALL_SUFFIX@</icon>
<icon type="stock">mscore@MUSESCORE_INSTALL_SUFFIX@</icon>
<description>
<p>MuseScore is cross-platform, multi-lingual, open source music notation software. It features an easy to use WYSIWYG editor with audio score playback for results that look and sound beautiful. It supports unlimited staves with up to four voices each, dynamics, articulations, lyrics, chords, lead sheet notation, import/export of MIDI and MusicXML, export to PDF and WAV, plus online score sharing.</p>
<p>MuseScore can upload scores directly to the score sharing site musescore.com. Program support is provided on musescore.org.</p>
Expand Down Expand Up @@ -55,11 +55,11 @@
<url type="contact">https://musescore.org/en/forum/6</url>
<url type="vcs-browser">https://github.com/musescore/MuseScore</url>
<url type="contribute">https://musescore.org/en/contribute</url>
<launchable type="desktop-id">org.musescore.MuseScore@MSCORE_INSTALL_SUFFIX@.desktop</launchable>
<launchable type="desktop-id">org.musescore.MuseScore@MUSESCORE_INSTALL_SUFFIX@.desktop</launchable>
<provides>
<!-- <mediatype> in .desktop file as MimeType -->
<binary>mscore@MSCORE_INSTALL_SUFFIX@</binary>
<id>org.musescore.MuseScore@MSCORE_INSTALL_SUFFIX@.desktop</id>
<binary>mscore@MUSESCORE_INSTALL_SUFFIX@</binary>
<id>org.musescore.MuseScore@MUSESCORE_INSTALL_SUFFIX@.desktop</id>
</provides>
<!-- <releases> moved to bottom of this file to keep it out the way -->
<supports>
Expand Down Expand Up @@ -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@MSCORE_INSTALL_SUFFIX@-@MUSESCORE_VERSION@/locale/instruments</translation>
<translation type="qt">mscore@MSCORE_INSTALL_SUFFIX@-@MUSESCORE_VERSION@/locale/musescore</translation>
<translation type="qt">mscore@MSCORE_INSTALL_SUFFIX@-@MUSESCORE_VERSION@/locale/qt</translation>
<translation type="qt">mscore@MSCORE_INSTALL_SUFFIX@-@MUSESCORE_VERSION@/locale/qtbase</translation>
<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>
<content_rating type="oars-1.1"/>
<!-- GNOME extensions -->
<kudos>
Expand Down
4 changes: 2 additions & 2 deletions build/Linux+BSD/org.musescore.MuseScore.desktop.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ GenericName[fr]=Notation musicale
Comment=Create, play and print beautiful sheet music
Comment[ru]=Визуальный редактор нотных партитур
Comment[fr]=Gravure de partitions musicales
Icon=mscore@MSCORE_INSTALL_SUFFIX@
Exec=mscore@MSCORE_INSTALL_SUFFIX@ %F
Icon=mscore@MUSESCORE_INSTALL_SUFFIX@
Exec=mscore@MUSESCORE_INSTALL_SUFFIX@ %F
Terminal=false
MimeType=application/x-musescore;application/x-musescore+xml;application/vnd.recordare.musicxml;application/vnd.recordare.musicxml+xml;audio/midi;application/x-bww;application/x-biab;application/x-capella;audio/x-gtp;application/x-musedata;application/x-overture;audio/x-ptb;application/x-sf2;application/x-sf3;
Categories=AudioVideo;Audio;Graphics;2DGraphics;VectorGraphics;RasterGraphics;Publishing;Midi;Mixer;Sequencer;Music;Qt;
Expand Down
2 changes: 1 addition & 1 deletion build/Linux+BSD/portable/AppRun.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ case "$1" in
"${APPDIR}/bin/portable-utils" "$@"
;;
* )
"${APPDIR}/bin/mscore@MSCORE_INSTALL_SUFFIX@" "$@"
"${APPDIR}/bin/mscore@MUSESCORE_INSTALL_SUFFIX@" "$@"
;;
esac
Loading

0 comments on commit c3fbb9f

Please sign in to comment.