fixed links

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5481 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2008-01-12 15:37:57 +00:00
parent 8661522b43
commit 26d527f8e4
4 changed files with 18 additions and 38 deletions

View file

@ -679,7 +679,7 @@ Call functions:
\c ; $R0="C:\ftp"
\c SectionEnd
\S1{headers_getparameters} GetParameters
\S1{getparameters} GetParameters
\b Get command line parameters.
@ -770,7 +770,7 @@ Call functions:
\c ; $R0="\\SuperPimp\NSIS"
\c SectionEnd
\S1{headers_getparent} GetParent
\S1{getparent} GetParent
\b Get parent directory.
@ -1620,7 +1620,7 @@ Call functions:
\c ${FileRecode} "C:\SCANDISK.LOG" "CharToOem"
\c SectionEnd
\S1{headers_trimnewlines} TrimNewLines
\S1{trimnewlines} TrimNewLines
\b Trim newlines in a string.

View file

@ -656,7 +656,7 @@ Released on October 20th, 2006
\S2{} Minor Changes
\b Added Vista support to \R{getwindowsversion}{GetWindowsVersion}
\b Added Vista support to GetWindowsVersion
\b Added \L{../Include/x64.nsh}{x64.nsh} including a few simple macros for handling x64 installations
@ -1449,7 +1449,7 @@ Released on March 19th, 2005
\b Added components.c to the Makefile (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1123154&group_id=22049&atid=373087}{patch #1123154})
\b Added missing \R{clearerrors}{ClearErrors} in \R{getwindowsversion}{GetWindowsVersion} (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1155588&group_id=22049&atid=373085}{bug #1155588})
\b Added missing \R{clearerrors}{ClearErrors} in GetWindowsVersion (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1155588&group_id=22049&atid=373085}{bug #1155588})
\b Fixed a bug in install.sh that made it try to install a non existing directory

View file

@ -20,38 +20,16 @@ Since the directory page can not be shown on silent installers, the user has an
\c foo.exe /S /D=C:\Program Files\Foo
If your installer/uninstaller requires some more information that can not be gathered when silent, you can allow the user to specify that information on the command line and process it in .onInit. You can use \R{getoptions}{GetOptions}, or a variant of the following example:
If your installer/uninstaller requires some more information that can not be gathered when silent, you can allow the user to specify that information on the command line and process it in .onInit. You can use \R{getoptions}{GetOptions}.
\c !include FileFunc.nsh
\c !insertmacro GetParameters
\c !insertmacro GetOptions
\c
\c Function .onInit
\c Call GetParameters
\c Pop $2
\c # search for quoted /USERNAME
\c StrCpy $1 '"'
\c Push $2
\c Push '"/USERNAME='
\c Call StrStr
\c Pop $0
\c StrCpy $0 $0 "" 1 # skip quote
\c StrCmp $0 "" "" next
\c # search for non quoted /USERNAME
\c StrCpy $1 ' '
\c Push $2
\c Push '/USERNAME='
\c Call StrStr
\c Pop $0
\c next:
\c StrCmp $0 "" done
\c # copy the value after /USERNAME=
\c StrCpy $0 $0 "" 10
\c # search for the next parameter
\c Push $0
\c Push $1
\c Call StrStr
\c Pop $1
\c StrCmp $1 "" done
\c StrLen $1 $1
\c StrCpy $0 $0 -$1
\c done:
\c ${GetParameters} $R0
\c ClearErrors
\c ${GetOptions} $R0 /USERNAME= $0
\c FunctionEnd
The above example will copy the value the user passes on after /USERNAME= into $0. This allows the user to specify the required information on the command line instead of using the interactive user interface. The user can use:
@ -60,8 +38,10 @@ The above example will copy the value the user passes on after /USERNAME= into $
or:
\c foo.exe /S "/USERNAME=string with spaces" /D=C:\Program Files\Foo
\c foo.exe /S /USERNAME=string with spaces /D=C:\Program Files\Foo
\R{getparameters}{GetParameters} and \R{strstr}{StrStr} can be found in \k{usefulfunctions}.
or:
\c foo.exe /S /USERNAME="string with spaces" /D=C:\Program Files\Foo
If your installer/uninstaller requires a lot of information and you want it to be able to be silent, you should allow the user to pass on a path to an answers file. This would be much more comfortable than writing all of the information on the command line.

View file

@ -47,7 +47,7 @@ The command line of the installer. The format of the command line can be one of
\b installer.exe PARAMETER PARAMETER PARAMETER
\b For parsing out the PARAMETER portion, see GetParameters on the \R{getparameters}{useful functions appendix}. If /D= is specified on the command line (to override the install directory) it won't show up in $CMDLINE.
\b For parsing out the PARAMETER portion, see \R{getparameters}{GetParameters}. If /D= is specified on the command line (to override the install directory) it won't show up in $CMDLINE.
\e{$LANGUAGE}