|
1 |
| -@ECHO OFF |
| 1 | +@IF NOT DEFINED _ECHO ECHO OFF |
2 | 2 | REM ================================================================
|
3 | 3 | REM This script installs the "vcpkg" source package manager and uses
|
4 | 4 | REM it to build the third-party libraries that git requires when it
|
@@ -32,7 +32,10 @@ REM ================================================================
|
32 | 32 | SETLOCAL EnableDelayedExpansion
|
33 | 33 |
|
34 | 34 | SET arch=%1
|
35 |
| - if not defined arch=x64-windows |
| 35 | + IF NOT DEFINED arch ( |
| 36 | + echo defaulting to 'x64-windows`. Invoke %0 with 'x86-windows', 'x64-windows', or 'arm64-windows' |
| 37 | + set arch=x64-windows |
| 38 | + ) |
36 | 39 |
|
37 | 40 | @FOR /F "delims=" %%D IN ("%~dp0") DO @SET cwd=%%~fD
|
38 | 41 | cd %cwd%
|
@@ -82,14 +85,50 @@ REM ================================================================
|
82 | 85 | :sub__install_one
|
83 | 86 | echo Installing package %1...
|
84 | 87 |
|
| 88 | + call :%1_features |
| 89 | + |
85 | 90 | REM vcpkg may not be reliable on slow, intermittent or proxy
|
86 | 91 | REM connections, see e.g.
|
87 | 92 | REM https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/4a8f7be5-5e15-4213-a7bb-ddf424a954e6/winhttpsendrequest-ends-with-12002-errorhttptimeout-after-21-seconds-no-matter-what-timeout?forum=windowssdk
|
88 | 93 | REM which explains the hidden 21 second timeout
|
89 | 94 | REM (last post by Dave : Microsoft - Windows Networking team)
|
90 | 95 |
|
91 |
| - .\vcpkg.exe install %1:%arch% |
| 96 | + .\vcpkg.exe install %1%features%:%arch% |
92 | 97 | IF ERRORLEVEL 1 ( EXIT /B 1 )
|
93 | 98 |
|
94 | 99 | echo Finished %1
|
95 | 100 | goto :EOF
|
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | +:: |
| 105 | +:: features for each vcpkg to install |
| 106 | +:: there should be an entry here for each package to install |
| 107 | +:: 'set features=' means use the default otherwise |
| 108 | +:: 'set features=[comma-delimited-feature-set]' is the syntax |
| 109 | +:: |
| 110 | + |
| 111 | +:zlib_features |
| 112 | +set features= |
| 113 | +goto :EOF |
| 114 | + |
| 115 | +:expat_features |
| 116 | +set features= |
| 117 | +goto :EOF |
| 118 | + |
| 119 | +:libiconv_features |
| 120 | +set features= |
| 121 | +goto :EOF |
| 122 | + |
| 123 | +:openssl_features |
| 124 | +set features= |
| 125 | +goto :EOF |
| 126 | + |
| 127 | +:libssh2_features |
| 128 | +set features= |
| 129 | +goto :EOF |
| 130 | + |
| 131 | +:curl_features |
| 132 | +set features=[core,openssl] |
| 133 | +goto :EOF |
| 134 | + |
0 commit comments