| | @@ -192,15 +192,29 @@ |
| 192 | 192 | IF ERRORLEVEL 1 ( |
| 193 | 193 | ECHO Could not change to directory "%ROOT%\msvcbld". |
| 194 | 194 | GOTO errors |
| 195 | 195 | ) |
| 196 | 196 | |
| 197 | +REM |
| 198 | +REM NOTE: If requested, setup the build environment to refer to the Windows |
| 199 | +REM SDK v7.1A, which is required if the binaries are being built with |
| 200 | +REM Visual Studio 201x and need to work on Windows XP. |
| 201 | +REM |
| 202 | +IF DEFINED USE_V110SDK71A ( |
| 203 | + %_AECHO% Forcing use of the Windows SDK v7.1A... |
| 204 | + CALL :fn_UseV110Sdk71A |
| 205 | +) |
| 206 | + |
| 207 | +%_VECHO% Path = '%PATH%' |
| 208 | +%_VECHO% Include = '%INCLUDE%' |
| 209 | +%_VECHO% Lib = '%LIB%' |
| 210 | + |
| 197 | 211 | REM |
| 198 | 212 | REM NOTE: Attempt to execute NMAKE for the Fossil MSVC makefile, passing |
| 199 | 213 | REM anything extra from our command line along (e.g. extra options). |
| 200 | 214 | REM |
| 201 | | -%__ECHO% nmake /f "%TOOLS%\Makefile.msc" %* |
| 215 | +%__ECHO% nmake /f "%TOOLS%\Makefile.msc" %NMAKE_ARGS% %* |
| 202 | 216 | |
| 203 | 217 | IF ERRORLEVEL 1 ( |
| 204 | 218 | GOTO errors |
| 205 | 219 | ) |
| 206 | 220 | |
| | @@ -213,10 +227,35 @@ |
| 213 | 227 | ECHO Could not restore directory. |
| 214 | 228 | GOTO errors |
| 215 | 229 | ) |
| 216 | 230 | |
| 217 | 231 | GOTO no_errors |
| 232 | + |
| 233 | +:fn_UseV110Sdk71A |
| 234 | + IF "%PROCESSOR_ARCHITECTURE%" == "x86" GOTO set_v110Sdk71A_x86 |
| 235 | + SET PFILES_SDK71A=%ProgramFiles(x86)% |
| 236 | + GOTO set_v110Sdk71A_done |
| 237 | + :set_v110Sdk71A_x86 |
| 238 | + SET PFILES_SDK71A=%ProgramFiles% |
| 239 | + :set_v110Sdk71A_done |
| 240 | + SET PATH=%PFILES_SDK71A%\Microsoft SDKs\Windows\7.1A\Bin;%PATH% |
| 241 | + SET INCLUDE=%PFILES_SDK71A%\Microsoft SDKs\Windows\7.1A\Include;%INCLUDE% |
| 242 | + IF "%PLATFORM%" == "x64" ( |
| 243 | + SET LIB=%PFILES_SDK71A%\Microsoft SDKs\Windows\7.1A\Lib;%LIB% |
| 244 | + ) ELSE ( |
| 245 | + SET LIB=%PFILES_SDK71A%\Microsoft SDKs\Windows\7.1A\Lib\x64;%LIB% |
| 246 | + ) |
| 247 | + CALL :fn_UnsetVariable PFILES_SDK71A |
| 248 | + SET NMAKE_ARGS=%NMAKE_ARGS% FOSSIL_ENABLE_WINXP=1 |
| 249 | + GOTO :EOF |
| 250 | + |
| 251 | +:fn_UnsetVariable |
| 252 | + IF NOT "%1" == "" ( |
| 253 | + SET %1= |
| 254 | + CALL :fn_ResetErrorLevel |
| 255 | + ) |
| 256 | + GOTO :EOF |
| 218 | 257 | |
| 219 | 258 | :fn_ResetErrorLevel |
| 220 | 259 | VERIFY > NUL |
| 221 | 260 | GOTO :EOF |
| 222 | 261 | |
| 223 | 262 | |