Debian Codegraph @

SCons/config.py

raw
1 Import('defenv')
2
3 ### Configuration options
4
5 cfg = Variables()
6
7 cfg.Add(
8 (
9 'NSIS_MAX_STRLEN',
10 'defines the maximum string length for internal variables and stack entries. 1024 should be plenty, but if you are doing crazy registry stuff, you might want to bump it up. Generally it adds about 16-32x the memory, so setting this to 4096 from 1024 will add around 64k of memory usage (not really a big deal, but not usually needed).',
11 1024
12 )
13 )
14
15 cfg.Add(
16 (
17 'NSIS_MAX_INST_TYPES',
18 'defines the maximum install types. Note that this should not exceed 32, ever.',
19 32
20 )
21 )
22
23 cfg.Add(
24 (
25 'NSIS_DEFAULT_LANG',
26 'defines the default language id NSIS will use if nothing else is defined in the script. Default value is 1033 which is English.',
27 1033
28 )
29 )
30
31 cfg.Add(
32 (
33 'NSIS_VARS_SECTION',
34 'defines the name of the PE section containing the runtime variables',
35 '.ndata'
36 )
37 )
38
39 cfg.Add(
40 BoolVariable(
41 'NSIS_CONFIG_UNINSTALL_SUPPORT',
42 "enables the uninstaller support. Turn it off if your installers don't need uninstallers. Adds less than 1kb.",
43 'yes'
44 )
45 )
46
47 cfg.Add(
48 BoolVariable(
49 'NSIS_CONFIG_LICENSEPAGE',
50 'enables support for the installer to present a license page.',
51 'yes'
52 )
53 )
54
55 cfg.Add(
56 BoolVariable(
57 'NSIS_CONFIG_COMPONENTPAGE',
58 'enables support for the installer to present a page where you can select what sections are installed. with this disabled, all sections are installed by default',
59 'yes'
60 )
61 )
62
63 cfg.Add(
64 BoolVariable(
65 'NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE',
66 'enables an alternative components page behavior. Checkboxes will only be toggled when clicking on the checkbox itself and not on its label. .onMouseOverSection will only be called when the user selects the component and not when moving the mouse pointer over it.',
67 'no'
68 )
69 )
70
71 cfg.Add(
72 BoolVariable(
73 'NSIS_CONFIG_SILENT_SUPPORT',
74 'enables support for making installers that are completely silent.',
75 'yes'
76 )
77 )
78
79 cfg.Add(
80 BoolVariable(
81 'NSIS_CONFIG_VISIBLE_SUPPORT',
82 'enables support for making installers that are visible.',
83 'yes'
84 )
85 )
86
87 cfg.Add(
88 BoolVariable(
89 'NSIS_CONFIG_ENHANCEDUI_SUPPORT',
90 'enables support for CreateFont, SetCtlColors (used by some UIs), SetBrandingImage, .onGUIInit, etc.',
91 'yes'
92 )
93 )
94
95 cfg.Add(
96 BoolVariable(
97 'NSIS_CONFIG_COMPRESSION_SUPPORT',
98 'enables support for making installers that use compression (recommended).',
99 'yes'
100 )
101 )
102
103 cfg.Add(
104 BoolVariable(
105 'NSIS_COMPRESS_BZIP2_SMALLMODE',
106 "if defined, bzip2's decompressor uses bzip2's alternative decompression method that uses less runtime memory, at the expense of speed (and executable size). not recommended.",
107 'no'
108 )
109 )
110
111 cfg.Add(
112 (
113 'NSIS_COMPRESS_BZIP2_LEVEL',
114 'bzip2 compression window size. 1-9 is valid. 9 uses the most memory, but typically compresses best (recommended). 1 uses the least memory, but typically compresses the worst.',
115 9
116 )
117 )
118
119
120 cfg.Add(
121 BoolVariable(
122 'NSIS_CONFIG_CRC_SUPPORT',
123 'enables support for installer verification. HIGHLY recommended.',
124 'yes'
125 )
126 )
127
128 cfg.Add(
129 BoolVariable(
130 'NSIS_CONFIG_CRC_ANAL',
131 'makes the CRC verification extremely careful, meaning extra bytes on the end of file, or the first 512 bytes changing, will give error. Enable this if you are paranoid, otherwise leaving it off seems safe (and is less prone to reporting virii). If you will be digitally signing your installers, leave this off.',
132 'no'
133 )
134 )
135
136 cfg.Add(
137 BoolVariable(
138 'NSIS_CONFIG_LOG',
139 'enables the logging facility. turning this on (by uncommenting it) adds about 4kb, but can be useful in debugging your installers.',
140 'no'
141 )
142 )
143
144 cfg.Add(
145 BoolVariable(
146 'NSIS_CONFIG_LOG_ODS',
147 'makes the logging facility use OutputDebugString instead of a file.',
148 'no'
149 )
150 )
151
152 cfg.Add(
153 BoolVariable(
154 'NSIS_CONFIG_LOG_STDOUT',
155 'makes the logging facility use stdout instead of a file.',
156 'no'
157 )
158 )
159
160 cfg.Add(
161 BoolVariable(
162 'NSIS_CONFIG_LOG_TIMESTAMP',
163 'adds a timestamp to each log line.',
164 'no'
165 )
166 )
167
168 cfg.Add(
169 BoolVariable(
170 'NSIS_SUPPORT_BGBG',
171 'enables support for the blue (well, whatever color you want) gradient background window.',
172 'yes'
173 )
174 )
175
176 cfg.Add(
177 BoolVariable(
178 'NSIS_SUPPORT_CODECALLBACKS',
179 'enables support for installer code callbacks. recommended, as it uses a minimum of space and allows for neat functionality.',
180 'yes'
181 )
182 )
183
184 cfg.Add(
185 BoolVariable(
186 'NSIS_SUPPORT_MOVEONREBOOT',
187 'enables support for uninstallers that automatically delete themselves from the temp directory, as well as the reboot moving/deleting modes of Delete and Rename. Adds about 512 gay bytes..',
188 'yes'
189 )
190 )
191
192 ### Instruction enabling configuration
193
194 cfg.Add(
195 BoolVariable(
196 'NSIS_SUPPORT_ACTIVEXREG',
197 'enables activeX plug-in registration and deregistration, as well as CallInstDLL',
198 'yes'
199 )
200 )
201
202 cfg.Add(
203 BoolVariable(
204 'NSIS_SUPPORT_INTOPTS',
205 'enables support for IntCmp, IntCmpU, IntOp, and IntFmt.',
206 'yes'
207 )
208 )
209
210 cfg.Add(
211 BoolVariable(
212 'NSIS_SUPPORT_STROPTS',
213 'enables support for StrCmp, StrCpy, and StrLen, as well as Get*Local.',
214 'yes'
215 )
216 )
217
218 cfg.Add(
219 BoolVariable(
220 'NSIS_SUPPORT_STACK',
221 'enables support for the stack (Push, Pop, Exch)',
222 'yes'
223 )
224 )
225
226 cfg.Add(
227 BoolVariable(
228 'NSIS_SUPPORT_FILEFUNCTIONS',
229 'enables support for FileOpen,FileClose, FileSeek, FileRead, and FileWrite.',
230 'yes'
231 )
232 )
233
234 cfg.Add(
235 BoolVariable(
236 'NSIS_SUPPORT_FINDFIRST',
237 'enables support for FindFirst, FindNext, and FindClose.',
238 'yes'
239 )
240 )
241
242 cfg.Add(
243 BoolVariable(
244 'NSIS_SUPPORT_CREATESHORTCUT',
245 'enables support for CreateShortcut.',
246 'yes'
247 )
248 )
249
250 cfg.Add(
251 BoolVariable(
252 'NSIS_SUPPORT_INIFILES',
253 'enables support for ReadINIStr and WriteINIStr.',
254 'yes'
255 )
256 )
257
258 cfg.Add(
259 BoolVariable(
260 'NSIS_SUPPORT_REGISTRYFUNCTIONS',
261 'enables support for ReadRegStr, ReadRegDWORD, WriteRegStr, etc etc etc.',
262 'yes'
263 )
264 )
265
266 cfg.Add(
267 BoolVariable(
268 'NSIS_SUPPORT_COPYFILES',
269 'enables support for CopyFiles',
270 'yes'
271 )
272 )
273
274 cfg.Add(
275 BoolVariable(
276 'NSIS_SUPPORT_REBOOT',
277 'enables support for Reboot, IfRebootFlag, SetRebootFlag',
278 'yes'
279 )
280 )
281
282 cfg.Add(
283 BoolVariable(
284 'NSIS_SUPPORT_FNUTIL',
285 'enables support for GetFullPathName, GetTempFileName, and SearchPath',
286 'yes'
287 )
288 )
289
290 cfg.Add(
291 BoolVariable(
292 'NSIS_SUPPORT_EXECUTE',
293 'enables support for Exec and ExecWait',
294 'yes'
295 )
296 )
297
298 cfg.Add(
299 BoolVariable(
300 'NSIS_SUPPORT_SHELLEXECUTE',
301 'enables support for ExecShell',
302 'yes'
303 )
304 )
305
306 cfg.Add(
307 BoolVariable(
308 'NSIS_SUPPORT_GETDLLVERSION',
309 'enables support for GetDLLVersion',
310 'yes'
311 )
312 )
313
314 cfg.Add(
315 BoolVariable(
316 'NSIS_SUPPORT_GETFILETIME',
317 'enables support for GetFileTime',
318 'yes'
319 )
320 )
321
322 cfg.Add(
323 BoolVariable(
324 'NSIS_SUPPORT_HWNDS',
325 'enables support for FindWindow, SendMessage, and IsWindow',
326 'yes'
327 )
328 )
329
330 cfg.Add(
331 BoolVariable(
332 'NSIS_SUPPORT_ENVIRONMENT',
333 'enables support for ReadEnvStr and ExpandEnvStrings',
334 'yes'
335 )
336 )
337
338 cfg.Add(
339 BoolVariable(
340 'NSIS_SUPPORT_RMDIR',
341 'enables support for RMDir',
342 'yes'
343 )
344 )
345
346 cfg.Add(
347 BoolVariable(
348 'NSIS_SUPPORT_FILE',
349 'enables support for File (extracting files)',
350 'yes'
351 )
352 )
353
354 cfg.Add(
355 BoolVariable(
356 'NSIS_SUPPORT_DELETE',
357 'enables support for Delete (delete files)',
358 'yes'
359 )
360 )
361
362 cfg.Add(
363 BoolVariable(
364 'NSIS_SUPPORT_RENAME',
365 'enables support for Rename (rename files)',
366 'yes'
367 )
368 )
369
370 cfg.Add(
371 BoolVariable(
372 'NSIS_SUPPORT_MESSAGEBOX',
373 'enables support for MessageBox',
374 'yes'
375 )
376 )
377
378 cfg.Add(
379 BoolVariable(
380 'NSIS_SUPPORT_VERSION_INFO',
381 'enables support for version information in the installer',
382 'yes'
383 )
384 )
385
386 cfg.Add(
387 BoolVariable(
388 'NSIS_FIX_DEFINES_IN_STRINGS',
389 'fixes defines inside defines and handles chars $ perfectly',
390 'no'
391 )
392 )
393
394 cfg.Add(
395 BoolVariable(
396 'NSIS_SUPPORT_STANDARD_PREDEFINES',
397 'enables standard predefines - __FILE__, __LINE__, __DATE__, __TIME__ and __TIMESTAMP__',
398 'yes'
399 )
400 )
401
402 cfg.Add(
403 BoolVariable(
404 'NSIS_LOCKWINDOW_SUPPORT',
405 'enables the LockWindow command',
406 'yes'
407 )
408 )
409
410 cfg.Add(
411 BoolVariable(
412 'NSIS_CONFIG_PLUGIN_SUPPORT',
413 'enables installer plug-ins support',
414 'yes'
415 )
416 )
417
418 cfg.Add(
419 BoolVariable(
420 'NSIS_FIX_COMMENT_HANDLING',
421 'fixes comment handling',
422 'yes'
423 )
424 )
425
426 cfg.Add(
427 BoolVariable(
428 'NSIS_CONFIG_CONST_DATA_PATH',
429 'determines if plugins, includes, stubs etc. are located in a constant path set at build-time',
430 defenv['PLATFORM'] != 'win32'
431 )
432 )
433
434 ### Generate help
435
436 Help(cfg.GenerateHelpText(defenv))
437
438 ### Apply configuration
439
440 env = Environment()
441 cfg.Update(env)
442
443 def AddValuedDefine(define):
444 defenv.Append(NSIS_CPPDEFINES = [(define, env[define])])
445
446 def AddBoolDefine(define):
447 if env[define]:
448 defenv.Append(NSIS_CPPDEFINES = [define])
449
450 def AddStringDefine(define):
451 defenv.Append(NSIS_CPPDEFINES = [(define, '"%s"' % env[define])])
452
453 AddValuedDefine('NSIS_MAX_STRLEN')
454 AddValuedDefine('NSIS_MAX_INST_TYPES')
455 AddValuedDefine('NSIS_DEFAULT_LANG')
456
457 AddBoolDefine('NSIS_CONFIG_UNINSTALL_SUPPORT')
458 AddBoolDefine('NSIS_CONFIG_LICENSEPAGE')
459 AddBoolDefine('NSIS_CONFIG_COMPONENTPAGE')
460 AddBoolDefine('NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE')
461 AddBoolDefine('NSIS_CONFIG_SILENT_SUPPORT')
462 AddBoolDefine('NSIS_CONFIG_VISIBLE_SUPPORT')
463 AddBoolDefine('NSIS_CONFIG_ENHANCEDUI_SUPPORT')
464 AddBoolDefine('NSIS_CONFIG_COMPRESSION_SUPPORT')
465 AddBoolDefine('NSIS_COMPRESS_BZIP2_SMALLMODE')
466
467 AddValuedDefine('NSIS_COMPRESS_BZIP2_LEVEL')
468
469 AddBoolDefine('NSIS_CONFIG_CRC_SUPPORT')
470 AddBoolDefine('NSIS_CONFIG_CRC_ANAL')
471 AddBoolDefine('NSIS_CONFIG_LOG')
472 AddBoolDefine('NSIS_CONFIG_LOG_ODS')
473 AddBoolDefine('NSIS_CONFIG_LOG_STDOUT')
474 AddBoolDefine('NSIS_CONFIG_LOG_TIMESTAMP')
475 AddBoolDefine('NSIS_SUPPORT_BGBG')
476 AddBoolDefine('NSIS_SUPPORT_CODECALLBACKS')
477 AddBoolDefine('NSIS_SUPPORT_MOVEONREBOOT')
478 AddBoolDefine('NSIS_SUPPORT_ACTIVEXREG')
479 AddBoolDefine('NSIS_SUPPORT_INTOPTS')
480 AddBoolDefine('NSIS_SUPPORT_STROPTS')
481 AddBoolDefine('NSIS_SUPPORT_STACK')
482 AddBoolDefine('NSIS_SUPPORT_FILEFUNCTIONS')
483 AddBoolDefine('NSIS_SUPPORT_FINDFIRST')
484 AddBoolDefine('NSIS_SUPPORT_CREATESHORTCUT')
485 AddBoolDefine('NSIS_SUPPORT_INIFILES')
486 AddBoolDefine('NSIS_SUPPORT_REGISTRYFUNCTIONS')
487 AddBoolDefine('NSIS_SUPPORT_COPYFILES')
488 AddBoolDefine('NSIS_SUPPORT_REBOOT')
489 AddBoolDefine('NSIS_SUPPORT_FNUTIL')
490 AddBoolDefine('NSIS_SUPPORT_EXECUTE')
491 AddBoolDefine('NSIS_SUPPORT_SHELLEXECUTE')
492 AddBoolDefine('NSIS_SUPPORT_GETDLLVERSION')
493 AddBoolDefine('NSIS_SUPPORT_GETFILETIME')
494 AddBoolDefine('NSIS_SUPPORT_HWNDS')
495 AddBoolDefine('NSIS_SUPPORT_ENVIRONMENT')
496 AddBoolDefine('NSIS_SUPPORT_RMDIR')
497 AddBoolDefine('NSIS_SUPPORT_FILE')
498 AddBoolDefine('NSIS_SUPPORT_DELETE')
499 AddBoolDefine('NSIS_SUPPORT_RENAME')
500 AddBoolDefine('NSIS_SUPPORT_MESSAGEBOX')
501 AddBoolDefine('NSIS_SUPPORT_VERSION_INFO')
502 AddBoolDefine('NSIS_FIX_DEFINES_IN_STRINGS')
503 AddBoolDefine('NSIS_SUPPORT_STANDARD_PREDEFINES')
504 AddBoolDefine('NSIS_LOCKWINDOW_SUPPORT')
505 AddBoolDefine('NSIS_CONFIG_PLUGIN_SUPPORT')
506 AddBoolDefine('NSIS_FIX_COMMENT_HANDLING')
507 AddBoolDefine('NSIS_CONFIG_CONST_DATA_PATH')
508
509 AddStringDefine('NSIS_VARS_SECTION')