Fossil SCM

Modify the MSVC makefile and build tool to support building binaries that work on Windows XP using Visual Studio 201x.

mistachkin 2014-10-13 02:51 trunk merge
Commit f6d7eb4e3c8cda59d7fcd1275629772d96a94b4a
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -1174,10 +1174,13 @@
11741174
PERLDIR = C:\Perl\bin
11751175
PERL = perl.exe
11761176
11771177
# Uncomment to enable debug symbols
11781178
# DEBUG = 1
1179
+
1180
+# Uncomment to support Windows XP with Visual Studio 201x
1181
+# FOSSIL_ENABLE_WINXP = 1
11791182
11801183
# Uncomment to enable JSON API
11811184
# FOSSIL_ENABLE_JSON = 1
11821185
11831186
# Uncomment to enable miniz usage
@@ -1200,10 +1203,11 @@
12001203
12011204
!ifdef FOSSIL_ENABLE_SSL
12021205
SSLDIR = $(B)\compat\openssl-1.0.1i
12031206
SSLINCDIR = $(SSLDIR)\inc32
12041207
SSLLIBDIR = $(SSLDIR)\out32
1208
+SSLLFLAGS = /nologo /opt:ref /debug
12051209
SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib
12061210
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
12071211
!message Using 'x64' platform for OpenSSL...
12081212
SSLCONFIG = VC-WIN64A no-asm
12091213
SSLSETUP = ms\do_win64a.bat
@@ -1246,10 +1250,21 @@
12461250
INCL = $(INCL) /I$(TCLINCDIR)
12471251
!endif
12481252
12491253
CFLAGS = /nologo
12501254
LDFLAGS = /NODEFAULTLIB:msvcrt /MANIFEST:NO
1255
+
1256
+!ifdef FOSSIL_ENABLE_WINXP
1257
+XPCFLAGS = $(XPCFLAGS) /D_USING_V110_SDK71_=1
1258
+CFLAGS = $(CFLAGS) $(XPCFLAGS)
1259
+!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1260
+XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
1261
+!else
1262
+XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
1263
+!endif
1264
+LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
1265
+!endif
12511266
12521267
!ifdef DEBUG
12531268
CFLAGS = $(CFLAGS) /Zi /MTd /Od
12541269
LDFLAGS = $(LDFLAGS) /DEBUG
12551270
!else
@@ -1352,21 +1367,29 @@
13521367
13531368
all: $(OX) $(APPNAME)
13541369
13551370
zlib:
13561371
@echo Building zlib from "$(ZLIBDIR)"...
1372
+!ifdef FOSSIL_ENABLE_WINXP
1373
+ @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) "CC=cl $(XPCFLAGS)" "LD=link $(XPLDFLAGS)" && popd
1374
+!else
13571375
@pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd
1376
+!endif
13581377
13591378
!ifdef FOSSIL_ENABLE_SSL
13601379
openssl:
13611380
@echo Building OpenSSL from "$(SSLDIR)"...
13621381
!if "$(PERLDIR)" != ""
13631382
@set PATH=$(PERLDIR);$(PATH)
13641383
!endif
13651384
@pushd "$(SSLDIR)" && $(PERL) Configure $(SSLCONFIG) && popd
13661385
@pushd "$(SSLDIR)" && call $(SSLSETUP) && popd
1386
+!ifdef FOSSIL_ENABLE_WINXP
1387
+ @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(SSLLFLAGS) $(XPLDFLAGS)" && popd
1388
+!else
13671389
@pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) && popd
1390
+!endif
13681391
!endif
13691392
13701393
!ifndef FOSSIL_ENABLE_MINIZ
13711394
APPTARGETS = $(APPTARGETS) zlib
13721395
!endif
13731396
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -1174,10 +1174,13 @@
1174 PERLDIR = C:\Perl\bin
1175 PERL = perl.exe
1176
1177 # Uncomment to enable debug symbols
1178 # DEBUG = 1
 
 
 
1179
1180 # Uncomment to enable JSON API
1181 # FOSSIL_ENABLE_JSON = 1
1182
1183 # Uncomment to enable miniz usage
@@ -1200,10 +1203,11 @@
1200
1201 !ifdef FOSSIL_ENABLE_SSL
1202 SSLDIR = $(B)\compat\openssl-1.0.1i
1203 SSLINCDIR = $(SSLDIR)\inc32
1204 SSLLIBDIR = $(SSLDIR)\out32
 
1205 SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib
1206 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1207 !message Using 'x64' platform for OpenSSL...
1208 SSLCONFIG = VC-WIN64A no-asm
1209 SSLSETUP = ms\do_win64a.bat
@@ -1246,10 +1250,21 @@
1246 INCL = $(INCL) /I$(TCLINCDIR)
1247 !endif
1248
1249 CFLAGS = /nologo
1250 LDFLAGS = /NODEFAULTLIB:msvcrt /MANIFEST:NO
 
 
 
 
 
 
 
 
 
 
 
1251
1252 !ifdef DEBUG
1253 CFLAGS = $(CFLAGS) /Zi /MTd /Od
1254 LDFLAGS = $(LDFLAGS) /DEBUG
1255 !else
@@ -1352,21 +1367,29 @@
1352
1353 all: $(OX) $(APPNAME)
1354
1355 zlib:
1356 @echo Building zlib from "$(ZLIBDIR)"...
 
 
 
1357 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd
 
1358
1359 !ifdef FOSSIL_ENABLE_SSL
1360 openssl:
1361 @echo Building OpenSSL from "$(SSLDIR)"...
1362 !if "$(PERLDIR)" != ""
1363 @set PATH=$(PERLDIR);$(PATH)
1364 !endif
1365 @pushd "$(SSLDIR)" && $(PERL) Configure $(SSLCONFIG) && popd
1366 @pushd "$(SSLDIR)" && call $(SSLSETUP) && popd
 
 
 
1367 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) && popd
 
1368 !endif
1369
1370 !ifndef FOSSIL_ENABLE_MINIZ
1371 APPTARGETS = $(APPTARGETS) zlib
1372 !endif
1373
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -1174,10 +1174,13 @@
1174 PERLDIR = C:\Perl\bin
1175 PERL = perl.exe
1176
1177 # Uncomment to enable debug symbols
1178 # DEBUG = 1
1179
1180 # Uncomment to support Windows XP with Visual Studio 201x
1181 # FOSSIL_ENABLE_WINXP = 1
1182
1183 # Uncomment to enable JSON API
1184 # FOSSIL_ENABLE_JSON = 1
1185
1186 # Uncomment to enable miniz usage
@@ -1200,10 +1203,11 @@
1203
1204 !ifdef FOSSIL_ENABLE_SSL
1205 SSLDIR = $(B)\compat\openssl-1.0.1i
1206 SSLINCDIR = $(SSLDIR)\inc32
1207 SSLLIBDIR = $(SSLDIR)\out32
1208 SSLLFLAGS = /nologo /opt:ref /debug
1209 SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib
1210 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1211 !message Using 'x64' platform for OpenSSL...
1212 SSLCONFIG = VC-WIN64A no-asm
1213 SSLSETUP = ms\do_win64a.bat
@@ -1246,10 +1250,21 @@
1250 INCL = $(INCL) /I$(TCLINCDIR)
1251 !endif
1252
1253 CFLAGS = /nologo
1254 LDFLAGS = /NODEFAULTLIB:msvcrt /MANIFEST:NO
1255
1256 !ifdef FOSSIL_ENABLE_WINXP
1257 XPCFLAGS = $(XPCFLAGS) /D_USING_V110_SDK71_=1
1258 CFLAGS = $(CFLAGS) $(XPCFLAGS)
1259 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
1260 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
1261 !else
1262 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
1263 !endif
1264 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
1265 !endif
1266
1267 !ifdef DEBUG
1268 CFLAGS = $(CFLAGS) /Zi /MTd /Od
1269 LDFLAGS = $(LDFLAGS) /DEBUG
1270 !else
@@ -1352,21 +1367,29 @@
1367
1368 all: $(OX) $(APPNAME)
1369
1370 zlib:
1371 @echo Building zlib from "$(ZLIBDIR)"...
1372 !ifdef FOSSIL_ENABLE_WINXP
1373 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) "CC=cl $(XPCFLAGS)" "LD=link $(XPLDFLAGS)" && popd
1374 !else
1375 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd
1376 !endif
1377
1378 !ifdef FOSSIL_ENABLE_SSL
1379 openssl:
1380 @echo Building OpenSSL from "$(SSLDIR)"...
1381 !if "$(PERLDIR)" != ""
1382 @set PATH=$(PERLDIR);$(PATH)
1383 !endif
1384 @pushd "$(SSLDIR)" && $(PERL) Configure $(SSLCONFIG) && popd
1385 @pushd "$(SSLDIR)" && call $(SSLSETUP) && popd
1386 !ifdef FOSSIL_ENABLE_WINXP
1387 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(SSLLFLAGS) $(XPLDFLAGS)" && popd
1388 !else
1389 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) && popd
1390 !endif
1391 !endif
1392
1393 !ifndef FOSSIL_ENABLE_MINIZ
1394 APPTARGETS = $(APPTARGETS) zlib
1395 !endif
1396
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -29,10 +29,13 @@
2929
PERLDIR = C:\Perl\bin
3030
PERL = perl.exe
3131
3232
# Uncomment to enable debug symbols
3333
# DEBUG = 1
34
+
35
+# Uncomment to support Windows XP with Visual Studio 201x
36
+# FOSSIL_ENABLE_WINXP = 1
3437
3538
# Uncomment to enable JSON API
3639
# FOSSIL_ENABLE_JSON = 1
3740
3841
# Uncomment to enable miniz usage
@@ -55,10 +58,11 @@
5558
5659
!ifdef FOSSIL_ENABLE_SSL
5760
SSLDIR = $(B)\compat\openssl-1.0.1i
5861
SSLINCDIR = $(SSLDIR)\inc32
5962
SSLLIBDIR = $(SSLDIR)\out32
63
+SSLLFLAGS = /nologo /opt:ref /debug
6064
SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib
6165
!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
6266
!message Using 'x64' platform for OpenSSL...
6367
SSLCONFIG = VC-WIN64A no-asm
6468
SSLSETUP = ms\do_win64a.bat
@@ -101,10 +105,21 @@
101105
INCL = $(INCL) /I$(TCLINCDIR)
102106
!endif
103107
104108
CFLAGS = /nologo
105109
LDFLAGS = /NODEFAULTLIB:msvcrt /MANIFEST:NO
110
+
111
+!ifdef FOSSIL_ENABLE_WINXP
112
+XPCFLAGS = $(XPCFLAGS) /D_USING_V110_SDK71_=1
113
+CFLAGS = $(CFLAGS) $(XPCFLAGS)
114
+!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
115
+XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
116
+!else
117
+XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
118
+!endif
119
+LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
120
+!endif
106121
107122
!ifdef DEBUG
108123
CFLAGS = $(CFLAGS) /Zi /MTd /Od
109124
LDFLAGS = $(LDFLAGS) /DEBUG
110125
!else
@@ -423,21 +438,29 @@
423438
424439
all: $(OX) $(APPNAME)
425440
426441
zlib:
427442
@echo Building zlib from "$(ZLIBDIR)"...
443
+!ifdef FOSSIL_ENABLE_WINXP
444
+ @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) "CC=cl $(XPCFLAGS)" "LD=link $(XPLDFLAGS)" && popd
445
+!else
428446
@pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd
447
+!endif
429448
430449
!ifdef FOSSIL_ENABLE_SSL
431450
openssl:
432451
@echo Building OpenSSL from "$(SSLDIR)"...
433452
!if "$(PERLDIR)" != ""
434453
@set PATH=$(PERLDIR);$(PATH)
435454
!endif
436455
@pushd "$(SSLDIR)" && $(PERL) Configure $(SSLCONFIG) && popd
437456
@pushd "$(SSLDIR)" && call $(SSLSETUP) && popd
457
+!ifdef FOSSIL_ENABLE_WINXP
458
+ @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(SSLLFLAGS) $(XPLDFLAGS)" && popd
459
+!else
438460
@pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) && popd
461
+!endif
439462
!endif
440463
441464
!ifndef FOSSIL_ENABLE_MINIZ
442465
APPTARGETS = $(APPTARGETS) zlib
443466
!endif
444467
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -29,10 +29,13 @@
29 PERLDIR = C:\Perl\bin
30 PERL = perl.exe
31
32 # Uncomment to enable debug symbols
33 # DEBUG = 1
 
 
 
34
35 # Uncomment to enable JSON API
36 # FOSSIL_ENABLE_JSON = 1
37
38 # Uncomment to enable miniz usage
@@ -55,10 +58,11 @@
55
56 !ifdef FOSSIL_ENABLE_SSL
57 SSLDIR = $(B)\compat\openssl-1.0.1i
58 SSLINCDIR = $(SSLDIR)\inc32
59 SSLLIBDIR = $(SSLDIR)\out32
 
60 SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib
61 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
62 !message Using 'x64' platform for OpenSSL...
63 SSLCONFIG = VC-WIN64A no-asm
64 SSLSETUP = ms\do_win64a.bat
@@ -101,10 +105,21 @@
101 INCL = $(INCL) /I$(TCLINCDIR)
102 !endif
103
104 CFLAGS = /nologo
105 LDFLAGS = /NODEFAULTLIB:msvcrt /MANIFEST:NO
 
 
 
 
 
 
 
 
 
 
 
106
107 !ifdef DEBUG
108 CFLAGS = $(CFLAGS) /Zi /MTd /Od
109 LDFLAGS = $(LDFLAGS) /DEBUG
110 !else
@@ -423,21 +438,29 @@
423
424 all: $(OX) $(APPNAME)
425
426 zlib:
427 @echo Building zlib from "$(ZLIBDIR)"...
 
 
 
428 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd
 
429
430 !ifdef FOSSIL_ENABLE_SSL
431 openssl:
432 @echo Building OpenSSL from "$(SSLDIR)"...
433 !if "$(PERLDIR)" != ""
434 @set PATH=$(PERLDIR);$(PATH)
435 !endif
436 @pushd "$(SSLDIR)" && $(PERL) Configure $(SSLCONFIG) && popd
437 @pushd "$(SSLDIR)" && call $(SSLSETUP) && popd
 
 
 
438 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) && popd
 
439 !endif
440
441 !ifndef FOSSIL_ENABLE_MINIZ
442 APPTARGETS = $(APPTARGETS) zlib
443 !endif
444
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -29,10 +29,13 @@
29 PERLDIR = C:\Perl\bin
30 PERL = perl.exe
31
32 # Uncomment to enable debug symbols
33 # DEBUG = 1
34
35 # Uncomment to support Windows XP with Visual Studio 201x
36 # FOSSIL_ENABLE_WINXP = 1
37
38 # Uncomment to enable JSON API
39 # FOSSIL_ENABLE_JSON = 1
40
41 # Uncomment to enable miniz usage
@@ -55,10 +58,11 @@
58
59 !ifdef FOSSIL_ENABLE_SSL
60 SSLDIR = $(B)\compat\openssl-1.0.1i
61 SSLINCDIR = $(SSLDIR)\inc32
62 SSLLIBDIR = $(SSLDIR)\out32
63 SSLLFLAGS = /nologo /opt:ref /debug
64 SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib
65 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
66 !message Using 'x64' platform for OpenSSL...
67 SSLCONFIG = VC-WIN64A no-asm
68 SSLSETUP = ms\do_win64a.bat
@@ -101,10 +105,21 @@
105 INCL = $(INCL) /I$(TCLINCDIR)
106 !endif
107
108 CFLAGS = /nologo
109 LDFLAGS = /NODEFAULTLIB:msvcrt /MANIFEST:NO
110
111 !ifdef FOSSIL_ENABLE_WINXP
112 XPCFLAGS = $(XPCFLAGS) /D_USING_V110_SDK71_=1
113 CFLAGS = $(CFLAGS) $(XPCFLAGS)
114 !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64"
115 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02
116 !else
117 XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01
118 !endif
119 LDFLAGS = $(LDFLAGS) $(XPLDFLAGS)
120 !endif
121
122 !ifdef DEBUG
123 CFLAGS = $(CFLAGS) /Zi /MTd /Od
124 LDFLAGS = $(LDFLAGS) /DEBUG
125 !else
@@ -423,21 +438,29 @@
438
439 all: $(OX) $(APPNAME)
440
441 zlib:
442 @echo Building zlib from "$(ZLIBDIR)"...
443 !ifdef FOSSIL_ENABLE_WINXP
444 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) "CC=cl $(XPCFLAGS)" "LD=link $(XPLDFLAGS)" && popd
445 !else
446 @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd
447 !endif
448
449 !ifdef FOSSIL_ENABLE_SSL
450 openssl:
451 @echo Building OpenSSL from "$(SSLDIR)"...
452 !if "$(PERLDIR)" != ""
453 @set PATH=$(PERLDIR);$(PATH)
454 !endif
455 @pushd "$(SSLDIR)" && $(PERL) Configure $(SSLCONFIG) && popd
456 @pushd "$(SSLDIR)" && call $(SSLSETUP) && popd
457 !ifdef FOSSIL_ENABLE_WINXP
458 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(SSLLFLAGS) $(XPLDFLAGS)" && popd
459 !else
460 @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) && popd
461 !endif
462 !endif
463
464 !ifndef FOSSIL_ENABLE_MINIZ
465 APPTARGETS = $(APPTARGETS) zlib
466 !endif
467
--- win/buildmsvc.bat
+++ win/buildmsvc.bat
@@ -192,15 +192,30 @@
192192
IF ERRORLEVEL 1 (
193193
ECHO Could not change to directory "%ROOT%\msvcbld".
194194
GOTO errors
195195
)
196196
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
+%_VECHO% NmakeArgs = '%NMAKE_ARGS%'
211
+
197212
REM
198213
REM NOTE: Attempt to execute NMAKE for the Fossil MSVC makefile, passing
199214
REM anything extra from our command line along (e.g. extra options).
200215
REM
201
-%__ECHO% nmake /f "%TOOLS%\Makefile.msc" %*
216
+%__ECHO% nmake /f "%TOOLS%\Makefile.msc" %NMAKE_ARGS% %*
202217
203218
IF ERRORLEVEL 1 (
204219
GOTO errors
205220
)
206221
@@ -213,10 +228,35 @@
213228
ECHO Could not restore directory.
214229
GOTO errors
215230
)
216231
217232
GOTO no_errors
233
+
234
+:fn_UseV110Sdk71A
235
+ IF "%PROCESSOR_ARCHITECTURE%" == "x86" GOTO set_v110Sdk71A_x86
236
+ SET PFILES_SDK71A=%ProgramFiles(x86)%
237
+ GOTO set_v110Sdk71A_done
238
+ :set_v110Sdk71A_x86
239
+ SET PFILES_SDK71A=%ProgramFiles%
240
+ :set_v110Sdk71A_done
241
+ SET PATH=%PFILES_SDK71A%\Microsoft SDKs\Windows\7.1A\Bin;%PATH%
242
+ SET INCLUDE=%PFILES_SDK71A%\Microsoft SDKs\Windows\7.1A\Include;%INCLUDE%
243
+ IF "%PLATFORM%" == "x64" (
244
+ SET LIB=%PFILES_SDK71A%\Microsoft SDKs\Windows\7.1A\Lib\x64;%LIB%
245
+ ) ELSE (
246
+ SET LIB=%PFILES_SDK71A%\Microsoft SDKs\Windows\7.1A\Lib;%LIB%
247
+ )
248
+ CALL :fn_UnsetVariable PFILES_SDK71A
249
+ SET NMAKE_ARGS=%NMAKE_ARGS% FOSSIL_ENABLE_WINXP=1
250
+ GOTO :EOF
251
+
252
+:fn_UnsetVariable
253
+ IF NOT "%1" == "" (
254
+ SET %1=
255
+ CALL :fn_ResetErrorLevel
256
+ )
257
+ GOTO :EOF
218258
219259
:fn_ResetErrorLevel
220260
VERIFY > NUL
221261
GOTO :EOF
222262
223263
--- win/buildmsvc.bat
+++ win/buildmsvc.bat
@@ -192,15 +192,30 @@
192 IF ERRORLEVEL 1 (
193 ECHO Could not change to directory "%ROOT%\msvcbld".
194 GOTO errors
195 )
196
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197 REM
198 REM NOTE: Attempt to execute NMAKE for the Fossil MSVC makefile, passing
199 REM anything extra from our command line along (e.g. extra options).
200 REM
201 %__ECHO% nmake /f "%TOOLS%\Makefile.msc" %*
202
203 IF ERRORLEVEL 1 (
204 GOTO errors
205 )
206
@@ -213,10 +228,35 @@
213 ECHO Could not restore directory.
214 GOTO errors
215 )
216
217 GOTO no_errors
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
219 :fn_ResetErrorLevel
220 VERIFY > NUL
221 GOTO :EOF
222
223
--- win/buildmsvc.bat
+++ win/buildmsvc.bat
@@ -192,15 +192,30 @@
192 IF ERRORLEVEL 1 (
193 ECHO Could not change to directory "%ROOT%\msvcbld".
194 GOTO errors
195 )
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 %_VECHO% NmakeArgs = '%NMAKE_ARGS%'
211
212 REM
213 REM NOTE: Attempt to execute NMAKE for the Fossil MSVC makefile, passing
214 REM anything extra from our command line along (e.g. extra options).
215 REM
216 %__ECHO% nmake /f "%TOOLS%\Makefile.msc" %NMAKE_ARGS% %*
217
218 IF ERRORLEVEL 1 (
219 GOTO errors
220 )
221
@@ -213,10 +228,35 @@
228 ECHO Could not restore directory.
229 GOTO errors
230 )
231
232 GOTO no_errors
233
234 :fn_UseV110Sdk71A
235 IF "%PROCESSOR_ARCHITECTURE%" == "x86" GOTO set_v110Sdk71A_x86
236 SET PFILES_SDK71A=%ProgramFiles(x86)%
237 GOTO set_v110Sdk71A_done
238 :set_v110Sdk71A_x86
239 SET PFILES_SDK71A=%ProgramFiles%
240 :set_v110Sdk71A_done
241 SET PATH=%PFILES_SDK71A%\Microsoft SDKs\Windows\7.1A\Bin;%PATH%
242 SET INCLUDE=%PFILES_SDK71A%\Microsoft SDKs\Windows\7.1A\Include;%INCLUDE%
243 IF "%PLATFORM%" == "x64" (
244 SET LIB=%PFILES_SDK71A%\Microsoft SDKs\Windows\7.1A\Lib\x64;%LIB%
245 ) ELSE (
246 SET LIB=%PFILES_SDK71A%\Microsoft SDKs\Windows\7.1A\Lib;%LIB%
247 )
248 CALL :fn_UnsetVariable PFILES_SDK71A
249 SET NMAKE_ARGS=%NMAKE_ARGS% FOSSIL_ENABLE_WINXP=1
250 GOTO :EOF
251
252 :fn_UnsetVariable
253 IF NOT "%1" == "" (
254 SET %1=
255 CALL :fn_ResetErrorLevel
256 )
257 GOTO :EOF
258
259 :fn_ResetErrorLevel
260 VERIFY > NUL
261 GOTO :EOF
262
263

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button