Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install vst3sdk via CMake's FetchContent, and update to latest version #26031

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions buildscripts/ci/linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ if [ "$PACKARCH" == "aarch64" ] || [ "$PACKARCH" == "armv7l" ]; then
fi

# TODO: https://github.com/musescore/MuseScore/issues/11689
#echo "VST3_SDK_PATH: $VST3_SDK_PATH"
#if [ -z "$VST3_SDK_PATH" ]; then
# echo "warning: not set VST3_SDK_PATH, build VST module disabled"
# BUILD_VST=OFF
#else
# BUILD_VST=ON
#fi
BUILD_VST=OFF

echo "=== BUILD ==="
Expand All @@ -90,7 +83,6 @@ MUSESCORE_BUILD_NUMBER=$BUILD_NUMBER \
MUSESCORE_REVISION=$MUSESCORE_REVISION \
MUSESCORE_CRASHREPORT_URL=$CRASH_REPORT_URL \
MUSESCORE_BUILD_VST_MODULE=$BUILD_VST \
MUSESCORE_VST3_SDK_PATH=$VST3_SDK_PATH \
MUSESCORE_BUILD_CRASHPAD_CLIENT=${MUSESCORE_BUILD_CRASHPAD_CLIENT:-"ON"} \
MUSESCORE_BUILD_UPDATE_MODULE=${MUSESCORE_BUILD_UPDATE_MODULE:-"ON"} \
MUSESCORE_BUILD_WEBSOCKET="ON" \
Expand Down
9 changes: 0 additions & 9 deletions buildscripts/ci/linux/build_utest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ cat $BUILD_TOOLS/environment.sh
source $BUILD_TOOLS/environment.sh

# TODO: https://github.com/musescore/MuseScore/issues/11689
#echo "VST3_SDK_PATH: $VST3_SDK_PATH"
#if [ -z "$VST3_SDK_PATH" ]; then
# echo "warning: not set VST3_SDK_PATH, build VST module disabled"
# BUILD_VST=OFF
#else
# BUILD_VST=ON
#fi

BUILD_VST=OFF

TESTS_ENABLE_CODE_COVERAGE=OFF
Expand All @@ -73,7 +65,6 @@ MUSE_APP_BUILD_MODE=dev \
MUSESCORE_BUILD_NUMBER=$BUILD_NUMBER \
MUSESCORE_REVISION=$MUSESCORE_REVISION \
MUSESCORE_BUILD_VST_MODULE=$BUILD_VST \
MUSESCORE_VST3_SDK_PATH=$VST3_SDK_PATH \
MUSESCORE_DOWNLOAD_SOUNDFONT=OFF \
MUSESCORE_BUILD_UNIT_TESTS=ON \
MUSESCORE_UNIT_TESTS_ENABLE_CODE_COVERAGE=$TESTS_ENABLE_CODE_COVERAGE \
Expand Down
12 changes: 0 additions & 12 deletions buildscripts/ci/linux/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,18 +203,6 @@ echo export PATH="${ninja_dir}:\${PATH}" >> ${ENV_FILE}
echo "ninja version"
$ninja_dir/ninja --version

##########################################################################
# OTHER
##########################################################################
# TODO: https://github.com/musescore/MuseScore/issues/11689
#echo "Get VST"
#vst_dir=$BUILD_TOOLS/vst
#if [[ ! -d "$vst_dir" ]]; then
# wget -q --show-progress -O $BUILD_TOOLS/vst_sdk.7z "https://s3.amazonaws.com/utils.musescore.org/VST3_SDK_379.7z"
# 7z x -y $BUILD_TOOLS/vst_sdk.7z -o"$vst_dir"
#fi
#echo export VST3_SDK_PATH="$vst_dir/VST3_SDK" >> $ENV_FILE

##########################################################################
# POST INSTALL
##########################################################################
Expand Down
11 changes: 1 addition & 10 deletions buildscripts/ci/macos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,9 @@ if [ "$BUILD_MODE" == "nightly" ]; then MUSE_APP_BUILD_MODE=dev; fi
if [ "$BUILD_MODE" == "testing" ]; then MUSE_APP_BUILD_MODE=testing; fi
if [ "$BUILD_MODE" == "stable" ]; then MUSE_APP_BUILD_MODE=release; fi

if [ -z "$VST3_SDK_PATH" ]; then
echo "warning: not set VST3_SDK_PATH, build VST module disabled"
BUILD_VST=OFF
else
BUILD_VST=ON
fi

echo "MUSE_APP_BUILD_MODE: $MUSE_APP_BUILD_MODE"
echo "BUILD_NUMBER: $BUILD_NUMBER"
echo "CRASH_REPORT_URL: $CRASH_REPORT_URL"
echo "VST3_SDK_PATH: $VST3_SDK_PATH"

MUSESCORE_REVISION=$(git rev-parse --short=7 HEAD)

Expand All @@ -65,8 +57,7 @@ MUSE_APP_BUILD_MODE=$MUSE_APP_BUILD_MODE \
MUSESCORE_BUILD_NUMBER=$BUILD_NUMBER \
MUSESCORE_REVISION=$MUSESCORE_REVISION \
MUSESCORE_CRASHREPORT_URL=$CRASH_REPORT_URL \
MUSESCORE_BUILD_VST_MODULE=$BUILD_VST \
MUSESCORE_VST3_SDK_PATH=$VST3_SDK_PATH \
MUSESCORE_BUILD_VST_MODULE="ON" \
MUSESCORE_BUILD_WEBSOCKET="ON" \
bash ./ninja_build.sh -t install

Expand Down
6 changes: 0 additions & 6 deletions buildscripts/ci/macos/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,4 @@ mkdir -p $QT_PATH
7z x -y qt.7z -o$QT_PATH
rm qt.7z

# VST SDK
echo "Download VST SDK"
wget -q --show-progress -O vst_sdk.7z "https://s3.amazonaws.com/utils.musescore.org/VST3_SDK_379.7z"
7z x -y vst_sdk.7z -o"$HOME/vst"
echo "VST3_SDK_PATH=$HOME/vst/VST3_SDK" >> $GITHUB_ENV

echo "Setup script done"
7 changes: 1 addition & 6 deletions buildscripts/ci/windows/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ SET "QT_DIR=C:\Qt\6.2.4"
SET "PATH=%QT_DIR%\msvc2019_64\bin;%JACK_DIR%;%PATH%"
SET "JACK_DIR=C:\Program Files (x86)\Jack"

:: At the moment not compiling yet.
SET BUILD_VST=ON
SET VST3_SDK_PATH=C:\vst\VST3_SDK

SET MUSESCORE_BUILD_CONFIGURATION="app"
IF %BUILD_WIN_PORTABLE% == ON (
SET INSTALL_DIR=../build.install/App/MuseScore
Expand All @@ -67,8 +63,7 @@ SET MUSESCORE_BUILD_NUMBER=%BUILD_NUMBER%
SET MUSESCORE_REVISION=%MUSESCORE_REVISION%
SET MUSESCORE_INSTALL_DIR=%INSTALL_DIR%
SET MUSESCORE_CRASHREPORT_URL="%CRASH_LOG_SERVER_URL%"
SET MUSESCORE_BUILD_VST_MODULE=%BUILD_VST%
SET MUSESCORE_VST3_SDK_PATH=%VST3_SDK_PATH%
SET MUSESCORE_BUILD_VST_MODULE="ON"
SET MUSESCORE_BUILD_WEBSOCKET="ON"

CALL ninja_build.bat -t installrelwithdebinfo || exit \b 1
Expand Down
3 changes: 0 additions & 3 deletions buildscripts/ci/windows/setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ SET PATH=%JACK_DIR%;%PATH%
CALL "wget.exe" -q --show-progress --no-check-certificate "https://s3.amazonaws.com/utils.musescore.org/dependencies.7z" -O %TEMP_DIR%\dependencies.7z
CALL "7z" x -y %TEMP_DIR%\dependencies.7z "-oC:\musescore_dependencies"

CALL "wget.exe" -q --show-progress --no-check-certificate "https://s3.amazonaws.com/utils.musescore.org/VST3_SDK_379.7z" -O %TEMP_DIR%\VST3_SDK.7z
CALL "7z" x -y %TEMP_DIR%\VST3_SDK.7z "-oC:\vst"

IF %BUILD_WIN_PORTABLE% == ON (
ECHO "=== Installing PortableApps.com Tools ==="
:: portableappslauncher is a vanilla installation of PortableApps.com Launcher https://portableapps.com/apps/development/portableapps.com_launcher
Expand Down
3 changes: 0 additions & 3 deletions ninja_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ MUSESCORE_RUN_LRELEASE=${MUSESCORE_RUN_LRELEASE:-"ON"}
MUSESCORE_CRASHREPORT_URL=${MUSESCORE_CRASHREPORT_URL:-""}
MUSESCORE_BUILD_CRASHPAD_CLIENT=${MUSESCORE_BUILD_CRASHPAD_CLIENT:-"ON"}
MUSESCORE_DEBUGLEVEL_ENABLED="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"}
MUSESCORE_ENABLE_CODE_COVERAGE=${MUSESCORE_UNIT_TESTS_ENABLE_CODE_COVERAGE:-"OFF"}
Expand Down Expand Up @@ -101,7 +100,6 @@ function do_build() {
-DMUSE_MODULE_DIAGNOSTICS_CRASHREPORT_URL="${MUSESCORE_CRASHREPORT_URL}" \
-DMUSE_MODULE_GLOBAL_LOGGER_DEBUGLEVEL="${MUSESCORE_DEBUGLEVEL_ENABLED}" \
-DMUSE_MODULE_VST="${MUSESCORE_BUILD_VST_MODULE}" \
-DMUSE_MODULE_VST_VST3_SDK_PATH="${MUSESCORE_VST3_SDK_PATH}" \
-DMUSE_MODULE_NETWORK_WEBSOCKET="${MUSESCORE_BUILD_WEBSOCKET}" \
-DCMAKE_SKIP_RPATH="${MUSESCORE_NO_RPATH}" \
-DMUE_COMPILE_USE_UNITY="${MUSESCORE_COMPILE_USE_UNITY}"
Expand Down Expand Up @@ -179,7 +177,6 @@ case $TARGET in
-DMUSE_MODULE_DIAGNOSTICS_CRASHREPORT_URL="${MUSESCORE_CRASHREPORT_URL}" \
-DMUSE_MODULE_GLOBAL_LOGGER_DEBUGLEVEL="${MUSESCORE_DEBUGLEVEL_ENABLED}" \
-DMUSE_MODULE_VST="${MUSESCORE_BUILD_VST_MODULE}" \
-DMUSE_MODULE_VST_VST3_SDK_PATH="${MUSESCORE_VST3_SDK_PATH}" \
-DCMAKE_SKIP_RPATH="${MUSESCORE_NO_RPATH}"
;;

Expand Down
26 changes: 22 additions & 4 deletions src/framework/vst/sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,27 @@

declare_module(vst_sdk_3)

if (NOT MUSE_MODULE_VST_VST3_SDK_PATH)
message(FATAL_ERROR "VST3_SDK path is not setted")
endif()
if(MUSE_MODULE_VST_VST3_SDK_PATH)
set(VST3_SDK_PATH ${MUSE_MODULE_VST_VST3_SDK_PATH})
else()
include(FetchContent)

set(VST3_SDK_PATH ${MUSE_MODULE_VST_VST3_SDK_PATH})
FetchContent_Declare(
vst3sdk
GIT_REPOSITORY https://github.com/steinbergmedia/vst3sdk.git
GIT_TAG v3.7.12_build_20

# Hack: we don't want `vst3sdk`'s own CMakeLists.txt to be used, so we
# tell CMake to go look for it in a non-existent folder.
SOURCE_SUBDIR none
)

FetchContent_MakeAvailable(vst3sdk)
FetchContent_GetProperties(
vst3sdk
SOURCE_DIR VST3_SDK_PATH
)
endif()

include(GetPlatformInfo)
include(GetCompilerInfo)
Expand Down Expand Up @@ -117,6 +133,8 @@ set(VST_PLUGIN_INTERFACES_SRC

set(VST_SDK_COMMON_SRC
${VST3_SDK_PATH}/public.sdk/source/common/commoniids.cpp
${VST3_SDK_PATH}/public.sdk/source/common/commonstringconvert.cpp
${VST3_SDK_PATH}/public.sdk/source/common/commonstringconvert.h
${VST3_SDK_PATH}/public.sdk/source/common/openurl.cpp
${VST3_SDK_PATH}/public.sdk/source/common/openurl.h
${VST3_SDK_PATH}/public.sdk/source/common/threadchecker.h
Expand Down
Loading