forked from aburch/simutrans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonlineupgrade.nsi
92 lines (76 loc) · 2.65 KB
/
onlineupgrade.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
; ************************************* Pakset downloader for simutrans *********************************************
; needs the following plugins:
; nsisunz
; inetc
; CabDll
; untgz
; ShellLink
!include "preparation-functions.nsh"
Name "Simutrans Pakset Installer"
OutFile "download-paksets.exe"
; The default installation directory
InstallDir $PROGRAMFILES\Simutrans
SectionGroup Simutrans
Section /o "Chinese Font" wenquanyi_font
AddSize 3245
StrCpy $downloadlink "http://downloads.sourceforge.net/project/simutrans/simutrans/wenquanyi_9pt-font-bdf.zip"
StrCpy $archievename "wenquanyi_9pt-font-bdf.zip"
StrCpy $downloadname "wenquanyi_9pt"
Call DownloadInstallZip
SectionEnd
SectionGroupEnd
!include "paksets.nsh"
;************************** from here on other helper stuff *****************
!include "other-functions.nsh"
;********************* from here on special own helper funtions ************
; make sure, at least one executable is installed
Function .onSelChange
; Make sure at least some pak is selected
SectionGetFlags ${pak} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak64german} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak64HAJO} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak64japan} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak64HO} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak64contrast} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak96comic} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak96HD} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak128} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak128japan} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak128britain} $R0
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak128german} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak192comic} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak48excentrique} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
SectionGetFlags ${pak32comic} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show_not
; not pak selected!
MessageBox MB_OK|MB_ICONSTOP "At least on pak set must be selected!"
show_not:
FunctionEnd