missing dir, function update

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3179 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2003-11-19 21:24:50 +00:00
parent 0eb6b1be22
commit c2fce2e62a

View file

@ -1,8 +1,5 @@
;Install CVS Data for anonymous ;Install CVS Data for anonymous access to the NSIS CVS server
;access to the NSIS CVS server ;Silent installer executed by NSIS Update
;Silent installer executed
;by NSIS Update
;Written by Joost Verburg ;Written by Joost Verburg
@ -15,19 +12,19 @@ SetCompressor bzip2
SilentInstall silent SilentInstall silent
!define NSISPATH $1 Var NSISPATH
;-------------------------------- ;--------------------------------
;Macro ;Macro
!macro CVSDATA DIR !macro CVSDATA DIR
SetOutPath "${NSISPATH}\${DIR}\CVS" SetOutPath "$NSISPATH\${DIR}\CVS"
File "/oname=${NSISPATH}\${DIR}\CVS\Entries" "..\${DIR}\CVS\Entries" File "/oname=$NSISPATH\${DIR}\CVS\Entries" "..\${DIR}\CVS\Entries"
;CVS sometimes uses Entries.log files. Ignore warnings about not existing Entries.log files. ;CVS sometimes uses Entries.log files. Ignore warnings about not existing Entries.log files.
File /nonfatal "/oname=${NSISPATH}\${DIR}\CVS\Entries.log" "..\${DIR}\CVS\Entries.log" File /nonfatal "/oname=$NSISPATH\${DIR}\CVS\Entries.log" "..\${DIR}\CVS\Entries.log"
File "/oname=${NSISPATH}\${DIR}\CVS\Repository" "..\${DIR}\CVS\Repository" File "/oname=$NSISPATH\${DIR}\CVS\Repository" "..\${DIR}\CVS\Repository"
File "/oname=${NSISPATH}\${DIR}\CVS\Root" "..\${DIR}\CVS\Root" File "/oname=$NSISPATH\${DIR}\CVS\Root" "..\${DIR}\CVS\Root"
!macroend !macroend
@ -36,9 +33,9 @@ SilentInstall silent
Function .onInit Function .onInit
StrCpy ${NSISPATH} "$EXEDIR\.." StrCpy $NSISPATH "$EXEDIR\.."
IfFileExists "${NSISPATH}\CVS\Root" "" +6 IfFileExists "$NSISPATH\CVS\Root" "" +6
Call GetParameters Call GetParameters
Pop $R0 Pop $R0
StrCmp $R0 "nooverwrite" +2 StrCmp $R0 "nooverwrite" +2
@ -48,10 +45,47 @@ Function .onInit
FunctionEnd FunctionEnd
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
;-------------------------------- ;--------------------------------
;Installer Section ;Installer Section
Section "" Section
!insertmacro CVSDATA "." !insertmacro CVSDATA "."
!insertmacro CVSDATA "Bin" !insertmacro CVSDATA "Bin"
@ -71,6 +105,7 @@ Section ""
!insertmacro CVSDATA "Contrib\Language files" !insertmacro CVSDATA "Contrib\Language files"
!insertmacro CVSDATA "Contrib\Makensisw" !insertmacro CVSDATA "Contrib\Makensisw"
!insertmacro CVSDATA "Contrib\Math" !insertmacro CVSDATA "Contrib\Math"
!insertmacro CVSDATA "Contrib\Math\Source"
!insertmacro CVSDATA "Contrib\Modern UI" !insertmacro CVSDATA "Contrib\Modern UI"
!insertmacro CVSDATA "Contrib\Modern UI\Language files" !insertmacro CVSDATA "Contrib\Modern UI\Language files"
!insertmacro CVSDATA "Contrib\nsExec" !insertmacro CVSDATA "Contrib\nsExec"
@ -102,35 +137,3 @@ Section ""
!insertmacro CVSDATA "Source\zlib" !insertmacro CVSDATA "Source\zlib"
SectionEnd SectionEnd
;--------------------------------
;Function
Function GetParameters
Push $R0
Push $R1
Push $R2
StrCpy $R0 $CMDLINE 1
StrCpy $R1 '"'
StrCpy $R2 1
StrCmp $R0 '"' loop
StrCpy $R1 ' ' ; we're scanning for a space instead of a quote
loop:
StrCpy $R0 $CMDLINE 1 $R2
StrCmp $R0 $R1 loop2
StrCmp $R0 "" loop2
IntOp $R2 $R2 + 1
Goto loop
loop2:
IntOp $R2 $R2 + 1
StrCpy $R0 $CMDLINE 1 $R2
StrCmp $R0 " " loop2
StrCpy $R0 $CMDLINE "" $R2
Pop $R2
Pop $R1
Exch $R0
FunctionEnd