cleaning project configuration

This commit is contained in:
Igor Korsukov 2023-02-10 16:43:22 +02:00
parent 5ac0e14649
commit bc1bbcc0e2
106 changed files with 879 additions and 799 deletions

View File

@ -46,8 +46,8 @@ set(MUSESCORE_BUILD_CONFIG "dev" CACHE STRING "Build config")
# - dev - for development/nightly builds
# - testing - for testing versions (alpha, beta, RC)
# - release - for stable release builds
set(MUSESCORE_BUILD_CONFIGURE "app" CACHE STRING "Build configure")
# Possible MUSESCORE_BUILD_CONFIGURE values:
set(MUE_BUILD_CONFIGURE "app" CACHE STRING "Build configure")
# Possible MUE_BUILD_CONFIGURE values:
# - app (or empty) - for desktop app
# - vtest - for visual tests
# - utest - for unit tests
@ -58,75 +58,75 @@ option(BUILD_PORTABLEAPPS "Windows build for PortableApps.com" OFF)
option(BUILD_FOR_WINSTORE "Build for the Windows Store." OFF)
option(BUILD_AUTOUPDATE "Build with autoupdate support" OFF)
option(BUILD_SHORTCUTS_MODULE "Build shortcuts module" ON)
option(BUILD_NETWORK_MODULE "Build network module" ON)
option(BUILD_LEARN_MODULE "Build learn module" ON)
option(BUILD_WORKSPACE_MODULE "Build workspace module" ON)
option(BUILD_CLOUD_MODULE "Build cloud module" ON)
option(BUILD_LANGUAGES_MODULE "Build languages module" ON)
option(BUILD_PLUGINS_MODULE "Build plugins module" ON)
option(BUILD_PLAYBACK_MODULE "Build playback module" ON)
option(BUILD_PALETTE_MODULE "Build palette module" ON)
option(BUILD_INSTRUMENTSSCENE_MODULE "Build instruments scene module" ON)
option(BUILD_INSPECTOR_MODULE "Build inspector module" ON)
option(BUILD_AUTOBOT_MODULE "Build autobot module" ON)
option(BUILD_MULTIINSTANCES_MODULE "Build multiinstances module" ON)
option(BUILD_UPDATE_MODULE "Build update module" ON)
option(BUILD_DIAGNOSTICS "Build diagnostic code" ON)
option(BUILD_CRASHPAD_CLIENT "Build crashpad client" ON)
set(YOUTUBE_API_KEY "" CACHE STRING "YouTube API key")
option(BUILD_AUDIO_MODULE "Build audio module" ON)
option(BUILD_MUSESAMPLER_MODULE "Build MuseSampler MODULE" ON)
# Modules framework (alphabetical order please)
option(MUE_BUILD_ACCESSIBILITY_MODULE "Build accessibility module" ON) # not impl
option(MUE_BUILD_AUDIO_MODULE "Build audio module" ON)
option(MUE_ENABLE_AUDIO_EXPORT "Enable audio export" ON)
option(MUE_BUILD_MUSESAMPLER_MODULE "Build MuseSampler module" ON)
set(MUSESAMPLER_SRC_PATH "" CACHE PATH "Path to MuseSampler sources")
option(MUE_BUILD_NETWORK_MODULE "Build network module" ON)
option(MUE_BUILD_SHORTCUTS_MODULE "Build shortcuts module" ON)
set(VST3_SDK_VERSION "3.7")
option(BUILD_VST_MODULE "Build VST MODULE" OFF)
option(MUE_BUILD_VST_MODULE "Build VST module" OFF)
set(VST3_SDK_PATH "" CACHE PATH "Path to VST3_SDK. SDK version >= ${VST3_SDK_VERSION} required")
option(BUILD_IMPORTEXPORT_MODULE "Build importexport module" ON)
option(BUILD_VIDEOEXPORT_MODULE "Build videoexport module" ON)
# Modules (alphabetical order please)
option(MUE_BUILD_AUTOBOT_MODULE "Build autobot module" ON)
option(MUE_BUILD_CLOUD_MODULE "Build cloud module" ON)
option(MUE_BUILD_DIAGNOSTICS_MODULE "Build diagnostic code" ON)
option(MUE_BUILD_IMPORTEXPORT_MODULE "Build importexport module" ON)
option(MUE_BUILD_VIDEOEXPORT_MODULE "Build videoexport module" OFF)
option(MUE_BUILD_INSPECTOR_MODULE "Build inspector module" ON)
option(MUE_BUILD_INSTRUMENTSSCENE_MODULE "Build instruments scene module" ON)
option(MUE_BUILD_LANGUAGES_MODULE "Build languages module" ON)
option(MUE_BUILD_LEARN_MODULE "Build learn module" ON)
set(MUE_LEARN_YOUTUBE_API_KEY "" CACHE STRING "YouTube API key")
option(MUE_BUILD_MULTIINSTANCES_MODULE "Build multiinstances module" ON)
option(MUE_BUILD_PALETTE_MODULE "Build palette module" ON)
option(MUE_BUILD_PLAYBACK_MODULE "Build playback module" ON)
option(MUE_BUILD_PLUGINS_MODULE "Build plugins module" ON)
option(MUE_BUILD_UPDATE_MODULE "Build update module" ON)
option(MUE_BUILD_WORKSPACE_MODULE "Build workspace module" ON)
# === Setup ===
option(MUE_DOWNLOAD_SOUNDFONT "Download the latest soundfont version as part of the build process" ON)
# === Pack ===
option(MUE_RUN_LRELEASE "Generate .qm files" ON)
option(MUE_PACKAGE_FILE_ASSOCIATION "File types association" OFF)
# === Tests ===
option(MUE_BUILD_UNIT_TESTS "Build unit tests" ON)
option(MUE_BUILD_ASAN "Enable Address Sanitizer" OFF)
# === Tools ===
option(MUE_BUILD_CRASHPAD_CLIENT "Build crashpad client" ON)
set(MUE_CRASH_REPORT_URL "" CACHE STRING "URL where to send crash reports")
option(MUE_CRASHPAD_HANDLER_PATH "Path to custom crashpad_handler executable (optional)" "")
option(MUE_ENABLE_CUSTOM_ALLOCATOR "Enable custom allocator (used for engraving)" OFF)
# === Compile ===
option(MUE_COMPILE_USE_PCH "Use precompiled headers." ON)
option(MUE_COMPILE_USE_UNITY "Use unity build." ON)
option(MUE_COMPILE_USE_CCACHE "Try use ccache" ON)
option(MUE_COMPILE_USE_SHARED_LIBS_IN_DEBUG "Build shared libs if possible in debug" OFF)
# === Debug ===
option(MUE_ENABLE_LOGGER_DEBUGLEVEL "Enable logging debug level" ON)
option(MUE_ENABLE_ACCESSIBILITY_TRACE "Enable accessibility logging" OFF)
option(MUE_ENABLE_DRAW_TRACE "Trace draw objects" OFF)
option(MUE_DISABLE_UI_MODALITY "Disable dialogs modality for testing purpose" OFF)
option(MUE_ENABLE_LOAD_QML_FROM_SOURCE "Load qml files from source (not resource)" OFF)
option(ENGRAVING_PAINT_DEBUGGER_ENABLED "Enable diagnostic engraving paint debugger" OFF)
# Temporary flags for MU3 compatibility to make testing easier.
option(ENGRAVING_COMPAT_WRITESTYLE_302 "Write style to score xml file" OFF)
option(ENGRAVING_COMPAT_WRITEEXCERPTS_302 "Write excerpts to score xml file" ON)
# -----
option(SOUNDFONT3 "Ogg Vorbis compressed fonts" ON) # Enable Ogg Vorbis compressed fonts, requires Ogg & Vorbis
option(DOWNLOAD_SOUNDFONT "Download the latest soundfont version as part of the build process" ON)
# Pack
option(PACKAGE_FILE_ASSOCIATION "File types association" OFF)
# Development
option(BUILD_UNIT_TESTS "Build gtest unit test" ON)
set(CRASH_REPORT_URL "" CACHE STRING "URL where to send crash reports")
option(CRASHPAD_HANDLER_PATH "Path to custom crashpad_handler executable (optional)" "")
option(LOGGER_DEBUGLEVEL_ENABLED "Enable logging debug level" ON)
option(ACCESSIBILITY_LOGGING_ENABLED "Enable accessibility logging" OFF)
option(MUE_RUN_LRELEASE "Generate .qm files" ON)
option(TRY_USE_CCACHE "Try use ccache" ON)
option(BUILD_PCH "Build using precompiled headers." ON)
option(BUILD_UNITY "Build using unity build." ON)
option(TRY_BUILD_SHARED_LIBS_IN_DEBUG "Build shared libs if possible in debug" OFF)
option(BUILD_ASAN "Enable Address Sanitizer" OFF) # if ON, then disabled custom allocator
option(BUILD_ALLOCATOR "Enable Custom allocator (used for engraving)" OFF)
option(QML_LOAD_FROM_SOURCE "Load qml files from source (not resource)" OFF)
option(TRACE_DRAW_OBJ_ENABLED "Trace draw objects" OFF)
option(UI_DISABLE_MODALITY "Disable dialogs modality for testing purpose" OFF)
if (BUILD_ASAN)
set(BUILD_ALLOCATOR OFF)
endif()
option(USE_SYSTEM_FREETYPE "Use system FreeType" OFF) # requires freetype >= 2.5.2, does not work on win
set(SCRIPT_INTERFACE TRUE)
option(ENABLE_AUDIO_EXPORT "Enable audio export" ON)
set(JACK_LONGNAME "JACK (Jack Audio Connection Kit)")
set(JACK_MIN_VERSION "0.98.0")
option(BUILD_JACK "Build with support for ${JACK_LONGNAME} audio backend. JACK >= ${JACK_MIN_VERSION} will be needed." OFF)
if (BUILD_PORTABLEAPPS)
set(WIN_PORTABLE 1)
@ -154,9 +154,9 @@ include(SetupConfigure)
include(SetupBuildEnvironment)
include(GetPlatformInfo)
if (TRY_USE_CCACHE)
if (MUE_COMPILE_USE_CCACHE)
include(TryUseCcache)
endif(TRY_USE_CCACHE)
endif(MUE_COMPILE_USE_CCACHE)
###########################################
# Setup MuseScore config
@ -187,28 +187,20 @@ include(SetupFreetype)
include(FindSndFile)
#if(SOUNDFONT3)
# include(FindVorbisAndOgg)
#endif(SOUNDFONT3)
if (BUILD_JACK)
include(FindJack)
endif(BUILD_JACK)
if (BUILD_AUTOUPDATE)
include(SetupSparkle)
endif(BUILD_AUTOUPDATE)
if (DOWNLOAD_SOUNDFONT)
if (MUE_DOWNLOAD_SOUNDFONT)
include(DownloadSoundFont)
endif(DOWNLOAD_SOUNDFONT)
endif(MUE_DOWNLOAD_SOUNDFONT)
###########################################
# Add source tree
###########################################
if (BUILD_UNIT_TESTS)
if (MUE_BUILD_UNIT_TESTS)
enable_testing()
message(STATUS "Enabled testing")
@ -218,7 +210,7 @@ if (BUILD_UNIT_TESTS)
)
add_subdirectory(thirdparty/googletest)
endif(BUILD_UNIT_TESTS)
endif(MUE_BUILD_UNIT_TESTS)
add_subdirectory(share)
add_subdirectory(src/framework/global) # should be first to work pch

View File

@ -17,8 +17,10 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#=============================================================================
message(STATUS "Build configure: ${MUSESCORE_BUILD_CONFIGURE}")
string(TOUPPER ${MUSESCORE_BUILD_CONFIGURE} _MUSESCORE_BUILD_CONFIGURE)
include(GetBuildType)
message(STATUS "Build configure: ${MUE_BUILD_CONFIGURE}")
string(TOUPPER ${MUE_BUILD_CONFIGURE} _MUE_BUILD_CONFIGURE)
###########################################
# General
@ -26,54 +28,112 @@ string(TOUPPER ${MUSESCORE_BUILD_CONFIGURE} _MUSESCORE_BUILD_CONFIGURE)
set(QT_SUPPORT ON)
if (NOT BUILD_AUDIO_MODULE)
set(BUILD_MUSESAMPLER_MODULE OFF)
set(BUILD_VST_MODULE OFF)
if (NOT MUE_BUILD_AUDIO_MODULE)
set(MUE_BUILD_MUSESAMPLER_MODULE OFF)
set(MUE_BUILD_VST_MODULE OFF)
endif()
if (NOT BUILD_IMPORTEXPORT_MODULE)
set(BUILD_VIDEOEXPORT_MODULE OFF)
if (NOT MUE_BUILD_IMPORTEXPORT_MODULE)
set(MUE_BUILD_VIDEOEXPORT_MODULE OFF)
endif()
if (NOT BUILD_DIAGNOSTICS)
set(BUILD_CRASHPAD_CLIENT OFF)
if (NOT MUE_BUILD_DIAGNOSTICS_MODULE)
set(MUE_BUILD_CRASHPAD_CLIENT OFF)
endif()
if (MUE_BUILD_ASAN)
set(MUE_ENABLE_CUSTOM_ALLOCATOR OFF)
endif()
###########################################
# Desktop App
###########################################
if(_MUSESCORE_BUILD_CONFIGURE MATCHES "APP")
if(_MUE_BUILD_CONFIGURE MATCHES "APP")
if (BUILD_IS_DEBUG)
set(MUE_ENABLE_LOGGER_DEBUGLEVEL ON)
else()
set(MUE_ENABLE_LOGGER_DEBUGLEVEL OFF)
endif()
endif()
###########################################
# VTest
###########################################
if(_MUSESCORE_BUILD_CONFIGURE MATCHES "VTEST")
set(BUILD_UNIT_TESTS OFF)
set(BUILD_UPDATE_MODULE OFF)
set(BUILD_SHORTCUTS_MODULE OFF)
set(BUILD_NETWORK_MODULE OFF)
set(BUILD_AUDIO_MODULE OFF)
set(BUILD_MUSESAMPLER_MODULE OFF)
set(BUILD_VST_MODULE OFF)
set(BUILD_LEARN_MODULE OFF)
set(BUILD_WORKSPACE_MODULE OFF)
set(BUILD_CLOUD_MODULE OFF)
set(BUILD_LANGUAGES_MODULE OFF)
set(BUILD_PLUGINS_MODULE OFF)
set(BUILD_PLAYBACK_MODULE OFF)
set(BUILD_PALETTE_MODULE OFF)
set(BUILD_INSTRUMENTSSCENE_MODULE OFF)
set(BUILD_INSPECTOR_MODULE OFF)
set(BUILD_MULTIINSTANCES_MODULE OFF)
set(BUILD_VIDEOEXPORT_MODULE OFF)
set(BUILD_IMPORTEXPORT_MODULE OFF)
if(_MUE_BUILD_CONFIGURE MATCHES "VTEST")
set(MUE_BUILD_AUDIO_MODULE OFF)
set(MUE_BUILD_MUSESAMPLER_MODULE OFF)
set(MUE_BUILD_NETWORK_MODULE OFF)
set(MUE_BUILD_SHORTCUTS_MODULE OFF)
set(MUE_BUILD_VST_MODULE OFF)
set(MUE_BUILD_CLOUD_MODULE OFF)
set(MUE_BUILD_IMPORTEXPORT_MODULE OFF)
set(MUE_BUILD_VIDEOEXPORT_MODULE OFF)
set(MUE_BUILD_INSPECTOR_MODULE OFF)
set(MUE_BUILD_INSTRUMENTSSCENE_MODULE OFF)
set(MUE_BUILD_LANGUAGES_MODULE OFF)
set(MUE_BUILD_LEARN_MODULE OFF)
set(MUE_BUILD_MULTIINSTANCES_MODULE OFF)
set(MUE_BUILD_PALETTE_MODULE OFF)
set(MUE_BUILD_PLAYBACK_MODULE OFF)
set(MUE_BUILD_PLUGINS_MODULE OFF)
set(MUE_BUILD_UPDATE_MODULE OFF)
set(MUE_BUILD_WORKSPACE_MODULE OFF)
set(MUE_BUILD_UNIT_TESTS OFF)
set(MUE_ENABLE_LOGGER_DEBUGLEVEL ON)
endif()
###########################################
# UTest
###########################################
if(_MUSESCORE_BUILD_CONFIGURE MATCHES "UTEST")
set(BUILD_UNIT_TESTS ON)
if(_MUE_BUILD_CONFIGURE MATCHES "UTEST")
set(MUE_BUILD_UNIT_TESTS ON)
set(MUE_ENABLE_LOGGER_DEBUGLEVEL ON)
endif()
###########################################
# Global definitions
###########################################
function(def_opt name val)
if (${val})
add_definitions(-D${name})
endif()
endfunction()
# framework
def_opt(MUE_BUILD_AUDIO_MODULE ${MUE_BUILD_AUDIO_MODULE})
def_opt(MUE_ENABLE_AUDIO_EXPORT ${MUE_ENABLE_AUDIO_EXPORT})
def_opt(MUE_BUILD_MUSESAMPLER_MODULE ${MUE_BUILD_MUSESAMPLER_MODULE})
def_opt(MUE_BUILD_NETWORK_MODULE ${MUE_BUILD_NETWORK_MODULE})
def_opt(MUE_BUILD_SHORTCUTS_MODULE ${MUE_BUILD_SHORTCUTS_MODULE})
# modules
def_opt(MUE_BUILD_AUTOBOT_MODULE ${MUE_BUILD_AUTOBOT_MODULE})
def_opt(MUE_BUILD_CLOUD_MODULE ${MUE_BUILD_CLOUD_MODULE})
def_opt(MUE_BUILD_DIAGNOSTICS_MODULE ${MUE_BUILD_DIAGNOSTICS_MODULE})
def_opt(MUE_BUILD_IMPORTEXPORT_MODULE ${MUE_BUILD_IMPORTEXPORT_MODULE})
def_opt(MUE_BUILD_VIDEOEXPORT_MODULE ${MUE_BUILD_VIDEOEXPORT_MODULE})
def_opt(MUE_BUILD_INSPECTOR_MODULE ${MUE_BUILD_INSPECTOR_MODULE})
def_opt(MUE_BUILD_INSTRUMENTSSCENE_MODULE ${MUE_BUILD_INSTRUMENTSSCENE_MODULE})
def_opt(MUE_BUILD_LANGUAGES_MODULE ${MUE_BUILD_LANGUAGES_MODULE})
def_opt(MUE_BUILD_LEARN_MODULE ${MUE_BUILD_LEARN_MODULE})
def_opt(MUE_BUILD_MULTIINSTANCES_MODULE ${MUE_BUILD_MULTIINSTANCES_MODULE})
def_opt(MUE_BUILD_PALETTE_MODULE ${MUE_BUILD_PALETTE_MODULE})
def_opt(MUE_BUILD_PLAYBACK_MODULE ${MUE_BUILD_PLAYBACK_MODULE})
def_opt(MUE_BUILD_PLUGINS_MODULE ${MUE_BUILD_PLUGINS_MODULE})
def_opt(MUE_BUILD_UPDATE_MODULE ${MUE_BUILD_UPDATE_MODULE})
def_opt(MUE_BUILD_WORKSPACE_MODULE ${MUE_BUILD_WORKSPACE_MODULE})
if (QT_SUPPORT)
add_definitions(-DQT_SUPPORT)
add_definitions(-DHAW_LOGGER_QT_SUPPORT)
add_definitions(-DSCRIPT_INTERFACE)
else()
add_definitions(-DNO_QT_SUPPORT)
endif()
add_definitions(-DHAW_PROFILER_ENABLED)
if (MUE_ENABLE_LOAD_QML_FROM_SOURCE)
add_definitions(-DMUE_ENABLE_LOAD_QML_FROM_SOURCE)
endif()

View File

@ -51,8 +51,8 @@ IF(MINGW OR MSVC)
SET(CPACK_STRIP_FILES "${MSCORE_EXECUTABLE_NAME}.exe")
# File types association:
message(STATUS "[Packaging.cmake] PACKAGE_FILE_ASSOCIATION: ${PACKAGE_FILE_ASSOCIATION}")
IF (PACKAGE_FILE_ASSOCIATION)
message(STATUS "[Packaging.cmake] PACKAGE_FILE_ASSOCIATION: ${MUE_PACKAGE_FILE_ASSOCIATION}")
IF (MUE_PACKAGE_FILE_ASSOCIATION)
SET(CPACK_NSIS_DEFINES "!include ${PROJECT_SOURCE_DIR}/build/packaging\\\\FileAssociation.nsh")
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
@ -67,9 +67,9 @@ IF(MINGW OR MSVC)
")
list(APPEND CPACK_WIX_CANDLE_EXTRA_FLAGS -dCPACK_WIX_FILE_ASSOCIATION=ON)
ELSE(PACKAGE_FILE_ASSOCIATION)
ELSE(MUE_PACKAGE_FILE_ASSOCIATION)
list(APPEND CPACK_WIX_CANDLE_EXTRA_FLAGS -dCPACK_WIX_FILE_ASSOCIATION=OFF)
ENDIF(PACKAGE_FILE_ASSOCIATION)
ENDIF(MUE_PACKAGE_FILE_ASSOCIATION)
file(TO_CMAKE_PATH $ENV{PROGRAMFILES} PROGRAMFILES)
SET(CPACK_WIX_ROOT "${PROGRAMFILES}/WiX Toolset v3.11")

View File

@ -44,7 +44,6 @@ if [ -z "$BUILD_NUMBER" ]; then echo "error: not set BUILD_NUMBER"; exit 1; fi
if [ -z "$BUILD_MODE" ]; then BUILD_MODE=$(cat $ARTIFACTS_DIR/env/build_mode.env); fi
MUSESCORE_BUILD_CONFIG=dev
BUILD_UNIT_TESTS=OFF
case "${BUILD_MODE}" in
"devel_build") MUSESCORE_BUILD_CONFIG=dev;;

View File

@ -49,7 +49,7 @@ if [ -z "$BUILD_MODE" ]; then BUILD_MODE=$(cat $ARTIFACTS_DIR/env/build_mode.env
if [ -z "$YOUTUBE_API_KEY" ]; then YOUTUBE_API_KEY=""; fi
MUSESCORE_BUILD_CONFIG=dev
BUILD_UNIT_TESTS=OFF
case "${BUILD_MODE}" in
"devel_build") MUSESCORE_BUILD_CONFIG=dev; SUFFIX=dev;;
"nightly_build") MUSESCORE_BUILD_CONFIG=dev; SUFFIX=nightly;;

View File

@ -147,7 +147,7 @@ IF %BUILD_MODE% == stable_build (
SET PACKAGE_FILE_ASSOCIATION=ON
)
cd "%BUILD_DIR%"
cmake -DPACKAGE_FILE_ASSOCIATION=%PACKAGE_FILE_ASSOCIATION% ..
cmake -DMUE_PACKAGE_FILE_ASSOCIATION=%PACKAGE_FILE_ASSOCIATION% ..
SET PATH=%WIX_DIR%;%PATH%
cmake --build . --target package || GOTO END_ERROR

View File

@ -3,42 +3,37 @@
## Find JACK >= JACK_MIN_VERSION
##
IF(BUILD_JACK)
IF(MINGW OR MSVC)
set (USE_JACK 1)
IF("$ENV{PROCESSOR_ARCHITEW6432}" STREQUAL "")
IF("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86")
# "pure" 32-bit environment
set (progenv "PROGRAMFILES")
ELSE("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86")
# "pure" 64-bit environment
set (progenv "PROGRAMFILES(x86)")
ENDIF("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86")
ELSE("$ENV{PROCESSOR_ARCHITEW6432}" STREQUAL "")
IF("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86")
# 32-bit program running with an underlying 64-bit environment
set (progenv "PROGRAMFILES(x86)")
ELSE("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86")
# Theoretically impossible case...
MESSAGE(SEND_ERROR "Error: Impossible program/environment bitness combination deduced: 64-bit program running in 32-bit environment. This is a programming error. PROCESSOR_ARCHITEW6432=$ENV{PROCESSOR_ARCHITEW6432}. PROCESSOR_ARCHITECTURE=$ENV{PROCESSOR_ARCHITECTURE}")
ENDIF("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86")
ENDIF("$ENV{PROCESSOR_ARCHITEW6432}" STREQUAL "")
set (JACK_INCDIR "$ENV{${progenv}}/Jack/includes")
set (JACK_LIB "$ENV{${progenv}}/Jack/lib/libjack.a")
MESSAGE("JACK support enabled.")
ELSE(MINGW OR MSVC)
include(UsePkgConfig1)
PKGCONFIG1 (jack ${JACK_MIN_VERSION} JACK_INCDIR JACK_LIBDIR JACK_LIB JACK_CPP)
IF(JACK_INCDIR)
MESSAGE(STATUS "${JACK_LONGNAME} >= ${JACK_MIN_VERSION} found. jack support enabled.")
SET(USE_JACK 1)
ELSE(JACK_INCDIR)
MESSAGE(STATUS "${JACK_LONGNAME} >= ${JACK_MIN_VERSION} not found")
MESSAGE(SEND_ERROR "Error: JACK support requested (BUILD_JACK=${BUILD_JACK}), but JACK was not found")
ENDIF(JACK_INCDIR)
ENDIF(MINGW OR MSVC)
ELSE(BUILD_JACK)
MESSAGE(STATUS "${JACK_LONGNAME} support disabled")
ENDIF(BUILD_JACK)
IF(MINGW OR MSVC)
set (USE_JACK 1)
IF("$ENV{PROCESSOR_ARCHITEW6432}" STREQUAL "")
IF("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86")
# "pure" 32-bit environment
set (progenv "PROGRAMFILES")
ELSE("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86")
# "pure" 64-bit environment
set (progenv "PROGRAMFILES(x86)")
ENDIF("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86")
ELSE("$ENV{PROCESSOR_ARCHITEW6432}" STREQUAL "")
IF("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86")
# 32-bit program running with an underlying 64-bit environment
set (progenv "PROGRAMFILES(x86)")
ELSE("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86")
# Theoretically impossible case...
MESSAGE(SEND_ERROR "Error: Impossible program/environment bitness combination deduced: 64-bit program running in 32-bit environment. This is a programming error. PROCESSOR_ARCHITEW6432=$ENV{PROCESSOR_ARCHITEW6432}. PROCESSOR_ARCHITECTURE=$ENV{PROCESSOR_ARCHITECTURE}")
ENDIF("$ENV{PROCESSOR_ARCHITECTURE}" STREQUAL "x86")
ENDIF("$ENV{PROCESSOR_ARCHITEW6432}" STREQUAL "")
set (JACK_INCDIR "$ENV{${progenv}}/Jack/includes")
set (JACK_LIB "$ENV{${progenv}}/Jack/lib/libjack.a")
MESSAGE("JACK support enabled.")
ELSE(MINGW OR MSVC)
include(UsePkgConfig1)
PKGCONFIG1 (jack ${JACK_MIN_VERSION} JACK_INCDIR JACK_LIBDIR JACK_LIB JACK_CPP)
IF(JACK_INCDIR)
MESSAGE(STATUS "${JACK_LONGNAME} >= ${JACK_MIN_VERSION} found. jack support enabled.")
SET(USE_JACK 1)
ELSE(JACK_INCDIR)
MESSAGE(STATUS "${JACK_LONGNAME} >= ${JACK_MIN_VERSION} not found")
MESSAGE(SEND_ERROR "Error: JACK support requested, but JACK was not found")
ENDIF(JACK_INCDIR)
ENDIF(MINGW OR MSVC)

View File

@ -7,30 +7,17 @@ set(SHARED_LIBS_INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
set(CMAKE_UNITY_BUILD_BATCH_SIZE 12)
if (QT_SUPPORT)
add_definitions(-DQT_SUPPORT)
add_definitions(-DHAW_LOGGER_QT_SUPPORT)
else()
add_definitions(-DNO_QT_SUPPORT)
endif()
add_definitions(-DHAW_PROFILER_ENABLED)
if (NOT BUILD_ALLOCATOR)
add_definitions(-DCUSTOM_ALLOCATOR_DISABLED)
endif()
if (CC_IS_GCC)
message(STATUS "Using Compiler GCC ${CMAKE_CXX_COMPILER_VERSION}")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
if (TRY_BUILD_SHARED_LIBS_IN_DEBUG AND BUILD_IS_DEBUG)
if (MUE_COMPILE_USE_SHARED_LIBS_IN_DEBUG AND BUILD_IS_DEBUG)
set(BUILD_SHARED_LIBS ON)
endif()
if (BUILD_ASAN)
if (MUE_BUILD_ASAN)
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -fsanitize=address -fno-omit-frame-pointer")
endif()
@ -60,7 +47,7 @@ elseif(CC_IS_MINGW)
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
if (TRY_BUILD_SHARED_LIBS_IN_DEBUG AND BUILD_IS_DEBUG)
if (MUE_COMPILE_USE_SHARED_LIBS_IN_DEBUG AND BUILD_IS_DEBUG)
set(BUILD_SHARED_LIBS ON)
endif()
@ -79,7 +66,7 @@ elseif(CC_IS_CLANG)
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
if (BUILD_ASAN)
if (MUE_BUILD_ASAN)
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -fsanitize=address -fno-omit-frame-pointer")
endif()

View File

@ -25,7 +25,6 @@
#cmakedefine MSCORE_UNSTABLE
#define CRASH_REPORT_URL "${CRASH_REPORT_URL}"
#define MUSESCORE_NAME_VERSION "${MUSESCORE_NAME_VERSION}"
#define MUSESCORE_REVISION "${MUSESCORE_REVISION}"
#define INSTALL_NAME "${Mscore_INSTALL_NAME}"
@ -36,49 +35,12 @@
#define BUILD_NUMBER "${CMAKE_BUILD_NUMBER}"
#define SPARKLE_APPCAST_URL "${SPARKLE_APPCAST_URL}"
#define YOUTUBE_API_KEY "${YOUTUBE_API_KEY}"
#cmakedefine LOGGER_DEBUGLEVEL_ENABLED
#cmakedefine BUILD_SHORTCUTS_MODULE
#cmakedefine BUILD_NETWORK_MODULE
#cmakedefine BUILD_AUDIO_MODULE
#cmakedefine BUILD_LEARN_MODULE
#cmakedefine BUILD_WORKSPACE_MODULE
#cmakedefine BUILD_CLOUD_MODULE
#cmakedefine BUILD_LANGUAGES_MODULE
#cmakedefine BUILD_PLUGINS_MODULE
#cmakedefine BUILD_PLAYBACK_MODULE
#cmakedefine BUILD_PALETTE_MODULE
#cmakedefine BUILD_INSTRUMENTSSCENE_MODULE
#cmakedefine BUILD_INSPECTOR_MODULE
#cmakedefine BUILD_AUTOBOT_MODULE
#cmakedefine BUILD_MULTIINSTANCES_MODULE
#cmakedefine BUILD_MUSESAMPLER_MODULE
#cmakedefine BUILD_UPDATE_MODULE
#cmakedefine BUILD_VIDEOEXPORT_MODULE
#cmakedefine BUILD_VST_MODULE
#cmakedefine BUILD_DIAGNOSTICS
#cmakedefine BUILD_IMPORTEXPORT_MODULE
#cmakedefine ENGRAVING_PAINT_DEBUGGER_ENABLED
#cmakedefine ENGRAVING_COMPAT_WRITESTYLE_302
#cmakedefine ENGRAVING_COMPAT_WRITEEXCERPTS_302
#cmakedefine ENABLE_AUDIO_EXPORT
#cmakedefine UI_DISABLE_MODALITY
#cmakedefine ACCESSIBILITY_LOGGING_ENABLED
#cmakedefine TRACE_DRAW_OBJ_ENABLED
#cmakedefine QML_LOAD_FROM_SOURCE
#cmakedefine SCRIPT_INTERFACE
#cmakedefine APP_UPDATABLE
#cmakedefine SPARKLE_ENABLED
#cmakedefine SOUNDFONT3
#cmakedefine WIN_PORTABLE
#cmakedefine FOR_WINSTORE

View File

@ -79,7 +79,7 @@ if (BUILD_SHARED_LIBS)
endif (NOT MSVC)
endif()
if (BUILD_PCH)
if (MUE_COMPILE_USE_PCH)
if (MODULE_USE_PCH_NONE)
# disabled pch for current module
else()
@ -97,16 +97,16 @@ if (BUILD_PCH)
target_precompile_headers(${MODULE} PRIVATE ${PROJECT_SOURCE_DIR}/build/pch/pch.h)
endif()
endif()
endif(BUILD_PCH)
endif(MUE_COMPILE_USE_PCH)
if (BUILD_UNITY)
if (MUE_COMPILE_USE_UNITY)
if (MODULE_USE_UNITY_NONE)
# disabled unity build for current module
set_target_properties(${MODULE} PROPERTIES UNITY_BUILD OFF)
else()
set_target_properties(${MODULE} PROPERTIES UNITY_BUILD ON)
endif()
endif(BUILD_UNITY)
endif(MUE_COMPILE_USE_UNITY)
target_sources(${MODULE} PRIVATE
${ui_headers}

View File

@ -182,12 +182,12 @@ IF /I "%1"=="clean" (
IF NOT "%MSCORE_STABLE_BUILD%" == "" (
IF NOT "%CRASH_LOG_SERVER_URL%" == "" (
IF "%BUILD_FOR_WINSTORE%" == "OFF" (
SET CRASH_REPORT_URL_OPT=-DCRASH_REPORT_URL=%CRASH_LOG_SERVER_URL% -DBUILD_CRASH_REPORTER=ON
SET CRASH_REPORT_URL_OPT=-DMUE_CRASH_REPORT_URL=%CRASH_LOG_SERVER_URL% -DBUILD_CRASH_REPORTER=ON
)
)
IF NOT "%YOUTUBE_API_KEY%" == "" (
SET YOUTUBE_API_KEY_OPT=-DYOUTUBE_API_KEY=%YOUTUBE_API_KEY%
SET YOUTUBE_API_KEY_OPT=-DMUE_LEARN_YOUTUBE_API_KEY=%YOUTUBE_API_KEY%
)
)

View File

@ -35,11 +35,8 @@
#define VERSION "2.0.0"
/* #undef OPENGL */
#define SOUNDFONT3
/* #undef Q_OS_UIKIT */
#define USE_BSP true
#define SCRIPT_INTERFACE true
#endif /* MUSESCORE_CONFIG_H */

View File

@ -33,7 +33,6 @@ MUSESCORE_BUILD_PORTABLEAPPS=${MUSESCORE_BUILD_PORTABLEAPPS:-"OFF"}
MUSESCORE_CRASHREPORT_URL=${MUSESCORE_CRASHREPORT_URL:-""}
MUSESCORE_BUILD_CRASHPAD_CLIENT=${MUSESCORE_BUILD_CRASHPAD_CLIENT:-"ON"}
MUSESCORE_DEBUGLEVEL_ENABLED="OFF"
MUSESCORE_BUILD_JACK=${MUSESCORE_BUILD_JACK:-"OFF"}
MUSESCORE_VST3_SDK_PATH=${MUSESCORE_VST3_SDK_PATH:-""}
MUSESCORE_DOWNLOAD_SOUNDFONT=${MUSESCORE_DOWNLOAD_SOUNDFONT:-"ON"}
MUSESCORE_BUILD_UNIT_TESTS=${MUSESCORE_BUILD_UNIT_TESTS:-"OFF"}
@ -86,37 +85,37 @@ function do_build() {
-DMSCORE_INSTALL_SUFFIX="${MUSESCORE_INSTALL_SUFFIX}" \
-DMUSESCORE_LABEL="${MUSESCORE_LABEL}" \
-DMUSESCORE_BUILD_CONFIG="${MUSESCORE_BUILD_CONFIG}" \
-DMUSESCORE_BUILD_CONFIGURE="${DMUSESCORE_BUILD_CONFIGURE}" \
-DMUE_BUILD_CONFIGURE="${MUSESCORE_BUILD_CONFIGURE}" \
-DCMAKE_BUILD_NUMBER="${MUSESCORE_BUILD_NUMBER}" \
-DMUSESCORE_REVISION="${MUSESCORE_REVISION}" \
-DMUE_RUN_LRELEASE="${MUSESCORE_RUN_LRELEASE}" \
-DBUILD_PORTABLEAPPS="${MUSESCORE_BUILD_PORTABLEAPPS}" \
-DCRASH_REPORT_URL="${MUSESCORE_CRASHREPORT_URL}" \
-DBUILD_CRASHPAD_CLIENT="${MUSESCORE_BUILD_CRASHPAD_CLIENT}" \
-DLOGGER_DEBUGLEVEL_ENABLED="${MUSESCORE_DEBUGLEVEL_ENABLED}" \
-DBUILD_JACK="${MUSESCORE_BUILD_JACK}" \
-DBUILD_VST_MODULE="${MUSESCORE_BUILD_VST_MODULE}" \
-DMUE_BUILD_AUDIO_MODULE="${MUSESCORE_BUILD_AUDIO_MODULE}" \
-DMUE_BUILD_NETWORK_MODULE="${MUSESCORE_BUILD_NETWORK_MODULE}" \
-DMUE_BUILD_SHORTCUTS_MODULE="${MUSESCORE_BUILD_SHORTCUTS_MODULE}" \
-DMUE_BUILD_VST_MODULE="${MUSESCORE_BUILD_VST_MODULE}" \
-DMUE_BUILD_CLOUD_MODULE="${MUSESCORE_BUILD_CLOUD_MODULE}" \
-DMUE_BUILD_IMPORTEXPORT_MODULE="${MUSESCORE_BUILD_IMPORTEXPORT_MODULE}" \
-DMUE_BUILD_VIDEOEXPORT_MODULE="${MUSESCORE_BUILD_VIDEOEXPORT_MODULE}" \
-DMUE_BUILD_INSPECTOR_MODULE="${MUSESCORE_BUILD_INSPECTOR_MODULE}" \
-DMUE_BUILD_INSTRUMENTSSCENE_MODULE="${MUSESCORE_BUILD_INSTRUMENTSSCENE_MODULE}" \
-DMUE_BUILD_LANGUAGES_MODULE="${MUSESCORE_BUILD_LANGUAGES_MODULE}" \
-DMUE_BUILD_LEARN_MODULE="${MUSESCORE_BUILD_LEARN_MODULE}" \
-DMUE_LEARN_YOUTUBE_API_KEY="${MUSESCORE_YOUTUBE_API_KEY}" \
-DMUE_BUILD_MULTIINSTANCES_MODULE="${MUSESCORE_BUILD_MULTIINSTANCES_MODULE}" \
-DMUE_BUILD_PALETTE_MODULE="${MUSESCORE_BUILD_PALETTE_MODULE}" \
-DMUE_BUILD_PLAYBACK_MODULE="${MUSESCORE_BUILD_PLAYBACK_MODULE}" \
-DMUE_BUILD_PLUGINS_MODULE="${MUSESCORE_BUILD_PLUGINS_MODULE}" \
-DMUE_BUILD_UPDATE_MODULE="${MUSESCORE_BUILD_UPDATE_MODULE}" \
-DMUE_BUILD_WORKSPACE_MODULE="${MUSESCORE_BUILD_WORKSPACE_MODULE}" \
-DMUE_DOWNLOAD_SOUNDFONT="${MUSESCORE_DOWNLOAD_SOUNDFONT}" \
-DMUE_BUILD_UNIT_TESTS="${MUSESCORE_BUILD_UNIT_TESTS}" \
-DMUE_BUILD_CRASHPAD_CLIENT="${MUSESCORE_BUILD_CRASHPAD_CLIENT}" \
-DMUE_CRASH_REPORT_URL="${MUSESCORE_CRASHREPORT_URL}" \
-DMUE_LOGGER_DEBUGLEVEL_ENABLED="${MUSESCORE_DEBUGLEVEL_ENABLED}" \
-DVST3_SDK_PATH="${MUSESCORE_VST3_SDK_PATH}" \
-DDOWNLOAD_SOUNDFONT="${MUSESCORE_DOWNLOAD_SOUNDFONT}" \
-DBUILD_UNIT_TESTS="${MUSESCORE_BUILD_UNIT_TESTS}" \
-DCMAKE_SKIP_RPATH="${MUSESCORE_NO_RPATH}" \
-DYOUTUBE_API_KEY="${MUSESCORE_YOUTUBE_API_KEY}" \
-DBUILD_UPDATE_MODULE="${MUSESCORE_BUILD_UPDATE_MODULE}" \
-DBUILD_SHORTCUTS_MODULE="${MUSESCORE_BUILD_SHORTCUTS_MODULE}" \
-DBUILD_NETWORK_MODULE="${MUSESCORE_BUILD_NETWORK_MODULE}" \
-DBUILD_AUDIO_MODULE="${MUSESCORE_BUILD_AUDIO_MODULE}" \
-DBUILD_LEARN_MODULE="${MUSESCORE_BUILD_LEARN_MODULE}" \
-DBUILD_WORKSPACE_MODULE="${MUSESCORE_BUILD_WORKSPACE_MODULE}" \
-DBUILD_CLOUD_MODULE="${MUSESCORE_BUILD_CLOUD_MODULE}" \
-DBUILD_LANGUAGES_MODULE="${MUSESCORE_BUILD_LANGUAGES_MODULE}" \
-DBUILD_PLUGINS_MODULE="${MUSESCORE_BUILD_PLUGINS_MODULE}" \
-DBUILD_PLAYBACK_MODULE="${MUSESCORE_BUILD_PLAYBACK_MODULE}" \
-DBUILD_PALETTE_MODULE="${MUSESCORE_BUILD_PALETTE_MODULE}" \
-DBUILD_INSTRUMENTSSCENE_MODULE="${MUSESCORE_BUILD_INSTRUMENTSSCENE_MODULE}" \
-DBUILD_INSPECTOR_MODULE="${MUSESCORE_BUILD_INSPECTOR_MODULE}" \
-DBUILD_MULTIINSTANCES_MODULE="${MUSESCORE_BUILD_MULTIINSTANCES_MODULE}" \
-DBUILD_VIDEOEXPORT_MODULE="${MUSESCORE_BUILD_VIDEOEXPORT_MODULE}" \
-DBUILD_IMPORTEXPORT_MODULE="${MUSESCORE_BUILD_IMPORTEXPORT_MODULE}" \
ninja -j $JOBS
}

View File

@ -25,10 +25,8 @@
#define MSCORE_UNSTABLE
/* #undef HAS_MIDI */
#define SCRIPT_INTERFACE
/* #undef HAS_AUDIOFILE */
#define CRASH_REPORT_URL ""
#define MUSESCORE_NAME_VERSION "MuseScore 4 (4.0.0 unstable)"
#define MUSESCORE_REVISION ""
#define INSTALL_NAME "mscore-4.0/"
@ -38,33 +36,12 @@
#define BUILD_NUMBER ""
#define SPARKLE_APPCAST_URL ""
#define BUILD_SHORTCUTS_MODULE
#define BUILD_SYSTEM_MODULE
#define BUILD_NETWORK_MODULE
#define BUILD_AUDIO_MODULE
#define BUILD_USERSCORES_MODULE
#define BUILD_LEARN_MODULE
#define BUILD_WORKSPACE_MODULE
#define BUILD_CLOUD_MODULE
#define BUILD_LANGUAGES_MODULE
#define BUILD_PLUGINS_MODULE
#define BUILD_PLAYBACK_MODULE
#define BUILD_PALETTE_MODULE
#define BUILD_INSTRUMENTSSCENE_MODULE
#define BUILD_INSPECTOR_MODULE
#define BUILD_AUTOBOT_MODULE
#define BUILD_MULTIINSTANCES_MODULE
#define BUILD_VST_MODULE
/* #undef ENGRAVING_BUILD_ACCESSIBLE_TREE */
/* #undef SPARKLE_ENABLED */
/* #undef OPENGL */
#define SOUNDFONT3
/* #undef WIN_PORTABLE */
/* #undef QML_LOAD_FROM_SOURCE */
/* #undef TRACE_DRAW_OBJ_ENABLED */
/* #undef Q_WS_UIKIT */

View File

@ -24,94 +24,76 @@ add_subdirectory(main)
# Framework
add_subdirectory(framework)
# Domain model
add_subdirectory(engraving)
# AppShell
# Modules
add_subdirectory(appshell)
# Modules
add_subdirectory(context)
add_subdirectory(notation)
add_subdirectory(project)
add_subdirectory(print)
if (BUILD_LEARN_MODULE)
add_subdirectory(learn)
endif (BUILD_LEARN_MODULE)
add_subdirectory(converter)
if (BUILD_WORKSPACE_MODULE)
add_subdirectory(workspace)
endif (BUILD_WORKSPACE_MODULE)
if (NOT OS_IS_WASM)
add_subdirectory(importexport)
if (BUILD_CLOUD_MODULE)
add_subdirectory(cloud)
endif (BUILD_CLOUD_MODULE)
if (BUILD_LANGUAGES_MODULE)
add_subdirectory(languages)
endif (BUILD_LANGUAGES_MODULE)
if (BUILD_PLUGINS_MODULE)
add_subdirectory(plugins)
endif (BUILD_PLUGINS_MODULE)
endif()
# Scenes common
add_subdirectory(commonscene)
if (BUILD_PLAYBACK_MODULE)
add_subdirectory(playback)
endif (BUILD_PLAYBACK_MODULE)
# Notation
if (BUILD_PALETTE_MODULE)
add_subdirectory(palette)
endif (BUILD_PALETTE_MODULE)
if (BUILD_INSTRUMENTSSCENE_MODULE)
add_subdirectory(instrumentsscene)
endif (BUILD_INSTRUMENTSSCENE_MODULE)
if (BUILD_INSPECTOR_MODULE)
add_subdirectory(inspector)
endif (BUILD_INSPECTOR_MODULE)
# Other
if (BUILD_MULTIINSTANCES_MODULE)
add_subdirectory(multiinstances)
endif()
add_subdirectory(diagnostics)
if (BUILD_AUTOBOT_MODULE)
if (MUE_BUILD_AUTOBOT_MODULE)
add_subdirectory(autobot)
endif()
if (BUILD_UPDATE_MODULE)
if (MUE_BUILD_CLOUD_MODULE)
add_subdirectory(cloud)
endif()
add_subdirectory(commonscene)
add_subdirectory(context)
add_subdirectory(converter)
if (MUE_BUILD_DIAGNOSTICS_MODULE)
add_subdirectory(diagnostics)
endif()
add_subdirectory(engraving)
add_subdirectory(importexport)
if (MUE_BUILD_INSPECTOR_MODULE)
add_subdirectory(inspector)
endif()
if (MUE_BUILD_INSTRUMENTSSCENE_MODULE)
add_subdirectory(instrumentsscene)
endif()
if (MUE_BUILD_LANGUAGES_MODULE)
add_subdirectory(languages)
endif()
if (MUE_BUILD_LEARN_MODULE)
add_subdirectory(learn)
endif()
if (MUE_BUILD_MULTIINSTANCES_MODULE)
add_subdirectory(multiinstances)
endif()
add_subdirectory(notation)
if (MUE_BUILD_PALETTE_MODULE)
add_subdirectory(palette)
endif()
if (MUE_BUILD_PLAYBACK_MODULE)
add_subdirectory(playback)
endif()
if (MUE_BUILD_PLUGINS_MODULE)
add_subdirectory(plugins)
endif()
add_subdirectory(print)
add_subdirectory(project)
if (MUE_BUILD_UPDATE_MODULE)
add_subdirectory(update)
endif (BUILD_UPDATE_MODULE)
endif()
if (MUE_BUILD_WORKSPACE_MODULE)
add_subdirectory(workspace)
endif()
# Stubs
add_subdirectory(stubs)
if (BUILD_UNIT_TESTS)
add_subdirectory(engraving/tests)
#add_subdirectory(notation/tests) no tests at moment
add_subdirectory(project/tests)
if (BUILD_PLUGINS_MODULE)
add_subdirectory(plugins/tests)
endif()
if (BUILD_DIAGNOSTICS)
add_subdirectory(diagnostics/tests)
endif()
endif(BUILD_UNIT_TESTS)
if (OS_IS_WASM)
add_subdirectory(wasmtest)
endif()

View File

@ -240,7 +240,7 @@ int AppShell::run(int argc, char** argv)
//! NOTE Move ownership to UiEngine
ui::UiEngine::instance()->moveQQmlEngine(engine);
#ifdef QML_LOAD_FROM_SOURCE
#ifdef MUE_ENABLE_LOAD_QML_FROM_SOURCE
const QUrl url(QString(appshell_QML_IMPORT) + mainQmlFile);
#else
const QUrl url(QStringLiteral("qrc:/qml") + mainQmlFile);

View File

@ -279,7 +279,7 @@ void CommandLineController::apply()
}
// Video
#ifdef BUILD_VIDEOEXPORT_MODULE
#ifdef MUE_BUILD_VIDEOEXPORT_MODULE
if (m_parser.isSet("score-video")) {
application()->setRunMode(IApplication::RunMode::Converter);
m_converterTask.type = ConvertType::ExportScoreVideo;

View File

@ -356,7 +356,7 @@ MenuItem* AppMenuModel::makeDiagnosticMenu()
makeMenu(TranslatableString("appshell/menu/diagnostic", "&System"), systemItems, "menu-system")
};
#ifdef BUILD_MUSESAMPLER_MODULE
#ifdef MUE_BUILD_MUSESAMPLER_MODULE
MenuItemList museSamplerItems {
makeMenuItem("musesampler-check"),
};

View File

@ -105,7 +105,7 @@ void FoldersPreferencesModel::load()
audioConfiguration()->userSoundFontDirectories()),
configuration()->userDataPath().toQString(), FolderValueType::MultiDirectories
},
#ifdef BUILD_VST_MODULE
#ifdef MUE_BUILD_VST_MODULE
{
FolderType::VST3, qtrc("appshell/preferences", "VST3"), pathsToString(vstConfiguration()->userVstDirectories()),
configuration()->userDataPath().toQString(), FolderValueType::MultiDirectories

View File

@ -90,7 +90,7 @@ UiContext UiContextResolver::currentUiContext() const
TRACEFUNC;
Uri currentUri = interactive()->currentUri().val;
#ifdef BUILD_DIAGNOSTICS
#ifdef MUE_BUILD_DIAGNOSTICS_MODULE
currentUri = diagnostics::diagnosticCurrentUri(interactive()->stack());
#endif

View File

@ -94,7 +94,7 @@ if (CC_IS_MINGW)
set(BUILD_CRASHPAD_CLIENT OFF)
endif(CC_IS_MINGW)
if (BUILD_CRASHPAD_CLIENT)
if (MUE_BUILD_CRASHPAD_CLIENT)
set(MODULE_SRC ${MODULE_SRC}
${CMAKE_CURRENT_LIST_DIR}/internal/crashhandler/crashhandler.cpp
${CMAKE_CURRENT_LIST_DIR}/internal/crashhandler/crashhandler.h
@ -106,7 +106,8 @@ if (BUILD_CRASHPAD_CLIENT)
)
set(MODULE_DEF ${MODULE_DEF}
-DBUILD_CRASHPAD_CLIENT
-DMUE_BUILD_CRASHPAD_CLIENT
-DMUE_CRASH_REPORT_URL="${MUE_CRASH_REPORT_URL}"
)
add_subdirectory(${PROJECT_SOURCE_DIR}/thirdparty/google_crashpad_client google_crashpad_client)
@ -118,34 +119,34 @@ if (BUILD_CRASHPAD_CLIENT)
# Install crashpad handler
set(CPAD_ROOT_PATH ${CMAKE_CURRENT_LIST_DIR}/crashpad_handler)
if (OS_IS_LIN)
if (NOT CRASHPAD_HANDLER_PATH)
if (NOT MUE_CRASHPAD_HANDLER_PATH)
if (ARCH_IS_ARMV7L)
set(CRASHPAD_HANDLER_PATH ${CPAD_ROOT_PATH}/linux/armv7l/crashpad_handler)
set(MUE_CRASHPAD_HANDLER_PATH ${CPAD_ROOT_PATH}/linux/armv7l/crashpad_handler)
elseif (ARCH_IS_AARCH64)
set(CRASHPAD_HANDLER_PATH ${CPAD_ROOT_PATH}/linux/aarch64/crashpad_handler)
set(MUE_CRASHPAD_HANDLER_PATH ${CPAD_ROOT_PATH}/linux/aarch64/crashpad_handler)
elseif (ARCH_IS_X86_64)
set(CRASHPAD_HANDLER_PATH ${CPAD_ROOT_PATH}/linux/x86-64/crashpad_handler)
set(MUE_CRASHPAD_HANDLER_PATH ${CPAD_ROOT_PATH}/linux/x86-64/crashpad_handler)
else ()
message(WARNING "Architecture could not be detected. Using x86_64 as a fallback for crashpad_handler binary.")
set(CRASHPAD_HANDLER_PATH ${CPAD_ROOT_PATH}/linux/x86-64/crashpad_handler)
set(MUE_CRASHPAD_HANDLER_PATH ${CPAD_ROOT_PATH}/linux/x86-64/crashpad_handler)
endif()
endif()
install(PROGRAMS ${CRASHPAD_HANDLER_PATH} DESTINATION bin)
install(PROGRAMS ${MUE_CRASHPAD_HANDLER_PATH} DESTINATION bin)
elseif(OS_IS_WIN)
if (NOT CRASHPAD_HANDLER_PATH)
set(CRASHPAD_HANDLER_PATH ${CPAD_ROOT_PATH}/windows/x86-64/crashpad_handler.exe)
if (NOT MUE_CRASHPAD_HANDLER_PATH)
set(MUE_CRASHPAD_HANDLER_PATH ${CPAD_ROOT_PATH}/windows/x86-64/crashpad_handler.exe)
endif()
install(PROGRAMS ${CRASHPAD_HANDLER_PATH} DESTINATION bin)
install(PROGRAMS ${MUE_CRASHPAD_HANDLER_PATH} DESTINATION bin)
elseif(OS_IS_MAC)
if (NOT CRASHPAD_HANDLER_PATH)
set(CRASHPAD_HANDLER_PATH ${CPAD_ROOT_PATH}/macos/x86-64/crashpad_handler)
if (NOT MUE_CRASHPAD_HANDLER_PATH)
set(MUE_CRASHPAD_HANDLER_PATH ${CPAD_ROOT_PATH}/macos/x86-64/crashpad_handler)
endif()
install(PROGRAMS ${CRASHPAD_HANDLER_PATH} DESTINATION ${Mscore_SHARE_NAME}Contents/MacOS)
install(PROGRAMS ${MUE_CRASHPAD_HANDLER_PATH} DESTINATION ${Mscore_SHARE_NAME}Contents/MacOS)
endif()
endif(BUILD_CRASHPAD_CLIENT)
endif(MUE_BUILD_CRASHPAD_CLIENT)
# ----------------
set(MODULE_INCLUDE ${MODULE_INCLUDE}
@ -153,3 +154,7 @@ set(MODULE_INCLUDE ${MODULE_INCLUDE}
)
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -125,7 +125,7 @@ void DiagnosticsModule::onInit(const framework::IApplication::RunMode&)
return;
}
#ifdef BUILD_CRASHPAD_CLIENT
#ifdef MUE_BUILD_CRASHPAD_CLIENT
static CrashHandler s_crashHandler;
@ -138,7 +138,7 @@ void DiagnosticsModule::onInit(const framework::IApplication::RunMode&)
io::path_t handlerPath = globalConf->appBinPath() + "/" + handlerFile;
io::path_t dumpsDir = globalConf->userAppDataPath() + "/logs/dumps";
fileSystem()->makePath(dumpsDir);
std::string serverUrl(CRASH_REPORT_URL);
std::string serverUrl(MUE_CRASH_REPORT_URL);
if (!s_configuration->isDumpUploadAllowed()) {
serverUrl.clear();
@ -156,5 +156,5 @@ void DiagnosticsModule::onInit(const framework::IApplication::RunMode&)
#else
LOGW() << "crash handling disabled";
#endif // BUILD_CRASHPAD_CLIENT
#endif // MUE_BUILD_CRASHPAD_CLIENT
}

View File

@ -34,7 +34,7 @@
#include "engraving/libmscore/masterscore.h"
#include "config.h"
#ifdef BUILD_IMPORTEXPORT_MODULE
#ifdef MUE_BUILD_IMPORTEXPORT_MODULE
#include "importexport/guitarpro/internal/guitarproreader.h"
#endif
@ -214,7 +214,7 @@ bool DrawDataGenerator::loadScore(mu::engraving::MasterScore* score, const mu::i
// Import
TRACEFUNC_C("Load gp");
#ifdef BUILD_IMPORTEXPORT_MODULE
#ifdef MUE_BUILD_IMPORTEXPORT_MODULE
mu::iex::guitarpro::GuitarProReader reader;
Ret ret = reader.read(score, path);
if (!ret) {

View File

@ -274,3 +274,7 @@ include(SetupModule)
set_property(TARGET ${MODULE} APPEND PROPERTY AUTOMOC_MACRO_NAMES "BEGIN_QT_REGISTERED_ENUM")
#target_compile_options(${MODULE} PUBLIC -Wconversion)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -57,14 +57,14 @@ std::shared_ptr<EngravingProject> EngravingProject::create(const MStyle& style)
EngravingProject::EngravingProject()
{
ObjectAllocator::used++;
ObjectAllocator::used();
}
EngravingProject::~EngravingProject()
{
delete m_masterScore;
ObjectAllocator::used--;
ObjectAllocator::unused();
AllocatorsRegister::instance()->printStatistic("=== Destroy engraving project ===");
//! NOTE At the moment, the allocator is working as leak detector. No need to do cleanup, at the moment it can lead to crashes

View File

@ -1987,12 +1987,6 @@ Segment* Score::firstSegment(SegmentType segType) const
seg = seg->next1(segType);
}
}
#ifdef SCRIPT_INTERFACE
// if called from QML/JS, tell QML engine not to garbage collect this object
// if (seg)
// QQmlEngine::setObjectOwnership(seg, QQmlEngine::CppOwnership);
#endif
return seg;
}

View File

@ -18,43 +18,40 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#add_subdirectory(global)
if (MUE_BUILD_ACCESSIBILITY_MODULE)
add_subdirectory(accessibility)
endif()
add_subdirectory(actions)
if (MUE_BUILD_AUDIO_MODULE)
add_subdirectory(audio)
endif ()
add_subdirectory(draw)
add_subdirectory(fonts)
if (MUE_BUILD_MUSESAMPLER_MODULE)
add_subdirectory(musesampler)
endif()
add_subdirectory(ui)
add_subdirectory(uicomponents)
add_subdirectory(fonts)
add_subdirectory(actions)
add_subdirectory(accessibility)
if (BUILD_SHORTCUTS_MODULE)
message(STATUS "============ shortcuts")
add_subdirectory(shortcuts)
endif (BUILD_SHORTCUTS_MODULE)
if (BUILD_NETWORK_MODULE)
if (MUE_BUILD_NETWORK_MODULE)
add_subdirectory(network)
endif (BUILD_NETWORK_MODULE)
endif()
if (BUILD_AUDIO_MODULE)
add_subdirectory(audio)
endif (BUILD_AUDIO_MODULE)
if (BUILD_MUSESAMPLER_MODULE)
add_subdirectory(musesampler)
endif(BUILD_MUSESAMPLER_MODULE)
if (BUILD_VST_MODULE)
add_subdirectory(vst)
endif(BUILD_VST_MODULE)
if (MUE_BUILD_SHORTCUTS_MODULE)
add_subdirectory(shortcuts)
endif()
add_subdirectory(midi)
add_subdirectory(mpe)
if (BUILD_UNIT_TESTS)
add_subdirectory(global/tests)
add_subdirectory(draw/tests)
add_subdirectory(mpe/tests)
add_subdirectory(ui/tests)
add_subdirectory(accessibility/tests)
endif(BUILD_UNIT_TESTS)
if (MUE_BUILD_VST_MODULE)
add_subdirectory(vst)
endif()

View File

@ -43,10 +43,19 @@ set(MODULE_SRC
)
if (OS_IS_LIN)
# it needed to send a spontaneous event by activating navigation
set(MODULE_INCLUDE
${Qt5Core_PRIVATE_INCLUDE_DIRS}
)
# it needed to send a spontaneous event by activating navigation
set(MODULE_INCLUDE
${Qt5Core_PRIVATE_INCLUDE_DIRS}
)
endif()
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
if (MUE_ENABLE_ACCESSIBILITY_TRACE)
set(MODULE_DEF ${MODULE_DEF} -DMUE_ENABLE_ACCESSIBILITY_TRACE )
endif()
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -37,9 +37,8 @@
#include "async/async.h"
#include "log.h"
#include "config.h"
#ifdef ACCESSIBILITY_LOGGING_ENABLED
#ifdef MUE_ENABLE_ACCESSIBILITY_TRACE
#define MYLOG() LOGI()
#else
#define MYLOG() LOGN()
@ -280,7 +279,7 @@ void AccessibilityController::stateChanged(IAccessible* aitem, State state, bool
void AccessibilityController::sendEvent(QAccessibleEvent* ev)
{
#ifdef ACCESSIBILITY_LOGGING_ENABLED
#ifdef MUE_ENABLE_ACCESSIBILITY_TRACE
AccessibleObject* obj = qobject_cast<AccessibleObject*>(ev->object());
MYLOG() << "object: " << obj->item()->accessibleName() << ", event: " << int(ev->type());
#endif

View File

@ -28,10 +28,10 @@
#include "translation.h"
#include "log.h"
//#define ACCESSIBILITY_LOGGING_ENABLED
//#define MUE_ENABLE_ACCESSIBILITY_TRACE
#undef MYLOG
#ifdef ACCESSIBILITY_LOGGING_ENABLED
#ifdef MUE_ENABLE_ACCESSIBILITY_TRACE
#define MYLOG() LOGI()
#else
#define MYLOG() LOGN()

View File

@ -198,7 +198,7 @@ set(MODULE_LINK
fluidsynth
)
if (ENABLE_AUDIO_EXPORT)
if (MUE_ENABLE_AUDIO_EXPORT)
set(MODULE_SRC
${MODULE_SRC}

View File

@ -32,7 +32,7 @@
#include "internal/worker/audioengine.h"
#include "audioerrors.h"
#ifdef ENABLE_AUDIO_EXPORT
#ifdef MUE_ENABLE_AUDIO_EXPORT
#include "internal/soundtracks/soundtrackwriter.h"
#endif
@ -41,7 +41,7 @@
using namespace mu::audio;
using namespace mu::async;
#ifdef ENABLE_AUDIO_EXPORT
#ifdef MUE_ENABLE_AUDIO_EXPORT
using namespace mu::audio::soundtrack;
#endif
@ -198,7 +198,7 @@ Promise<bool> AudioOutputHandler::saveSoundTrack(const TrackSequenceId sequenceI
return reject(static_cast<int>(Err::InvalidSequenceId), "invalid sequence id");
}
#ifdef ENABLE_AUDIO_EXPORT
#ifdef MUE_ENABLE_AUDIO_EXPORT
s->player()->stop();
s->player()->seek(0);
msecs_t totalDuration = s->player()->duration();
@ -229,7 +229,7 @@ Promise<bool> AudioOutputHandler::saveSoundTrack(const TrackSequenceId sequenceI
void AudioOutputHandler::abortSavingAllSoundTracks()
{
#ifdef ENABLE_AUDIO_EXPORT
#ifdef MUE_ENABLE_AUDIO_EXPORT
for (auto writer : m_saveSoundTracksWritersMap) {
writer.second->abort();
}

View File

@ -90,4 +90,12 @@ else()
endif (USE_SYSTEM_FREETYPE)
endif()
if (MUE_ENABLE_DRAW_TRACE)
set(MODULE_DEF ${MODULE_DEF} -DMUE_ENABLE_DRAW_TRACE)
endif()
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -71,7 +71,7 @@ void BufferedPaintProvider::beginObject(const std::string& name, const PointF& p
// add new object
m_currentObjects.push(DrawData::Object(name, pagePos));
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
m_drawObjectsLogger->beginObject(name, pagePos);
#endif
}
@ -92,7 +92,7 @@ void BufferedPaintProvider::endObject()
// remove obj
m_currentObjects.pop();
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
m_drawObjectsLogger->endObject();
#endif
}

View File

@ -285,7 +285,7 @@ private:
Painter* m_painter = nullptr;
};
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
#define TRACE_OBJ_DRAW \
mu::draw::PainterObjMarker __drawObjMarker(painter, typeName(), pagePos())

View File

@ -38,7 +38,7 @@ static double angleForArc(double angle);
void PainterPath::moveTo(const PointF& p)
{
if (!hasValidCoords(p)) {
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
LOGW() << "PainterPath::moveTo: Adding point with invalid coordinates, ignoring call";
#endif
return;
@ -59,7 +59,7 @@ void PainterPath::moveTo(const PointF& p)
void PainterPath::lineTo(const PointF& p)
{
if (!hasValidCoords(p)) {
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
LOGW() << "PainterPath::lineTo: Adding point with invalid coordinates, ignoring call";
#endif
return;
@ -80,7 +80,7 @@ void PainterPath::lineTo(const PointF& p)
void PainterPath::cubicTo(const PointF& ctrlPt1, const PointF& ctrlPt2, const PointF& endPt)
{
if (!hasValidCoords(ctrlPt1) || !hasValidCoords(ctrlPt2) || !hasValidCoords(endPt)) {
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
LOGW() << "PainterPath::cubicTo: Adding point with invalid coordinates, ignoring call";
#endif
return;
@ -154,7 +154,7 @@ PainterPath::Element PainterPath::elementAt(size_t i) const
void PainterPath::addRect(const RectF& r)
{
if (!hasValidCoords(r)) {
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
LOGW() << "PainterPath::addRect: Adding point with invalid coordinates, ignoring call";
#endif
return;
@ -179,7 +179,7 @@ void PainterPath::addRect(const RectF& r)
void PainterPath::addEllipse(const RectF& boundingRect)
{
if (!hasValidCoords(boundingRect)) {
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
LOGW() << "PainterPath::addEllipse: Adding point with invalid coordinates, ignoring call";
#endif
return;
@ -262,7 +262,7 @@ void PainterPath::arcMoveTo(const RectF& rect, double angle)
void PainterPath::arcTo(const RectF& rect, double startAngle, double sweepLength)
{
if (!hasValidCoords(rect) || !isValidCoord(startAngle) || !isValidCoord(sweepLength)) {
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
LOGW() << "PainterPath::arcTo: Adding point with invalid coordinates, ignoring call";
#endif
return;

View File

@ -461,7 +461,7 @@ Transform& Transform::rotate(double a)
if (RealIsNull(a)) {
return *this;
}
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
if (std::isnan(a)) {
nanWarning("rotate");
return *this;
@ -529,7 +529,7 @@ Transform& Transform::rotate(double a)
Transform& Transform::rotateRadians(double a)
{
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
if (std::isnan(a)) {
nanWarning("rotateRadians");
return *this;
@ -588,7 +588,7 @@ Transform& Transform::translate(double dx, double dy)
if (RealIsNull(dx) && RealIsNull(dy)) {
return *this;
}
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
if (std::isnan(dx) | std::isnan(dy)) {
nanWarning("translate");
return *this;
@ -627,7 +627,7 @@ Transform& Transform::scale(double sx, double sy)
if (RealIsEqual(sx, 1) && RealIsEqual(sy, 1)) {
return *this;
}
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
if (std::isnan(sx) | std::isnan(sy)) {
nanWarning("scale");
return *this;
@ -664,7 +664,7 @@ Transform& Transform::shear(double sh, double sv)
if (RealIsNull(sh) && RealIsNull(sv)) {
return *this;
}
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
if (std::isnan(sh) | std::isnan(sv)) {
nanWarning("shear");
return *this;
@ -798,7 +798,7 @@ Transform Transform::fromQTransform(const QTransform& transform)
#endif
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
void Transform::nanWarning(const std::string& func)
{
LOGW() << "Transform:: " << func << " with NaN called";

View File

@ -122,7 +122,7 @@ private:
void mapElement(double& nx, double& ny, TransformationType t) const;
#ifdef TRACE_DRAW_OBJ_ENABLED
#ifdef MUE_ENABLE_DRAW_TRACE
static void nanWarning(const std::string& func);
#endif

View File

@ -204,5 +204,16 @@ if (OS_IS_MAC)
set(MODULE_LINK ${MODULE_LINK} ${AppKit})
endif()
if (MUE_ENABLE_CUSTOM_ALLOCATOR)
set(MODULE_DEF ${MODULE_DEF} -DMUE_ENABLE_CUSTOM_ALLOCATOR)
endif()
if (MUE_ENABLE_LOGGER_DEBUGLEVEL)
set(MODULE_DEF ${MODULE_DEF} -DMUE_ENABLE_LOGGER_DEBUGLEVEL)
endif()
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -30,7 +30,7 @@
using namespace mu;
int ObjectAllocator::used = 0;
int ObjectAllocator::__used = 0;
size_t ObjectAllocator::DEFAULT_BLOCK_SIZE(1024 * 256); // 256 kB
static inline size_t align(size_t n)
@ -41,6 +41,20 @@ static inline size_t align(size_t n)
// ============================================
// ObjectAllocator
// ============================================
void ObjectAllocator::used()
{
#ifdef MUE_ENABLE_CUSTOM_ALLOCATOR
__used++;
#endif
}
void ObjectAllocator::unused()
{
#ifdef MUE_ENABLE_CUSTOM_ALLOCATOR
__used--;
#endif
}
ObjectAllocator::ObjectAllocator(const char* module, const char* name, destroyer_t dtor)
: m_module(module), m_name(name), m_dtor(dtor)
{

View File

@ -104,18 +104,13 @@ public:
Info stateInfo() const;
static bool enabled()
{
#ifdef CUSTOM_ALLOCATOR_DISABLED
return false;
#else
return used;
#endif
}
static int used;
static bool enabled() { return __used; }
static void used();
static void unused();
static int __used;
private:
struct Chunk {
/**
* When a chunk is free, the `next` contains the

View File

@ -105,7 +105,7 @@ void GlobalModule::onPreInit(const IApplication::RunMode& mode)
logger->addDest(logFile);
#ifdef LOGGER_DEBUGLEVEL_ENABLED
#ifdef MUE_ENABLE_LOGGER_DEBUGLEVEL
logger->setLevel(haw::logger::Debug);
#else
logger->setLevel(haw::logger::Normal);

View File

@ -21,12 +21,6 @@
*/
#include <gtest/gtest.h>
#include "types/string.h"
#ifdef CUSTOM_ALLOCATOR_DISABLED
#undef CUSTOM_ALLOCATOR_DISABLED
#endif
#include "allocator.h"
#include "log.h"
@ -88,7 +82,7 @@ public:
void SetUp() override
{
ObjectAllocator::used++;
ObjectAllocator::__used++;
}
};

View File

@ -45,3 +45,7 @@ set(MODULE_QRC mpe.qrc)
set(MODULE_QML_IMPORT ${CMAKE_CURRENT_LIST_DIR}/qml)
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -151,4 +151,8 @@ if (OS_IS_MAC)
set(MODULE_LINK ${MODULE_LINK} ${AppKit})
endif()
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -361,7 +361,7 @@ void NavigationController::resetIfNeed(QObject* watched)
return;
}
#ifdef BUILD_DIAGNOSTICS
#ifdef MUE_BUILD_DIAGNOSTICS_MODULE
if (diagnostics::isDiagnosticHierarchy(watched)) {
return;
}

View File

@ -121,7 +121,7 @@ void UiEngine::setup(QQmlEngine* engine)
m_engine->addImportPath(":/qml");
#ifdef QML_LOAD_FROM_SOURCE
#ifdef MUE_ENABLE_LOAD_QML_FROM_SOURCE
for (const QString& path : m_sourceImportPaths) {
m_engine->addImportPath(path);
}
@ -130,7 +130,7 @@ void UiEngine::setup(QQmlEngine* engine)
void UiEngine::addSourceImportPath(const QString& path)
{
#ifdef QML_LOAD_FROM_SOURCE
#ifdef MUE_ENABLE_LOAD_QML_FROM_SOURCE
LOGD() << path;
m_sourceImportPaths << path;
if (m_engine) {

View File

@ -22,12 +22,12 @@
#include "mainwindowprovider.h"
#include <QWindow>
#include "modularity/ioc.h"
#include "log.h"
#include <QWindow>
using namespace mu::ui;
using namespace mu::modularity;

View File

@ -103,6 +103,10 @@ if (OS_IS_WIN)
)
endif(OS_IS_WIN)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
if (MUE_DISABLE_UI_MODALITY)
set(MODULE_DEF ${MODULE_DEF} -DMUE_DISABLE_UI_MODALITY)
endif()
include(SetupModule)

View File

@ -180,7 +180,7 @@ void PopupView::open()
qWindow->setTitle(m_title);
qWindow->setModality(m_modal ? Qt::ApplicationModal : Qt::NonModal);
qWindow->setFlag(Qt::FramelessWindowHint, m_frameless);
#ifdef UI_DISABLE_MODALITY
#ifdef MUE_DISABLE_UI_MODALITY
qWindow->setModality(Qt::NonModal);
#endif
m_window->setResizable(m_resizable);

View File

@ -18,14 +18,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
if (BUILD_IMPORTEXPORT_MODULE)
if (MUE_BUILD_IMPORTEXPORT_MODULE)
add_subdirectory(bb)
add_subdirectory(braille)
add_subdirectory(bww)
add_subdirectory(capella)
add_subdirectory(${THIRDPARTY_DIR}/rtf2html rtf2html) # for capella
add_subdirectory(midi)
add_subdirectory(${THIRDPARTY_DIR}/beatroot beatroot) # for midi import
add_subdirectory(musedata)
add_subdirectory(musicxml)
add_subdirectory(ove)
@ -33,17 +31,9 @@ if (BUILD_IMPORTEXPORT_MODULE)
add_subdirectory(imagesexport)
add_subdirectory(guitarpro)
if (BUILD_UNIT_TESTS)
add_subdirectory(bb/tests)
add_subdirectory(braille/tests)
add_subdirectory(bww/tests)
add_subdirectory(capella/tests)
add_subdirectory(guitarpro/tests)
add_subdirectory(midi/tests)
add_subdirectory(musicxml/tests)
if (MUE_BUILD_VIDEOEXPORT_MODULE)
add_subdirectory(videoexport)
endif()
endif()
if (BUILD_VIDEOEXPORT_MODULE)
add_subdirectory(videoexport)
endif()

View File

@ -42,5 +42,4 @@ set(MODULE_LINK
engraving
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)

View File

@ -33,5 +33,8 @@ set(MODULE_LINK
engraving
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -35,5 +35,8 @@ set(MODULE_LINK
project
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -34,5 +34,8 @@ set(MODULE_LINK
engraving
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -30,10 +30,15 @@ set(MODULE_SRC
${CMAKE_CURRENT_LIST_DIR}/internal/capxml.cpp
)
add_subdirectory(${THIRDPARTY_DIR}/rtf2html rtf2html)
set(MODULE_LINK
rtf2html # for capella
rtf2html
engraving
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -82,3 +82,7 @@ set(MODULE_LINK
)
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -43,5 +43,5 @@ set(MODULE_LINK
engraving
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)

View File

@ -39,10 +39,16 @@ set(MODULE_SRC
${CMAKE_CURRENT_LIST_DIR}/internal/notationmidiwriter.h
)
add_subdirectory(${THIRDPARTY_DIR}/beatroot beatroot)
set(MODULE_LINK
beatroot
engraving
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -33,5 +33,5 @@ set(MODULE_LINK
engraving
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)

View File

@ -43,5 +43,8 @@ set(MODULE_LINK
engraving
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -37,5 +37,5 @@ set(MODULE_LINK
engraving
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)

View File

@ -33,5 +33,5 @@ set(MODULE_SRC
${CMAKE_CURRENT_LIST_DIR}/internal/languagesservice.h
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)

View File

@ -38,5 +38,9 @@ set(MODULE_SRC
${CMAKE_CURRENT_LIST_DIR}/view/learnpagemodel.h
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
set(MODULE_DEF ${MODULE_DEF}
-DMUE_LEARN_YOUTUBE_API_KEY="${MUE_LEARN_YOUTUBE_API_KEY}"
)
include(SetupModule)

View File

@ -28,7 +28,7 @@
using namespace mu::learn;
using namespace mu::network;
static const QString API_KEY(YOUTUBE_API_KEY);
static const QString API_KEY(MUE_LEARN_YOUTUBE_API_KEY);
static const QString GET_STARTED_PLAYLIST_ID("PLTYuWi2LmaPEhcwZJwFZqoyQ2xXx_maPa");
static const QString ADVANCED_PLAYLIST_ID("PL24C760637A625BB6");
static const int MAX_NUMBER_OF_RESULT_ITEMS(100);

View File

@ -164,7 +164,7 @@ if (NOT CC_IS_EMSCRIPTEN)
list(APPEND LINK_LIB plugins)
list(APPEND LINK_LIB multiinstances)
if (BUILD_IMPORTEXPORT_MODULE)
if (MUE_BUILD_IMPORTEXPORT_MODULE)
set(LINK_LIB ${LINK_LIB}
iex_musicxml
iex_bb
@ -178,21 +178,23 @@ if (NOT CC_IS_EMSCRIPTEN)
iex_audioexport
iex_imagesexport
)
if (MUE_BUILD_VIDEOEXPORT_MODULE)
list(APPEND LINK_LIB iex_videoexport)
endif()
endif()
endif()
if (BUILD_VIDEOEXPORT_MODULE)
list(APPEND LINK_LIB iex_videoexport)
endif()
if (BUILD_AUTOBOT_MODULE)
if (MUE_BUILD_AUTOBOT_MODULE)
list(APPEND LINK_LIB autobot)
endif()
if (BUILD_MUSESAMPLER_MODULE)
if (MUE_BUILD_MUSESAMPLER_MODULE)
list(APPEND LINK_LIB musesampler)
endif(BUILD_MUSESAMPLER_MODULE)
endif(MUE_BUILD_MUSESAMPLER_MODULE)
set (MSCORE_APPEND_SRC)

View File

@ -29,51 +29,66 @@
#include "appshell/appshell.h"
#include "framework/global/globalmodule.h"
#include "framework/draw/drawmodule.h"
#include "framework/ui/uimodule.h"
#include "framework/uicomponents/uicomponentsmodule.h"
#include "framework/fonts/fontsmodule.h"
#include "framework/actions/actionsmodule.h"
#include "framework/accessibility/accessibilitymodule.h"
#ifdef BUILD_SHORTCUTS_MODULE
#include "framework/shortcuts/shortcutsmodule.h"
#include "framework/actions/actionsmodule.h"
#ifdef MUE_BUILD_AUDIO_MODULE
#include "framework/audio/audiomodule.h"
#else
#include "stubs/framework/shortcuts/shortcutsstubmodule.h"
#include "stubs/framework/audio/audiostubmodule.h"
#endif
#ifdef BUILD_NETWORK_MODULE
#include "framework/draw/drawmodule.h"
#include "framework/fonts/fontsmodule.h"
#include "framework/midi/midimodule.h"
#include "framework/mpe/mpemodule.h"
#ifdef MUE_BUILD_MUSESAMPLER_MODULE
#include "framework/musesampler/musesamplermodule.h"
#endif
#ifdef MUE_BUILD_NETWORK_MODULE
#include "framework/network/networkmodule.h"
#else
#include "stubs/framework/network/networkstubmodule.h"
#endif
#ifdef BUILD_AUDIO_MODULE
#include "framework/audio/audiomodule.h"
#ifdef MUE_BUILD_SHORTCUTS_MODULE
#include "framework/shortcuts/shortcutsmodule.h"
#else
#include "stubs/framework/audio/audiostubmodule.h"
#endif
#include "framework/midi/midimodule.h"
#include "framework/mpe/mpemodule.h"
#ifdef BUILD_MUSESAMPLER_MODULE
#include "framework/musesampler/musesamplermodule.h"
#include "stubs/framework/shortcuts/shortcutsstubmodule.h"
#endif
#include "framework/ui/uimodule.h"
#include "framework/uicomponents/uicomponentsmodule.h"
#ifdef MUE_BUILD_VST_MODULE
#include "framework/vst/vstmodule.h"
#else
#include "stubs/framework/vst/vststubmodule.h"
#endif
// Modules
#include "appshell/appshellmodule.h"
#include "context/contextmodule.h"
#ifdef BUILD_LEARN_MODULE
#include "learn/learnmodule.h"
#else
#include "stubs/learn/learnmodule.h"
#ifdef MUE_BUILD_AUTOBOT_MODULE
#include "autobot/autobotmodule.h"
#endif
#include "engraving/engravingmodule.h"
#include "notation/notationmodule.h"
#include "project/projectmodule.h"
#include "print/printmodule.h"
#ifdef MUE_BUILD_CLOUD_MODULE
#include "cloud/cloudmodule.h"
#else
#include "stubs/cloud/cloudstubmodule.h"
#endif
#ifdef BUILD_IMPORTEXPORT_MODULE
#include "commonscene/commonscenemodule.h"
#include "context/contextmodule.h"
#include "converter/convertermodule.h"
#include "diagnostics/diagnosticsmodule.h"
#include "engraving/engravingmodule.h"
#ifdef MUE_BUILD_IMPORTEXPORT_MODULE
#include "importexport/musicxml/musicxmlmodule.h"
#include "importexport/bb/bbmodule.h"
#include "importexport/braille/braillemodule.h"
@ -85,80 +100,73 @@
#include "importexport/ove/ovemodule.h"
#include "importexport/audioexport/audioexportmodule.h"
#include "importexport/imagesexport/imagesexportmodule.h"
#endif
#ifdef BUILD_VIDEOEXPORT_MODULE
#ifdef MUE_BUILD_VIDEOEXPORT_MODULE
#include "importexport/videoexport/videoexportmodule.h"
#endif
#endif
#include "commonscene/commonscenemodule.h"
#ifdef BUILD_PALETTE_MODULE
#include "palette/palettemodule.h"
#else
#include "stubs/palette/palettestubmodule.h"
#endif
#include "inspector/inspectormodule.h"
#ifdef BUILD_PLAYBACK_MODULE
#include "playback/playbackmodule.h"
#else
#include "stubs/playback/playbackstubmodule.h"
#endif
#ifdef BUILD_INSTRUMENTSSCENE_MODULE
#ifdef MUE_BUILD_INSTRUMENTSSCENE_MODULE
#include "instrumentsscene/instrumentsscenemodule.h"
#else
#include "stubs/instrumentsscene/instrumentsscenestubmodule.h"
#endif
#include "converter/convertermodule.h"
#ifdef BUILD_VST_MODULE
#include "framework/vst/vstmodule.h"
#else
#include "stubs/framework/vst/vststubmodule.h"
#endif
#ifndef Q_OS_WASM
#ifdef BUILD_WORKSPACE_MODULE
#include "workspace/workspacemodule.h"
#else
#include "stubs/workspace/workspacestubmodule.h"
#endif
#ifdef BUILD_PLUGINS_MODULE
#include "plugins/pluginsmodule.h"
#else
#include "stubs/plugins/pluginsstubmodule.h"
#endif
#ifdef BUILD_CLOUD_MODULE
#include "cloud/cloudmodule.h"
#else
#include "stubs/cloud/cloudstubmodule.h"
#endif
#ifdef BUILD_LANGUAGES_MODULE
#ifdef MUE_BUILD_LANGUAGES_MODULE
#include "languages/languagesmodule.h"
#else
#include "stubs/languages/languagesstubmodule.h"
#endif
#ifdef BUILD_MULTIINSTANCES_MODULE
#ifdef MUE_BUILD_LEARN_MODULE
#include "learn/learnmodule.h"
#else
#include "stubs/learn/learnmodule.h"
#endif
#ifdef MUE_BUILD_MULTIINSTANCES_MODULE
#include "multiinstances/multiinstancesmodule.h"
#else
#include "stubs/multiinstances/multiinstancesstubmodule.h"
#endif
#ifdef BUILD_UPDATE_MODULE
#include "notation/notationmodule.h"
#ifdef MUE_BUILD_PALETTE_MODULE
#include "palette/palettemodule.h"
#else
#include "stubs/palette/palettestubmodule.h"
#endif
#ifdef MUE_BUILD_PLAYBACK_MODULE
#include "playback/playbackmodule.h"
#else
#include "stubs/playback/playbackstubmodule.h"
#endif
#ifdef MUE_BUILD_PLUGINS_MODULE
#include "plugins/pluginsmodule.h"
#else
#include "stubs/plugins/pluginsstubmodule.h"
#endif
#include "print/printmodule.h"
#include "project/projectmodule.h"
#ifdef MUE_BUILD_UPDATE_MODULE
#include "update/updatemodule.h"
#else
#include "stubs/update/updatestubmodule.h"
#endif
#include "diagnostics/diagnosticsmodule.h"
#ifdef BUILD_AUTOBOT_MODULE
#include "autobot/autobotmodule.h"
#ifdef MUE_BUILD_WORKSPACE_MODULE
#include "workspace/workspacemodule.h"
#else
#include "stubs/workspace/workspacestubmodule.h"
#endif
#else
#ifdef Q_OS_WASM
#include "wasmtest/wasmtestmodule.h"
#endif
@ -182,75 +190,37 @@ int main(int argc, char** argv)
//! NOTE `diagnostics` must be first, because it installs the crash handler.
//! For other modules, the order is (an should be) unimportant.
app.addModule(new mu::diagnostics::DiagnosticsModule());
// framework
app.addModule(new mu::accessibility::AccessibilityModule());
app.addModule(new mu::actions::ActionsModule());
app.addModule(new mu::audio::AudioModule());
app.addModule(new mu::draw::DrawModule());
app.addModule(new mu::fonts::FontsModule());
app.addModule(new mu::ui::UiModule());
app.addModule(new mu::uicomponents::UiComponentsModule());
#ifdef BUILD_NETWORK_MODULE
app.addModule(new mu::network::NetworkModule());
#else
app.addModule(new mu::network::NetworkStubModule());
#endif
app.addModule(new mu::actions::ActionsModule());
app.addModule(new mu::accessibility::AccessibilityModule());
app.addModule(new mu::appshell::AppShellModule());
app.addModule(new mu::context::ContextModule());
#ifdef BUILD_SHORTCUTS_MODULE
app.addModule(new mu::shortcuts::ShortcutsModule());
#else
app.addModule(new mu::shortcuts::ShortcutsStubModule());
#endif
#ifdef BUILD_AUDIO_MODULE
app.addModule(new mu::audio::AudioModule());
#else
app.addModule(new mu::audio::AudioStubModule());
#endif
app.addModule(new mu::midi::MidiModule());
app.addModule(new mu::mpe::MpeModule());
#ifdef BUILD_MUSESAMPLER_MODULE
#ifdef MUE_BUILD_MUSESAMPLER_MODULE
app.addModule(new mu::musesampler::MuseSamplerModule());
#endif
app.addModule(new mu::learn::LearnModule());
app.addModule(new mu::engraving::EngravingModule());
app.addModule(new mu::notation::NotationModule());
app.addModule(new mu::project::ProjectModule());
app.addModule(new mu::print::PrintModule());
app.addModule(new mu::commonscene::CommonSceneModule());
#ifdef BUILD_PLAYBACK_MODULE
app.addModule(new mu::playback::PlaybackModule());
#else
app.addModule(new mu::playback::PlaybackStubModule());
#endif
#ifdef BUILD_INSTRUMENTSSCENE_MODULE
app.addModule(new mu::instrumentsscene::InstrumentsSceneModule());
#else
app.addModule(new mu::instrumentsscene::InstrumentsSceneStubModule());
#endif
#ifdef BUILD_VST_MODULE
app.addModule(new mu::network::NetworkModule());
app.addModule(new mu::shortcuts::ShortcutsModule());
app.addModule(new mu::ui::UiModule());
app.addModule(new mu::uicomponents::UiComponentsModule());
app.addModule(new mu::vst::VSTModule());
#else
app.addModule(new mu::vst::VstStubModule());
// modules
app.addModule(new mu::appshell::AppShellModule());
#ifdef MUE_BUILD_AUTOBOT_MODULE
app.addModule(new mu::autobot::AutobotModule());
#endif
app.addModule(new mu::inspector::InspectorModule());
#ifdef BUILD_PALETTE_MODULE
app.addModule(new mu::palette::PaletteModule());
#else
app.addModule(new mu::palette::PaletteStubModule());
#endif
app.addModule(new mu::cloud::CloudModule());
app.addModule(new mu::commonscene::CommonSceneModule());
app.addModule(new mu::context::ContextModule());
app.addModule(new mu::converter::ConverterModule());
app.addModule(new mu::engraving::EngravingModule());
#ifndef Q_OS_WASM
#ifdef BUILD_IMPORTEXPORT_MODULE
#ifdef MUE_BUILD_IMPORTEXPORT_MODULE
app.addModule(new mu::iex::bb::BBModule());
app.addModule(new mu::iex::braille::BrailleModule());
app.addModule(new mu::iex::bww::BwwModule());
@ -262,46 +232,26 @@ int main(int argc, char** argv)
app.addModule(new mu::iex::ove::OveModule());
app.addModule(new mu::iex::audioexport::AudioExportModule());
app.addModule(new mu::iex::imagesexport::ImagesExportModule());
#endif
#ifdef BUILD_VIDEOEXPORT_MODULE
#ifdef MUE_BUILD_VIDEOEXPORT_MODULE
app.addModule(new mu::iex::videoexport::VideoExportModule());
#endif
#endif
#ifdef BUILD_WORKSPACE_MODULE
app.addModule(new mu::workspace::WorkspaceModule());
#else
app.addModule(new mu::workspace::WorkspaceStubModule());
#endif
#ifdef BUILD_PLUGINS_MODULE
app.addModule(new mu::plugins::PluginsModule());
#else
app.addModule(new mu::plugins::PluginsStubModule());
#endif
#ifdef BUILD_CLOUD_MODULE
app.addModule(new mu::cloud::CloudModule());
#else
app.addModule(new mu::cloud::CloudStubModule());
#endif
#ifdef BUILD_LANGUAGES_MODULE
app.addModule(new mu::inspector::InspectorModule());
app.addModule(new mu::instrumentsscene::InstrumentsSceneModule());
app.addModule(new mu::languages::LanguagesModule());
#else
app.addModule(new mu::languages::LanguagesStubModule());
#endif
app.addModule(new mu::learn::LearnModule());
app.addModule(new mu::mi::MultiInstancesModule());
#ifdef BUILD_UPDATE_MODULE
app.addModule(new mu::notation::NotationModule());
app.addModule(new mu::palette::PaletteModule());
app.addModule(new mu::playback::PlaybackModule());
app.addModule(new mu::plugins::PluginsModule());
app.addModule(new mu::print::PrintModule());
app.addModule(new mu::project::ProjectModule());
app.addModule(new mu::update::UpdateModule());
#else
app.addModule(new mu::update::UpdateStubModule());
#endif
app.addModule(new mu::workspace::WorkspaceModule());
#ifdef BUILD_AUTOBOT_MODULE
app.addModule(new mu::autobot::AutobotModule());
#endif
#else
#ifdef Q_OS_WASM
app.addModule(new mu::wasmtest::WasmTestModule());
#endif

View File

@ -148,11 +148,9 @@ void PlaybackConfiguration::setDefaultProfileForNewProjects(const SoundProfileNa
const SoundProfileName& PlaybackConfiguration::fallbackSoundProfileStr() const
{
#ifdef BUILD_MUSESAMPLER_MODULE
if (musesamplerInfo()->isInstalled()) {
if (musesamplerInfo() && musesamplerInfo()->isInstalled()) {
return MUSE_PROFILE_NAME;
}
#endif
return BASIC_PROFILE_NAME;
}

View File

@ -22,21 +22,15 @@
#ifndef MU_PLAYBACK_PLAYBACKCONFIGURATION_H
#define MU_PLAYBACK_PLAYBACKCONFIGURATION_H
#include "config.h"
#ifdef BUILD_MUSESAMPLER_MODULE
#include "modularity/ioc.h"
#include "musesampler/imusesamplerinfo.h"
#endif
#include "../iplaybackconfiguration.h"
namespace mu::playback {
class PlaybackConfiguration : public IPlaybackConfiguration
{
#ifdef BUILD_MUSESAMPLER_MODULE
INJECT(playback, musesampler::IMuseSamplerInfo, musesamplerInfo)
#endif
public:
void init();

View File

@ -83,4 +83,8 @@ set(MODULE_LINK
engraving
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -141,4 +141,8 @@ set(MODULE_LINK
notation
)
include(${PROJECT_SOURCE_DIR}/build/module.cmake)
include(SetupModule)
if (MUE_BUILD_UNIT_TESTS)
add_subdirectory(tests)
endif()

View File

@ -20,46 +20,46 @@
add_subdirectory(framework)
if (NOT BUILD_LEARN_MODULE)
add_subdirectory(learn)
endif (NOT BUILD_LEARN_MODULE)
if (NOT BUILD_WORKSPACE_MODULE)
add_subdirectory(workspace)
endif (NOT BUILD_WORKSPACE_MODULE)
if (NOT BUILD_CLOUD_MODULE)
if (NOT MUE_BUILD_CLOUD_MODULE)
add_subdirectory(cloud)
endif (NOT BUILD_CLOUD_MODULE)
endif()
if (NOT BUILD_LANGUAGES_MODULE)
add_subdirectory(languages)
endif (NOT BUILD_LANGUAGES_MODULE)
if (NOT BUILD_PLUGINS_MODULE)
add_subdirectory(plugins)
endif (NOT BUILD_PLUGINS_MODULE)
if (NOT BUILD_PLAYBACK_MODULE)
add_subdirectory(playback)
endif (NOT BUILD_PLAYBACK_MODULE)
if (NOT BUILD_PALETTE_MODULE)
add_subdirectory(palette)
endif (NOT BUILD_PALETTE_MODULE)
if (NOT BUILD_INSTRUMENTSSCENE_MODULE)
add_subdirectory(instrumentsscene)
endif (NOT BUILD_INSTRUMENTSSCENE_MODULE)
if (NOT BUILD_INSPECTOR_MODULE)
if (NOT MUE_BUILD_INSPECTOR_MODULE)
add_subdirectory(inspector)
endif (NOT BUILD_INSPECTOR_MODULE)
endif()
if (NOT BUILD_MULTIINSTANCES_MODULE)
if (NOT MUE_BUILD_INSTRUMENTSSCENE_MODULE)
add_subdirectory(instrumentsscene)
endif()
if (NOT MUE_BUILD_LANGUAGES_MODULE)
add_subdirectory(languages)
endif()
if (NOT MUE_BUILD_LEARN_MODULE)
add_subdirectory(learn)
endif()
if (NOT MUE_BUILD_MULTIINSTANCES_MODULE)
add_subdirectory(multiinstances)
endif()
if (NOT BUILD_UPDATE_MODULE)
if (NOT MUE_BUILD_PALETTE_MODULE)
add_subdirectory(palette)
endif()
if (NOT MUE_BUILD_PLAYBACK_MODULE)
add_subdirectory(playback)
endif()
if (NOT MUE_BUILD_PLUGINS_MODULE)
add_subdirectory(plugins)
endif()
if (NOT MUE_BUILD_UPDATE_MODULE)
add_subdirectory(update)
endif (NOT BUILD_UPDATE_MODULE)
endif()
if (NOT MUE_BUILD_WORKSPACE_MODULE)
add_subdirectory(workspace)
endif()

View File

@ -34,22 +34,22 @@ static void cloud_init_qrc()
Q_INIT_RESOURCE(cloud);
}
std::string CloudStubModule::moduleName() const
std::string CloudModule::moduleName() const
{
return "cloud_stub";
}
void CloudStubModule::registerExports()
void CloudModule::registerExports()
{
ioc()->registerExport<IAuthorizationService>(moduleName(), new AuthorizationServiceStub());
}
void CloudStubModule::registerResources()
void CloudModule::registerResources()
{
cloud_init_qrc();
}
void CloudStubModule::registerUiTypes()
void CloudModule::registerUiTypes()
{
ioc()->resolve<ui::IUiEngine>(moduleName())->addSourceImportPath(cloud_QML_IMPORT);
}

View File

@ -25,7 +25,7 @@
#include "modularity/imodulesetup.h"
namespace mu::cloud {
class CloudStubModule : public modularity::IModuleSetup
class CloudModule : public modularity::IModuleSetup
{
public:
std::string moduleName() const override;

View File

@ -18,17 +18,19 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
if (NOT BUILD_SHORTCUTS_MODULE)
add_subdirectory(shortcuts)
endif (NOT BUILD_SHORTCUTS_MODULE)
if (NOT BUILD_NETWORK_MODULE)
add_subdirectory(network)
endif (NOT BUILD_NETWORK_MODULE)
if (NOT BUILD_AUDIO_MODULE)
if (NOT MUE_BUILD_AUDIO_MODULE)
add_subdirectory(audio)
endif (NOT BUILD_AUDIO_MODULE)
endif()
if (NOT MUE_BUILD_NETWORK_MODULE)
add_subdirectory(network)
endif()
if (NOT MUE_BUILD_SHORTCUTS_MODULE)
add_subdirectory(shortcuts)
endif()
if (NOT BUILD_VST_MODULE)
add_subdirectory(vst)

View File

@ -38,12 +38,12 @@ static void audio_init_qrc()
Q_INIT_RESOURCE(audio);
}
std::string AudioStubModule::moduleName() const
std::string AudioModule::moduleName() const
{
return "audio_engine_stub";
}
void AudioStubModule::registerExports()
void AudioModule::registerExports()
{
ioc()->registerExport<IAudioConfiguration>(moduleName(), new AudioConfigurationStub());
ioc()->registerExport<IAudioDriver>(moduleName(), new AudioDriverStub());
@ -54,12 +54,12 @@ void AudioStubModule::registerExports()
ioc()->registerExport<ISoundFontRepository>(moduleName(), new SoundFontRepositoryStub());
}
void AudioStubModule::registerResources()
void AudioModule::registerResources()
{
audio_init_qrc();
}
void AudioStubModule::registerUiTypes()
void AudioModule::registerUiTypes()
{
ioc()->resolve<ui::IUiEngine>(moduleName())->addSourceImportPath(audio_QML_IMPORT);
}

View File

@ -26,7 +26,7 @@
#include "async/asyncable.h"
namespace mu::audio {
class AudioStubModule : public modularity::IModuleSetup, public async::Asyncable
class AudioModule : public modularity::IModuleSetup, public async::Asyncable
{
public:
std::string moduleName() const override;

View File

@ -28,12 +28,12 @@
using namespace mu::network;
using namespace mu::modularity;
std::string NetworkStubModule::moduleName() const
std::string NetworkModule::moduleName() const
{
return "network_stub";
}
void NetworkStubModule::registerExports()
void NetworkModule::registerExports()
{
ioc()->registerExport<INetworkManagerCreator>(moduleName(), new NetworkManagerCreatorStub());
}

View File

@ -25,7 +25,7 @@
#include "modularity/imodulesetup.h"
namespace mu::network {
class NetworkStubModule : public modularity::IModuleSetup
class NetworkModule : public modularity::IModuleSetup
{
public:
std::string moduleName() const override;

View File

@ -38,12 +38,12 @@ static void shortcuts_init_qrc()
Q_INIT_RESOURCE(shortcuts);
}
std::string ShortcutsStubModule::moduleName() const
std::string ShortcutsModule::moduleName() const
{
return "shortcuts_stub";
}
void ShortcutsStubModule::registerExports()
void ShortcutsModule::registerExports()
{
ioc()->registerExport<IShortcutsRegister>(moduleName(), new ShortcutsRegisterStub());
ioc()->registerExport<IShortcutsController>(moduleName(), new ShortcutsControllerStub());
@ -51,12 +51,12 @@ void ShortcutsStubModule::registerExports()
ioc()->registerExport<IShortcutsConfiguration>(moduleName(), new ShortcutsConfigurationStub());
}
void ShortcutsStubModule::registerResources()
void ShortcutsModule::registerResources()
{
shortcuts_init_qrc();
}
void ShortcutsStubModule::registerUiTypes()
void ShortcutsModule::registerUiTypes()
{
ioc()->resolve<ui::IUiEngine>(moduleName())->addSourceImportPath(shortcuts_QML_IMPORT);
}

View File

@ -25,7 +25,7 @@
#include "modularity/imodulesetup.h"
namespace mu::shortcuts {
class ShortcutsStubModule : public modularity::IModuleSetup
class ShortcutsModule : public modularity::IModuleSetup
{
public:

View File

@ -27,12 +27,12 @@
using namespace mu::vst;
using namespace mu::modularity;
std::string VstStubModule::moduleName() const
std::string VSTModule::moduleName() const
{
return "vst_stub";
}
void VstStubModule::registerExports()
void VSTModule::registerExports()
{
ioc()->registerExport<IVstConfiguration>(moduleName(), new VstConfigurationStub());
}

View File

@ -25,7 +25,7 @@
#include "modularity/imodulesetup.h"
namespace mu::vst {
class VstStubModule : public modularity::IModuleSetup
class VSTModule : public modularity::IModuleSetup
{
public:
std::string moduleName() const override;

View File

@ -37,17 +37,17 @@ static void instrumentsscene_init_qrc()
Q_INIT_RESOURCE(instrumentsscene);
}
std::string InstrumentsSceneStubModule::moduleName() const
std::string InstrumentsSceneModule::moduleName() const
{
return "instrumentsscene";
}
void InstrumentsSceneStubModule::registerExports()
void InstrumentsSceneModule::registerExports()
{
ioc()->registerExport<notation::ISelectInstrumentsScenario>(moduleName(), new SelectInstrumentsScenarioStub());
}
void InstrumentsSceneStubModule::resolveImports()
void InstrumentsSceneModule::resolveImports()
{
auto ir = ioc()->resolve<IInteractiveUriRegister>(moduleName());
if (ir) {
@ -56,12 +56,12 @@ void InstrumentsSceneStubModule::resolveImports()
}
}
void InstrumentsSceneStubModule::registerResources()
void InstrumentsSceneModule::registerResources()
{
instrumentsscene_init_qrc();
}
void InstrumentsSceneStubModule::registerUiTypes()
void InstrumentsSceneModule::registerUiTypes()
{
ioc()->resolve<IUiEngine>(moduleName())->addSourceImportPath(instrumentsscene_QML_IMPORT);
}

View File

@ -25,7 +25,7 @@
#include "modularity/imodulesetup.h"
namespace mu::instrumentsscene {
class InstrumentsSceneStubModule : public modularity::IModuleSetup
class InstrumentsSceneModule : public modularity::IModuleSetup
{
public:
std::string moduleName() const override;

View File

@ -35,23 +35,23 @@ static void languages_init_qrc()
Q_INIT_RESOURCE(languages);
}
std::string LanguagesStubModule::moduleName() const
std::string LanguagesModule::moduleName() const
{
return "languages_stub";
}
void LanguagesStubModule::registerExports()
void LanguagesModule::registerExports()
{
ioc()->registerExport<ILanguagesConfiguration>(moduleName(), new LanguagesConfigurationStub());
ioc()->registerExport<ILanguagesService>(moduleName(), new LanguagesServiceStub());
}
void LanguagesStubModule::registerResources()
void LanguagesModule::registerResources()
{
languages_init_qrc();
}
void LanguagesStubModule::registerUiTypes()
void LanguagesModule::registerUiTypes()
{
ioc()->resolve<ui::IUiEngine>(moduleName())->addSourceImportPath(languages_QML_IMPORT);
}

View File

@ -25,7 +25,7 @@
#include "modularity/imodulesetup.h"
namespace mu::languages {
class LanguagesStubModule : public modularity::IModuleSetup
class LanguagesModule : public modularity::IModuleSetup
{
public:
std::string moduleName() const override;

View File

@ -36,17 +36,17 @@ static void palette_init_qrc()
Q_INIT_RESOURCE(palette);
}
std::string PaletteStubModule::moduleName() const
std::string PaletteModule::moduleName() const
{
return "palette_stub";
}
void PaletteStubModule::registerExports()
void PaletteModule::registerExports()
{
ioc()->registerExport<IPaletteConfiguration>(moduleName(), new PaletteConfigurationStub());
}
void PaletteStubModule::resolveImports()
void PaletteModule::resolveImports()
{
auto ir = ioc()->resolve<IInteractiveUriRegister>(moduleName());
if (ir) {
@ -58,12 +58,12 @@ void PaletteStubModule::resolveImports()
}
}
void PaletteStubModule::registerResources()
void PaletteModule::registerResources()
{
palette_init_qrc();
}
void PaletteStubModule::registerUiTypes()
void PaletteModule::registerUiTypes()
{
ioc()->resolve<ui::IUiEngine>(moduleName())->addSourceImportPath(palette_QML_IMPORT);
}

View File

@ -25,7 +25,7 @@
#include "modularity/imodulesetup.h"
namespace mu::palette {
class PaletteStubModule : public modularity::IModuleSetup
class PaletteModule : public modularity::IModuleSetup
{
public:
std::string moduleName() const override;

View File

@ -2,5 +2,6 @@
<qresource prefix="/">
<file>qml/MuseScore/Playback/qmldir</file>
<file>qml/MuseScore/Playback/PlaybackToolBar.qml</file>
<file>qml/MuseScore/Playback/PlaybackLoadingInfo.qml</file>
</qresource>
</RCC>

View File

@ -36,23 +36,23 @@ static void playback_init_qrc()
Q_INIT_RESOURCE(playback);
}
std::string PlaybackStubModule::moduleName() const
std::string PlaybackModule::moduleName() const
{
return "playback_stub";
}
void PlaybackStubModule::registerExports()
void PlaybackModule::registerExports()
{
ioc()->registerExport<IPlaybackController>(moduleName(), new PlaybackControllerStub());
ioc()->registerExport<IPlaybackConfiguration>(moduleName(), new PlaybackConfigurationStub());
}
void PlaybackStubModule::registerResources()
void PlaybackModule::registerResources()
{
playback_init_qrc();
}
void PlaybackStubModule::registerUiTypes()
void PlaybackModule::registerUiTypes()
{
ioc()->resolve<ui::IUiEngine>(moduleName())->addSourceImportPath(playback_QML_IMPORT);
}

View File

@ -25,7 +25,7 @@
#include "modularity/imodulesetup.h"
namespace mu::playback {
class PlaybackStubModule : public modularity::IModuleSetup
class PlaybackModule : public modularity::IModuleSetup
{
public:
std::string moduleName() const override;

View File

@ -0,0 +1,30 @@
/*
* SPDX-License-Identifier: GPL-3.0-only
* MuseScore-CLA-applies
*
* MuseScore
* Music Composition & Notation
*
* Copyright (C) 2021 MuseScore BVBA and others
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import QtQuick 2.15
Item {
id: root
signal started()
signal finished()
}

View File

@ -24,8 +24,19 @@ import QtQuick 2.15
import MuseScore.UiComponents 1.0
Rectangle {
property bool floating: false
property alias navigation: nav
color: ui.theme.backgroundPrimaryColor
QtObject {
id: nav
property QtObject section: null
property int order: 0
}
StyledTextLabel {
anchors.centerIn: parent
text: "Playback ToolBar Stub"

View File

@ -1,2 +1,3 @@
module MuseScore.Playback
PlaybackToolBar 1.0 PlaybackToolBar.qml
PlaybackLoadingInfo 1.0 PlaybackLoadingInfo.qml

View File

@ -36,23 +36,23 @@ static void plugins_init_qrc()
Q_INIT_RESOURCE(plugins);
}
std::string PluginsStubModule::moduleName() const
std::string PluginsModule::moduleName() const
{
return "plugins_stub";
}
void PluginsStubModule::registerExports()
void PluginsModule::registerExports()
{
ioc()->registerExport<IPluginsService>(moduleName(), new PluginsServiceStub());
ioc()->registerExport<IPluginsConfiguration>(moduleName(), new PluginsConfigurationStub());
}
void PluginsStubModule::registerResources()
void PluginsModule::registerResources()
{
plugins_init_qrc();
}
void PluginsStubModule::registerUiTypes()
void PluginsModule::registerUiTypes()
{
ioc()->resolve<IUiEngine>(moduleName())->addSourceImportPath(plugins_QML_IMPORT);
}

View File

@ -25,7 +25,7 @@
#include "modularity/imodulesetup.h"
namespace mu::plugins {
class PluginsStubModule : public modularity::IModuleSetup
class PluginsModule : public modularity::IModuleSetup
{
public:
std::string moduleName() const override;

View File

@ -34,12 +34,12 @@ static std::shared_ptr<UpdateScenarioStub> s_scenario = std::make_shared<UpdateS
static std::shared_ptr<UpdateServiceStub> s_service = std::make_shared<UpdateServiceStub>();
static std::shared_ptr<UpdateConfigurationStub> s_configuration = std::make_shared<UpdateConfigurationStub>();
std::string UpdateStubModule::moduleName() const
std::string UpdateModule::moduleName() const
{
return "update_stub";
}
void UpdateStubModule::registerExports()
void UpdateModule::registerExports()
{
ioc()->registerExport<IUpdateScenario>(moduleName(), s_scenario);
ioc()->registerExport<IUpdateService>(moduleName(), s_service);

View File

@ -25,7 +25,7 @@
#include "modularity/imodulesetup.h"
namespace mu::update {
class UpdateStubModule : public modularity::IModuleSetup
class UpdateModule : public modularity::IModuleSetup
{
public:
std::string moduleName() const override;

View File

@ -30,6 +30,8 @@ set(MODULE_SRC
${CMAKE_CURRENT_LIST_DIR}/workspacemanagerstub.h
${CMAKE_CURRENT_LIST_DIR}/workspaceconfigurationstub.cpp
${CMAKE_CURRENT_LIST_DIR}/workspaceconfigurationstub.h
${CMAKE_CURRENT_LIST_DIR}/workspacesdataproviderstub.cpp
${CMAKE_CURRENT_LIST_DIR}/workspacesdataproviderstub.h
)
set(MODULE_IS_STUB ON)

Some files were not shown because too many files have changed in this diff Show More