|
1 | | -call git clone https://github.com/microsoft/vcpkg vcpkg |
| 1 | +@echo off |
| 2 | +setlocal |
| 3 | + |
| 4 | +pushd "%~dp0" |
| 5 | + |
| 6 | +if not exist .\vcpkg ( |
| 7 | + call git clone --depth 1 https://github.com/microsoft/vcpkg vcpkg |
| 8 | + if errorlevel 1 goto :fail |
| 9 | +) else ( |
| 10 | + pushd .\vcpkg |
| 11 | + call git pull --ff-only |
| 12 | + if errorlevel 1 goto :fail |
| 13 | + popd |
| 14 | +) |
| 15 | + |
2 | 16 | call .\vcpkg\bootstrap-vcpkg.bat |
| 17 | +if errorlevel 1 goto :fail |
| 18 | + |
| 19 | +call .\vcpkg\vcpkg install openssl:x64-windows-static |
| 20 | +if errorlevel 1 goto :fail |
| 21 | +call .\vcpkg\vcpkg install openssl:x86-windows-static |
| 22 | +if errorlevel 1 goto :fail |
| 23 | +call .\vcpkg\vcpkg install openssl:arm64-windows-static |
| 24 | +if errorlevel 1 goto :fail |
| 25 | + |
| 26 | +if exist .\OpenSSL-Win32 rmdir /s /q .\OpenSSL-Win32 |
| 27 | +if exist .\OpenSSL-Win64 rmdir /s /q .\OpenSSL-Win64 |
| 28 | +if exist .\OpenSSL-Win64-ARM rmdir /s /q .\OpenSSL-Win64-ARM |
| 29 | +if exist .\openssl-include rmdir /s /q .\openssl-include |
| 30 | + |
| 31 | +mkdir .\OpenSSL-Win32 |
| 32 | +if errorlevel 1 goto :fail |
| 33 | +mkdir .\OpenSSL-Win64 |
| 34 | +if errorlevel 1 goto :fail |
| 35 | +mkdir .\OpenSSL-Win64-ARM |
| 36 | +if errorlevel 1 goto :fail |
| 37 | +mkdir .\openssl-include |
| 38 | +if errorlevel 1 goto :fail |
| 39 | +mkdir .\openssl-include\openssl |
| 40 | +if errorlevel 1 goto :fail |
| 41 | + |
| 42 | +xcopy /Y /I .\vcpkg\installed\x64-windows-static\lib\*.* .\OpenSSL-Win64\ >nul |
| 43 | +if errorlevel 1 goto :fail |
| 44 | +xcopy /Y /I .\vcpkg\installed\x64-windows-static\include\openssl\*.* .\openssl-include\openssl\ >nul |
| 45 | +if errorlevel 1 goto :fail |
| 46 | +xcopy /Y /I .\vcpkg\installed\x86-windows-static\lib\*.* .\OpenSSL-Win32\ >nul |
| 47 | +if errorlevel 1 goto :fail |
| 48 | +xcopy /Y /I .\vcpkg\installed\arm64-windows-static\lib\*.* .\OpenSSL-Win64-ARM\ >nul |
| 49 | +if errorlevel 1 goto :fail |
| 50 | + |
| 51 | +popd |
| 52 | +exit /b 0 |
3 | 53 |
|
4 | | -.\vcpkg\vcpkg install openssl:x64-windows-static |
5 | | -if %errorlevel% neq 0 exit /b %errorlevel% |
6 | | -.\vcpkg\vcpkg install openssl:x86-windows-static |
7 | | -if %errorlevel% neq 0 exit /b %errorlevel% |
8 | | -.\vcpkg\vcpkg install openssl:arm64-windows-static |
9 | | -if %errorlevel% neq 0 exit /b %errorlevel% |
10 | | - |
11 | | -if not exist .\OpenSSL-Win32 mkdir .\OpenSSL-Win32 |
12 | | -if not exist .\OpenSSL-Win64 mkdir .\OpenSSL-Win64 |
13 | | -if not exist .\OpenSSL-Win64-ARM mkdir .\OpenSSL-Win64-ARM |
14 | | -if not exist .\openssl-include mkdir .\openssl-include |
15 | | - |
16 | | -copy .\vcpkg\installed\x64-windows-static\lib\*.* .\OpenSSL-Win64 |
17 | | -copy .\vcpkg\installed\x64-windows-static\include\openssl\*.* .\openssl-include\openssl |
18 | | -copy .\vcpkg\installed\x86-windows-static\lib\*.* .\OpenSSL-Win32 |
19 | | -copy .\vcpkg\installed\arm64-windows-static\lib\*.* .\OpenSSL-Win64-ARM |
| 54 | +:fail |
| 55 | +set EXIT_CODE=%errorlevel% |
| 56 | +popd |
| 57 | +exit /b %EXIT_CODE% |
0 commit comments