-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathrun.cmd
More file actions
745 lines (501 loc) · 15.2 KB
/
run.cmd
File metadata and controls
745 lines (501 loc) · 15.2 KB
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
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
:: Last updated: Saturday 16th August, 2025 @ 19:00
@echo off
setlocal EnableExtensions
title Krypton Toolkit Build System
set "VS_VERSION="
set "VS_SCRIPTS_DIR="
goto selectvsversion
:: ===================================================================================================
:selectvsversion
cls
@echo Welcome to the Krypton Toolkit Build system, version: 3.0.
@echo Please select the Visual Studio toolset to target.
echo:
@echo ==============================================================================================
echo:
echo 1. Visual Studio 2022 (Scripts\VS2022)
echo 2. Visual Studio 2026 (Scripts\Current)
echo 3. End
echo:
set /p answer="Enter number (1 - 3): "
if "%answer%"=="1" (goto usevs2022)
if "%answer%"=="2" (goto usevscurrent)
if "%answer%"=="3" (goto exitbuildsystem)
@echo Invalid input, please try again.
pause
goto selectvsversion
:usevs2022
call :configurevsversion VS2022
if errorlevel 1 (goto selectvsversion)
goto mainmenu
:usevscurrent
call :configurevsversion Current
if errorlevel 1 (goto selectvsversion)
goto mainmenu
:configurevsversion
set "VS_VERSION=%~1"
set "VS_SCRIPTS_DIR=Scripts\%~1"
if not exist "%VS_SCRIPTS_DIR%" (
echo.
echo ERROR: Could not find "%VS_SCRIPTS_DIR%".
echo Please ensure the scripts are available before continuing.
echo.
pause
set "VS_VERSION="
set "VS_SCRIPTS_DIR="
exit /b 1
)
echo.
echo Using %VS_VERSION% scripts located at "%VS_SCRIPTS_DIR%".
echo.
exit /b 0
:: ===================================================================================================
:mainmenu
cls
if "%VS_SCRIPTS_DIR%"=="" (goto selectvsversion)
echo Current Visual Studio target: %VS_VERSION%
echo Script directory..........: %VS_SCRIPTS_DIR%
echo:
echo 1. Clean project
echo 2. Build Krypton Toolkit
echo 3. Create NuGet packages
echo 4. Build and Pack Toolkit
echo 5. Debug project
echo 6. NuGet Tools
echo 7. Create Archives (ZIP/TAR)
echo 8. Change Visual Studio target
echo 9. End
echo:
set /p answer="Enter number (1 - 9): "
if "%answer%"=="1" (goto cleanproject)
if "%answer%"=="2" (goto buildproject)
if "%answer%"=="3" (goto createnugetpackages)
if "%answer%"=="4" (goto buildandpacktoolkit)
if "%answer%"=="5" (goto debugproject)
if "%answer%"=="6" (goto nugettools)
if "%answer%"=="7" (goto createarchives)
if "%answer%"=="8" (goto selectvsversion)
if "%answer%"=="9" (goto exitbuildsystem)
@echo Invalid input, please try again.
pause
goto mainmenu
:buildmenu
cls
echo 1. Build nightly version
echo a. Rebuild project
echo 2. Build canary version
echo 3. Build stable version
echo 4. Build long term stable version (LTS)
echo 5. Go back to main menu
echo:
set /p answer="Enter number or letter (1 - 5, a - *): "
if %answer%==1 (goto buildnightly)
if %answer%==a (goto rebuildproject)
if %answer%==2 (goto buildcanary)
if %answer%==3 (goto buildstable)
if %answer%==4 (goto buildlts)
if %answer%==5 (goto mainmenu)
@echo Invalid input, please try again.
pause
goto buildmenu
:packmenu
cls
echo 1. Pack nightly version
echo 2. Pack canary version
echo 3. Pack stable version
echo 4. Pack long term stable version (LTS)
echo 5. Go back to main menu
echo:
set /p answer="Enter number (1 - 5): "
if %answer%==1 (goto packnightly)
if %answer%==2 (goto packcanary)
if %answer%==3 (goto packstable)
if %answer%==4 (goto packlts)
if %answer%==5 (goto mainmenu)
@echo Invalid input, please try again.
pause
goto packmenu
:debugmenu
cls
echo 1. Debug
echo 2. Go back to main mainmenu
echo:
set /p answer="Enter number (1 - 2): "
if %answer%==1 (goto debug)
if %answer%==2 (goto mainmenu)
@echo Invalid input, please try again.
pause
goto debugmenu
:buildandpacktoolkitmenu
cls
echo 1. Build and pack nightly
echo 2. Build and pack canary
echo 3. Build and pack stable
echo 4. Build and pack long term stable (LTS)
echo 5. Go to main mainmenu
echo:
set /p answer="Enter number (1 - 5): "
if %answer%==1 (goto buildandpacknightly)
if %answer%==2 (goto buildandpackcanary)
if %answer%==3 (goto buildandpackstable)
if %answer%==4 (goto buildandpacklts)
if %answer%==5 (goto mainmenu)
@echo Invalid input, please try again.
pause
goto buildandpacktoolkitmenu
:miscellaneoustasksmenu
cls
echo 1. Install prerequisites
echo 2. Update prerequisites
echo 3. Go to main menu
echo:
set /p answer="Enter number (1 - 3): "
if %answer%==1 (goto installprerequisites)
if %answer%==2 (goto updateprerequisites)
if %answer%==3 (goto mainmenu)
@echo Invalid input, please try again.
pause
goto miscellaneoustasksmenu
:: ===================================================================================================
:clearscreen
cls
:hold
pause
:cleanproject
cls
echo Deleting the 'Bin' folder
rd /s /q "Bin"
echo Deleted the 'Bin' folder
echo Deleting the 'Krypton.Docking\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Docking\obj"
echo Deleted the 'Krypton.Docking\obj' folder
echo Deleting the 'Krypton.Navigator\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Navigator\obj"
echo Deleted the 'Krypton.Navigator\obj' folder
echo Deleting the 'Krypton.Ribbon\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Ribbon\obj"
echo Deleted the 'Krypton.Ribbon\obj' folder
echo Deleting the 'Krypton.Toolkit\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Toolkit\obj"
echo Deleted the 'Krypton.Toolkit\obj' folder
echo Deleting the 'Krypton.Workspace\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Workspace\obj"
echo Deleted the 'Krypton.Workspace\obj' folder
echo Deleting the 'Logs' folder
del /f "Logs"
pause
goto mainmenu
:clearproject
echo Deleting the 'Bin' folder
rd /s /q "Bin"
echo Deleted the 'Bin' folder
echo Deleting the 'Krypton.Docking\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Docking\obj"
echo Deleted the 'Krypton.Docking\obj' folder
echo Deleting the 'Krypton.Navigator\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Navigator\obj"
echo Deleted the 'Krypton.Navigator\obj' folder
echo Deleting the 'Krypton.Ribbon\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Ribbon\obj"
echo Deleted the 'Krypton.Ribbon\obj' folder
echo Deleting the 'Krypton.Toolkit\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Toolkit\obj"
echo Deleted the 'Krypton.Toolkit\obj' folder
echo Deleting the 'Krypton.Workspace\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Workspace\obj"
echo Deleted the 'Krypton.Workspace\obj' folder
echo Deleting the 'Logs' folder
del /f "Logs"
:: ===================================================================================================
:cleanproject
goto cleanproject
:buildproject
goto buildmenu
:createnugetpackages
goto packmenu
:debugproject
goto debugmenu
:nugettools
goto createarchives
:createarchives
cls
echo 1. Create ZIP archive (Nightly)
echo 2. Create TAR archive (Nightly)
echo 3. Create both ZIP and TAR archives (Nightly)
echo 4. Create ZIP archive (Canary)
echo 5. Create TAR archive (Canary)
echo 6. Create both ZIP and TAR archives (Canary)
echo 7. Create ZIP archive (Stable)
echo 8. Create TAR archive (Stable)
echo 9. Create both ZIP and TAR archives (Stable)
echo 10. Update NuGet tools
echo 11. Go back to main menu
echo:
set /p answer="Enter number (1 - 11): "
if %answer%==1 (goto createzipnightly)
if %answer%==2 (goto createtarnightly)
if %answer%==3 (goto createallarchivesnightly)
if %answer%==4 (goto createzipcanary)
if %answer%==5 (goto createtarcanary)
if %answer%==6 (goto createallarchivescanary)
if %answer%==7 (goto createzipstable)
if %answer%==8 (goto createtarstable)
if %answer%==9 (goto createallarchivesstable)
if %answer%==10 (goto updatenuget)
if %answer%==11 (goto mainmenu)
@echo Invalid input, please try again.
pause
goto createarchives
:: ===================================================================================================
:updatenuget
cls
call "%VS_SCRIPTS_DIR%\update-nuget.cmd"
pause
goto mainmenu
:: ===================================================================================================
:createzipnightly
cls
call "%VS_SCRIPTS_DIR%\build-nightly.cmd" CreateNightlyZip
pause
goto mainmenu
:createtarnightly
cls
call "%VS_SCRIPTS_DIR%\build-nightly.cmd" CreateNightlyTar
pause
goto mainmenu
:createallarchivesnightly
cls
call "%VS_SCRIPTS_DIR%\build-nightly.cmd" CreateAllArchives
pause
goto mainmenu
:: ===================================================================================================
:createzipcanary
cls
call "%VS_SCRIPTS_DIR%\build-canary.cmd" CreateCanaryZip
pause
goto mainmenu
:createtarcanary
cls
call "%VS_SCRIPTS_DIR%\build-canary.cmd" CreateCanaryTar
pause
goto mainmenu
:createallarchivescanary
cls
call "%VS_SCRIPTS_DIR%\build-canary.cmd" CreateAllCanaryArchives
pause
goto mainmenu
:: ===================================================================================================
:createzipstable
cls
call "%VS_SCRIPTS_DIR%\build-stable.cmd" CreateReleaseZip
pause
goto mainmenu
:createtarstable
cls
call "%VS_SCRIPTS_DIR%\build-stable.cmd" CreateReleaseTar
pause
goto mainmenu
:createallarchivesstable
cls
call "%VS_SCRIPTS_DIR%\build-stable.cmd" CreateAllReleaseArchives
pause
goto mainmenu
:: ===================================================================================================
:buildandpacktoolkit
goto buildandpacktoolkitmenu
:miscellaneoustasks
goto miscellaneoustasksmenu
:exitbuildsystem
@echo Exiting the build system, have a good day. Bye!
pause
exit
:: ===================================================================================================
:buildnightly
cls
call "%VS_SCRIPTS_DIR%\build-nightly.cmd"
goto buildmenu
:buildcanary
cls
call "%VS_SCRIPTS_DIR%\build-canary.cmd"
goto buildmenu
:buildinstaller
cls
call "%VS_SCRIPTS_DIR%\build-installer.cmd"
cls
goto buildmenu
:buildstable
cls
call "%VS_SCRIPTS_DIR%\build-stable.cmd"
goto buildmenu
:buildlts
cls
call "%VS_SCRIPTS_DIR%\build-lts.cmd"
goto buildmenu
:: ===================================================================================================
:packnightly
cls
call "%VS_SCRIPTS_DIR%\build-nightly.cmd" Pack
goto packmenu
:packcanary
cls
call "%VS_SCRIPTS_DIR%\build-canary.cmd" Pack
goto packmenu
:packinstaller
cls
call "%VS_SCRIPTS_DIR%\build-installer.cmd" Pack
goto packmenu
:packstable
cls
echo 1. Produce 'Lite' stable packages
echo 2. Produce 'full' stable packages
echo 3. Produce 'full/lite' stable packages
echo 4. Go back to main menu
echo:
set /p answer="Enter number (1 - 4): "
if %answer%==1 (goto packstablelite)
if %answer%==2 (goto packstablefull)
if %answer%==3 (goto packstableboth)
if %answer%==4 (goto mainmenu)
@echo Invalid input, please try again.
pause
goto packstable
:packltsmenu
cls
echo 1. Produce 'Lite' LTS packages
echo 2. Produce 'full' LTS packages
echo 3. Produce 'full/lite' LTS packages
echo 4. Go back to main menu
echo:
set /p answer="Enter number (1 - 4): "
if %answer%==1 (goto packltslite)
if %answer%==2 (goto packltsfull)
if %answer%==3 (goto packltsboth)
if %answer%==4 (goto mainmenu)
@echo Invalid input, please try again.
pause
goto packltsmenu
:: ===================================================================================================
:packstablelite
cls
call "%VS_SCRIPTS_DIR%\build-stable.cmd" PackLite
goto packmenu
:packstablefull
cls
call "%VS_SCRIPTS_DIR%\build-stable.cmd" PackAll
goto packmenu
:packstableboth
cls
call "%VS_SCRIPTS_DIR%\build-stable.cmd" Pack
goto packmenu
:packltslite
cls
call "%VS_SCRIPTS_DIR%\build-lts.cmd" PackLite
goto packltsmenu
:packltsfull
cls
call "%VS_SCRIPTS_DIR%\build-lts.cmd" PackAll
goto packltsmenu
:packltsboth
cls
call "%VS_SCRIPTS_DIR%\build-lts.cmd" Pack
goto packltsmenu
:: ===================================================================================================
:debug
cls
echo Deleting the 'Bin' folder
rd /s /q "Bin"
echo Deleted the 'Bin' folder
echo Deleting the 'Krypton.Docking\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Docking\obj"
echo Deleted the 'Krypton.Docking\obj' folder
echo Deleting the 'Krypton.Navigator\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Navigator\obj"
echo Deleted the 'Krypton.Navigator\obj' folder
echo Deleting the 'Krypton.Ribbon\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Ribbon\obj"
echo Deleted the 'Krypton.Ribbon\obj' folder
echo Deleting the 'Krypton.Toolkit\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Toolkit\obj"
echo Deleted the 'Krypton.Toolkit\obj' folder
echo Deleting the 'Krypton.Workspace\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Workspace\obj"
echo Deleted the 'Krypton.Workspace\obj' folder
echo Deleting the 'build.log' file
del /f build.log
echo Deleted the 'build.log' file
cls
call "%VS_SCRIPTS_DIR%\build-nightly.cmd"
:: ===================================================================================================
:nugettools
cls
call "%VS_SCRIPTS_DIR%\update-nuget.cmd"
:buildandcreatenugetpackages
cls
echo 1. Build nightly packages
echo 2. Build canary packages
echo 3. Build stable packages
echo 4. Build stable (lite) packages
echo 5. Build LTS packages
echo 6. Go back to main menu
echo:
set /p answer="Enter number (1 - 6): "
if %answer%==1 (goto buildnightlypackages)
if %answer%==2 (goto buildcanarypackages)
if %answer%==3 (goto buildstablepackages)
if %answer%==4 (goto buildstablelitepackages)
if %answer%==5 (goto buildltspackages)
if %answer%==6 (goto mainmenu)
@echo Invalid input, please try again.
pause
:: ===================================================================================================
:buildnightlypackages
cls
echo Step 1: Clean
echo Deleting the 'Bin' folder
rd /s /q "Bin"
echo Deleted the 'Bin' folder
echo Deleting the 'Krypton.Docking\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Docking\obj"
echo Deleted the 'Krypton.Docking\obj' folder
echo Deleting the 'Krypton.Navigator\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Navigator\obj"
echo Deleted the 'Krypton.Navigator\obj' folder
echo Deleting the 'Krypton.Ribbon\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Ribbon\obj"
echo Deleted the 'Krypton.Ribbon\obj' folder
echo Deleting the 'Krypton.Toolkit\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Toolkit\obj"
echo Deleted the 'Krypton.Toolkit\obj' folder
echo Deleting the 'Krypton.Workspace\obj' folder
rd /s /q "Source\Krypton Components\Krypton.Workspace\obj"
echo Deleted the 'Krypton.Workspace\obj' folder
echo Deleting the 'build.log' file
del /f build.log
echo Deleted the 'build.log' file
cls
echo Step 2: Build
call "%VS_SCRIPTS_DIR%\build-nightly-custom.cmd"
pause
cls
echo Step 3: Pack
call "%VS_SCRIPTS_DIR%\build-nightly-custom.cmd" Pack
pause
:: ===================================================================================================
:rebuildproject
cls
call "%VS_SCRIPTS_DIR%\rebuild-build-nightly.cmd"
:: ===================================================================================================
:buildandpacknightly
cls
:: goto clearproject
:: build-nightly.cmd
call "%VS_SCRIPTS_DIR%\build-nightly.cmd" Pack
:buildandpackcanary
cls
call "%VS_SCRIPTS_DIR%\build-canary.cmd" Pack
:buildandpackstable
cls
call "%VS_SCRIPTS_DIR%\build-stable.cmd" Pack
:: ===================================================================================================
:clearlogfiles
:clearbinaries