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:
parent
0eb6b1be22
commit
c2fce2e62a
1 changed files with 91 additions and 88 deletions
|
@ -1,8 +1,5 @@
|
|||
;Install CVS Data for anonymous
|
||||
;access to the NSIS CVS server
|
||||
|
||||
;Silent installer executed
|
||||
;by NSIS Update
|
||||
;Install CVS Data for anonymous access to the NSIS CVS server
|
||||
;Silent installer executed by NSIS Update
|
||||
|
||||
;Written by Joost Verburg
|
||||
|
||||
|
@ -15,19 +12,19 @@ SetCompressor bzip2
|
|||
|
||||
SilentInstall silent
|
||||
|
||||
!define NSISPATH $1
|
||||
Var NSISPATH
|
||||
|
||||
;--------------------------------
|
||||
;Macro
|
||||
|
||||
!macro CVSDATA DIR
|
||||
|
||||
SetOutPath "${NSISPATH}\${DIR}\CVS"
|
||||
File "/oname=${NSISPATH}\${DIR}\CVS\Entries" "..\${DIR}\CVS\Entries"
|
||||
SetOutPath "$NSISPATH\${DIR}\CVS"
|
||||
File "/oname=$NSISPATH\${DIR}\CVS\Entries" "..\${DIR}\CVS\Entries"
|
||||
;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 "/oname=${NSISPATH}\${DIR}\CVS\Repository" "..\${DIR}\CVS\Repository"
|
||||
File "/oname=${NSISPATH}\${DIR}\CVS\Root" "..\${DIR}\CVS\Root"
|
||||
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\Root" "..\${DIR}\CVS\Root"
|
||||
|
||||
!macroend
|
||||
|
||||
|
@ -36,9 +33,9 @@ SilentInstall silent
|
|||
|
||||
Function .onInit
|
||||
|
||||
StrCpy ${NSISPATH} "$EXEDIR\.."
|
||||
StrCpy $NSISPATH "$EXEDIR\.."
|
||||
|
||||
IfFileExists "${NSISPATH}\CVS\Root" "" +6
|
||||
IfFileExists "$NSISPATH\CVS\Root" "" +6
|
||||
Call GetParameters
|
||||
Pop $R0
|
||||
StrCmp $R0 "nooverwrite" +2
|
||||
|
@ -48,10 +45,47 @@ Function .onInit
|
|||
|
||||
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
|
||||
|
||||
Section ""
|
||||
Section
|
||||
|
||||
!insertmacro CVSDATA "."
|
||||
!insertmacro CVSDATA "Bin"
|
||||
|
@ -71,6 +105,7 @@ Section ""
|
|||
!insertmacro CVSDATA "Contrib\Language files"
|
||||
!insertmacro CVSDATA "Contrib\Makensisw"
|
||||
!insertmacro CVSDATA "Contrib\Math"
|
||||
!insertmacro CVSDATA "Contrib\Math\Source"
|
||||
!insertmacro CVSDATA "Contrib\Modern UI"
|
||||
!insertmacro CVSDATA "Contrib\Modern UI\Language files"
|
||||
!insertmacro CVSDATA "Contrib\nsExec"
|
||||
|
@ -102,35 +137,3 @@ Section ""
|
|||
!insertmacro CVSDATA "Source\zlib"
|
||||
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue