-
Notifications
You must be signed in to change notification settings - Fork 5
/
make.nsi
executable file
·205 lines (172 loc) · 4.29 KB
/
make.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
!define MyName "DropShadowDocker"
# ATTRIBUTES
Name '${MyName}'
OutFile '${MyName} Installer X7-2019.exe'
BrandingText 'http://cdrpro.ru/'
SetCompressor /SOLID lzma
XPStyle on
InstallColors /windows
ShowInstDetails hide
SetDateSave on
CRCCheck on
RequestExecutionLevel admin
LicenseData "LICENSE.txt"
# LANGUAGES
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
LoadLanguageFile "${NSISDIR}\Contrib\Language files\Russian.nlf"
LoadLanguageFile "${NSISDIR}\Contrib\Language files\Turkish.nlf"
# PAGES
page license
Page components
Page instfiles
# APP PATHS
Var cdr17
Var cdr17x64
Var cdr18
Var cdr18x64
Var cdr19
Var cdr19x64
Var cdr20
Var cdr20x64
Var cdr21
Var cdr21x64
# PLUGINS
!include Sections.nsh
!include LogicLib.nsh
!include WinMessages.nsh
!macro execSection appVer appUserVer xVer
StrCpy $0 'CorelDRAW ${appUserVer}'
${If} '${xVer}' != ''
StrCpy $0 '$0 (64-Bit)'
${EndIf}
DetailPrint $0
${If} '${xVer}' != ''
StrCpy $1 '$cdr${appVer}x64\Programs64\Addons\${MyName}\'
${Else}
StrCpy $1 '$cdr${appVer}\Programs\Addons\${MyName}\'
${EndIf}
SetOutPath $1
File AppUI.xslt
File CorelDrw.addon
File ${MyName}.dll
File ${MyName}.gms
File UserUI.xslt
!macroend
Section /o '' sec17
${IF} $cdr17 != ''
!insertmacro execSection 17 X7 ''
${ENDIF}
SectionEnd
Section /o '' sec17x64
${IF} $cdr17x64 != ''
!insertmacro execSection 17 X7 x64
${ENDIF}
SectionEnd
Section /o '' sec18
${IF} $cdr18 != ''
!insertmacro execSection 18 X8 ''
${ENDIF}
SectionEnd
Section /o '' sec18x64
${IF} $cdr18x64 != ''
!insertmacro execSection 18 X8 x64
${ENDIF}
SectionEnd
Section /o '' sec19
${IF} $cdr19 != ''
!insertmacro execSection 19 2017 ''
${ENDIF}
SectionEnd
Section /o '' sec19x64
${IF} $cdr19x64 != ''
!insertmacro execSection 19 2017 x64
${ENDIF}
SectionEnd
Section /o '' sec20
${IF} $cdr20 != ''
!insertmacro execSection 20 2018 ''
${ENDIF}
SectionEnd
Section /o '' sec20x64
${IF} $cdr20x64 != ''
!insertmacro execSection 20 2018 x64
${ENDIF}
SectionEnd
Section /o '' sec21
${IF} $cdr21 != ''
!insertmacro execSection 21 2019 ''
${ENDIF}
SectionEnd
Section /o '' sec21x64
${IF} $cdr21x64 != ''
!insertmacro execSection 21 2019 x64
${ENDIF}
SectionEnd
!macro checkApp appVer xVer
${If} '${xVer}' != ''
SetRegView 64
${EndIf}
ReadRegStr $0 HKLM 'SOFTWARE\Corel\CorelDRAW\${appVer}.0' 'ConfigDir'
${If} $0 == ''
ReadRegStr $0 HKLM 'SOFTWARE\Corel\Corel DESIGNER\${appVer}.0' 'ConfigDir'
${EndIf}
StrCpy $0 $0 -7
${If} '${xVer}' != ''
StrCpy $cdr${appVer}x64 '$0'
StrCpy $1 '$0\Programs64\CorelDRW.exe'
StrCpy $2 '${sec${appVer}x64}'
${Else}
StrCpy $cdr${appVer} '$0'
StrCpy $1 '$0\Programs\CorelDRW.exe'
StrCpy $2 '${sec${appVer}}'
${EndIf}
${IF} ${FileExists} $1
!insertmacro SelectSection $2
${ENDIF}
!macroend
Function .onInit
InitPluginsDir
File /oname=$PluginsDir\splash.bmp 'cdrpro.bmp'
advsplash::show 1000 600 400 0x00FF00 $PluginsDir\splash
Pop $0
!insertmacro checkApp 17 ''
!insertmacro checkApp 17 x64
!insertmacro checkApp 18 ''
!insertmacro checkApp 18 x64
!insertmacro checkApp 19 ''
!insertmacro checkApp 19 x64
!insertmacro checkApp 20 ''
!insertmacro checkApp 20 x64
!insertmacro checkApp 21 ''
!insertmacro checkApp 21 x64
${IF} ${SectionIsSelected} ${sec17}
SectionSetText ${sec17} 'CorelDRAW X7'
${ENDIF}
${IF} ${SectionIsSelected} ${sec17x64}
SectionSetText ${sec17x64} 'CorelDRAW X7 (64-Bit)'
${ENDIF}
${IF} ${SectionIsSelected} ${sec18}
SectionSetText ${sec18} 'CorelDRAW X8'
${ENDIF}
${IF} ${SectionIsSelected} ${sec18x64}
SectionSetText ${sec18x64} 'CorelDRAW X8 (64-Bit)'
${ENDIF}
${IF} ${SectionIsSelected} ${sec19}
SectionSetText ${sec19} 'CorelDRAW 2017'
${ENDIF}
${IF} ${SectionIsSelected} ${sec19x64}
SectionSetText ${sec19x64} 'CorelDRAW 2017 (64-Bit)'
${ENDIF}
${IF} ${SectionIsSelected} ${sec20}
SectionSetText ${sec20} 'CorelDRAW 2018'
${ENDIF}
${IF} ${SectionIsSelected} ${sec20x64}
SectionSetText ${sec20x64} 'CorelDRAW 2018 (64-Bit)'
${ENDIF}
${IF} ${SectionIsSelected} ${sec21}
SectionSetText ${sec21} 'CorelDRAW 2019'
${ENDIF}
${IF} ${SectionIsSelected} ${sec21x64}
SectionSetText ${sec21x64} 'CorelDRAW 2019 (64-Bit)'
${ENDIF}
FunctionEnd