This repository has been archived by the owner on Sep 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Compiler_Map.bat
547 lines (461 loc) · 23.9 KB
/
Compiler_Map.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
:: If incase the user double clicks this script without using proper compiling procedure, and using MS-DOS, stop
:: the script immediately!
IF "%OS%" NEQ "Windows_NT" GOTO :UnsupportedOS
REM ----
CALL :Main %1 "%~2" "%~3" %4
EXIT /B %ERRORLEVEL%
REM -----------------------------------------------------------------
REM =================================================================
REM -----------------------------------------------------------------
REM Compiler Map
REM # =============================================================================================
REM # Parameters: [{string} Type] [{string} DirectoryBuildTarget] [{string} DirectoryProjectTarget] [{string} BuildType]
REM # Documentation: This is the main route access. All operations will be drifted from this function.
REM # Parameters:
REM # ACCEPTED LIST:
REM # Make [Format the project to append to the ZIP standard as specified in the ZDoom Wiki Article]
REM # Version [Project version]
REM # =============================================================================================
:Main
REM Make sure that a function was actually passed as the first parameter; if not - opt out immediately!
REM Failure todo so could result into Unforeseen Consequences!
IF "%~1" EQU "" (
CALL :InsuccifientParameters
) ELSE (
CALL :%1 "%~2" "%~3" %4
)
EXIT /B %ERRORLEVEL%
REM # =============================================================================================
REM # Documentation: This function warns the user that this script started without any parameters and will
REM # notify the end-user that this script terminate to avoid any Unforeseen Consequences.
REM #
REM # ACHTUNG: If the Host System IS NOT Windows 2000 [NT5.0 - Windows NT] or greater, this function will
REM # be meaningless as Windows ME and early [DOS - MS-DOS] does NOT support parameter passing!
REM # ===========================================================================================
:InsuccifientParameters
ECHO OFF
REM Flush the terminal
CLS
REM Output the message
ECHO ^<!^> ERROR ^<!^>
ECHO =====================
ECHO.
ECHO.
ECHO This shell script requires Bootless Star and the Shadowmaker module!
ECHO.
REM Let the user see the message before the window is destroyed
PAUSE
REM End with error
EXIT /B 1
REM # =============================================================================================
REM # Documentation: This method will prompt the user that their OS is incompatible with this script
REM # This method will only take effect if and only if the user clicks the shell script without
REM # doing the proper compiling methods.
REM #
REM # ACHTUNG: To avoid spaghetti code, control everything from this function - including the termination
REM # ===========================================================================================
:UnsupportedOS
ECHO OFF
:: Flush the terminal
CLS
:: Output the message
ECHO ^<!^> ERROR ^<!^>
ECHO =====================
ECHO.
ECHO.
ECHO The host system is incompatible with this script! You must have a 'Windows_NT' variant in order to run this script!
ECHO Reported host version: %OS%
ECHO.
:: Let the user see the message before the window is destroyed
PAUSE
:: End with error
EXIT /B 255
REM # =============================================================================================
REM # Parameters: - Accepted; but not used -
REM # Documentation: This function specifies the projects initial version ID. This sets the Version identifier as well as ERRORLEVEL return code.
REM # =============================================================================================
:Version
SET Version=1
EXIT /B %Version%
REM # =============================================================================================
REM # Parameters: [{string} DirectoryBuildTarget] [{string} DirectoryProjectTarget]
REM # Documentation: Make the build; append only the ZIP standard as specified in the ZDoom Wiki article database.
REM # The project developers must manipulate this section to work with their project!
REM # Parameters:
REM # %1 = Directory that will hold all of the resources for the project; this _will_ be compiled with 7z!
REM # This does contain a trailing slash! [example: .\Project\Build\]
REM # %2 = Place contents outside of the resources; readme and other read-able documentation can be placed here.
REM # This does contain a trailing slash! [example: .\Project\]
REM # %3 = Build Type:
REM # 0 = Developmental Build
REM # 1 = Release Build
REM # 2 = Resource Build
REM # =============================================================================================
:Make
SET "DriversNiceTask=Creating Project Build %ProjectNameShort% [Version: %Version%]"
CALL :CompileProject_Display_IncomingTask "%DriversNiceTask%"
REM ----
IF "%3" EQU "0" CALL :Make_ProjectBuilder %~1 || (CALL :Make_Failure& EXIT /B 1)
IF "%3" EQU "1" CALL :Make_ProjectBuilder %~1 || (CALL :Make_Failure& EXIT /B 1)
IF "%3" EQU "2" CALL :Make_ResourceBuilder %~1 || (CALL :Make_Failure& EXIT /B 1)
CALL :CompileProject_DriverLogFooter "%DriversNiceTask%"
EXIT /B 0
REM # =============================================================================================
REM # Parameters: [{string} DirectoryBuildTarget] [{string} DirectoryProjectTarget]
REM # Documentation: Generate the resource archive; this is to be used with GZDoom Builder and play testing within that environment.
REM # Parameters:
REM # %1 = Directory that will hold all of the resources for the project; this _will_ be compiled with 7z!
REM # This does contain a trailing slash! [example: .\Project\Build\]
REM # %2 = Place contents outside of the resources; readme and other read-able documentation can be placed here.
REM # This does contain a trailing slash! [example: .\Project\]
REM # =============================================================================================
:Make_ResourceBuilder
REM Create the standard archive filesystem
CALL :Make_ArchiveResourceFilesystem "%~1" || EXIT /B 1
REM Copy data from the SVN Project to the local directory
CALL :Make_DuplicateResourceAssets "%~1" || EXIT /B 1
EXIT /B 0
REM # =============================================================================================
REM # Parameters: [{string} DirectoryBuildTarget] [{string} DirectoryProjectTarget]
REM # Documentation: Generate the project archive; this is to be used with play testing or to generate a release build.
REM # Parameters:
REM # %1 = Directory that will hold all of the resources for the project; this _will_ be compiled with 7z!
REM # This does contain a trailing slash! [example: .\Project\Build\]
REM # %2 = Place contents outside of the resources; readme and other read-able documentation can be placed here.
REM # This does contain a trailing slash! [example: .\Project\]
REM # =============================================================================================
:Make_ProjectBuilder
REM Create the standard archive filesystem
CALL :Make_ArchiveFilesystem "%~1" || EXIT /B 1
REM Copy data from the SVN Project to the local directory
CALL :Make_DuplicateAssets "%~1" || EXIT /B 1
REM Remove rubbish from Map directory
CALL :Make_ThrashSuperfluousMapData "%~1" || EXIT /B 1
REM IF: WYSIWYG patch alteration
EXIT /B 0
REM # =============================================================================================
REM # Documentation: This function creates the entire archive filesystem as meet with the ZDoom specifications and standards.
REM # Parameters: [{String} Project Build Path]
REM # =============================================================================================
:Make_ArchiveFilesystem
REM This variable is used to describe the drivers main purpose and present the value in the log files.
CALL :CompileProject_Display_IncomingTaskSubLevel "Creating archive filesystem"
REM ----
REM Decorate
SET "TaskCaller_CallLong=MKDIR %~1Decorate"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM Documentations
SET "TaskCaller_CallLong=MKDIR %~1Documentation"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM Sounds
SET "TaskCaller_CallLong=MKDIR %~1Sounds"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM Music
SET "TaskCaller_CallLong=MKDIR %~1Music"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM Maps
SET "TaskCaller_CallLong=MKDIR %~1Maps"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM Sprites
SET "TaskCaller_CallLong=MKDIR %~1Sprites"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM GLDefs
SET "TaskCaller_CallLong=MKDIR %~1GLDefs"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM Graphics
SET "TaskCaller_CallLong=MKDIR %~1Graphics"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM Textures
SET "TaskCaller_CallLong=MKDIR %~1Textures"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM ----
EXIT /B 0
REM # =============================================================================================
REM # Documentation: This function creates the entire resource archive filesystem as meet with the ZDoom specifications and standards.
REM # Parameters: [{String} Project Build Path]
REM # =============================================================================================
:Make_ArchiveResourceFilesystem
REM This variable is used to describe the drivers main purpose and present the value in the log files.
CALL :CompileProject_Display_IncomingTaskSubLevel "Creating resource archive filesystem"
REM ----
REM Decorate
SET "TaskCaller_CallLong=MKDIR %~1Decorate"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM Sounds
SET "TaskCaller_CallLong=MKDIR %~1Sounds"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM Music
SET "TaskCaller_CallLong=MKDIR %~1Music"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM GLDefs
SET "TaskCaller_CallLong=MKDIR %~1GLDefs"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM Sprites
SET "TaskCaller_CallLong=MKDIR %~1Sprites"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM Graphics
SET "TaskCaller_CallLong=MKDIR %~1Graphics"
CALL :CompileProject_TaskOperation || EXIT /B 1
REM ----
EXIT /B 0
REM # =============================================================================================
REM # Documentation: This function will duplicate the data from the SVN project into the ZDoom Archive filesystem standards.
REM # Parameters: [{String} Project Build Path]
REM # =============================================================================================
:Make_DuplicateAssets
REM This variable is used to describe the drivers main purpose and present the value in the log files.
CALL :CompileProject_Display_IncomingTaskSubLevel "Duplicate the data from local host repo into the local directory"
REM ----
REM Duplicate the following:
REM Documentations
REM Because we need recursive; use XCopy to duplicate subdirectories.
SET TaskCaller_CallLong=XCOPY %XCopyArg% /E "%UserConfig.DirProjectWorkingCopy%\Documents\*" "%~1Documentation\"
CALL :CompileProject_TaskOperation
REM Textures
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Textures\*.*" "%~1Textures\"
CALL :CompileProject_TaskOperation
REM Lumps
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Lumps\*.*" "%~1"
CALL :CompileProject_TaskOperation
REM Maps
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Maps\*.*" "%~1Maps\"
CALL :CompileProject_TaskOperation
REM GLDefs
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\GLDefs\GLDefs.txt*" "%~1"
CALL :CompileProject_TaskOperation
REM ----
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\GLDefs\Subsets\*.*" "%~1GLDefs\"
CALL :CompileProject_TaskOperation
REM Decorate
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Decorate\DECORATE.txt*" "%~1"
CALL :CompileProject_TaskOperation
REM ----
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Decorate\Effects\*.*" "%~1Decorate\"
CALL :CompileProject_TaskOperation
REM Sprites
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Sprites\BreakableGlass\*.*" "%~1Sprites\"
CALL :CompileProject_TaskOperation
REM ----
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Sprites\Fog\*.*" "%~1Sprites\"
CALL :CompileProject_TaskOperation
REM ----
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Sprites\Rain\*.*" "%~1Sprites\"
CALL :CompileProject_TaskOperation
REM ----
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Sprites\LightTower\*.*" "%~1Sprites\"
CALL :CompileProject_TaskOperation
REM Graphics
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Graphics\*.*" "%~1Graphics\"
CALL :CompileProject_TaskOperation
REM Sounds
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Sounds\World\*.*" "%~1Sounds\"
CALL :CompileProject_TaskOperation
REM ----
REM Music
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Music\*.*" "%~1Music\"
CALL :CompileProject_TaskOperation
REM ----
EXIT /B 0
REM # =============================================================================================
REM # Documentation: This function will duplicate the data from the SVN project into the ZDoom Archive filesystem standards.
REM # This function is explicitly for the resource archive.
REM # Parameters: [{String} Project Build Path]
REM # =============================================================================================
:Make_DuplicateResourceAssets
REM This variable is used to describe the drivers main purpose and present the value in the log files.
CALL :CompileProject_Display_IncomingTaskSubLevel "Duplicate the data from local host repo into the local directory"
REM ----
REM Duplicate the following:
REM Lumps
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Lumps\*.*" "%~1"
CALL :CompileProject_TaskOperation
REM GLDefs
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\GLDefs\GLDefs.txt*" "%~1"
CALL :CompileProject_TaskOperation
REM ----
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\GLDefs\Subsets\*.*" "%~1GLDefs\"
CALL :CompileProject_TaskOperation
REM Decorate
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Decorate\DECORATE.txt*" "%~1"
CALL :CompileProject_TaskOperation
REM ----
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Decorate\Effects\*.*" "%~1Decorate\"
CALL :CompileProject_TaskOperation
REM Sprites
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Sprites\BreakableGlass\*.*" "%~1Sprites\"
CALL :CompileProject_TaskOperation
REM ----
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Sprites\Fog\*.*" "%~1Sprites\"
CALL :CompileProject_TaskOperation
REM ----
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Sprites\Rain\*.*" "%~1Sprites\"
CALL :CompileProject_TaskOperation
REM ----
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Sprites\LightTower\*.*" "%~1Sprites\"
CALL :CompileProject_TaskOperation
REM Graphics
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Graphics\*.*" "%~1Graphics\"
CALL :CompileProject_TaskOperation
REM Sounds
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Sounds\World\*.*" "%~1Sounds\"
CALL :CompileProject_TaskOperation
REM Music
SET TaskCaller_CallLong=COPY %CopyIntCMDArg% "%UserConfig.DirProjectWorkingCopy%\Music\*.*" "%~1Music\"
CALL :CompileProject_TaskOperation
REM ----
REM ----
EXIT /B 0
REM # =============================================================================================
REM # Documentation: This function will only output a general error message on the screen - and log.
REM # =============================================================================================
:Make_Failure
REM Display that an error 'happened'; the user can resort to the log file for help.
CALL :CompileProject_Display_IncomingTaskSubLevelMSG "!CRIT_ERR!: Failed to build project! Check log for details"
GOTO :EOF
REM # =============================================================================================
REM # Documentation: This function will expunge superfluous data that is in the Maps directory. Such data
REM # can be: (GZ)Doom Builder Wad Backups and (GZ)Doom Builder DBS files
REM # Parameters: [{String} Project Build Path]
REM # =============================================================================================
:Make_ThrashSuperfluousMapData
REM This variable is used to describe the drivers main purpose and present the value in the log files.
CALL :CompileProject_Display_IncomingTaskSubLevel "Thrashing the superfluous data from the Maps Directory"
REM ----
REM Thrash: DBS files [DB2 configuration for the individual map\wad]
SET TaskCaller_CallLong=DEL /Q "%~1Maps\*.dbs" || EXIT /B 1
CALL :CompileProject_TaskOperation
REM Thrash: Wad Backups
SET TaskCaller_CallLong=DEL /Q "%~1Maps\*.wad.backup*" || EXIT /B 1
CALL :CompileProject_TaskOperation
REM Thrash: SLADE WAD Backups
SET TaskCaller_CallLong=DEL /Q "%~1Maps\*.wad.bak*" || EXIT /B 1
CALL :CompileProject_TaskOperation
REM =========================================================
EXIT /B 0
REM Do not touch
REM -----------------------------------------------------------------
REM =================================================================
REM -----------------------------------------------------------------
REM General Program Use
REM # =============================================================================================
REM # Documentation: This function will help keep the activity messages in a cleaner standard.
REM # Parameters:
REM # [string] TaskName
REM # =============================================================================================
:CompileProject_Display_IncomingTask
IF %ToggleLog% EQU True CALL :CompileProject_Display_IncomingTaskLog "%~1"
ECHO %~1. . .
GOTO :EOF
REM # =============================================================================================
REM # Documentation: This function will help keep the activity messages in a cleaner standard.
REM # Parameters:
REM # [string] TaskName
REM # =============================================================================================
:CompileProject_Display_IncomingTaskSubLevel
IF %ToggleLog% EQU True CALL :CompileProject_Display_IncomingTaskLog "%~1"
ECHO %~1. . .
GOTO :EOF
REM # =============================================================================================
REM # Documentation: This function will help keep the activity messages in a cleaner standard. Messages passed through this function are only treated as standard messages and not fully procedures.
REM # Parameters:
REM # [string] TaskName
REM # =============================================================================================
:CompileProject_Display_IncomingTaskSubLevelMSG
(ECHO %~1) >> %STDOUT%
ECHO %~1
GOTO :EOF
REM # =============================================================================================
REM # Documentation: This function will help keep the log activity messages in a cleaner standard.
REM # Parameters:
REM # [string] TaskName
REM # =============================================================================================
:CompileProject_Display_IncomingTaskLog
(ECHO Performing Task:) >> %STDOUT%
(ECHO %~1) >> %STDOUT%
(ECHO.) >> %STDOUT%
(ECHO.) >> %STDOUT%
GOTO :EOF
REM # =============================================================================================
REM # Documentation: Perform the operation that is requested properly.
REM # NOTE: This depends on the global variable 'TaskCaller_CallLong'!
REM # =============================================================================================
:CompileProject_TaskOperation
REM Run the operation that is packaged.
%TaskCaller_CallLong%>> "%STDOUT%" 2>&1
SET ExitCode=%ERRORLEVEL%
REM If we're logging, call the log-footer
IF %ToggleLog% EQU True CALL :CompileProject_LogFooter
GOTO :EOF
REM # =============================================================================================
REM # Documentation: Always print this to log files after executing a task or a program.
REM # =============================================================================================
:CompileProject_LogFooter
(ECHO.)>> "%STDOUT%"
(ECHO.)>> "%STDOUT%"
(ECHO.)>> "%STDOUT%"
(ECHO.)>> "%STDOUT%"
(ECHO Program Called:)>> "%STDOUT%"
(ECHO %TaskCaller_NiceProgramName%)>> "%STDOUT%"
(ECHO Task Performed:)>> "%STDOUT%"
(ECHO %TaskCaller_CallLong%)>> "%STDOUT%"
(ECHO Exit Code: %ExitCode%)>> "%STDOUT%"
(ECHO %Separator%)>> "%STDOUT%"
(ECHO Time: %Time% - Date: %Date%)>> "%STDOUT%"
(ECHO Project Name: %ProjectName% - Module Version: %ProjectVersion%)>> "%STDOUT%"
(ECHO %SeparatorLong%)>> "%STDOUT%"
(ECHO %SeparatorLong%)>> "%STDOUT%"
(ECHO.)>> "%STDOUT%"
(ECHO.)>> "%STDOUT%"
GOTO :EOF
REM # =============================================================================================
REM # Documentation: Always print this to logfiles after a driver finished executing.
REM # Parameters: [{String} DriverMainProcess]
REM # =============================================================================================
:CompileProject_DriverLogFooter
REM ----
REM If incase the drivers call this function, opt out when the program is not logging.
IF %ToggleLog% EQU False (GOTO :EOF)
REM ----
(ECHO.)>> "%STDOUT%"
(ECHO.)>> "%STDOUT%"
(ECHO.)>> "%STDOUT%"
(ECHO.)>> "%STDOUT%"
(ECHO %SeparatorSmall%)>> "%STDOUT%"
(ECHO %Separator%)>> "%STDOUT%"
(ECHO Finished Executing Task:)>> "%STDOUT%"
(ECHO %~1)>> %STDOUT%
(ECHO Time: %Time% - Date: %Date%)>> "%STDOUT%"
(ECHO Project Name: %ProjectName% - Module Version: %ProjectVersion%)>> "%STDOUT%"
(ECHO %SeparatorLong%)>> "%STDOUT%"
(ECHO %SeparatorLong%)>> "%STDOUT%"
(ECHO %Separator%)>> "%STDOUT%"
(ECHO %Separator%)>> "%STDOUT%"
(ECHO %SeparatorLong%)>> "%STDOUT%"
(ECHO %SeparatorLong%)>> "%STDOUT%"
(ECHO.)>> "%STDOUT%"
(ECHO.)>> "%STDOUT%"
GOTO :EOF
REM # =============================================================================================
REM # Documentation: For programs that uses reverse of the standard return code, this function will reverse them back to normal so the program will understand how to to properly treat the return value.
REM # =============================================================================================
:CompileProject_FlipBit_Common
IF %1 EQU 1 (
REM 1 = Successful Operation
EXIT /B 0
) ELSE (
REM Failure or something else
EXIT /B 1
)
REM =====================================================================
REM Global Functions
REM ----------------------------
REM These functions listed below is used to reduce redundancy within the code.
REM =====================================================================
REM # =============================================================================================
REM # Documentation: This function captures the user's input from the keyboard. Added this into this functionality if incase some projects need this -- though it shouldn't only be used when absolutely necessary! User interaction should be an absolute minimum during the compiling phase!
REM # =============================================================================================
:UserInput
ECHO.
ECHO %SeparatorSmall%
SET /P STDIN=^>^>^>^>
GOTO :EOF