/
NAM Installer Script_Monolith.nsi
7179 lines (6714 loc) · 349 KB
/
NAM Installer Script_Monolith.nsi
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
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* !_ Network Addon Mod Installer _!
*
* !_ The following is essential information for adding new options to the installer. _!
*
* In former versions of this installer, information for options needed to be added only
* under Sections and the section description. Now there are many more places where
* information about options must be added; not all of them are required for all options.
* Detailed descriptions of these routines are included in a comment section preceding
* them; these comment sections start with a red text line to make them easier to find.
* (This assumes that you are using the NSIS UDL written by z for Notepad++.)
*
* The following places always require new entries when adding new options.
* See each place individually for comments.
*
* 1. Sections
* 2. ConfirmText()
* 3. Section descriptions
* 4. GetOldComponents()
*
* The following routine requires new entries in the first part of the main table whenever
* adding transit stations or textures that have previously been available outside the NAM.
*
* 5. DeleteDuplicates()
*
* The following routine requires entries whenever radio button options are added.
*
* 6. .onSelChange() (top part)
*
* The following routine requires entries whenever bridges or transit stations are added
* that belong to networks that are optional.
*
* 7. .onSelChange() (bottom part)
*
* The list of station overrides needs to be extended whenever new overridden stations are added.
*
* 8. StationOverride section macros at end of main sections
*/
;Script originally generated by the HM NIS Edit Script Wizard.
; This defines compression method
SetCompressor lzma
;SetCompress off
RequestExecutionLevel highest
MiscButtonText "" "" "&Cancel"
BrandingText "Network Addon Mod Setup"
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Network Addon Mod"
!define PRODUCT_VERSION "36"
!define PRODUCT_PUBLISHER "The NAM Team"
!define PRODUCT_WEB_SITE "http://www.sc4devotion.com"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKCU"
;--------------------------------
!include "UMUI.nsh"
!include "Sections.nsh"
!include "FileFunc.nsh"
!include "StrFunc.nsh"
!include "defines.nsh" ;For Dialogs plugin
!include "WinVer.nsh"
Var AdminAbort
Var AlreadyInstalled
Var ButtonGroup1
Var ButtonGroup2
Var ButtonGroup3
Var ButtonGroup4
Var ButtonGroup5
Var ButtonGroup6
Var ButtonGroup7
Var ButtonGroup8
Var ButtonGroup9
Var ButtonGroup10
Var ButtonGroup11
Var ButtonGroup12
Var ButtonGroup13
Var CalledNWMCore
Var CalledRHWCore
Var CalledSAMCore
Var Cleanitol
Var CleanitolDir
Var CompilerDir
Var ConfElevatedRoad
Var ConfElRail
Var ConfElRailOverRoad
Var ConfGLR
Var ConfMonorail
Var ConfMultiPurpose
Var ConfRail
Var ConfStationOverride
Var ConfTramInAvenue
Var ConfTramInRoad
Var ConfTramInStreet
Var ConfTransitions
Var DirectoryWarning
Var ElRailAlt
Var Eseries
Var InstalledBTM
Var InstalledDoubleHeightElRail
Var InstalledDoubleHeightMonorail
Var InstalledElevatedRoad
Var InstalledElRailOverAvenue
Var InstalledElRailOverRoad
Var InstalledGLR
Var InstalledGoltzschViaduct
Var InstalledHSR
Var InstalledNWM
Var InstalledRailTexture
Var InstalledRHW
Var InstalledRoyalAlbert
Var InstalledRRW
Var InstalledSAM
Var InstalledSAMBridges
Var InstalledSTR
Var InstalledTramInAvenue
Var InstalledTramInRoad
Var InstalledTramInStreet
Var InstalledViaductRail
Var KeepOldSimulator
Var CustomizeSimulator
Var bRight
Var LanguageKnown
Var LanguageReminder
Var LastLoadDir
Var Memory
Var MonolithicNAM
Var NAMAuxDir
Var NAMOldVersion
Var NewNAM
Var OldInstallDir
Var OSLang
Var ParentNode
Var PersistentAutomata
Var RHWNR
Var SavedElRailOverAvenue
Var SavedElevatedRoad
Var SavedGLR
Var SavedHSR
Var SavedNWM
Var SavedRHW1
Var SavedRHW2
Var SavedSAM
Var SC4Docs
Var SC4Exec
Var SC4Lang
Var SC4InstallDir
Var SelectCount
Var Sseries
Var WindowsArchitecture
Var Wine
Var WriteController
Var z___NAM
;Initializations
!insertmacro DirState
!insertmacro Locate
${StrStr} ;This makes no sense at all. But it's necessary...
${StrLoc}
; Add splash screen
!define UMUI_LEFTIMAGE_BMP "NAM36Sidebar.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP "NAM.bmp" ; the logo on the left of the first installer screen - 164x314 pixels by default
!define MUI_WELCOMEPAGE_TITLE_3LINES ; default is 2 lines, but 3 might be better if you have a long title
!define MUI_FINISHPAGE_TITLE_3LINES
!define MUI_WELCOMEPAGE_TEXT "This program allows you to install $(^NameDA) on your computer.\r\n\nIt is strongly recommended that before proceeding, you ensure that SimCity 4 and its related tools are not running.\r\n\nIf you do not wish to install $(^NameDA), click 'Cancel' now; otherwise click 'Next' to continue."
!define MUI_COMPONENTSPAGE_TEXT_COMPLIST "Optionally modify any of the$\r$\ncomponents in this installation type:"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "NAM logo.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
;!define MUI_HEADERIMAGE
;!define MUI_HEADERIMAGE_BITMAP "NAM_logo.bmp" ; the logo in the top right corner of the other installer screens - 150x57 pixels by default
;!define MUI_HEADERIMAGE_RIGHT
!define MUI_UI_COMPONENTSPAGE_SMALLDESC "UltraModern_smalldesc.exe"
!define MUI_COMPONENTSPAGE_SMALLDESC
; Language Selection Dialog Settings
!define UMUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define UMUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define UMUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
; Welcome page
!define MUI_PAGE_HEADER_TEXT "$(^NameDA) Installer"
!insertmacro MUI_PAGE_WELCOME
; License page
;!define MUI_LICENSEPAGE_RADIOBUTTONS
!insertmacro MUI_PAGE_LICENSE "license_english.txt" ; a simple TXT file, keep it together with the BMP logos in the same folder where this installer script is located
!define UMUI_USE_INSTALLOPTIONSEX
!define UMUI_INFORMATIONPAGE_USE_RICHTEXTFORMAT
!define UMUI_INFORMATIONPAGE_TEXT "Important information concerning the installation of $(^NameDA)"
!insertmacro UMUI_PAGE_INFORMATION "Information.rtf"
!define UMUI_MAINTENANCEPAGE_MODIFY
!define UMUI_MAINTENANCEPAGE_REPAIR
!define UMUI_MAINTENANCEPAGE_REMOVE
!define UMUI_MAINTENANCEPAGE_CONTINUE_SETUP
;!insertmacro UMUI_PAGE_MAINTENANCE
!define UMUI_SETUPTYPEPAGE_TEXT "Please select a setup type. If you want want to choose individual components, or select options that override standard SimCity 4 features, please select the Custom Installation."
!define UMUI_SETUPTYPEPAGE_MINIMAL_TITLE "&Traffic Simulator and Maxis Fixes Only"
!define UMUI_SETUPTYPEPAGE_MINIMAL_TEXT "The NAM traffic simulator will be installed, along with the Traffic Simulator Configuration Tool, the NAM Traffic Data Views, and the standard version of the NAM automata controller. None of the NAM networks will be installed."
!define UMUI_SETUPTYPEPAGE_MINIMAL "Traffic Simulator and Maxis Fixes Only"
!define UMUI_SETUPTYPEPAGE_STANDARD_TITLE "N&etworks and Traffic Simulator"
!define UMUI_SETUPTYPEPAGE_STANDARD_TEXT "This is equivalent to the traffic simulator installation above, with the addition of all the NAM networks (except the Bullet Train Mod and Maxis Highway Override), all transit lots (e.g., stations), additional bridges, and certain other required options."
!define UMUI_SETUPTYPEPAGE_STANDARD "Networks and Traffic Simulator"
!define UMUI_SETUPTYPEPAGE_COMPLETE "Complete Installation"
!define UMUI_SETUPTYPEPAGE_COMPLETE_TITLE "C&omplete Standard Installation"
!define UMUI_SETUPTYPEPAGE_COMPLETE_TEXT "All standard features of the NAM will be installed, including networks, bridges, all components of the traffic simulator, custom menu icons, extended queries, Maxis highway additions, roundabouts, all turning lane types, and wide radius curves."
!define UMUI_SETUPTYPEPAGE_CUSTOM_TITLE "C&ustom Installation"
!define UMUI_SETUPTYPEPAGE_CUSTOM_TEXT "Choose which of the components of the complete installation you want installed, as well as the type of traffic simulator and automata controller, rail viaduct and texture styles, one-way arrow mods, and the NAM installation location."
!define UMUI_SETUPTYPEPAGE_DEFAULTCHOICE ${UMUI_COMPLETE}
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE SetupTypeLeave
!insertmacro UMUI_PAGE_SETUPTYPE
!define MUI_DIRECTORYPAGE_TEXT_TOP "Setup will install $(^NameDA) in the following folder. To install in a different folder, click Browse and select another folder.$\r$\n$\nIn general, it is recommended that you install the NAM in the selected folder. You can also install the NAM in the SimCity 4 Plugins folder if you like. In any case, the NAM must be installed somewhere in your Plugins hierarchy. $DirectoryWarning"
!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Destination Folder (Must contain $\"Plugins$\" in the path)"
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckDir
!insertmacro MUI_PAGE_DIRECTORY
; Components page
Page custom GetOldComponents ; Must be separate page so it never gets skipped.
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE ComponentsLeave
!insertmacro MUI_PAGE_COMPONENTS
!define UMUI_TEXT_INSTCONFIRM_TEXTBOX_TITLE "Selected Configuration:"
!define UMUI_CONFIRMPAGE_TEXTBOX ConfirmText
!insertmacro UMUI_PAGE_CONFIRM
!define MUI_PAGE_CUSTOMFUNCTION_PRE RecordNAM
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_TEXT "$(^NameDA) has been installed on your computer. It is strongly recommended that you view the ReadMe file, as it contains much valuable information about the use of the NAM. If you wish to view the documentation later, you can find it in the $\"Documentation$\" subfolder of the $\"NAM Auxiliary Files$\" folder.\r\n\nIf you are installing this version of the NAM over an older, existing version, please leave the first checkbox checked. This simply ensures that your traffic simulator and/or customizer are updated to the latest version."
!define MUI_FINISHPAGE_TEXT_LARGE
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_TEXT "&Install/Start Traffic Simulator Configuration Tool (also allows customization of new Data Views)"
!define MUI_FINISHPAGE_RUN_FUNCTION LaunchTSCT
!define MUI_FINISHPAGE_SHOWREADME "$NAMAuxDir\Documentation\1-start.html" ; the path of your readme file, once it is installed
!define MUI_PAGE_CUSTOMFUNCTION_PRE CheckTSCT
!insertmacro MUI_PAGE_FINISH
!define MUI_CUSTOMFUNCTION_ABORT AbortNAM
; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES
; MUI end ------
!include "NAM Languages.nsh"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "NetworkAddonMod Setup ${PRODUCT_VERSION}.exe"
InstallDir "$DOCUMENTS\SimCity 4\Plugins\Network Addon Mod"
ShowInstDetails show
ShowUnInstDetails show
; Setting pre-defined installation types
InstType "Traffic Simulator and Maxis Fixes Only"
InstType "Networks and Traffic Simulator"
InstType "Complete Installation"
InstType "/CUSTOMSTRING=Custom Installation"
; Defining Groups for the components selection page
Section "Main NAM Files" sec1 ; sec1 is a short name for description reference (see below)
SectionIn RO ; RO means read-only, so the user cannot deselect this
SectionIn 1 2 3 4 ; in which installation types (defined above) this section will show up
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
Delete "$INSTDIR\uninst_*.exe"
Delete "$INSTDIR\Data Views\NetworkAddonMod_Zone_Data_View.dat"
Call SaveTrafficSim
Delete "$INSTDIR\NetworkAddonMod*.dat"
Delete "$INSTDIR\Additional Bridges\Additional Bridges.txt"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_Additional_Bridges_Plugin.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-2_Concrete_Girder_Bridge.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-2_Small_Steel_Arch_Bridge.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-4_Large_Steel_Arch_Bridge.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-4_Steel_Girder_Bridge.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-4_Steel_Girder_Bridge_Dual.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-4_Suspension_Bridge_Compact.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-6S_Cable-Stayed_Bridge_Compact.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-6S_Concrete_Arch_Bridge.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-6S_Concrete_Arch_Bridge_Dual.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-6S_Steel_Arch_Bridge_Compact.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-8S_Undertruss_Bridge.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-10S_Cable_Stayed_Bridge.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-10S_Large_Concrete_Arch.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_RHW-MIS_Bridges.dat"
Delete "$INSTDIR\Additional Bridges\NetworkAddonMod_Rural_Street_and_Rail_Bridge.dat"
RMDir /r "$INSTDIR\Additional Bridges\Avenue Bridges"
RMDir /r "$INSTDIR\Additional Bridges\Bridge Props and Models"
RMDir /r "$INSTDIR\Additional Bridges\El Rail Bridges"
RMDir /r "$INSTDIR\Additional Bridges\Elevated Highway Bridges"
RMDir /r "$INSTDIR\Additional Bridges\Ground Highway Bridges"
RMDir /r "$INSTDIR\Additional Bridges\High Speed Rail Bridges"
RMDir /r "$INSTDIR\Additional Bridges\Monorail Bridges"
RMDir /r "$INSTDIR\Additional Bridges\Network Widening Mod Bridges"
RMDir /r "$INSTDIR\Additional Bridges\Railway Bridges"
RMDir /r "$INSTDIR\Additional Bridges\Real Highway Bridges"
RMDir /r "$INSTDIR\Additional Bridges\Real Railway Bridges"
RMDir /r "$INSTDIR\Additional Bridges\Road Bridges"
RMDir /r "$INSTDIR\Additional Bridges\Rural Street and Rail Bridge"
RMDir /r "$INSTDIR\Additional Bridges\Street Addon Mod Bridges"
RMDir /r "$INSTDIR\Additional Bridges\Street Bridges"
RMDir /r "$INSTDIR\Additional Bridges\Tram in Road Bridges"
RMDir /r "$INSTDIR\Bullet Train Mod"
RMDir /r "$INSTDIR\Canal Addon Mod"
RMDir /r "$INSTDIR\Cosmetic Addons"
RMDir /r "$INSTDIR\Custom Menu Icon Layouts"
RMDir /r "$INSTDIR\Data Views"
RMDir /r "$INSTDIR\Diagonal Streets"
RMDir /r "$INSTDIR\El Rail"
RMDir /r "$INSTDIR\Fractionally Angled Networks"
RMDir /r "$INSTDIR\Flexible Underpasses"
RMDir /r "$INSTDIR\High Elevated Monorail"
RMDir /r "$INSTDIR\High Speed Rail Project"
RMDir /r "$INSTDIR\Hole Diggers and Ground Raisers"
RMDir /r "$INSTDIR\Locale Files"
RMDir /r "$INSTDIR\Maxis Highway Override"
RMDir /r "$INSTDIR\Network Widening Mod"
RMDir /r "$INSTDIR\Rail"
RMDir /r "$INSTDIR\Railway Addon Mod"
RMDir /r "$INSTDIR\Rail Textures"
RMDir /r "$INSTDIR\Real Highway Mod"
RMDir /r "$INSTDIR\Roundabouts"
RMDir /r "$INSTDIR\Rural Roads Plugin"
RMDir /r "$INSTDIR\Street Addon Mod"
RMDir /r "$INSTDIR\Traffic Simulator"
RMDir /r "$INSTDIR\Traffic Simulator Configuration Tool"
RMDir /r "$INSTDIR\Ground Light Rail"
RMDir /r "$INSTDIR\Turning Lanes"
RMDir /r "$INSTDIR\Wide Radius Curves"
RMDir /r "$INSTDIR\z_Left Hand Plugin"
RMDir /r "$NAMAuxDir\Documentation"
RMDir /r "$NAMAuxDir\Tools\Controller Compiler"
RMDir /r "$z___NAM\El Rail Alternate Implementation"
RMDir /r "$z___NAM\Mass Transit Lots"
RMDir /r "$z___NAM\Maxis Highway Override"
RMDir /r "$z___NAM\MTA Station Overrides"
RMDir /r "$z___NAM\Road Textures"
RMDir /r "$z___NAM\Shinkansen Bullet Train Mod"
RMDir /r "$z___NAM\z Props and Models"
StrCpy $0 "$SC4Docs\SimCity 4"
Call DeleteCompressedNAM
StrCpy $0 $SC4InstallDir
Call DeleteCompressedNAM
RMDir /r "$INSTDIR\Automata Controller"
RMDir /r "$INSTDIR\High Speed Rail Project"
RMDir /r "$INSTDIR\Network Widening Mod"
RMDir /r "$INSTDIR\Plugins"
RMDir /r "$INSTDIR\Railway Addon Mod"
RMDir /r "$INSTDIR\Real Highway Mod"
RMDir /r "$INSTDIR\Rural Roads Plugin"
RMDir /r "$INSTDIR\Street Addon Mod"
Call ClearStations
${If} $Cleanitol > 0
File /r "Tools\BSC Cleanitol TM"
!insertmacro UMUI_IF_INSTALLFLAG_ISNOT ${UMUI_MINIMAL}
File "Cleanitol_NetworkAddonMod.txt"
StrCpy $5 "Cleanitol_NetworkAddonMod.txt"
!insertmacro UMUI_ENDIF_INSTALLFLAG
!insertmacro UMUI_IF_INSTALLFLAG_IS ${UMUI_MINIMAL}
File "Cleanitol_NAM_TrafficSimulator.txt"
StrCpy $5 "Cleanitol_NAM_TrafficSimulator.txt"
!insertmacro UMUI_ENDIF_INSTALLFLAG
MessageBox MB_OK|MB_ICONEXCLAMATION "The Cleanitol program will now be run in your Plugins folders to remove any files that conflict with the NAM. These files will be moved to a backup folder whose name will be displayed by Cleanitol. This process may take a while; please be patient and let it run to completion.$\r$\n$\r$\nSome mass transit stations or lots that you have installed separately may show up in your Cleanitol output. These lots are not being deleted from the game, but are being upgraded to NAM Standard lots.$\r$\n$\r$\nWhen Cleanitol finishes, after optionally examining the results, please press Cleanitol's Quit button."
StrCpy $0 "$SC4Docs\SimCity 4\Plugins"
Call CheckDatPacked
StrCpy $0 "$SC4InstallDir\Plugins"
Call CheckDatPacked
ExecWait '"$INSTDIR\BSC Cleanitol TM\BSC Cleanitol TM.exe" $5'
RMDir /r "$INSTDIR\BSC Cleanitol TM"
Delete "$INSTDIR\Cleanitol_NetworkAddonMod.txt"
Delete "$INSTDIR\Cleanitol_NAM_TrafficSimulator.txt"
Call DeleteDuplicates
${EndIf}
Call UpdateStations
SetOutPath "$INSTDIR"
File "NAM logo.ico"
!insertmacro UMUI_IF_INSTALLFLAG_ISNOT ${UMUI_MINIMAL}
StrCpy $WriteController 1
Call ProcessController
SetOutPath "$INSTDIR"
File "NetworkAddonMod_IndividualNetworkRULs.dat"
File "NetworkAddonMod_Bridges_Plugin_Controller.dat"
File "NetworkAddonMod_a_Controller_Marker.dat"
File "NetworkAddonMod_a_EP1Paths.dat"
File "NetworkAddonMod_UI.dat"
File "NetworkAddonMod_BaseContent.dat"
File "NetworkAddonMod_BridgeSupport.dat"
File "NetworkAddonMod_Props.dat"
SetOutPath "$INSTDIR\Cosmetic Addons"
File "Cosmetic Addons\NetworkAddonMod_OverpassUpdate_Maxis_Components_Plugin.dat"
!insertmacro UMUI_ENDIF_INSTALLFLAG
SetOutPath "$INSTDIR\Locale Files"
File "Locale Files\*.dat"
SectionEnd
Function CheckDatPacked
CDP0:
StrCpy $1 "$0\Plugins_Compressed"
${DirState} $1 $2
${If} $2 = 1
CDP1:
MessageBox MB_ABORTRETRYIGNORE|MB_DEFBUTTON2|MB_ICONEXCLAMATION "The NAM installer has detected a folder of DatPacked files in $1. As Cleanitol cannot search DatPacked files, please remove this folder temporarily from your Plugins folder and replace it with the original, uncompressed files. If Cleanitol makes no changes to these files, you can simply move them back and return the Plugins_Compressed folder to its place. However, if Cleanitol makes any changes to these files, you should recompress them using the DatPacker, and remove your old Plugins_Compressed folder.$\r$\n$\nSelect $\"Abort$\" to abort the installation. Select $\"Retry$\" if you have replaced your Plugins_Compressed folder with the original files. Select $\"Ignore$\" to ignore this problem and just continue (not recommended)." IDRETRY CDP0 IDIGNORE CDP2
MessageBox MB_YESNO|MB_DEFBUTTON2|MB_ICONQUESTION "Your current NAM has already been uninstalled, and you will have to reinstall the NAM if you wish to use it. Are you sure you want to abort the installation?" IDNO CDP1
RMDir /r $INSTDIR
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKCU "Software\Network Addon Mod"
Abort "Installation aborted."
CDP2:
MessageBox MB_YESNO|MB_DEFBUTTON2|MB_ICONQUESTION "Are you sure you want to continue without having Cleanitol do a full job? This may result in various unknown problems in using the NAM." IDNO CDP0
${EndIf}
FunctionEnd
Section "Documentation" sec2
SectionIn RO ; Documentation optimally should be installed. Note, if user doesnt install readme files the finsh page can't display the readme file.
SectionIn 1 2 3 4
SetOutPath $NAMAuxDir
SetOverwrite ifnewer
File /r "Documentation"
SetOutPath "$NAMAuxDir\Documentation"
File "Information*.rtf"
SetOutPath "$NAMAuxDir\Documentation"
File /r /x "*.dat" /x "Additional Bridges.txt" "Additional Bridges"
SectionEnd
Section /o "Run Cleanitol and the Station Updater" sec4
SectionEnd
SectionGroup /e "Traffic Driving Side" sec3
Section "Game traffic drives on right side of road" controller1
SectionIn 2 3 4
SectionEnd
Section /o "Game traffic drives on left side of road" controller2
!insertmacro UMUI_IF_INSTALLFLAG_ISNOT ${UMUI_MINIMAL}
SetOutPath "$INSTDIR\z_Left Hand Plugin"
SetOverwrite ifnewer
File "z_Left Hand Plugin\NetworkAddonMod_LEFT_HAND_VERSIONS_ONLY_Required_Additional_Plugin.dat"
File "z_Left Hand Plugin\NetworkAddonMod_Bridges_LEFT_HAND_VERSIONS_ONLY_Required_Additional_Plugin.dat"
!insertmacro UMUI_ENDIF_INSTALLFLAG
SectionEnd
Section /o -controller controller3
SectionIn 4
SectionEnd
SectionGroupEnd
!define DefaultSimulator 1
!macro _TrafficSection num capacity selected
!ifdef "${selected}"
Section "NAM Traffic Simulator ${capacity}" capa${num}
SectionIn 1 2 3 4
!insertmacro UMUI_IF_INSTALLFLAG_IS ${UMUI_MINIMAL}
StrCpy $CustomizeSimulator 1
!insertmacro UMUI_ENDIF_INSTALLFLAG
!else
Section /o "NAM Traffic Simulator ${capacity}" capa${num}
!endif
Call SimulatorSetup
File "Traffic Simulator\NetworkAddonMod_Traffic_Plugin_Z_${capacity}.dat"
File "Data Views\NetworkAddonMod_Volume_Data_View_Z_${capacity}.dat"
SectionEnd
!macroend
!define TrafficSection `!insertmacro _TrafficSection`
Function SimulatorSetup
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
Delete "$INSTDIR\NetworkAddonMod_Traffic_Plugin_*.dat"
Delete "$INSTDIR\NetworkAddonMod_Volume_Data_View_*.dat"
FunctionEnd
SectionGroup "!Traffic Simulator and Related Options" secgrp1
SectionGroup /e "Select Traffic Simulator and Capacity Levels" sec11
${TrafficSection} 1 Classic 0
${TrafficSection} 2 Low 0
${TrafficSection} 3 Medium DefaultSimulator
${TrafficSection} 4 High 0
${TrafficSection} 5 Ultra 0
Section /o "Keep my previous traffic simulator" capa6
CopyFiles "$INSTDIR\..\*_Z_*.dat" "$INSTDIR\"
Delete "$INSTDIR\..\*_Z_*.dat"
SectionEnd
Section /o "Build a custom traffic simulator" capa7
Call SimulatorSetup
StrCpy $CustomizeSimulator 1
File "Traffic Simulator\NetworkAddonMod_Traffic_Plugin_Z_Medium.dat"
File "Data Views\NetworkAddonMod_Volume_Data_View_Z_Medium.dat"
SectionEnd
SectionGroupEnd
Section "New Zones Data View" sec16
SectionIn 1 2 3 4
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
File "Data Views\NetworkAddonMod_Zone_Data_View.dat"
SectionEnd
SectionGroup /e "Automata Controller Type" sec10
Section /o "Persistent Automata" auto0
StrCpy $PersistentAutomata 1
SectionEnd
Section "Standard Automata Numbers" auto1
SectionIn 1 2 3 4
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
Delete $OUTDIR\NetworkAddonMod_Automata_Plugin_*.dat
${If} $PersistentAutomata = 0
File "Automata Controller\NetworkAddonMod_Automata_Plugin_Standard.dat"
${Else}
File "Automata Controller\NetworkAddonMod_Automata_Plugin_Standard_Persist.dat"
${EndIf}
SectionEnd
Section /o "Standard Automata Numbers 24h" auto2
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
Delete $OUTDIR\NetworkAddonMod_Automata_Plugin_*.dat
${If} $PersistentAutomata = 0
File "Automata Controller\NetworkAddonMod_Automata_Plugin_Automata24.dat"
${Else}
File "Automata Controller\NetworkAddonMod_Automata_Plugin_Automata24_Persist.dat"
${EndIf}
SectionEnd
Section /o "Radical Automata Numbers" auto3
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
Delete $OUTDIR\NetworkAddonMod_Automata_Plugin_*.dat
${If} $PersistentAutomata = 0
File "Automata Controller\NetworkAddonMod_Automata_Plugin_Radical.dat"
${Else}
File "Automata Controller\NetworkAddonMod_Automata_Plugin_Radical_Persist.dat"
${EndIf}
SectionEnd
Section /o "Radical Automata Numbers 24h" auto4
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
Delete $OUTDIR\NetworkAddonMod_Automata_Plugin_*.dat
${If} $PersistentAutomata = 0
File "Automata Controller\NetworkAddonMod_Automata_Plugin_Radical_Automata24.dat"
${Else}
File "Automata Controller\NetworkAddonMod_Automata_Plugin_Radical_Automata24_Persist.dat"
${EndIf}
SectionEnd
SectionGroupEnd
SectionGroupEnd
Function SaveTrafficSim
${If} ${SectionIsSelected} ${capa6}
CopyFiles "$INSTDIR\*_Z_*.dat" "$INSTDIR\.."
${EndIf}
FunctionEnd
SectionGroup /e "!NAM Networks and Network Expansions" secgrp2
SectionGroup "Bullet Train Mod (BTM)" sec24
Section /o "Main Bullet Train Mod" btm1
SetOutPath "$z___NAM\Shinkansen Bullet Train Mod"
SetOverwrite ifnewer
File "Bullet Train Mod\Core Files\*.dat"
SectionEnd
Section /o "Ground Texture" btm2
SetOutPath "$z___NAM\Shinkansen Bullet Train Mod"
SetOverwrite ifnewer
File "Bullet Train Mod\Ground Texture\ML Shinkansen MOD ground texture.dat"
SectionEnd
Section /o "Alternate Concrete Texture" btm3
SetOutPath "$z___NAM\Shinkansen Bullet Train Mod"
SetOverwrite ifnewer
File "Bullet Train Mod\Concrete Texture\z ML Shinkansen MOD concrete texture.dat"
SectionEnd
Section /o "Fence Prop" btm4
SetOutPath "$z___NAM\Shinkansen Bullet Train Mod"
SetOverwrite ifnewer
File "Bullet Train Mod\ML Shinkansen MOD Fence.dat"
SectionEnd
Section /o "N700 Series Shinkansen Train" btm5
SetOutPath "$z___NAM\Shinkansen Bullet Train Mod"
SetOverwrite ifnewer
File "Bullet Train Mod\N700 series Shinkansen\N700 series Shinkansen.dat"
SectionEnd
SectionGroupEnd
SectionGroup "Canal Addon Mod (CAN-AM)" sec15
Section "SimGoober's Canals" can1
SectionIn 2 3 4
SetOutPath "$INSTDIR\Canal Addon Mod"
SetOverwrite ifnewer
Delete "$OUTDIR\NetworkAddonMod_CanAM_Props_CAL.dat"
File "Canal Addon Mod\NetworkAddonMod_CanAM_Plugin.dat"
File "Canal Addon Mod\NetworkAddonMod_CanAM_Props_SG.dat"
SectionEnd
Section /o "Callagrafx' Canals" can2
SetOutPath "$INSTDIR\Canal Addon Mod"
SetOverwrite ifnewer
Delete "$OUTDIR\NetworkAddonMod_CanAM_Props_SG.dat"
File "Canal Addon Mod\NetworkAddonMod_CanAM_Plugin.dat"
File "Canal Addon Mod\NetworkAddonMod_CanAM_Props_CAL.dat"
SectionEnd
SectionGroupEnd
Section "Diagonal Streets" plugin2
SectionIn 2 3 4
SetOutPath "$INSTDIR\Diagonal Streets"
SetOverwrite ifnewer
File "Diagonal Streets\NetworkAddonMod_Diagonal_Streets_Plugin.dat"
SetOutPath "$INSTDIR\INRUL Overrides"
File "INRUL Overrides\NetworkAddonMod_Diagonal_Streets_Plugin_INRULs.dat"
SectionEnd
Section "Double-Height Monorail / Bullet Train Mod" plugin6
SectionIn 2 3 4
SetOutPath "$INSTDIR\High Elevated Monorail"
SetOverwrite ifnewer
File "High Elevated Monorail\NetworkAddonMod_High_Monorail_Plugin.dat"
SectionEnd
SectionGroup "El Rail" plugin5
SectionGroup "El Rail Alternate Implementation" elrail1
Section /o "Core El Rail Network" elrail_alt1
SetOutPath "$z___NAM\El Rail Alternate Implementation"
SetOverwrite ifnewer
File "El Rail\El Rail Alternate Implementation\*.dat"
File /r "El Rail\El Rail Alternate Implementation\Core Files"
${If} ${SectionIsSelected} ${btm1}
SetOutPath "$z___NAM\Shinkansen Bullet Train Mod"
SetOverwrite ifnewer
File "El Rail\El Rail Alternate Implementation\z ML Shinkansen MOD Patch\*.dat"
${EndIf}
SectionEnd
Section /o "El Rail Catenaries" elrail_alt2
SetOutPath "$z___NAM\El Rail Alternate Implementation"
SetOverwrite ifnewer
File "El Rail\El Rail Alternate Implementation\Catenary and Fence Props\z ML JPN ELR T21 Catenary Prop.dat"
SectionEnd
Section /o "El Rail Fence Props" elrail_alt3
SetOutPath "$z___NAM\El Rail Alternate Implementation"
SetOverwrite ifnewer
File "El Rail\El Rail Alternate Implementation\Catenary and Fence Props\z ML JPN ELR T21 Fence Prop.dat"
SectionEnd
Section /o "El Rail Ground Texture" elrail_alt4
SetOutPath "$z___NAM\El Rail Alternate Implementation"
SetOverwrite ifnewer
File "El Rail\El Rail Alternate Implementation\Ground Texure\z Ground Texture.dat"
SectionEnd
Section /o "El Rail Cool Color Concrete Texture" elrail_alt5
SetOutPath "$z___NAM\El Rail Alternate Implementation"
SetOverwrite ifnewer
File "El Rail\El Rail Alternate Implementation\Concrete Texture\Cool Color Concrete Texture.dat"
SectionEnd
SectionGroupEnd
Section "El Rail over Avenue Networks" elrail2a
SectionIn 2 3 4
SetOutPath "$INSTDIR\El Rail"
SetOverwrite ifnewer
File /r "El Rail\El Rail over Avenue Networks"
SectionEnd
Section "El Rail over Road Networks" elrail2
SectionIn 2 3 4
SetOutPath "$INSTDIR\El Rail"
SetOverwrite ifnewer
File /r "El Rail\El Rail over Road Networks"
SectionEnd
Section "Double-Height Elevated Rail" elrail3
SectionIn 2 3 4
SetOutPath "$INSTDIR\El Rail"
SetOverwrite ifnewer
File "El Rail\NetworkAddonMod_High_ElRail_Plugin.dat"
SectionEnd
SectionGroupEnd
SectionGroup "Elevated Road Networks" sec26
Section "Draggable Elevated Road Networks" elroadnet1
SectionIn 2 3 4
SetOutPath "$INSTDIR\Elevated Road Networks"
SetOverwrite ifnewer
File "Road Viaducts\NetworkAddonMod_RoadViaducts_Draggable.dat"
SectionEnd
Section "Modular Elevated Road Networks" elroadnet2
SectionIn 2 3 4
SetOutPath "$INSTDIR\Elevated Road Networks"
SetOverwrite ifnewer
File "Road Viaducts\NetworkAddonMod_RoadViaducts.dat"
SectionEnd
SectionGroupEnd
Section "Flexible Underpasses (FLUPs)" plugin8
SectionIn 2 3 4
SetOutPath "$INSTDIR\Flexible Underpasses"
SetOverwrite ifnewer
File "Flexible Underpasses\NetworkAddonMod_FLUPs_Plugin.dat"
File "Flexible Underpasses\NetworkAddonMod_FLUPs_Props.dat"
Call FLUPs
SectionEnd
SectionGroup "Fractionally Angled Networks (FANs)" sec22
Section "Fractionally Angled Road Networks (FARs)" fan1
SectionIn 2 3 4
SetOutPath "$INSTDIR\Fractionally Angled Networks"
SetOverwrite ifnewer
File "Fractionally Angled Networks\*_Roads.dat"
File "Fractionally Angled Networks\*_OneWayRoads.dat"
File "Fractionally Angled Networks\*_Avenues.dat"
SectionEnd
Section "Fractionally Angled Railroads (FARRs)" fan2
SectionIn 2 3 4
SetOutPath "$INSTDIR\Fractionally Angled Networks"
SetOverwrite ifnewer
File "Fractionally Angled Networks\*_Rails.dat"
Call FARR
SectionEnd
Section "Draggable FAR" fan3
SectionIn 2 3 4
SetOutPath "$INSTDIR\Fractionally Angled Networks"
SetOverwrite ifnewer
File "Fractionally Angled Networks\*draggable*.dat"
SetOutPath "$INSTDIR\INRUL Overrides\"
File "INRUL Overrides\NetworkAddonMod_FAN_WRC_INRULs.dat"
SectionEnd
SectionGroupEnd
SectionGroup "Ground Light Rail / Tram" sec18
Section "Ground Light Rail" tram1
SectionIn 2 3 4
SetOutPath "$INSTDIR\Ground Light Rail"
SetOverwrite ifnewer
File "Ground Light Rail\NetworkAddonMod_GroundLightRail_Plugin.dat"
File "Ground Light Rail\NetworkAddonMod_GroundLightRailDrag_Plugin.dat"
SetOutPath "$INSTDIR\INRUL Overrides"
File "INRUL Overrides\NetworkAddonMod_GroundLightRail_Plugin_INRULs.dat"
SectionEnd
Section "Tram in Avenue" tram2
SectionIn 2 3 4
SetOutPath "$INSTDIR\Ground Light Rail"
SetOverwrite ifnewer
File "Ground Light Rail\NetworkAddonMod_GroundLightRailxAvenue_Plugin.dat"
SectionEnd
Section "Tram in Road" tram3
SectionIn 2 3 4
SetOutPath "$INSTDIR\Ground Light Rail"
SetOverwrite ifnewer
SetOverwrite ifnewer
File "Ground Light Rail\NetworkAddonMod_GroundLightRailxRoad_Plugin.dat"
SectionEnd
Section "Tram in Street" tram4
SectionIn 2 3 4
SetOutPath "$INSTDIR\Ground Light Rail"
SetOverwrite ifnewer
File "Ground Light Rail\NetworkAddonMod_GroundLightRailxStreet_Plugin.dat"
SectionEnd
Section /o "Extended Draggable Ground Light Rail" tram5
SectionIn 2 3 4
SetOutPath "$INSTDIR\Ground Light Rail"
SetOverwrite ifnewer
File "Ground Light Rail\NetworkAddonMod_GroundLightRailDrag_Extension.dat"
SectionEnd
SectionGroupEnd
Section "High Speed Rail Plugin" sec30
SectionIn 2 3 4
SetOutPath "$INSTDIR\High Speed Rail Project"
SetOverwrite ifnewer
File "High Speed Rail Project\*.dat"
${If} $bRight = 0
SetOutPath "$INSTDIR\z_Left Hand Plugin"
File "z_Left Hand Plugin\HSR_LEFT_HAND_VERSIONS_ONLY_Required_Additional_Plugin.dat"
${EndIf}
SectionEnd
Section /o "Maxis Highway Override" sec23
SetOutPath "$z___NAM"
SetOverwrite ifnewer
File /r "Maxis Highway Override"
SetOutPath "$z___NAM\Maxis Highway Override"
${Unless} ${SectionIsSelected} ${elrail_alt1}
Delete "$OUTDIR\z_Moonlinght_Alternate_ELR_Patch.dat"
SetOutPath "$z___NAM\Shinkansen Bullet Train Mod"
Delete "$OUTDIR\z_Moonlinght_Alternate_ELR_Patch.dat"
${EndIf}
${If} ${SectionIsSelected} ${elrail_alt1}
SetOutPath "$z___NAM\Shinkansen Bullet Train Mod"
File "Maxis Highway Override\z_Moonlinght_Alternate_ELR_Patch.dat"
${EndIf}
${Unless} ${SectionIsSelected} ${btm1}
SetOutPath "$z___NAM\Maxis Highway Override"
Delete "$OUTDIR\z_BTM_Patch.dat"
SetOutPath "$z___NAM\Shinkansen Bullet Train Mod"
Delete "$OUTDIR\z_BTM_Patch.dat"
${EndIf}
${If} ${SectionIsSelected} ${btm1}
SetOutPath "$z___NAM\Shinkansen Bullet Train Mod"
File "Maxis Highway Override\z_BTM_Patch.dat"
${EndIf}
SectionEnd
!macro _NWMSection num nwmname
Section "NWM ${nwmname}" nwm${num}
SectionIn 2 3 4
SetOutPath "$INSTDIR\Network Widening Mod"
SetOverwrite ifnewer
!if "${nwmname}" != "Triple-Tile Networks"
File "Network Widening Mod\NetworkWideningMod_${nwmname}.dat"
!else
File "Network Widening Mod\NetworkWideningMod_TripleTile.dat"
!endif
StrCpy $1 ${nwmname}
Call NWMCore
SectionEnd
!macroend
!define NWMSection `!insertmacro _NWMSection`
Function NWMCore
SetOutPath "$INSTDIR\Network Widening Mod"
SetOverwrite ifnewer
${If} $CalledNWMCore = 0
File "Network Widening Mod\NetworkWideningMod_Core.dat"
File "Network Widening Mod\NetworkWideningMod_ElRail_over_Road_NWM.dat"
File "Network Widening Mod\NetworkWideningMod_LotSupport.dat"
${StrStr} $2 $1 "TLA"
${If} $2 != ""
${If} $bRight = 0
File "Network Widening Mod\TLA Center Turn Arrows\tla_center_arrows_addon_LHD.dat"
SetOutPath "$INSTDIR\z_Left Hand Plugin"
File "z_Left Hand Plugin\Network Widening Mod_LEFT_HAND_VERSIONS_ONLY_Required_Additional_Plugin.dat"
${Else}
File "Network Widening Mod\TLA Center Turn Arrows\tla_center_arrows_addon_RHD.dat"
${EndIf}
StrCpy $CalledNWMCore 1
${EndIf}
${EndIf}
FunctionEnd
SectionGroup "Network Widening Mod (NWM)" sec20
SectionGroup "NWM Networks" nwmgroup1
${NWMSection} 1 "TLA-3"
${NWMSection} 2 "AVE-2"
${NWMSection} 3 "ARD-3"
${NWMSection} 4 "OWR-1"
${NWMSection} 5 "OWR-3"
${NWMSection} 6 "NRD-4"
${NWMSection} 7 "TLA-5"
${NWMSection} 8 "OWR-4"
${NWMSection} 9 "OWR-5"
${NWMSection} 10 "RD-4"
${NWMSection} 11 "RD-6"
${NWMSection} 12 "Triple-Tile Networks"
SectionGroupEnd
Section /o "Legacy Transition Piece Wealthification" nwmgroup2
SectionIn 2 3 4
SetOutPath "$INSTDIR\Network Widening Mod"
SetOverwrite ifnewer
File "Network Widening Mod\NetworkWideningMod_LegacyPuzzleWealthing.dat"
SectionEnd
SectionGroupEnd
Section "Ped Malls" sec28
SectionIn 2 3 4
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
File "NetworkAddonMod_PedMalls.dat"
SectionEnd
SectionGroup "Rail" sec33
Section "RealRailway (RRW)" rail1
SetOutPath "$z___NAM\y_RealRailway"
SetOverwrite ifnewer
File "Rail\RealRailway\*.dat"
File "Rail\RealRailway\RealRailway_Bridges.dat"
SetOutPath "$z___NAM\y_RealRailway\Textures" ;Adds new Textures Folder
File "Rail\RealRailway\Textures\*.dat"
;Main Crossings
File "Rail\RealRailway\Textures\Crossings\RealRailway_Textures_Crossings_Generic.dat"
;INRULs
SetOutPath "$INSTDIR\INRUL Overrides"
File "INRUL Overrides\RealRailway_Core_INRULs.dat"
;LHD Support
${If} $bRight = 0
SetOutPath "$INSTDIR\z_Left Hand Plugin\z_RealRailway"
File "z_Left Hand Plugin\z_RealRailway\RealRailway_LHD.dat"
${EndIf}
;Crosslink Files for Cosmetic Mods
${Unless} ${SectionIsSelected} ${btm1}
SetOutPath "$z___NAM\y_RealRailway"
Delete "$OUTDIR\z_RealRailway_ML Shinkansen MOD Patch.dat" ;MGB - Modified File Name to remove STR
${EndIf}
${If} ${SectionIsSelected} ${btm1}
SetOutPath "$z___NAM\y_RealRailway"
File "Rail\RealRailway\z_RealRailway_ML Shinkansen MOD Patch.dat" ;MGB - Modified File Name to remove STR
${EndIf}
${Unless} ${SectionIsSelected} ${elrail_alt1}
SetOutPath "$z___NAM\y_RealRailway"
Delete "$OUTDIR\z_RealRailway_ML JPN EL Rail 2013 Patch.dat"
${EndIf}
${If} ${SectionIsSelected} ${elrail_alt1}
SetOutPath "$z___NAM\y_RealRailway"
File "Rail\RealRailway\z_RealRailway_ML JPN EL Rail 2013 Patch.dat"
${EndIf}
${Unless} ${SectionIsSelected} ${sec23}
SetOutPath "$z___NAM\y_RealRailway"
Delete "$OUTDIR\z_RealRailway_MHO_Patch.dat"
${EndIf}
${If} ${SectionIsSelected} ${sec23}
SetOutPath "$z___NAM\y_RealRailway"
File "Rail\RealRailway\z_RealRailway_MHO_Patch.dat"
${EndIf}
;Calls US/EU Texture and Prop Variations, Widths/Heights, plus SAM Crosslinks
Call RRW
SectionEnd
SectionGroup /e "Maxis Rail" rail0
SectionGroup "Maxis Rail Texture Style" sec14
Section "Darker textures by SFBT" rail_texture1
SectionIn 2 3 4
SetOutPath "$INSTDIR\Rail Textures"
SetOverwrite ifnewer
Delete "$OUTDIR\Rail* Addon*\zzz_Dual_Rail_Texture_*.dat"
File "Rail\Rail Textures\SFBT_Rail Textures Mod_Darker Textures.dat"
SectionEnd
Section /o "Alternative textures by dedgren" rail_texture2
SetOutPath "$INSTDIR\Railway Addon Mod"
SetOverwrite ifnewer
Delete "$INSTDIR\*\SFBT_Rail Textures Mod_Darker Textures.dat"
File "Rail\Rail Textures\zzz_Dual_Rail_Texture_Maxis_Upgrade.dat"
File "Rail\Rail Textures\zzz_Dual_Rail_Texture_NAM_Upgrade.dat"
File "Rail\Rail Textures\zzz_Dual_Rail_Texture_STR_Upgrade.dat"
SectionEnd
Section /o "Maxis default (not recommended)" rail_texture3
Delete "$INSTDIR\*\SFBT_Rail Textures Mod_Darker Textures.dat"
Delete "$INSTDIR\Rail* Addon*\zzz_Dual_Rail_Texture_*.dat"
SectionEnd
SectionGroupEnd
SectionGroupEnd
Section "Single Track Rail (STR)" rail2
SectionIn 2 3 4
SetOutPath "$INSTDIR\Rail\Railway Addon Mod"
SetOverwrite ifnewer
File "Rail\Railway Addon Mod\RailwayAddonMod_STR_WideRadiusCurves.dat"
File "Rail\Railway Addon Mod\RailroadAddonMod_Viaducts.dat"
File "Rail\Railway Addon Mod\RailwayAddonMod_STR_DraggableNetwork.dat"
${If} $bRight = 0
SetOutPath "$INSTDIR\z_Left Hand Plugin"
File "z_Left Hand Plugin\RailwayAddonMod_STR_LEFT_HAND_VERSIONS_ONLY_Required_Additional_Plugin.dat"
${EndIf}
SectionEnd
Section "Underground Rail" rail5
SectionIn 2 3 4
SetOutPath "$INSTDIR\Rail"
SetOverwrite ifnewer
File /r "Rail\Underground Rail"
SectionEnd
Section "Viaduct Rail Puzzle Pieces" rail6
SectionIn 2 3 4
SetOutPath "$INSTDIR\Rail"
SetOverwrite ifnewer
File "Rail\NetworkAddonMod_RailViaducts.dat"
SectionEnd
SectionGroupEnd
!define RHWLevel `!insertmacro _RHWLevel`
!define RHWSection `!insertmacro _RHWSection`
!macro _RHWLevel level level_name
SectionGroup "RHW ${level_name} Networks" rhw${level}
!if ${level} < 3
${RHWSection} ${level} 0 ${level_name} RHW-2
${RHWSection} ${level} 1 ${level_name} RHW-3
!endif
${RHWSection} ${level} 2 ${level_name} MIS
${RHWSection} ${level} 3 ${level_name} RHW-4