From c7ce66f26f693b6251cbf757ef60db29a2fb3fa4 Mon Sep 17 00:00:00 2001 From: Chen Gong Date: Sun, 31 Mar 2019 17:44:54 +0800 Subject: [PATCH] feat(appveyor): install RIME_PLUGINS [skip travis] --- appveyor.install.bat | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/appveyor.install.bat b/appveyor.install.bat index 8abc0f3fa..ba248a9c7 100644 --- a/appveyor.install.bat +++ b/appveyor.install.bat @@ -1,5 +1,19 @@ setlocal +set boost_build_options=toolset=msvc-14.0^ + variant=release^ + link=static^ + threading=multi^ + runtime-link=static^ + define=BOOST_USE_WINAPI_VERSION=0x0501^ + cxxflags="/Zc:threadSafeInit- "^ + --with-date_time^ + --with-filesystem^ + --with-locale^ + --with-regex^ + --with-system^ + --with-thread + set nocache=0 if not exist thirdparty.cached set nocache=1 @@ -11,7 +25,7 @@ if %nocache% == 1 ( 7z x boost_1_68_0.7z | find "ing archive" cd boost_1_68_0 call .\bootstrap.bat - call .\b2.exe --prefix=%BOOST_ROOT% toolset=msvc-14.0 variant=release link=static threading=multi runtime-link=static define=BOOST_USE_WINAPI_VERSION=0x0501 cxxflags="/Zc:threadSafeInit- " --with-date_time --with-filesystem --with-locale --with-regex --with-system --with-thread -q -d0 install + call .\b2.exe --prefix=%BOOST_ROOT% %boost_build_options% -q -d0 install xcopy /e /i /y /q %BOOST_ROOT%\include\boost-1_68\boost %BOOST_ROOT%\boost popd if %ERRORLEVEL% NEQ 0 goto ERROR @@ -23,17 +37,32 @@ if %nocache% == 1 ( echo. echo Thirdparty libraries installed. echo. - goto EXIT ) else ( echo. echo Last build date of cache is type thirdparty.cached echo. - goto EXIT ) +if defined RIME_PLUGINS ( + for %%s in (%RIME_PLUGINS%) do call :install_plugin %%s +) + +goto EXIT + :ERROR set EXITCODE=%ERRORLEVEL% :EXIT exit /b %EXITCODE% + +:install_plugin +set slug=%1 +echo "plugin: %slug%" +set plugin_project=%slug:*/=% +set plugin_dir=plugins/%plugin_project:librime-=% +git clone --depth 1 "https://github.com/%slug%.git" %plugin_dir% +if exist %plugin_dir%\appveyor.install.bat ( + call %plugin_dir%\appveyor.install.bat +) +exit /b