diff --git a/Dependencies/JUCE b/Dependencies/JUCE index 02bbe31..df3b49f 160000 --- a/Dependencies/JUCE +++ b/Dependencies/JUCE @@ -1 +1 @@ -Subproject commit 02bbe31c0d2fb59ed32fb725b56ad25536c7ed75 +Subproject commit df3b49fbd35655ed2530e77e005034d87987c765 diff --git a/GLSLPlugIn/GLSLPlugIn.jucer b/GLSLPlugIn/GLSLPlugIn.jucer index 2179163..c3e730d 100644 --- a/GLSLPlugIn/GLSLPlugIn.jucer +++ b/GLSLPlugIn/GLSLPlugIn.jucer @@ -8,10 +8,11 @@ pluginCode="X25u" pluginChannelConfigs="" pluginIsSynth="0" pluginWantsMidiIn="1" pluginProducesMidiOut="0" pluginIsMidiEffectPlugin="0" pluginEditorRequiresKeys="1" pluginAUExportPrefix="GLSLPlugInAU" pluginRTASCategory="" aaxIdentifier="com.yourcompany.GLSLPlugIn" - pluginAAXCategory="2" jucerVersion="5.4.7" companyName="JUCE JAPAN" - displaySplashScreen="0" reportAppUsage="0" splashScreenColour="Dark" - buildStandalone="1" enableIAA="0" cppLanguageStandard="14" companyCopyright="JUCE JAPAN" - pluginFormats="buildStandalone,buildVST3" pluginCharacteristicsValue="pluginWantsMidiIn,pluginEditorRequiresKeys"> + pluginAAXCategory="2" companyName="JUCE JAPAN" displaySplashScreen="0" + reportAppUsage="0" splashScreenColour="Dark" buildStandalone="1" + enableIAA="0" cppLanguageStandard="14" companyCopyright="JUCE JAPAN" + pluginFormats="buildStandalone,buildVST3" pluginCharacteristicsValue="pluginWantsMidiIn,pluginEditorRequiresKeys" + jucerFormatVersion="1"> diff --git a/GLSLPlugIn/Scripts/build_vs2019.bat b/GLSLPlugIn/Scripts/build_vs2019.bat new file mode 100644 index 0000000..ea4afdf --- /dev/null +++ b/GLSLPlugIn/Scripts/build_vs2019.bat @@ -0,0 +1,177 @@ +@echo off + +rem --- Define script directory --- +set SCRIPT_DIRECTORY=%~dp0 +cd %SCRIPT_DIRECTORY% + +rem --- Set variables for MSVC --- +set PROJECT_NAME=GLSLPlugIn +set EXPORTER_NAME=VisualStudio2019 +set MSVC_VERSION=2019 +set MSVC_OFFERING=Community +set ARCHITECTURE=x64 +set BUILD_CONFIG=Debug + +rem --- Set variables for enabling each plugin format type --- +set ENABLE_VST=false +set VST_LEGACY_SDK_PATH= +set ENABLE_VST3=false +set VST3_SDK_PATH= +set ENABLE_AAX=false +set AAX_SDK_PATH= + +rem --- Set enable/disable concatet version number for binary file --- +set CONCAT_VERSION_NUMBER=false + +rem --- Set Projucer's global search path --- +cd %SCRIPT_DIRECTORY% +if %ENABLE_VST%==true ( + if not "%VST_LEGACY_SDK_PATH%"=="" ( + ..\..\Projucer\Projucer.exe --set-global-search-path windows vstLegacyPath %VST_LEGACY_SDK_PATH% + ) else ( + echo "Please set a value to the variable VST_LEGACY_SDK_PATH" + goto FAILURE + ) +) +if %ENABLE_VST3%==true ( + rem --- Because plugin client property "JUCE_VST3_CAN_REPLACE_VST2" is set to "Enabled, it makes have to link with VST legacy SDK." --- + if not "%VST_LEGACY_SDK_PATH%"=="" ( + ..\..\Projucer\Projucer.exe --set-global-search-path windows vstLegacyPath %VST_LEGACY_SDK_PATH% + ) else ( + echo "Please set a value to the variable VST_LEGACY_SDK_PATH" + goto FAILURE + ) + + if not "%VST3_SDK_PATH%"=="" ( + ..\..\Projucer\Projucer.exe --set-global-search-path windows vst3Path %VST3_SDK_PATH% + ) else ( + ..\..\Projucer\Projucer.exe --set-global-search-path windows vst3Path ..\..\Dependencies\JUCE\modules\juce_audio_processors\format_types\VST3_SDK + ) +) +if %ENABLE_AAX%==true ( + if not "%AAX_SDK_PATH%"=="" ( + ..\..\Projucer\Projucer.exe --set-global-search-path windows aaxPath %AAX_SDK_PATH% + ) else ( + echo "Please set a value to the variable AAX_SDK_PATH" + goto FAILURE + ) +) + +rem --- Generate IDE project file(.sln) by Projucer --- +cd %SCRIPT_DIRECTORY% +..\..\Projucer\Projucer.exe --resave ..\%PROJECT_NAME%.jucer + +rem --- Get solution file name from Projucer --- +cd %SCRIPT_DIRECTORY% +for /f "usebackq delims=" %%a in (`..\..\Projucer\Projucer.exe --status ..\%PROJECT_NAME%.jucer ^| find "Name:"`) do set SOLUTION_NAME=%%a +for /f "tokens=1,2 delims= " %%a in ("%SOLUTION_NAME%") do set SOLUTION_NAME=%%b + +rem --- Get project version number from Projucer --- +for /f "usebackq delims=" %%a in (`..\..\Projucer\Projucer.exe --get-version ..\%PROJECT_NAME%.jucer`) do set VERSION_NUMBER=%%a + +rem --- Start Visual Studio Developer Command Line Tool --- +if "%MSVC_OFFERING%"=="" ( + echo "Please set a value to the variable MSVC_OFFERING like Community, Professional, Enterprise" + goto FAILURE +) +call "C:\Program Files (x86)\Microsoft Visual Studio\%MSVC_VERSION%\%MSVC_OFFERING%\Common7\Tools\VsDevCmd.bat" + +rem --- Build by MSBuild --- +cd %SCRIPT_DIRECTORY% +call :CLEAN_SOLUTION +if %ERRORLEVEL% neq 0 goto FAILURE + +call :BUILD_STANDALONE +if %ERRORLEVEL% neq 0 goto FAILURE + +call :BUILD_VST +if %ERRORLEVEL% neq 0 goto FAILURE + +call :BUILD_VST3 +if %ERRORLEVEL% neq 0 goto FAILURE + +call :BUILD_AAX +if %ERRORLEVEL% neq 0 goto FAILURE + +:BUILD_FINISH +echo "BUILD_FINISH" +goto SUCCESS + +:CLEAN_SOLUTION +rem --- Clean solution --- +MSBuild ..\Builds\%EXPORTER_NAME%\%SOLUTION_NAME%.sln /t:Clean +if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL% +exit /B 0 + +:BUILD_STANDALONE +rem --- Build Standalone format --- +MSBuild ..\Builds\%EXPORTER_NAME%\%SOLUTION_NAME%.sln /t:"%SOLUTION_NAME% - Standalone Plugin":Rebuild /p:Configuration=%BUILD_CONFIG%;Platform=%ARCHITECTURE% +if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL% + +if %CONCAT_VERSION_NUMBER%==true ( + rem --- Rename to adding version number for Standalone file -- + move /y "..\Builds\%EXPORTER_NAME%\%ARCHITECTURE%\%BUILD_CONFIG%\Standalone Plugin\%SOLUTION_NAME%.exe" ^ + "..\Builds\%EXPORTER_NAME%\%ARCHITECTURE%\%BUILD_CONFIG%\Standalone Plugin\%SOLUTION_NAME%-%VERSION_NUMBER%.exe" + if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL% +) +exit /B 0 + +:BUILD_VST +rem --- Build VST format --- +if %ENABLE_VST%==true ( + MSBuild ..\Builds\%EXPORTER_NAME%\%SOLUTION_NAME%.sln /t:"%SOLUTION_NAME% - VST":Rebuild /p:Configuration=%BUILD_CONFIG%;Platform=%ARCHITECTURE% + if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL% + + if %CONCAT_VERSION_NUMBER%==true ( + rem --- Rename to adding version number for VST file -- + if exist "..\Builds\%EXPORTER_NAME%\%ARCHITECTURE%\%BUILD_CONFIG%\VST\%SOLUTION_NAME%.dll" ( + move /y "..\Builds\%EXPORTER_NAME%\%ARCHITECTURE%\%BUILD_CONFIG%\VST\%SOLUTION_NAME%.dll" ^ + "..\Builds\%EXPORTER_NAME%\%ARCHITECTURE%\%BUILD_CONFIG%\VST\%SOLUTION_NAME%-%VERSION_NUMBER%.dll" + ) + if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL% + ) +) +exit /B 0 + +:BUILD_VST3 +rem --- Build VST3 format --- +if %ENABLE_VST3%==true ( + MSBuild ..\Builds\%EXPORTER_NAME%\%SOLUTION_NAME%.sln /t:"%SOLUTION_NAME% - VST3":Rebuild /p:Configuration=%BUILD_CONFIG%;Platform=%ARCHITECTURE% + if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL% + + if %CONCAT_VERSION_NUMBER%==true ( + rem --- Rename to adding version number for VST3 file -- + if exist "..\Builds\%EXPORTER_NAME%\%ARCHITECTURE%\%BUILD_CONFIG%\VST3\%SOLUTION_NAME%.vst3" ( + move /y "..\Builds\%EXPORTER_NAME%\%ARCHITECTURE%\%BUILD_CONFIG%\VST3\%SOLUTION_NAME%.vst3" ^ + "..\Builds\%EXPORTER_NAME%\%ARCHITECTURE%\%BUILD_CONFIG%\VST3\%SOLUTION_NAME%-%VERSION_NUMBER%.vst3" + ) + if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL% + ) +) +exit /B 0 + +:BUILD_AAX +rem --- Build AAX format --- +if %ENABLE_AAX%==true ( + MSBuild ..\Builds\%EXPORTER_NAME%\%SOLUTION_NAME%.sln /t:"%SOLUTION_NAME% - AAX":Rebuild /p:Configuration=%BUILD_CONFIG%;Platform=%ARCHITECTURE% + if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL% + + if %CONCAT_VERSION_NUMBER%==true ( + rem --- Rename to adding version number for AAX file -- + if exist "..\Builds\%EXPORTER_NAME%\%ARCHITECTURE%\%BUILD_CONFIG%\AAX\%SOLUTION_NAME%.aaxplugin" ( + move /y "..\Builds\%EXPORTER_NAME%\%ARCHITECTURE%\%BUILD_CONFIG%\AAX\%SOLUTION_NAME%.aaxplugin" ^ + "..\Builds\%EXPORTER_NAME%\%ARCHITECTURE%\%BUILD_CONFIG%\AAX\%SOLUTION_NAME%-%VERSION_NUMBER%.aaxplugin" + ) + if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL% + ) +) +exit /B 0 + +:FAILURE +echo ErrorLevel:%ERRORLEVEL% +echo ***Build Failed*** +exit 1 + +:SUCCESS +echo ***Build Success*** +exit /B 0 \ No newline at end of file diff --git a/GLSLPlugIn/Scripts/build_xcode.command b/GLSLPlugIn/Scripts/build_xcode.command new file mode 100644 index 0000000..f12bc20 --- /dev/null +++ b/GLSLPlugIn/Scripts/build_xcode.command @@ -0,0 +1,201 @@ +#!/bin/sh + +echo '--- Define script directory ---' +SCRIPT_DIRECTORY=$(cd $(dirname $0);pwd) +cd ${SCRIPT_DIRECTORY} + +# Script job will terminate when error occured. +set -e + +# Prepare function +function FAILURE() { + echo "*** Build Failed ***" + exit +} + +function SUCCESS() { + echo "*** Build Success ***" + exit +} + +echo '--- Set variables ---' +PROJECT_NAME=GLSLPlugIn +ARCHITECTURE=x86_64 +BUILD_CONFIG=Release +EXPORTER_NAME=MacOSX + +echo '--- Set variables for enabling each plugin format type ---' +ENABLE_VST=true +VST_LEGACY_SDK_PATH="${SCRIPT_DIRECTORY}/../../3rd-party/VST3 SDK" +ENABLE_VST3=false +VST3_SDK_PATH= +ENABLE_AAX=false +AAX_SDK_PATH= +ENABLE_AU=true + +echo '--- Set enable/disable concatet version number for binary file ---' +CONCAT_VERSION_NUMBER=false + +PROJUCER_EXE="${SCRIPT_DIRECTORY}/../../Projucer/Projucer.app/Contents/MacOS/Projucer" + +echo '--- Set Projucer global search path ---' +if test "${ENABLE_VST}" = "true"; then + if test "${VST_LEGACY_SDK_PATH}" != ""; then + "${PROJUCER_EXE}" --set-global-search-path osx vstLegacyPath "${VST_LEGACY_SDK_PATH}" + echo "${VST_LEGACY_SDK_PATH}" + else + echo "*** Please set a value to the variable VST_LEGACY_SDK_PATH ***" + FAILURE + fi +fi + +if test "${ENABLE_VST3}" = "true"; then + # --- Because plugin client property "JUCE_VST3_CAN_REPLACE_VST2" is set to "Enabled, it makes have to link with VST legacy SDK." --- + if test "${VST_LEGACY_SDK_PATH}" != ""; then + "${PROJUCER_EXE}" --set-global-search-path osx vstLegacyPath "${VST_LEGACY_SDK_PATH}" + else + echo "*** Please set a value to the variable VST_LEGACY_SDK_PATH ***" + FAILURE + fi + + if test "${VST3_SDK_PATH}" != ""; then + "${PROJUCER_EXE}" --set-global-search-path osx vst3Path "${VST3_SDK_PATH}" + else + "${PROJUCER_EXE}" --set-global-search-path osx vst3Path "${SCRIPT_DIRECTORY}/../../Dependencies/JUCE/modules/juce_audio_processors/format_types/VST3_SDK" + fi +fi + +if test "${ENABLE_AAX}" = "true"; then + if test "${AAX_SDK_PATH}" != ""; then + "${PROJUCER_EXE}" --set-global-search-path osx aaxPath "${AAX_SDK_PATH}" + else + echo "*** Please set a value to the variable AAX_SDK_PATH ***" + FAILURE + fi +fi + +echo '--- Generate IDE project file by Projucer ---' +"${PROJUCER_EXE}" --resave "${SCRIPT_DIRECTORY}/../${PROJECT_NAME}.jucer" + +echo '--- Get solution file name from Projucer ---' +SOLUTION_NAME=`${PROJUCER_EXE} --status ${SCRIPT_DIRECTORY}/../${PROJECT_NAME}.jucer | grep "Name:" | awk '{ print $2 }'` + +echo '--- Get project version number from Projucer ---' +VERSION_NUMBER=`${PROJUCER_EXE} --get-version ${SCRIPT_DIRECTORY}/../${PROJECT_NAME}.jucer` + +echo '--- Show variables ---' +echo 'SCRIPT_DIRECTORY: '${SCRIPT_DIRECTORY} +echo 'PROJECT_NAME: '${PROJECT_NAME} +echo 'VERSION_NUMBER:'${VERSION_NUMBER} +echo 'ARCHITECTURE: '${ARCHITECTURE} +echo 'BUILD_CONFIG: '${BUILD_CONFIG} +echo 'SOLUTION_NAME: '${SOLUTION_NAME} +echo 'EXPORTER_NAME: '${EXPORTER_NAME} + +echo '--- Show list of '${SOLUTION_NAME}'.xcodeproj ---' +xcodebuild -project "${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/${SOLUTION_NAME}.xcodeproj" -list + +echo '--- Show Xcode build settings ---' +xcodebuild -project "${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/${SOLUTION_NAME}.xcodeproj" \ +-alltargets \ +-configuration ${BUILD_CONFIG} \ +-arch ${ARCHITECTURE} \ +-showBuildSettings + +echo '--- Run Xcode build Standalone Plugin ---' +xcodebuild -project "${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/${SOLUTION_NAME}.xcodeproj" \ +-target "${SOLUTION_NAME} - Standalone Plugin" \ +-configuration ${BUILD_CONFIG} \ +-arch ${ARCHITECTURE} + +if test "${CONCAT_VERSION_NUMBER}" = "true"; then + echo '--- Rename to adding version number for Standalone Plugin --' + SRC_FILE="${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/build/${BUILD_CONFIG}/${SOLUTION_NAME}" + DEST_FILE="${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/build/${BUILD_CONFIG}/${SOLUTION_NAME}-${VERSION_NUMBER}" + if test -e "${DEST_FILE}"; then + rm -rf "${DEST_FILE}" + fi + if test -e "${SRC_FILE}"; then + mv -f "${SRC_FILE}" "${DEST_FILE}" + fi +fi + +if test "${ENABLE_VST}" = "true"; then + echo '--- Run Xcode build VST ---' + xcodebuild -project "${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/${SOLUTION_NAME}.xcodeproj" \ + -target "${SOLUTION_NAME} - VST" \ + -configuration ${BUILD_CONFIG} \ + -arch ${ARCHITECTURE} + + if test "${CONCAT_VERSION_NUMBER}" = "true"; then + echo '--- Rename to adding version number for VST file --' + SRC_FILE="${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/build/${BUILD_CONFIG}/${SOLUTION_NAME}.vst" + DEST_FILE="${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/build/${BUILD_CONFIG}/${SOLUTION_NAME}-${VERSION_NUMBER}.vst" + if test -e "${DEST_FILE}"; then + rm -rf "${DEST_FILE}" + fi + if test -e "${SRC_FILE}"; then + mv -f "${SRC_FILE}" "${DEST_FILE}" + fi + fi +fi + +if test "${ENABLE_VST3}" = "true"; then + echo '--- Run Xcode build VST3 ---' + xcodebuild -project "${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/${SOLUTION_NAME}.xcodeproj" \ + -target "${SOLUTION_NAME} - VST3" \ + -configuration ${BUILD_CONFIG} \ + -arch ${ARCHITECTURE} + + if test "${CONCAT_VERSION_NUMBER}" = "true"; then + echo '--- Rename to adding version number for VST3 file --' + SRC_FILE="${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/build/${BUILD_CONFIG}/${SOLUTION_NAME}.vst3" + DEST_FILE="${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/build/${BUILD_CONFIG}/${SOLUTION_NAME}-${VERSION_NUMBER}.vst3" + if test -e "${DEST_FILE}"; then + rm -rf "${DEST_FILE}" + fi + if test -e "${SRC_FILE}"; then + mv -f "${SRC_FILE}" "${DEST_FILE}" + fi + fi +fi + +if test "${ENABLE_AAX}" = "true"; then + echo '--- Run Xcode build AAX ---' + xcodebuild -project "${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/${SOLUTION_NAME}.xcodeproj" \ + -target "${SOLUTION_NAME} - AAX" \ + -configuration ${BUILD_CONFIG} \ + -arch ${ARCHITECTURE} + + if test "${CONCAT_VERSION_NUMBER}" = "true"; then + echo '--- Rename to adding version number for AAX file --' + SRC_FILE="${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/build/${BUILD_CONFIG}/${SOLUTION_NAME}.aaxplugin" + DEST_FILE="${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/build/${BUILD_CONFIG}/${SOLUTION_NAME}-${VERSION_NUMBER}.aaxplugin" + if test -e "${DEST_FILE}"; then + rm -rf "${DEST_FILE}" + fi + if test -e "${SRC_FILE}"; then + mv -f "${SRC_FILE}" "${DEST_FILE}" + fi + fi +fi + +if test "${ENABLE_AU}" = "true"; then + echo '--- Run Xcode build AU ---' + xcodebuild -project "${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/${SOLUTION_NAME}.xcodeproj" \ + -target "${SOLUTION_NAME} - AU" \ + -configuration ${BUILD_CONFIG} \ + -arch ${ARCHITECTURE} + + if test "${CONCAT_VERSION_NUMBER}" = "true"; then + echo '--- Rename to adding version number for AU file --' + SRC_FILE="${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/build/${BUILD_CONFIG}/${SOLUTION_NAME}.component" + DEST_FILE="${SCRIPT_DIRECTORY}/../Builds/${EXPORTER_NAME}/build/${BUILD_CONFIG}/${SOLUTION_NAME}-${VERSION_NUMBER}.component" + if test -e "${DEST_FILE}"; then + rm -rf "${DEST_FILE}" + fi + if test -e "${SRC_FILE}"; then + mv -f "${SRC_FILE}" "${DEST_FILE}" + fi + fi +fi diff --git a/GLSLPlugIn/Scripts/resave_macos.command b/GLSLPlugIn/Scripts/resave_macos.command new file mode 100644 index 0000000..26a7b51 --- /dev/null +++ b/GLSLPlugIn/Scripts/resave_macos.command @@ -0,0 +1,14 @@ +#!/bin/sh + +echo '--- Define script directory ---' +SCRIPT_DIRECTORY=$(cd $(dirname $0);pwd) + +# Script job will terminate when error occured. +set -e + +echo '--- Set variables ---' +PROJECT_NAME=GLSLPlugIn +PROJUCER_EXE=${SCRIPT_DIRECTORY}/../../Projucer/Projucer.app/Contents/MacOS/Projucer + +echo '--- Generate IDE project file by Projucer ---' +${PROJUCER_EXE} --resave ${SCRIPT_DIRECTORY}/../${PROJECT_NAME}.jucer diff --git a/GLSLPlugIn/Scripts/resave_windows.bat b/GLSLPlugIn/Scripts/resave_windows.bat new file mode 100644 index 0000000..636b54f --- /dev/null +++ b/GLSLPlugIn/Scripts/resave_windows.bat @@ -0,0 +1,11 @@ +@echo off + +rem --- Define script directory --- +set SCRIPT_DIRECTORY=%~dp0 + +rem --- Set variables for MSVC --- +set PROJECT_NAME=GLSLPlugIn + +rem --- Generate IDE project file(.sln) by Projucer --- +cd %SCRIPT_DIRECTORY% +..\..\Projucer\Projucer.exe --resave ..\%PROJECT_NAME%.jucer diff --git a/Projucer/Projucer.exe b/Projucer/Projucer.exe new file mode 100644 index 0000000..98e3c65 Binary files /dev/null and b/Projucer/Projucer.exe differ