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.
30 lines
509 B
NSIS
30 lines
509 B
NSIS
; Push $filenamestring (e.g. 'c:\this\and\that\filename.htm')
|
|
; Push '\\'
|
|
; Pop $R0
|
|
; Call StrSlash
|
|
; Pop $R0
|
|
; ;Now $R0 contains 'c:/this/and/that/filename.htm'
|
|
Function StrSlash
|
|
Exch $R0
|
|
Push $R1
|
|
Push $R2
|
|
StrCpy $R1 0
|
|
loop:
|
|
IntOp $R1 $R1 - 1
|
|
StrCpy $R2 $R0 1 $R1
|
|
StrCmp $R2 "" done
|
|
StrCmp $R2 "\" 0 loop ; "
|
|
StrCpy $R2 $R0 $R1
|
|
Push $R1
|
|
IntOp $R1 $R1 + 1
|
|
StrCpy $R1 $R0 "" $R1
|
|
StrCpy $R0 "$R2/$R1"
|
|
Pop $R1
|
|
IntOp $R1 $R1 - 1
|
|
Goto loop
|
|
done:
|
|
Pop $R2
|
|
Pop $R1
|
|
Exch $R0
|
|
FunctionEnd
|