blob: 6e0aeb572c0a996efd53bd249e163bcb5cadeece [file] [log] [blame]
mistachkin31856a32012-07-27 07:13:25 +00001@ECHO OFF
2
3::
4:: build-all-msvc.bat --
5::
6:: Multi-Platform Build Tool for MSVC
7::
8
mistachkin7c5dbdf2012-10-19 00:23:31 +00009REM
10REM This batch script is used to build the SQLite DLL for multiple platforms
11REM and configurations using MSVC. The built SQLite DLLs, their associated
12REM import libraries, and optionally their symbols files, are placed within
13REM the directory specified on the command line, in sub-directories named for
14REM their respective platforms and configurations. This batch script must be
15REM run from inside a Visual Studio Command Prompt for the desired version of
16REM Visual Studio ^(the initial platform configured for the command prompt does
17REM not really matter^). Exactly one command line argument is required, the
18REM name of an existing directory to be used as the final destination directory
19REM for the generated output files, which will be placed in sub-directories
20REM created therein. Ideally, the directory specified should be empty.
21REM
22REM Example:
23REM
24REM CD /D C:\dev\sqlite\core
25REM tool\build-all-msvc.bat C:\Temp
26REM
27REM In the example above, "C:\dev\sqlite\core" represents the root of the
28REM source tree for SQLite and "C:\Temp" represents the final destination
29REM directory for the generated output files.
30REM
31REM There are several environment variables that may be set to modify the
32REM behavior of this batch script and its associated Makefile. The list of
33REM platforms to build may be overriden by using the PLATFORMS environment
34REM variable, which should contain a list of platforms ^(e.g. x86 x86_amd64
35REM x86_arm^). All platforms must be supported by the version of Visual Studio
36REM being used. The list of configurations to build may be overridden by
37REM setting the CONFIGURATIONS environment variable, which should contain a
38REM list of configurations to build ^(e.g. Debug Retail^). Neither of these
39REM variable values may contain any double quotes, surrounding or embedded.
40REM Finally, the NCRTLIBPATH and NSDKLIBPATH environment variables may be set
41REM to specify the location of the CRT and SDK, respectively, needed to compile
42REM executables native to the architecture of the build machine during any
43REM cross-compilation that may be necessary, depending on the platforms to be
44REM built. These values in these two variables should be surrounded by double
45REM quotes if they contain spaces.
46REM
47REM Please note that the SQLite build process performed by the Makefile
48REM associated with this batch script requires both Gawk ^(gawk.exe^) and Tcl
49REM 8.5 ^(tclsh85.exe^) to be present in a directory contained in the PATH
50REM environment variable unless a pre-existing amalgamation file is used.
51REM
mistachkin31856a32012-07-27 07:13:25 +000052SETLOCAL
53
54REM SET __ECHO=ECHO
55REM SET __ECHO2=ECHO
mistachkin0ec07442012-10-12 18:06:07 +000056REM SET __ECHO3=ECHO
mistachkin31856a32012-07-27 07:13:25 +000057IF NOT DEFINED _AECHO (SET _AECHO=REM)
58IF NOT DEFINED _CECHO (SET _CECHO=REM)
59IF NOT DEFINED _VECHO (SET _VECHO=REM)
60
61%_AECHO% Running %0 %*
62
63REM SET DFLAGS=/L
64
65%_VECHO% DFlags = '%DFLAGS%'
66
67SET FFLAGS=/V /F /G /H /I /R /Y /Z
68
69%_VECHO% FFlags = '%FFLAGS%'
70
71SET ROOT=%~dp0\..
72SET ROOT=%ROOT:\\=\%
73
74%_VECHO% Root = '%ROOT%'
75
76REM
77REM NOTE: The first and only argument to this batch file should be the output
78REM directory where the platform-specific binary directories should be
79REM created.
80REM
81SET BINARYDIRECTORY=%1
82
83IF NOT DEFINED BINARYDIRECTORY (
84 GOTO usage
85)
86
87%_VECHO% BinaryDirectory = '%BINARYDIRECTORY%'
88
89SET DUMMY=%2
90
91IF DEFINED DUMMY (
92 GOTO usage
93)
94
95REM
96REM NOTE: From this point, we need a clean error level. Reset it now.
97REM
98CALL :fn_ResetErrorLevel
99
100REM
101REM NOTE: Change the current directory to the root of the source tree, saving
102REM the current directory on the directory stack.
103REM
104%__ECHO2% PUSHD "%ROOT%"
105
106IF ERRORLEVEL 1 (
107 ECHO Could not change directory to "%ROOT%".
108 GOTO errors
109)
110
111REM
112REM NOTE: This batch file requires the ComSpec environment variable to be set,
113REM typically to something like "C:\Windows\System32\cmd.exe".
114REM
115IF NOT DEFINED ComSpec (
116 ECHO The ComSpec environment variable must be defined.
117 GOTO errors
118)
119
120REM
121REM NOTE: This batch file requires the VcInstallDir environment variable to be
122REM set. Tyipcally, this means this batch file needs to be run from an
123REM MSVC command prompt.
124REM
125IF NOT DEFINED VCINSTALLDIR (
126 ECHO The VCINSTALLDIR environment variable must be defined.
127 GOTO errors
128)
129
130REM
131REM NOTE: If the list of platforms is not already set, use the default list.
132REM
133IF NOT DEFINED PLATFORMS (
134 SET PLATFORMS=x86 x86_amd64 x86_arm
135)
136
137%_VECHO% Platforms = '%PLATFORMS%'
138
139REM
mistachkin7c5dbdf2012-10-19 00:23:31 +0000140REM NOTE: If the list of configurations is not already set, use the default
141REM list.
142REM
143IF NOT DEFINED CONFIGURATIONS (
144 SET CONFIGURATIONS=Debug Retail
145)
146
147%_VECHO% Configurations = '%CONFIGURATIONS%'
148
149REM
mistachkin31856a32012-07-27 07:13:25 +0000150REM NOTE: Setup environment variables to translate between the MSVC platform
151REM names and the names to be used for the platform-specific binary
152REM directories.
153REM
mistachkin0f801702012-10-20 08:40:05 +0000154SET amd64_NAME=x64
155SET arm_NAME=ARM
156SET x64_NAME=x64
mistachkin31856a32012-07-27 07:13:25 +0000157SET x86_NAME=x86
158SET x86_amd64_NAME=x64
159SET x86_arm_NAME=ARM
mistachkin0f801702012-10-20 08:40:05 +0000160SET x86_x64_NAME=x64
mistachkin31856a32012-07-27 07:13:25 +0000161
mistachkin0f801702012-10-20 08:40:05 +0000162%_VECHO% amd64_Name = '%amd64_NAME%'
163%_VECHO% arm_Name = '%arm_NAME%'
164%_VECHO% x64_Name = '%x64_NAME%'
mistachkin31856a32012-07-27 07:13:25 +0000165%_VECHO% x86_Name = '%x86_NAME%'
166%_VECHO% x86_amd64_Name = '%x86_amd64_NAME%'
167%_VECHO% x86_arm_Name = '%x86_arm_NAME%'
mistachkin0f801702012-10-20 08:40:05 +0000168%_VECHO% x86_x64_Name = '%x86_x64_NAME%'
mistachkin31856a32012-07-27 07:13:25 +0000169
170REM
171REM NOTE: Check for the external tools needed during the build process ^(i.e.
172REM those that do not get compiled as part of the build process itself^)
173REM along the PATH.
174REM
175FOR %%T IN (gawk.exe tclsh85.exe) DO (
176 SET %%T_PATH=%%~dp$PATH:T
177)
178
179REM
mistachkin7c5dbdf2012-10-19 00:23:31 +0000180REM NOTE: The Gawk executable "gawk.exe" is required during the SQLite build
181REM process unless a pre-existing amalgamation file is used.
182REM
183IF NOT DEFINED gawk.exe_PATH (
184 ECHO The Gawk executable "gawk.exe" is required to be in the PATH.
185 GOTO errors
186)
187
188REM
189REM NOTE: The Tcl 8.5 executable "tclsh85.exe" is required during the SQLite
190REM build process unless a pre-existing amalgamation file is used.
191REM
192IF NOT DEFINED tclsh85.exe_PATH (
193 ECHO The Tcl 8.5 executable "tclsh85.exe" is required to be in the PATH.
194 GOTO errors
195)
196
197REM
mistachkin31856a32012-07-27 07:13:25 +0000198REM NOTE: Set the TOOLPATH variable to contain all the directories where the
199REM external tools were found in the search above.
200REM
201SET TOOLPATH=%gawk.exe_PATH%;%tclsh85.exe_PATH%
202
203%_VECHO% ToolPath = '%TOOLPATH%'
204
205REM
mistachkin50420542013-06-20 18:53:33 +0000206REM NOTE: Check for MSVC 2012/2013 because the Windows SDK directory handling
207REM is slightly different for those versions.
mistachkinfd0ba2a2012-07-27 08:21:45 +0000208REM
209IF "%VisualStudioVersion%" == "11.0" (
mistachkin7c5dbdf2012-10-19 00:23:31 +0000210 REM
211 REM NOTE: If the Windows SDK library path has already been set, do not set
212 REM it to something else later on.
213 REM
214 IF NOT DEFINED NSDKLIBPATH (
215 SET SET_NSDKLIBPATH=1
216 )
mistachkin50420542013-06-20 18:53:33 +0000217) ELSE IF "%VisualStudioVersion%" == "12.0" (
218 REM
219 REM NOTE: If the Windows SDK library path has already been set, do not set
220 REM it to something else later on.
221 REM
222 IF NOT DEFINED NSDKLIBPATH (
223 SET SET_NSDKLIBPATH=1
224 )
mistachkinfd0ba2a2012-07-27 08:21:45 +0000225) ELSE (
226 CALL :fn_UnsetVariable SET_NSDKLIBPATH
227)
228
229REM
mistachkin0f801702012-10-20 08:40:05 +0000230REM NOTE: Check if this is the Windows Phone SDK. If so, a different batch
231REM file is necessary to setup the build environment. Since the variable
232REM values involved here may contain parenthesis, using GOTO instead of
233REM an IF block is required.
234REM
235IF DEFINED WindowsPhoneKitDir GOTO set_vcvarsall_phone
236SET VCVARSALL=%VCINSTALLDIR%\vcvarsall.bat
237GOTO set_vcvarsall_done
238:set_vcvarsall_phone
239SET VCVARSALL=%VCINSTALLDIR%\WPSDK\WP80\vcvarsphoneall.bat
240:set_vcvarsall_done
241
242REM
mistachkin31856a32012-07-27 07:13:25 +0000243REM NOTE: This is the outer loop. There should be exactly one iteration per
244REM platform.
245REM
246FOR %%P IN (%PLATFORMS%) DO (
247 REM
248 REM NOTE: Using the MSVC platform name, lookup the simpler platform name to
249 REM be used for the name of the platform-specific binary directory via
250 REM the environment variables setup earlier.
251 REM
mistachkind744fcc2012-10-05 07:36:34 +0000252 CALL :fn_CopyVariable %%P_NAME PLATFORMNAME
mistachkin31856a32012-07-27 07:13:25 +0000253
254 REM
mistachkin293566e2013-10-31 06:39:15 +0000255 REM NOTE: This is the second loop. There should be exactly one iteration.
mistachkin31856a32012-07-27 07:13:25 +0000256 REM This loop is necessary because the PlatformName environment
257 REM variable was set above and that value is needed by some of the
258 REM commands contained in the inner loop. If these commands were
259 REM directly contained in the outer loop, the PlatformName environment
260 REM variable would be stuck with its initial empty value instead.
261 REM
262 FOR /F "tokens=2* delims==" %%D IN ('SET PLATFORMNAME') DO (
263 REM
264 REM NOTE: Attempt to clean the environment of all variables used by MSVC
265 REM and/or Visual Studio. This block may need to be updated in the
266 REM future to account for additional environment variables.
267 REM
268 CALL :fn_UnsetVariable DevEnvDir
mistachkinfd0ba2a2012-07-27 08:21:45 +0000269 CALL :fn_UnsetVariable ExtensionSdkDir
mistachkin31856a32012-07-27 07:13:25 +0000270 CALL :fn_UnsetVariable Framework35Version
271 CALL :fn_UnsetVariable FrameworkDir
272 CALL :fn_UnsetVariable FrameworkDir32
273 CALL :fn_UnsetVariable FrameworkVersion
274 CALL :fn_UnsetVariable FrameworkVersion32
mistachkinfd0ba2a2012-07-27 08:21:45 +0000275 CALL :fn_UnsetVariable FSHARPINSTALLDIR
mistachkin31856a32012-07-27 07:13:25 +0000276 CALL :fn_UnsetVariable INCLUDE
277 CALL :fn_UnsetVariable LIB
278 CALL :fn_UnsetVariable LIBPATH
279 CALL :fn_UnsetVariable Platform
280 REM CALL :fn_UnsetVariable VCINSTALLDIR
281 CALL :fn_UnsetVariable VSINSTALLDIR
mistachkin0f801702012-10-20 08:40:05 +0000282 CALL :fn_UnsetVariable WindowsPhoneKitDir
mistachkin31856a32012-07-27 07:13:25 +0000283 CALL :fn_UnsetVariable WindowsSdkDir
mistachkinfd0ba2a2012-07-27 08:21:45 +0000284 CALL :fn_UnsetVariable WindowsSdkDir_35
285 CALL :fn_UnsetVariable WindowsSdkDir_old
mistachkin31856a32012-07-27 07:13:25 +0000286
287 REM
288 REM NOTE: Reset the PATH here to the absolute bare minimum required.
289 REM
290 SET PATH=%TOOLPATH%;%SystemRoot%\System32;%SystemRoot%
291
mistachkin293566e2013-10-31 06:39:15 +0000292 REM
293 REM NOTE: This is the inner loop. There are normally two iterations, one
294 REM for each supported build configuration, e.g. Debug or Retail.
295 REM
mistachkin7c5dbdf2012-10-19 00:23:31 +0000296 FOR %%B IN (%CONFIGURATIONS%) DO (
mistachkin31856a32012-07-27 07:13:25 +0000297 REM
mistachkin0ec07442012-10-12 18:06:07 +0000298 REM NOTE: When preparing the debug build, set the DEBUG and MEMDEBUG
299 REM environment variables to be picked up by the MSVC makefile
300 REM itself.
mistachkin31856a32012-07-27 07:13:25 +0000301 REM
mistachkin0ec07442012-10-12 18:06:07 +0000302 IF /I "%%B" == "Debug" (
303 SET DEBUG=2
304 SET MEMDEBUG=1
mistachkin0b5ae722012-07-27 23:03:47 +0000305 ) ELSE (
mistachkin0ec07442012-10-12 18:06:07 +0000306 CALL :fn_UnsetVariable DEBUG
307 CALL :fn_UnsetVariable MEMDEBUG
308 )
309
310 REM
311 REM NOTE: Launch a nested command shell to perform the following steps:
312 REM
313 REM 1. Setup the MSVC environment for this platform using the
314 REM official batch file.
315 REM
316 REM 2. Make sure that no stale build output files are present.
317 REM
318 REM 3. Build the "sqlite3.dll" and "sqlite3.lib" binaries for this
319 REM platform.
320 REM
321 REM 4. Copy the "sqlite3.dll" and "sqlite3.lib" binaries for this
322 REM platform to the platform-specific directory beneath the
323 REM binary directory.
324 REM
mistachkin293566e2013-10-31 06:39:15 +0000325 REM 5. Unless prevented from doing so, copy the "sqlite3.pdb"
326 REM symbols file for this platform to the platform-specific
327 REM directory beneath the binary directory.
328 REM
mistachkin0ec07442012-10-12 18:06:07 +0000329 "%ComSpec%" /C (
mistachkin0b5ae722012-07-27 23:03:47 +0000330 REM
mistachkin0ec07442012-10-12 18:06:07 +0000331 REM NOTE: Attempt to setup the MSVC environment for this platform.
mistachkin0b5ae722012-07-27 23:03:47 +0000332 REM
mistachkin0f801702012-10-20 08:40:05 +0000333 %__ECHO3% CALL "%VCVARSALL%" %%P
mistachkin391b3642012-07-31 00:43:31 +0000334
335 IF ERRORLEVEL 1 (
mistachkin0f801702012-10-20 08:40:05 +0000336 ECHO Failed to call "%VCVARSALL%" for platform %%P.
mistachkin391b3642012-07-31 00:43:31 +0000337 GOTO errors
338 )
mistachkin0ec07442012-10-12 18:06:07 +0000339
340 REM
341 REM NOTE: If this batch file is not running in "what-if" mode, check to
342 REM be sure we were actually able to setup the MSVC environment
343 REM as current versions of their official batch file do not set
344 REM the exit code upon failure.
345 REM
mistachkin0f801702012-10-20 08:40:05 +0000346 IF NOT DEFINED __ECHO3 (
347 IF NOT DEFINED WindowsPhoneKitDir (
348 IF NOT DEFINED WindowsSdkDir (
349 ECHO Cannot build, Windows SDK not found for platform %%P.
350 GOTO errors
351 )
mistachkin0ec07442012-10-12 18:06:07 +0000352 )
353 )
354
355 REM
mistachkin293566e2013-10-31 06:39:15 +0000356 REM NOTE: When using MSVC 2012 and/or 2013, the native SDK path cannot
357 REM simply use the "lib" sub-directory beneath the location
358 REM specified in the WindowsSdkDir environment variable because
359 REM that location does not actually contain the necessary library
360 REM files for x86. This must be done for each iteration because
361 REM it relies upon the WindowsSdkDir environment variable being
362 REM set by the batch file used to setup the MSVC environment.
mistachkin0ec07442012-10-12 18:06:07 +0000363 REM
364 IF DEFINED SET_NSDKLIBPATH (
mistachkin293566e2013-10-31 06:39:15 +0000365 REM
366 REM NOTE: The Windows Phone SDK has a slightly different directory
367 REM structure and must be handled specially here.
368 REM
mistachkin0f801702012-10-20 08:40:05 +0000369 IF DEFINED WindowsPhoneKitDir (
370 CALL :fn_CopyVariable WindowsPhoneKitDir NSDKLIBPATH
371 CALL :fn_AppendVariable NSDKLIBPATH \lib\x86
372 ) ELSE IF DEFINED WindowsSdkDir (
373 CALL :fn_CopyVariable WindowsSdkDir NSDKLIBPATH
mistachkin50420542013-06-20 18:53:33 +0000374
mistachkin293566e2013-10-31 06:39:15 +0000375 REM
376 REM NOTE: The Windows 8.1 SDK has a slightly different directory
377 REM naming convention. Currently, this tool assumes that
378 REM the Windows 8.1 SDK should only be used with MSVC 2013.
379 REM
mistachkin50420542013-06-20 18:53:33 +0000380 IF "%VisualStudioVersion%" == "12.0" (
381 CALL :fn_AppendVariable NSDKLIBPATH \lib\winv6.3\um\x86
382 ) ELSE (
383 CALL :fn_AppendVariable NSDKLIBPATH \lib\win8\um\x86
384 )
mistachkin0f801702012-10-20 08:40:05 +0000385 )
mistachkin0ec07442012-10-12 18:06:07 +0000386 )
387
388 REM
389 REM NOTE: Unless prevented from doing so, invoke NMAKE with the MSVC
390 REM makefile to clean any stale build output from previous
391 REM iterations of this loop and/or previous runs of this batch
392 REM file, etc.
393 REM
394 IF NOT DEFINED NOCLEAN (
395 %__ECHO% nmake -f Makefile.msc clean
396
397 IF ERRORLEVEL 1 (
398 ECHO Failed to clean for platform %%P.
399 GOTO errors
400 )
401 ) ELSE (
402 REM
403 REM NOTE: Even when the cleaning step has been disabled, we still
404 REM need to remove the build output for the files we are
405 REM specifically wanting to build for each platform.
406 REM
mistachkin75305082013-06-07 22:12:20 +0000407 %__ECHO% DEL /Q *.lo sqlite3.dll sqlite3.lib sqlite3.pdb
mistachkin0ec07442012-10-12 18:06:07 +0000408 )
409
410 REM
411 REM NOTE: Call NMAKE with the MSVC makefile to build the "sqlite3.dll"
412 REM binary. The x86 compiler will be used to compile the native
413 REM command line tools needed during the build process itself.
414 REM Also, disable looking for and/or linking to the native Tcl
415 REM runtime library.
416 REM
417 %__ECHO% nmake -f Makefile.msc sqlite3.dll XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS%
418
419 IF ERRORLEVEL 1 (
420 ECHO Failed to build %%B "sqlite3.dll" for platform %%P.
421 GOTO errors
422 )
423
424 REM
425 REM NOTE: Copy the "sqlite3.dll" file to the appropriate directory for
426 REM the build and platform beneath the binary directory.
427 REM
428 %__ECHO% XCOPY sqlite3.dll "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
429
430 IF ERRORLEVEL 1 (
431 ECHO Failed to copy "sqlite3.dll" to "%BINARYDIRECTORY%\%%B\%%D\".
432 GOTO errors
433 )
434
435 REM
436 REM NOTE: Copy the "sqlite3.lib" file to the appropriate directory for
437 REM the build and platform beneath the binary directory.
438 REM
439 %__ECHO% XCOPY sqlite3.lib "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
440
441 IF ERRORLEVEL 1 (
442 ECHO Failed to copy "sqlite3.lib" to "%BINARYDIRECTORY%\%%B\%%D\".
443 GOTO errors
444 )
445
446 REM
447 REM NOTE: Copy the "sqlite3.pdb" file to the appropriate directory for
448 REM the build and platform beneath the binary directory unless we
449 REM are prevented from doing so.
450 REM
451 IF NOT DEFINED NOSYMBOLS (
452 %__ECHO% XCOPY sqlite3.pdb "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
453
454 IF ERRORLEVEL 1 (
455 ECHO Failed to copy "sqlite3.pdb" to "%BINARYDIRECTORY%\%%B\%%D\".
456 GOTO errors
457 )
458 )
mistachkin391b3642012-07-31 00:43:31 +0000459 )
mistachkin31856a32012-07-27 07:13:25 +0000460 )
461 )
462
463 REM
464 REM NOTE: Handle any errors generated during the nested command shell.
465 REM
466 IF ERRORLEVEL 1 (
467 GOTO errors
468 )
469)
470
471REM
472REM NOTE: Restore the saved current directory from the directory stack.
473REM
474%__ECHO2% POPD
475
476IF ERRORLEVEL 1 (
477 ECHO Could not restore directory.
478 GOTO errors
479)
480
481REM
482REM NOTE: If we get to this point, we have succeeded.
483REM
484GOTO no_errors
485
486:fn_ResetErrorLevel
487 VERIFY > NUL
488 GOTO :EOF
489
490:fn_SetErrorLevel
491 VERIFY MAYBE 2> NUL
492 GOTO :EOF
493
mistachkind744fcc2012-10-05 07:36:34 +0000494:fn_CopyVariable
mistachkin31856a32012-07-27 07:13:25 +0000495 IF NOT DEFINED %1 GOTO :EOF
496 IF "%2" == "" GOTO :EOF
mistachkinf2014962013-11-22 00:49:43 +0000497 SETLOCAL
mistachkin31856a32012-07-27 07:13:25 +0000498 SET __ECHO_CMD=ECHO %%%1%%
499 FOR /F "delims=" %%V IN ('%__ECHO_CMD%') DO (
500 SET VALUE=%%V
501 )
502 ENDLOCAL && SET %2=%VALUE%
503 GOTO :EOF
504
505:fn_UnsetVariable
506 IF NOT "%1" == "" (
507 SET %1=
508 CALL :fn_ResetErrorLevel
509 )
510 GOTO :EOF
511
mistachkinfd0ba2a2012-07-27 08:21:45 +0000512:fn_AppendVariable
513 SET __ECHO_CMD=ECHO %%%1%%
514 IF DEFINED %1 (
515 FOR /F "delims=" %%V IN ('%__ECHO_CMD%') DO (
516 SET %1=%%V%~2
517 )
518 ) ELSE (
519 SET %1=%~2
520 )
521 SET __ECHO_CMD=
522 CALL :fn_ResetErrorLevel
523 GOTO :EOF
524
mistachkin31856a32012-07-27 07:13:25 +0000525:usage
526 ECHO.
527 ECHO Usage: %~nx0 ^<binaryDirectory^>
528 ECHO.
529 GOTO errors
530
531:errors
532 CALL :fn_SetErrorLevel
533 ENDLOCAL
534 ECHO.
535 ECHO Failure, errors were encountered.
536 GOTO end_of_file
537
538:no_errors
539 CALL :fn_ResetErrorLevel
540 ENDLOCAL
541 ECHO.
542 ECHO Success, no errors were encountered.
543 GOTO end_of_file
544
545:end_of_file
546%__ECHO% EXIT /B %ERRORLEVEL%