From 5236032cf266aa77ba63c1851f889e25376a864e Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Mon, 21 Sep 2020 13:58:05 +0300 Subject: AppVeyor: Split build script by handy CMD files --- cmake/win-ci/vlc-plugin.cmd | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 cmake/win-ci/vlc-plugin.cmd (limited to 'cmake/win-ci/vlc-plugin.cmd') diff --git a/cmake/win-ci/vlc-plugin.cmd b/cmake/win-ci/vlc-plugin.cmd new file mode 100644 index 0000000..7117980 --- /dev/null +++ b/cmake/win-ci/vlc-plugin.cmd @@ -0,0 +1,52 @@ +rem =============== BUILDING A VLC PLUGIN =============== + +md C:\vlc-temp + +"%WGET_BIN%" --quiet %VLC_TARBALL% -O C:\vlc-temp\vlcsdk.7z +if %errorlevel% neq 0 exit /b %errorlevel% + +"%SEVENZIP%" x C:\vlc-temp\vlcsdk.7z -oC:\vlc-temp +if %errorlevel% neq 0 exit /b %errorlevel% + +xcopy /S /E /Y "C:\vlc-temp\%VLC_DIR%\sdk\*" "%TOOLCHAIN_BIN%\.." +if %errorlevel% neq 0 exit /b %errorlevel% + +md build-%COMPILER%-%BUILD_TYPE%-%PLATFORM% +cd build-%COMPILER%-%BUILD_TYPE%-%PLATFORM% + +if NOT [%TOOLCHAIN_BIN%]==[] set PATH=%TOOLCHAIN_BIN%;%PATH:C:\Program Files\Git\usr\bin;=% + +cmake -G "%GENERATOR%"^ + -DCMAKE_BUILD_TYPE=%BUILD_TYPE%^ + -DCMAKE_PREFIX_PATH=%CMAKEPREFIXPATH%^ + -DCMAKE_INSTALL_PREFIX=libADLMIDI^ + -DWITH_OLD_UTILS=ON ^ + -DWITH_GENADLDATA=OFF ^ + -DlibADLMIDI_STATIC=%BUILD_STATIC% ^ + -DlibADLMIDI_SHARED=%BUILD_SHARED% ^ + -DWITH_MIDIPLAY=%BUILD_MIDIPLAY% ^ + -DWITH_VLC_PLUGIN=%VLC_PLUGIN% ^ + -DVLC_PLUGIN_NOINSTALL=ON .. +if %errorlevel% neq 0 exit /b %errorlevel% + +if [%COMPILER_FAMILY%]==[MinGW] ( + cmake --build . --config %BUILD_TYPE% -- -j 2 + if %errorlevel% neq 0 exit /b %errorlevel% +) + +if [%COMPILER_FAMILY%]==[MinGW] ( + mingw32-make install + if %errorlevel% neq 0 exit /b %errorlevel% +) + +if [%COMPILER_FAMILY%]==[MSVC] ( + cmake --build . --config %BUILD_TYPE% --target install + if %errorlevel% neq 0 exit /b %errorlevel% +) + +7z a -t7z -mx9 "libADLMIDI-%VLC_DIR%-codec-%PLATFORM%.7z" "libadlmidi_plugin.dll" +if %errorlevel% neq 0 exit /b %errorlevel% + +appveyor PushArtifact "libADLMIDI-%VLC_DIR%-codec-%PLATFORM%.7z" +if %errorlevel% neq 0 exit /b %errorlevel% + -- cgit v1.2.3