forked from Imagelibrary/rtems
* filewrite.nsi, getparameters.nsi, instance-check.nsi,
mingw-path.nsi, sm-dummy.nsi, strslash.nsi, strstr.nsi,
options.nsi: Added the shared between the 2 installer scripts.
* msys-path.nsi: Fixed the last LF bug.
* rtems-autotools.nsi, rtems-tools.nsi: Fixed the instance check,
added a start menu, remove pages from target installers.
* rtems.ini: Fixed the URL links. Added support link.
* rtems_logo.bmp: Trimmed a little more to get a better image.
* ba-wrap.sh: Stop on a error.
* build-exes.sh: Use the option parameter variables. Change the
order the section appear in the installer.
42 lines
656 B
NSIS
42 lines
656 B
NSIS
; GetParameters
|
|
; input, none
|
|
; output, top of stack (replaces, with e.g. whatever)
|
|
; modifies no other variables.
|
|
|
|
Function GetParameters
|
|
|
|
Push $R0
|
|
Push $R1
|
|
Push $R2
|
|
Push $R3
|
|
|
|
StrCpy $R2 1
|
|
StrLen $R3 $CMDLINE
|
|
|
|
;Check for quote or space
|
|
StrCpy $R0 $CMDLINE $R2
|
|
StrCmp $R0 '"' 0 +3
|
|
StrCpy $R1 '"'
|
|
Goto loop
|
|
StrCpy $R1 " "
|
|
|
|
loop:
|
|
IntOp $R2 $R2 + 1
|
|
StrCpy $R0 $CMDLINE 1 $R2
|
|
StrCmp $R0 $R1 get
|
|
StrCmp $R2 $R3 get
|
|
Goto loop
|
|
|
|
get:
|
|
IntOp $R2 $R2 + 1
|
|
StrCpy $R0 $CMDLINE 1 $R2
|
|
StrCmp $R0 " " get
|
|
StrCpy $R0 $CMDLINE "" $R2
|
|
|
|
Pop $R3
|
|
Pop $R2
|
|
Pop $R1
|
|
Exch $R0
|
|
|
|
FunctionEnd
|