summaryrefslogtreecommitdiffstats
path: root/contrib/mingw/options.nsi
blob: b100978fb4274a1e00fc08f665d986815e9042d4 (plain) (blame)
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
;
; $Id$
;
; RTEMS Tools Installer.
;
; Copyright Chris Johns (chrisj@rtems.org)
;

!ifndef OPTIONS_DEFINED
!define OPTIONS_DEFINED

!include "${RTEMS_SOURCE}/strstr.nsi"
!include "${RTEMS_SOURCE}/getparameters.nsi"

Var "SilentOption"
Var "DebugOption"
Var "DebugScriptOption"

Function CheckCmdLineOption
  Exch $R0
  Call GetParameters
  Push $R0
  Call StrStr
  Exch $R1
  StrCmp $R1 "" 0 +2
  StrCpy $R0 "not-found"
  Pop $R1
  Exch $R0
FunctionEnd

Function CheckSilent
  StrCpy $SilentOption ""
  Push $R0
  Push "/SILENT"
  Call CheckCmdLineOption
  Pop $R0
  StrCmp $R0 "not-found" +2 0
  StrCpy $SilentOption "/S"
  Pop $R0
FunctionEnd

Function CheckDebug
  StrCpy $DebugOption ""
  Push $R0
  Push "/DEBUG"
  Call CheckCmdLineOption
  Pop $R0
  StrCmp $R0 "not-found" +3 0
  StrCpy $DebugScriptOption "-d"
  StrCpy $DebugOption "/DEBUG"
  Pop $R0
FunctionEnd

!endif