- updated history
- added information about silent installers/uninstallers git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3462 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b1a527c4ce
commit
2e9cb26270
7 changed files with 152 additions and 27 deletions
|
@ -257,13 +257,17 @@ Sets whether or not the details of the uninstall are shown. Can be 'hide' to hid
|
|||
|
||||
\c \\<b\\>normal\\</b\\>|silent|silentlog
|
||||
|
||||
Specifies whether or not the installer should be silent. If it is 'silent' or 'silentlog', all sections that have the SF_SELECTED flag are installed quietly (you can set this flag using see \R{sectionsetflags}{SectionSetFlags}), with no screen output from the installer itself (MessageBoxes are still displayed on error, and the script can still display whatever it wants). Note that if this is set to 'normal' and the user runs the installer with /S (case sensitive) on the command line, it will behave as if SilentInstall 'silent' was used. Note: see also \R{logset}{LogSet}.
|
||||
Specifies whether or not the installer should be silent. If it is 'silent' or 'silentlog', all sections that have the SF_SELECTED flag are installed quietly (you can set this flag using see \R{sectionsetflags}{SectionSetFlags}), with no screen output from the installer itself (the script can still display whatever it wants, use \R{messagebox}{MessageBox}'s /SD to specify a default for silent installers). Note that if this is set to 'normal' and the user runs the installer with /S (case sensitive) on the command line, it will behave as if SilentInstall 'silent' was used. Note: see also \R{logset}{LogSet}.
|
||||
|
||||
See \k{silent} for more information.
|
||||
|
||||
\S2{asilentuninstall} SilentUnInstall
|
||||
|
||||
\c \\<b\\>normal\\</b\\>|silent
|
||||
|
||||
Specifies whether or not the uninstaller should be silent. If it is 'silent' or 'silentlog', the uninstall section will run quietly, with no screen output from the uninstaller itself (MessageBoxes are still displayed on error, and the script can still display whatever it wants). Note that if this is set to 'normal' and the user runs the uninstaller with /S on the command line, it will behave as if SilentUnInstall 'silent' was used. Note: see also \R{logset}{LogSet}.
|
||||
Specifies whether or not the uninstaller should be silent. If it is 'silent' or 'silentlog', the uninstall section will run quietly, with no screen output from the uninstaller itself (the script can still display whatever it wants, use \R{messagebox}{MessageBox}'s /SD to specify a default for silent installers). Note that if this is set to 'normal' and the user runs the uninstaller with /S on the command line, it will behave as if SilentUnInstall 'silent' was used. Note: see also \R{logset}{LogSet}.
|
||||
|
||||
See \k{silent} for more information.
|
||||
|
||||
\S2{aspacetexts} SpaceTexts
|
||||
|
||||
|
|
|
@ -1,25 +1,27 @@
|
|||
bin\halibut.exe chm_config.but intro.but tutorial.but usage.but script.but var.but labels.but jumps.but pages.but sections.but usection.but functions.but callback.but attributes.but compilerflags.but basic.but registry.but generalpurpose.but flowcontrol.but file.but uninstall.but misc.but string.but stack.but int.but reboot.but log.but sec.but ui.but langs.but plugin.but compiler.but defines.but modernui.but usefulfunc.but usefulinfos.but history.but credits.but license.but
|
||||
@copy Contents.html IndexPage.html
|
||||
|
||||
@copy ..\*.css .
|
||||
@hhc nsis.hhp
|
||||
@del /F *.html *.hhc *.hhk *.css
|
||||
@if not "x%OS%x" == "xWindows_NTx" goto CHMCopy
|
||||
@fc /B nsis.chm ..\..\nsis.chm > nul
|
||||
@if %errorlevel% == 0 goto SkipCHMCopy
|
||||
:CHMCopy
|
||||
@copy nsis.chm ..\..\
|
||||
:SkipCHMCopy
|
||||
@del nsis.chm
|
||||
|
||||
bin\halibut.exe config.but intro.but tutorial.but usage.but script.but var.but labels.but jumps.but pages.but sections.but usection.but functions.but callback.but attributes.but compilerflags.but basic.but registry.but generalpurpose.but flowcontrol.but file.but uninstall.but misc.but string.but stack.but int.but reboot.but log.but sec.but ui.but langs.but plugin.but compiler.but defines.but modernui.but usefulfunc.but usefulinfos.but history.but credits.but license.but
|
||||
bin\halibut.exe chm_config.but intro.but tutorial.but usage.but script.but var.but labels.but jumps.but pages.but sections.but usection.but functions.but callback.but attributes.but compilerflags.but basic.but registry.but generalpurpose.but flowcontrol.but file.but uninstall.but misc.but string.but stack.but int.but reboot.but log.but sec.but ui.but langs.but plugin.but silent.but compiler.but defines.but modernui.but usefulfunc.but usefulinfos.but history.but credits.but license.but
|
||||
@echo off
|
||||
@copy Contents.html index.html > nul
|
||||
@copy index.html IndexPage.html > nul
|
||||
@if "x%OS%x" == "xWindows_NTx" goto nt
|
||||
@copy *.html .. > nul
|
||||
@goto done
|
||||
copy Contents.html IndexPage.html
|
||||
|
||||
copy ..\*.css .
|
||||
hhc nsis.hhp
|
||||
del /F *.html *.hhc *.hhk *.css
|
||||
if not "x%OS%x" == "xWindows_NTx" goto CHMCopy
|
||||
fc /B nsis.chm ..\..\nsis.chm > nul
|
||||
if %errorlevel% == 0 goto SkipCHMCopy
|
||||
:CHMCopy
|
||||
copy nsis.chm ..\..\
|
||||
:SkipCHMCopy
|
||||
del nsis.chm
|
||||
|
||||
@echo on
|
||||
bin\halibut.exe config.but intro.but tutorial.but usage.but script.but var.but labels.but jumps.but pages.but sections.but usection.but functions.but callback.but attributes.but compilerflags.but basic.but registry.but generalpurpose.but flowcontrol.but file.but uninstall.but misc.but string.but stack.but int.but reboot.but log.but sec.but ui.but langs.but plugin.but silent.but compiler.but defines.but modernui.but usefulfunc.but usefulinfos.but history.but credits.but license.but
|
||||
@echo off
|
||||
copy Contents.html index.html > nul
|
||||
copy index.html IndexPage.html > nul
|
||||
if "x%OS%x" == "xWindows_NTx" goto nt
|
||||
copy *.html .. > nul
|
||||
goto done
|
||||
:nt
|
||||
@for %%A in (*.html) do (fc "%%A" "..\%%~nxA" || copy "%%A" ..) > nul
|
||||
for %%A in (*.html) do (fc "%%A" "..\%%~nxA" || copy "%%A" ..) > nul
|
||||
:done
|
||||
@del *.html > nul
|
||||
del *.html > nul
|
||||
|
|
|
@ -145,7 +145,7 @@ Return_check can be 0 (or empty, or left off), or one of the following:
|
|||
|
||||
If the return value of the MessageBox is return_check, the installer will Goto jumpto.
|
||||
|
||||
Use the /SD parameter with one of the return_check values above to specify the option that will be used when the installer is silent.
|
||||
Use the /SD parameter with one of the return_check values above to specify the option that will be used when the installer is silent. See \k{silent} for more information.
|
||||
|
||||
\S2{return} Return
|
||||
|
||||
|
|
|
@ -1,5 +1,57 @@
|
|||
\A{history} Changelog and Release Notes
|
||||
|
||||
\H{v2.0} 2.0
|
||||
|
||||
\S1{v2.0-cl-198} Changelog from 1.98
|
||||
|
||||
\b \R{langs}{Multiple languages in one installer support} (with RTL support)
|
||||
|
||||
\b \R{plugindlls}{Easier plug-in system}
|
||||
|
||||
\b \L{../Contrib/Modern UI/Readme.html}{Modern User Interface} (optional)
|
||||
|
||||
\b \W{http://www.7-zip.org/}{LZMA} compression which provides installers 20% smaller than bzip2
|
||||
|
||||
\b \R{pages}{Easier paging system} (no more .onNextPage, .onPrevPage)
|
||||
|
||||
\b Components are presented as a tree which allows sub components
|
||||
|
||||
\b \R{varuser}{User variables} ($VARNAME)
|
||||
|
||||
\b \R{aicon}{Icon} and \R{auninstallicon}{UninstallIcon} support any color depth and sizes, not just 32x32x16
|
||||
|
||||
\b \R{acheckbitmap}{CheckBitmap} supports any color depth
|
||||
|
||||
\b Improved large files handling
|
||||
|
||||
\b License data can be RTF
|
||||
|
||||
\b CHM documentation for easy browsing
|
||||
|
||||
\b \R{silent}{Better silent support}
|
||||
|
||||
\b Improved plug-ins: \L{../Contrib/InstallOptions/Readme.html}{InstallOptions}, \L{../Contrib/NSISdl/ReadMe.txt}{NSISdl} and \L{../Contrib/Splash/splash.txt}{Splash}
|
||||
|
||||
\b New plug-ins: \L{../Contrib/AdvSplash/advsplash.txt}{AdvSplash}, \L{../Contrib/Banner/Readme.txt}{Banner}, \L{../Contrib/BgImage/BgImage.txt}{BgImage}, \L{../Contrib/Dialer/Dialer.txt}{Dialer}, \L{../Examples/languages.nsi}{LangDLL}, \L{../Contrib/Math/Math.txt}{Math}, \L{../Contrib/nsExec/nsExec.txt}{nsExec}, \L{../Contrib/StartMenu/Readme.txt}{StartMenu}, \L{../Contrib/System/System.txt}{System}, \L{../Contrib/UserInfo/UserInfo.nsi}{UserInfo} and \L{../Contrib/VPatch/Readme.html}{VPatch}
|
||||
|
||||
\b New and improved utilities: \L{../Contrib/Makensisw/Readme.txt}{MakeNSISw}, NSIS Menu (NSIS.exe), NSIS Update (Bin\\NSIS Update.exe) and zip2exe (Bin\\zip2exe.exe)
|
||||
|
||||
\b New commands: \R{addplugindir}{!AddPluginDir}, \R{echo}{!echo}, \R{ifmacrodef}{!ifmacrodef}, \R{ifmacrondef}{!ifmacrondef}, \R{verbose}{!verbose}, \R{aaddbrandingimage}{AddBrandingImage}, \R{asetallowskipfiles}{AllowSkipFiles}, \R{achangeui}{ChangeUI}, \R{acheckbitmap}{CheckBitmap}, \R{createfont}{CreateFont}, \R{adirvar}{DirVar}, \R{adirverify}{DirVerify}, \R{enablewindow}{EnableWindow}, \R{afilebufsize}{FileBufSize}, \R{flushini}{FlushINI}, \R{sgetcurinsttype}{GetCurInstType}, \R{getdlgitem}{GetDlgItem}, \R{getinstdirerror}{GetInstDirError}, \R{ifabort}{IfAbort}, \R{ifsilent}{IfSilent}, \R{initpluginsdir}{InitPluginsDir}, \R{sinsttypegettext}{InstTypeGetText}, \R{sinsttypesettext}{InstTypeSetText}, \R{langstring}{LangString}, \R{alicensebkcolor}{LicenseBkColor}, \R{alicenseforceselection}{LicenseForceSelection}, \R{licenselangstring}{LicenseLangString}, \R{loadlanguagefile}{LoadLanguageFile}, LockWindow, \R{page}{Page}, \R{pageex}{PageEx}, \R{reservefile}{ReserveFile}, \R{sectiongetinsttypes}{SectionGetInstTypes}, \R{ssectiongetsize}{SectionGetSize}, \R{sectionsetinsttypes}{SectionSetInstTypes}, \R{ssectionsetsize}{SectionSetSize}, \R{setbrandingimage}{SetBrandingImage}, SetCompressionLevel, \R{asetcompressor}{SetCompressor}, \R{asetcompressordictsize}{SetCompressorDictSize}, \R{setctlcolors}{SetCtlColors}, \R{ssetcurinsttype}{SetCurInstType}, \R{setpluginunload}{SetPluginUnload}, \R{setsilent}{SetSilent}, \R{showwindow}{ShowWindow}, \R{ssubsection}{SubSection}, \R{ssubsectionend}{SubSectionEnd}, \R{var}{Var}, \R{viaddversionkey}{VIAddVersionKey}, \R{viproductversion}{VIProductVersion} and \R{axpstyle}{XPStyle}
|
||||
|
||||
\b Removed commands: DisabledBitmap, EnabledBitmap and SectionDivider
|
||||
|
||||
\b All this and a smaller overhead! =)
|
||||
|
||||
\b A lot more... See below for more information
|
||||
|
||||
\S1{v2.0-cl} Changelog from rc4
|
||||
|
||||
\b Command line parser ignored any switches after tokens that are not switches
|
||||
|
||||
\b Updated and fixed language files
|
||||
|
||||
\b Updated, fixed and improved documentation
|
||||
|
||||
\H{v2.0rc4} 2.0 Release Candidate 4
|
||||
|
||||
Released on February 2nd, 2004
|
||||
|
|
|
@ -36,7 +36,7 @@ Sets the install types the section specified by section_index defaults to the en
|
|||
|
||||
because the binary value for 5 is "00000101". The error flag will be set if the section index specified is out of range.
|
||||
|
||||
\S2{SectionGetInstTypes} SectionGetInstTypes
|
||||
\S2{sectiongetinsttypes} SectionGetInstTypes
|
||||
|
||||
\c section_index user_var(output)
|
||||
|
||||
|
|
67
Docs/src/silent.but
Normal file
67
Docs/src/silent.but
Normal file
|
@ -0,0 +1,67 @@
|
|||
\S0{silent} Silent Installers/Uninstallers
|
||||
|
||||
Silent installers are installers which require no user intervention and have no user interface. The user doesn't see any dialog and isn't ask any questions. This is useful for network administrators who wish to install or uninstall something without user intervention so they can preform the operation quickly over multiple number of computers. It is also useful for other developers who wish to embed another installer in their own and collect all of the required information on their installer instead of showing two installers.
|
||||
|
||||
NSIS installers and uninstallers can be both silent and not silent. When an installer or an uninstaller is silent, not all callback functions are called. \R{onguiinit}{.onGUIInit}, \R{onguiend}{.onGUIEnd}, their uninstaller equivalents and any callback related to a specific page or page type will not be called.
|
||||
|
||||
There are several methods to make an installer or an uninstaller silent:
|
||||
|
||||
\n \R{asilentinstall}{SilentInstall} and \R{asilentuninstall}{SilentUninstall}
|
||||
|
||||
\n \R{setsilent}{SetSilent}
|
||||
|
||||
\n Passing /S on the command line (case sensitive)
|
||||
|
||||
To check if the installer/uninstaller is silent use \R{ifsilent}{IfSilent}.
|
||||
|
||||
To make sure your installer will be silent when it needs to, you should check with \R{ifsilent}{IfSilent} before each command that might require user intervention or create a window. The \R{messagebox}{MessageBox} command, which is the most common culprit in silent installers, has the /SD switch to set a default answer for silent installers. If you want your installer/uninstaller to be able to be completely silent you should use this switch. All internal NSIS message boxes have defaults for silent installers. The \L{../Examples/silent.nsi}{silent.nsi example} demonstrates all aspects of this topic.
|
||||
|
||||
Since the directory page can not be shown on silent installers, the user has an option to specify the installation directory on the command line (this also works on non-silent installers/uninstallers). To do that, the user uses the /D switch as in the following example:
|
||||
|
||||
\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. For example:
|
||||
|
||||
\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 FunctionEnd
|
||||
|
||||
The above example will copy the value the user passes on after /USRNAME= 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:
|
||||
|
||||
\c foo.exe /S /USERNAME=Bar /D=C:\Program Files\Foo
|
||||
|
||||
or:
|
||||
|
||||
\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}.
|
||||
|
||||
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.
|
|
@ -129,7 +129,7 @@
|
|||
\c ; ($R0 at this point is "ass string")
|
||||
\c
|
||||
\c Function StrStr
|
||||
\c Exch $R1 ; st=haystack,old$R1, $R1=needle
|
||||
\c Exch $R1 ; st=haystack,old$R1, $R1=needle
|
||||
\c Exch ; st=old$R1,haystack
|
||||
\c Exch $R2 ; st=old$R1,old$R2, $R2=haystack
|
||||
\c Push $R3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue