一個下載編譯的批處理

setlocal

set nocache=0

if not exist thirdparty.cached set nocache=1
if not exist %BOOST_ROOT% set nocache=1

if %nocache% == 1 (
    pushd C:\Libraries
    curl -fsSO http://iweb.dl.sourceforge.net/project/boost/boost/1.60.0/boost_1_60_0.7z
    7z x boost_1_60_0.7z | find "ing archive"
    cd boost_1_60_0
    call .\bootstrap.bat
    call .\b2.exe --prefix=%BOOST_ROOT% toolset=msvc-14.0 variant=release link=static threading=multi runtime-link=static --with-date_time --with-filesystem --with-system --with-regex --with-signals --with-thread --with-locale -q -d0 install
    xcopy /e /i /y /q %BOOST_ROOT%\include\boost-1_60\boost %BOOST_ROOT%\boost
    popd
    if %ERRORLEVEL% NEQ 0 goto ERROR

    call .\build.bat thirdparty
    if %ERRORLEVEL% NEQ 0 goto ERROR

    date /t > thirdparty.cached & time /t >> thirdparty.cached
    echo.
    echo Thirdparty libraries installed.
    echo.
    goto EXIT
) else (
    echo.
    echo Last build date of cache is
    type thirdparty.cached
    echo.
    goto EXIT
)

:ERROR
set EXITCODE=%ERRORLEVEL%

:EXIT
exit /b %EXITCODE%

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容