Improved registry storage for Start Menu folder; ReserveFile macro for StartMenu plug-in; Added MUI_LANGDLL_ALWAYSSHOW option; Checkboxes on Finish page can be used to call a function; example fixes
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2646 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
59c8fcc17e
commit
5aa3a8f632
5 changed files with 138 additions and 86 deletions
|
@ -1,10 +1,14 @@
|
|||
NSIS Modern User Interface - VERSION HISTORY
|
||||
|
||||
1.65 - May 25, 2003
|
||||
1.65 - June 14, 2003
|
||||
* New page configuration system, no different system for installers
|
||||
with custom pages
|
||||
* Default windows color for the license text background
|
||||
* New format for example scripts
|
||||
* Improved registry storage for Start Menu folder
|
||||
* ReserveFile macro for StartMenu plug-in
|
||||
* Added MUI_LANGDLL_ALWAYSSHOW option
|
||||
* Checkboxes on Finish page can be used to call a function
|
||||
|
||||
1.64 - April 27, 2003
|
||||
* Support for license page with checkbox or radiobuttons to let the
|
||||
|
|
|
@ -238,7 +238,7 @@ follow these steps:</p>
|
|||
remember the users preference. You should also use it in the uninstaller to
|
||||
remove the Start Menu folders. Don't forget to remove this key in the
|
||||
uninstaller.</p>
|
||||
<p class="text">In the uninstaller, use these macro's to remove the shortcuts:</p>
|
||||
<p class="text">In the uninstaller, these macro to get the Start Menu folder:</p>
|
||||
<pre class="margin">
|
||||
!insertmacro MUI_STARTMENU_DELETE_BEGIN $R0 ;You can also use another variable
|
||||
Delete "$SMPROGRAMS\$R0\Your Shortcut.lnk"
|
||||
|
@ -256,6 +256,10 @@ follow these steps:</p>
|
|||
quotes in the value (use $\").</p>
|
||||
<p class="text"><span class="bold">MUI_FINISHPAGE_RUN_NOTCHECKED</span><br />
|
||||
Do not check the 'Run program' checkbox by default</p>
|
||||
<p class="text"><span class="bold">MUI_FINISHPAGE_RUN_FUNCTION </span><span class="parameter">function_name</span><br />
|
||||
Call a function instead of executing an application (define MUI_FINISHPAGE_RUN without parameters).
|
||||
You can use the function to exectute multiple applications or you can change the checkbox name and
|
||||
use it for other things.</p>
|
||||
</div>
|
||||
<p class="text"><span class="bold">MUI_FINISHPAGE_SHOWREADME </span><span class="parameter">file/url</span><br />
|
||||
File or website which the user can select to view (using a checkbox).
|
||||
|
@ -264,6 +268,10 @@ follow these steps:</p>
|
|||
<div class="margin">
|
||||
<p class="text"><span class="bold">MUI_FINISHPAGE_SHOWREADME_NOTCHECKED</span><br />
|
||||
Do not check the 'Show Readme' checkbox by default</p>
|
||||
<p class="text"><span class="bold">MUI_FINISHPAGE_SHOWREADME_FUNCTION </span><span class="parameter">function_name</span><br />
|
||||
Call a function instead of showing a file (define MUI_FINISHPAGE_SHOWREADME without parameters).
|
||||
You can use the function to show multiple files or you can change the checkbox name and
|
||||
use it for other things.</p>
|
||||
</div>
|
||||
<p class="text"><span class="bold">MUI_FINISHPAGE_NOAUTOCLOSE</span><br />
|
||||
Do not automatically jump to the finish page, to allow the user to
|
||||
|
@ -399,6 +407,9 @@ Function un.onInit
|
|||
|
||||
FunctionEnd
|
||||
</pre>
|
||||
<p class="text"><span class="bold">MUI_LANGDLL_ALWAYSSHOW</span><br />
|
||||
Always show the language selection dialog, even if a language has been stored in the registry.
|
||||
The language stored in the registry will be selected by default.</p>
|
||||
<p class="subheader">7. Set the descriptions for the sections</p>
|
||||
<p class="text">Insert the description macro's to set the descriptions
|
||||
for the sections. These descriptions will be displayed on the component
|
||||
|
@ -526,10 +537,12 @@ start faster.</p>
|
|||
insert the ReserveFile commands or macro's above other File commands:</p>
|
||||
<pre class="margin">
|
||||
ReserveFile "ioFile.ini" ;Your own InstallOptions INI files
|
||||
ReserveFile "${NSISDIR}\Contrib\Icons\modern-header.bmp" ;Your header bitmap
|
||||
|
||||
!insertmacro MUI_RESERVEFILE_WELCOMEFINISHPAGE ;Welcome- or Finish page
|
||||
!insertmacro MUI_RESERVEFILE_INSTALLOPTION ;InstallOptions
|
||||
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ;InstallOptions
|
||||
!insertmacro MUI_RESERVEFILE_LANGDLL ;LangDLL (language selection dialog)
|
||||
!insertmacro MUI_RESERVEFILE_STARTMENU ;Start Menu folder selection page
|
||||
</pre>
|
||||
<p class="header"><a name="examples">Examples</a></p>
|
||||
<p class="text">Basic: <a href="../../Examples/Modern UI/Basic.nsi">Basic.nsi</a><br />
|
||||
|
@ -630,12 +643,16 @@ MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE
|
|||
</p>
|
||||
<p class="header">Version history</p>
|
||||
<ul>
|
||||
<li>1.65 - May 25, 2003
|
||||
<li>1.65 - June 14, 2003
|
||||
<ul>
|
||||
<li>New page configuration system, no different system for installers
|
||||
with custom pages</li>
|
||||
<li>Default windows color for the license text background</li>
|
||||
<li>New format for example scripts</li>
|
||||
<li>Improved registry storage for Start Menu folder</li>
|
||||
<li>ReserveFile macro for StartMenu plug-in</li>
|
||||
<li>Added MUI_LANGDLL_ALWAYSSHOW option</li>
|
||||
<li>Checkboxes on Finish page can be used to call a function</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<p class="text"></p>
|
||||
|
|
|
@ -409,6 +409,48 @@
|
|||
|
||||
!macroend
|
||||
|
||||
!macro MUI_STARTMENU_INITDEFINES
|
||||
|
||||
;Check defines
|
||||
!ifndef MUI_STARTMENUPAGE_VARIABLE
|
||||
!define MUI_STARTMENUPAGE_VARIABLE "$9"
|
||||
!endif
|
||||
|
||||
!ifndef MUI_STARTMENUPAGE_DEFAULTFOLDER
|
||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${MUI_PRODUCT}"
|
||||
!endif
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_STARTMENU_GETFOLDER VAR
|
||||
|
||||
!ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
|
||||
|
||||
ReadRegStr ${MUI_TEMP1} "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
|
||||
StrCmp ${MUI_TEMP1} "" +3
|
||||
StrCpy "${VAR}" ${MUI_TEMP1}
|
||||
Goto +2
|
||||
|
||||
StrCpy "${VAR}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
|
||||
|
||||
!else
|
||||
|
||||
StrCpy "${VAR}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
|
||||
|
||||
!endif
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_STARTMENU_GETFOLDER_IFEMPTY VAR
|
||||
|
||||
StrCmp ${VAR} "" 0 mui.startmenu_writebegin_notempty
|
||||
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER ${VAR}
|
||||
|
||||
mui.startmenu_writebegin_notempty:
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_STARTMENU_WRITE_BEGIN
|
||||
|
||||
!ifndef MUI_MANUALVERBOSE
|
||||
|
@ -420,28 +462,7 @@
|
|||
StrCpy ${MUI_TEMP1} ${MUI_STARTMENUPAGE_VARIABLE} 1
|
||||
StrCmp ${MUI_TEMP1} ">" mui.startmenu_write_done
|
||||
|
||||
StrCmp ${MUI_STARTMENUPAGE_VARIABLE} "" 0 mui.startmenu_writebegin_notempty
|
||||
|
||||
!ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
|
||||
|
||||
StrCmp "${MUI_STARTMENUPAGE_VARIABLE}" "" 0 +6
|
||||
|
||||
ReadRegStr ${MUI_TEMP1} "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
|
||||
StrCmp ${MUI_TEMP1} "" +3
|
||||
StrCpy "${MUI_STARTMENUPAGE_VARIABLE}" ${MUI_TEMP1}
|
||||
Goto +2
|
||||
|
||||
StrCpy "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
|
||||
|
||||
!else
|
||||
|
||||
StrCpy "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
|
||||
|
||||
!endif
|
||||
|
||||
mui.startmenu_writebegin_notempty:
|
||||
|
||||
Pop ${MUI_TEMP1}
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER_IFEMPTY ${MUI_STARTMENUPAGE_VARIABLE}
|
||||
|
||||
!ifndef MUI_MANUALVERBOSE
|
||||
!verbose 4
|
||||
|
@ -461,6 +482,8 @@
|
|||
|
||||
mui.startmenu_write_done:
|
||||
|
||||
Pop ${MUI_TEMP1}
|
||||
|
||||
!ifndef MUI_MANUALVERBOSE
|
||||
!verbose 4
|
||||
!endif
|
||||
|
@ -469,31 +492,16 @@
|
|||
|
||||
!macro MUI_STARTMENU_DELETE_BEGIN VAR
|
||||
|
||||
!ifndef MUI_MANUALVERBOSE
|
||||
!verbose 3
|
||||
!endif
|
||||
Push ${MUI_TEMP1}
|
||||
|
||||
ReadRegStr "${VAR}" "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
|
||||
StrCmp "${VAR}" "" mui.startmenu_delete_done
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER ${VAR}
|
||||
|
||||
!ifndef MUI_MANUALVERBOSE
|
||||
!verbose 4
|
||||
!endif
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_STARTMENU_DELETE_END
|
||||
|
||||
!ifndef MUI_MANUALVERBOSE
|
||||
!verbose 3
|
||||
!endif
|
||||
Pop ${MUI_TEMP1}
|
||||
|
||||
mui.startmenu_delete_done:
|
||||
|
||||
!ifndef MUI_MANUALVERBOSE
|
||||
!verbose 4
|
||||
!endif
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_LANGDLL_DISPLAY
|
||||
|
@ -516,7 +524,9 @@
|
|||
ReadRegStr ${MUI_TEMP1} "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
|
||||
StrCmp ${MUI_TEMP1} "" showlangdialog
|
||||
StrCpy $LANGUAGE ${MUI_TEMP1}
|
||||
Goto mui.langdll_done
|
||||
!ifndef MUI_LANGDLL_ALWAYSSHOW
|
||||
Goto mui.langdll_done
|
||||
!endif
|
||||
showlangdialog:
|
||||
|
||||
Pop ${MUI_TEMP1}
|
||||
|
@ -527,9 +537,11 @@
|
|||
Pop $LANGUAGE
|
||||
StrCmp $LANGUAGE "cancel" 0 +2
|
||||
Abort
|
||||
|
||||
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
|
||||
mui.langdll_done:
|
||||
|
||||
!ifndef MUI_LANGDLL_ALWAYSSHOW
|
||||
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
|
||||
mui.langdll_done:
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!ifndef MUI_MANUALVERBOSE
|
||||
|
@ -883,19 +895,6 @@
|
|||
|
||||
!macroend
|
||||
|
||||
!macro MUI_STARTMENU_INITDEFINES
|
||||
|
||||
;Check defines
|
||||
!ifndef MUI_STARTMENUPAGE_VARIABLE
|
||||
!define MUI_STARTMENUPAGE_VARIABLE "$9"
|
||||
!endif
|
||||
|
||||
!ifndef MUI_STARTMENUPAGE_DEFAULTFOLDER
|
||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${MUI_PRODUCT}"
|
||||
!endif
|
||||
|
||||
!macroend
|
||||
|
||||
;--------------------------------
|
||||
;FUNCTIONS
|
||||
|
||||
|
@ -1356,33 +1355,40 @@
|
|||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ ${MUI_TEMP1} "ioSpecial.ini" "Field 4" "State"
|
||||
|
||||
StrCmp ${MUI_TEMP1} "1" "" +3
|
||||
!ifndef MUI_FINISHPAGE_RUN_PARAMETERS
|
||||
StrCpy ${MUI_TEMP1} "$\"${MUI_FINISHPAGE_RUN}$\""
|
||||
StrCmp ${MUI_TEMP1} "1" 0 mui.finish_norun
|
||||
!ifndef MUI_FINISHPAGE_RUN_FUNCTION
|
||||
!ifndef MUI_FINISHPAGE_RUN_PARAMETERS
|
||||
StrCpy ${MUI_TEMP1} "$\"${MUI_FINISHPAGE_RUN}$\""
|
||||
!else
|
||||
StrCpy ${MUI_TEMP1} "$\"${MUI_FINISHPAGE_RUN}$\" ${MUI_FINISHPAGE_RUN_PARAMETERS}"
|
||||
!endif
|
||||
Exec "${MUI_TEMP1}"
|
||||
!else
|
||||
StrCpy ${MUI_TEMP1} "$\"${MUI_FINISHPAGE_RUN}$\" ${MUI_FINISHPAGE_RUN_PARAMETERS}"
|
||||
Call "${MUI_FINISHPAGE_RUN_FUNCTION}"
|
||||
!endif
|
||||
Exec "${MUI_TEMP1}"
|
||||
|
||||
!ifdef MUI_FINISHPAGE_SHOWREADME
|
||||
mui.finish_norun:
|
||||
|
||||
!endif
|
||||
|
||||
!ifdef MUI_FINISHPAGE_SHOWREADME
|
||||
|
||||
!ifdef MUI_FINISHPAGE_RUN
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ ${MUI_TEMP1} "ioSpecial.ini" "Field 5" "State"
|
||||
|
||||
StrCmp ${MUI_TEMP1} "1" "" +2
|
||||
ExecShell "open" "${MUI_FINISHPAGE_SHOWREADME}"
|
||||
|
||||
!else
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ ${MUI_TEMP1} "ioSpecial.ini" "Field 4" "State"
|
||||
!endif
|
||||
|
||||
!else ifdef MUI_FINISHPAGE_SHOWREADME
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ ${MUI_TEMP1} "ioSpecial.ini" "Field 4" "State"
|
||||
|
||||
StrCmp ${MUI_TEMP1} "1" "" +2
|
||||
StrCmp ${MUI_TEMP1} "1" 0 mui.finish_noshowreadme
|
||||
!ifndef MUI_FINISHPAGE_SHOWREADME_FUNCTION
|
||||
ExecShell "open" "${MUI_FINISHPAGE_SHOWREADME}"
|
||||
|
||||
!endif
|
||||
|
||||
!endif
|
||||
!else
|
||||
Call "${MUI_FINISHPAGE_SHOWREADME_FUNCTION}"
|
||||
!endif
|
||||
|
||||
mui.finish_noshowreadme:
|
||||
|
||||
!endif
|
||||
|
||||
mui.finish_done:
|
||||
|
||||
|
@ -1595,6 +1601,20 @@
|
|||
|
||||
!macroend
|
||||
|
||||
!macro MUI_RESERVEFILE_STARTMENU
|
||||
|
||||
!ifndef MUI_MANUALVERBOSE
|
||||
!verbose 3
|
||||
!endif
|
||||
|
||||
ReserveFile "${NSISDIR}\Plugins\StartMenu.dll"
|
||||
|
||||
!ifndef MUI_MANUALVERBOSE
|
||||
!verbose 4
|
||||
!endif
|
||||
|
||||
!macroend
|
||||
|
||||
;--------------------------------
|
||||
;INSERT ALL CODE
|
||||
|
||||
|
|
|
@ -66,6 +66,13 @@
|
|||
|
||||
LicenseData "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
|
||||
;--------------------------------
|
||||
;Reserve Files
|
||||
|
||||
;Things that need to be extracted on first (keep these lines before any File command!)
|
||||
;Only for BZIP2 compression
|
||||
!insertmacro MUI_RESERVEFILE_STARTMENU
|
||||
|
||||
;--------------------------------
|
||||
;Installer Sections
|
||||
|
||||
|
@ -110,15 +117,12 @@ Section "Uninstall"
|
|||
Delete "$INSTDIR\Uninstall.exe"
|
||||
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
|
||||
|
||||
!insertmacro MUI_STARTMENU_DELETE_BEGIN ${TEMP}
|
||||
|
||||
Delete "$SMPROGRAMS\${TEMP}\Modern UI.lnk"
|
||||
Delete "$SMPROGRAMS\${TEMP}\Uninstall.lnk"
|
||||
RMDir "$SMPROGRAMS\${TEMP}" ;Only if empty, so it won't delete other shortcuts
|
||||
|
||||
!insertmacro MUI_STARTMENU_DELETE_END
|
||||
|
||||
DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
|
||||
|
||||
SectionEnd
|
|
@ -42,7 +42,6 @@
|
|||
;Modern UI Configuration
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\modern.exe"
|
||||
|
||||
;--------------------------------
|
||||
;Languages
|
||||
|
@ -54,6 +53,14 @@
|
|||
|
||||
LicenseData "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
|
||||
;--------------------------------
|
||||
;Reserve Files
|
||||
|
||||
;Things that need to be extracted on first (keep these lines before any File command!)
|
||||
;Only for BZIP2 compression
|
||||
|
||||
!insertmacro MUI_RESERVEFILE_WELCOMEFINISHPAGE
|
||||
|
||||
;--------------------------------
|
||||
;Installer Sections
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue