一个下载编译的批处理

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%

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容