-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathwindows_tests.bat
executable file
·74 lines (59 loc) · 3.13 KB
/
windows_tests.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@echo OFF
cd "%~dp0%.."
set ROOT=%cd%
echo ROOT: "%ROOT%"
if not exist "%ROOT%" exit 1
set PROJECT_NAME=pluginval
set DEPLOYMENT_DIR=%ROOT%/bin/windows
set PLUGINVAL_EXE=%ROOT%/Builds/VisualStudio2017/x64/Release/App/%PROJECT_NAME%.exe
if not defined MSBUILD_EXE set MSBUILD_EXE=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe
echo "MSBUILD_EXE: %MSBUILD_EXE%"
::============================================================
:: First build pluginval
::============================================================
call "%ROOT%/install/windows_build.bat" || exit 1
::============================================================
:: Build Projucer and generate test plugin projects
::============================================================
echo "Building Projucer and creating projects"
set PROJUCER_ROOT=%ROOT%/modules/juce/extras/Projucer/Builds/VisualStudio2017
set PROJUCER_EXE=%PROJUCER_ROOT%/x64/Release/App/Projucer.exe
set PLUGINS_PIP_DIR=%ROOT%/modules/juce/examples/Plugins
set TEMP_DIR=%ROOT%/tmp
rd /S /Q "%TEMP_DIR%"
cd "%PROJUCER_ROOT%"
set CL=/DJUCER_ENABLE_GPL_MODE /GL
"%MSBUILD_EXE%" Projucer.sln /p:VisualStudioVersion=15.0 /m /p:Configuration=Release /p:Platform=x64 /p:PreferredToolArchitecture=x64
if not exist "%PROJUCER_EXE%" exit 1
::============================================================
:: Test plugins
::============================================================
:: Disabling these tests for now as they can't be built due to dependancies on the VST2 SDK which
:: can't be found without the use of Projucer's Global Settings
:: call :TestPlugin "ArpeggiatorPlugin", "ArpeggiatorPluginDemo.h"
call :TestPlugin "AudioPluginDemo", "AudioPluginDemo.h"
:: call :TestPlugin "DSPModulePluginDemo", "DSPModulePluginDemo.h"
:: call :TestPlugin "GainPlugin", "GainPluginDemo.h"
:: call :TestPlugin "MultiOutSynthPlugin", "MultiOutSynthPluginDemo.h"
:: call :TestPlugin "NoiseGatePlugin", "NoiseGatePluginDemo.h"
:: call :TestPlugin "SamplerPlugin", "SamplerPluginDemo.h"
:: call :TestPlugin "SurroundPlugin", "SurroundPluginDemo.h"
exit /B %ERRORLEVEL%
:TestPlugin
echo "=========================================================="
echo "Testing: %~1%"
set PLUGIN_NAME=%~1%
set PLUGIN_PIP_FILE=%~2%
set PLUGIN_VST3="%TEMP_DIR%/%PLUGIN_NAME%/Builds/VisualStudio2017/x64/Release/VST3/%PLUGIN_NAME%.vst3"
call "%PROJUCER_EXE%" --create-project-from-pip "%PLUGINS_PIP_DIR%\%PLUGIN_PIP_FILE%" "%TEMP_DIR%" "%ROOT%/modules/juce/modules"
call "%PROJUCER_EXE%" --resave "%TEMP_DIR%/%PLUGIN_NAME%/%PLUGIN_NAME%.jucer"
cd "%TEMP_DIR%/%PLUGIN_NAME%/Builds/VisualStudio2017"
set CL=/DJUCE_PLUGINHOST_VST#0 /GL
"%MSBUILD_EXE%" %PLUGIN_NAME%.sln /p:VisualStudioVersion=15.0 /m /t:Build /p:Configuration=Release /p:Platform=x64 /p:PreferredToolArchitecture=x64 /p:TreatWarningsAsErrors=true
:: Test in process
call "%PLUGINVAL_EXE%" --validate-in-process --strictness-level 5 --validate %PLUGIN_VST3%
if %ERRORLEVEL% NEQ 0 exit 1
:: Test out of process
:: call "%PLUGINVAL_EXE%" --strictness-level 5 --validate %PLUGIN_VST3%
:: if %ERRORLEVEL% NEQ 0 exit 1
exit /B 0