Modern UI 1.62

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1949 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2002-12-14 00:15:41 +00:00
parent 6f600e4485
commit 34f3be86d8
12 changed files with 186 additions and 161 deletions

View file

@ -1,5 +1,11 @@
NSIS Modern User Interface - VERSION HISTORY
1.62 - December 14, 2002
* No problems anymore when using both 'Run program' and 'Show Readme' on the finish page
* Default state of checkboxes on the finish page can be changed
* Welcome / Finish pages compatible with custom DPI settings
* Converted Install Options INI files to use dialog units
1.61 - December 5, 2002
* Final version for NSIS 2 beta 0
* modern3.exe UI without description area
@ -11,7 +17,7 @@ NSIS Modern User Interface - VERSION HISTORY
1.6 - November 18, 2002
* Welcome / Finish pages
* Automatic ask for reboot on finish page
* Create no shortcut option on Start Menu Folder selection page
* Create no shortcut option on the Start Menu Folder selection page
* Customizing GUIInit functions easier
* Minor font / UI changes
@ -43,7 +49,7 @@ NSIS Modern User Interface - VERSION HISTORY
* SetPage function should be set using defines
* Different NextPage/PrevPage/FinishHeader macro's for install/uninstall
* Interface settings can be definend (for example, MUI_ICON), no parameters for MUI_INTERFACE anymore
* New Install Options macro's to read/write IO INI file values
* New Install Options macro's to read/write IO INI file value
1.21 - September 30, 2002
* Temp vars set in Modern UI header

View file

@ -111,7 +111,7 @@ with a custom user interface.</p>
like the wizards of recent Windows versions. This new interface
also features new graphics and a description area on the
component selection page.</p>
<p class="text">To use this new interface for for installer, you need
<p class="text">To use this new interface for your installer, you need
to add some code to your NSIS script. Read this document for more info!</p>
<p class="header">Requirements</p>
<p class="text"><a href="http://nsis.sourceforge.net">NSIS 2 beta 0 (or later)</a></p>
@ -158,7 +158,7 @@ add the following things (in order, from the beginning of the script):</p>
<p class="text"><span class="bold">MUI_DIRECTORYPAGE</span><br>
Show the directory selection page.</p>
<p class="text"><span class="bold">MUI_STARTMENUPAGE</span><br>
Show the Start Menu Folder selection page page.</p>
Show the Start Menu Folder selection page.</p>
<div class="margin">
<p class="text"><span class="bold">MUI_STARTMENU_VARIABLE</span><br>
Variable to store the current Start Menu Folder. Default is $9.
@ -171,15 +171,23 @@ add the following things (in order, from the beginning of the script):</p>
Show the Finish page.</p>
<div class="margin">
<p class="text"><span class="bold">MUI_FINISHPAGE_RUN</span><br>
Applcation which the user can select to run (using a checkbox).
Application which the user can select to run (using a checkbox).
You don't need to put quotes around the filename when it contains spaces.</p>
<div class="margin">
<p class="text"><span class="bold">MUI_FINISHPAGE_RUN_PARAMETERS</span><br>
Parameters for the application to run. Don't forget to escape double
quotes ($\") in the value.</p>
<p class="text"><span class="bold">MUI_FINISHPAGE_RUN_NOTCHECKED</span><br>
Do not check the 'Run program' checkbox by default</p>
</div>
<p class="text"><span class="bold">MUI_FINISHPAGE_SHOWREADME</span><br>
File which the user can select to view (using a checkbox).
You don't need to put quotes around the filename when it contains spaces.
Use $(LANGSTRINGNAME) as value is you want to use a language string.</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>
</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
check the log.</p>
@ -227,7 +235,7 @@ add the following things (in order, from the beginning of the script):</p>
Please help to translate the new strings and post them at the
<a href="http://forums.winamp.com/forumdisplay.php?forumid=65">NSIS Forum</a>.</p>
<p class="subheader">5. Define interface settings (optional)</p>
<p class="text">You can also change the settings of the interface by usings defines:</p>
<p class="text">You can also change the settings of the interface by using defines:</p>
<pre class="margin">!define MUI_UI "${NSISDIR}\Contrib\UIs\modern2.exe"</pre>
<p class="text">If you don't define a setting, the default will be used.</p>
<p class="text">The following settings are available: <i>(default values)</i></p>
@ -266,7 +274,7 @@ add the following things (in order, from the beginning of the script):</p>
after all the sections to display the finish-header:</p>
<pre class="margin">!insertmacro MUI_SECTIONS_FINISHHEADER</pre>
<p class="text">For the uninstaller, insert MUI_UNFINISHHEADER at the end of the
Unintaller section:</p>
Uninstaller section:</p>
<pre class="margin">
!insertmacro MUI_UNFINISHHEADER
</pre>
@ -338,6 +346,11 @@ Function FunctionName
!insertmacro MUI_INSTALLOPTIONS_SHOW "ioFile.ini"
FunctionEnd
</pre>
<p class="text">To read or write values to the INI Files on runtime, use these macro's:</p>
<pre class="margin">
!insertmacro MUI_INSTALLOPTIONS_READ $VAR "ioFile.ini" "Field #" "Value Name"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioFile.ini" "Field #" "Value Name" "Value"
</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>
Multilanguage: <a href="../../Examples/Modern UI/MultiLanguage.nsi">MultiLanguage.nsi</a><br>
@ -382,6 +395,15 @@ FunctionEnd
</pre>
<p class="header">Version history</p>
<ul>
<li class="changelog">1.62 - December 14, 2002
<ul>
<li>No problems anymore when using both 'Run program' and 'Show Readme'
on the finish page
<li>Default state of checkboxes on the finish page can be changed
<li>Welcome / Finish pages compatible with custom DPI settings
<li>Converted Install Options INI files to use dialog units
</ul>
<p class="text"></p>
<li class="changelog">1.61 - December 5, 2002
<ul>
<li>Final version for NSIS 2 beta 0
@ -395,8 +417,8 @@ FunctionEnd
<li class="changelog">1.6 - November 18, 2002
<ul>
<li>Welcome / Finish pages
<li>Automatic ask for reboot on finish page
<li>Create no shortcut option on Start Menu Folder selection page
<li>Automatic ask for reboot on the finish page
<li>Create no shortcut option on the Start Menu Folder selection page
<li>Customizing GUIInit functions easier
<li>Minor font / UI changes
</ul>

View file

@ -1,4 +1,4 @@
;NSIS Modern User Interface version 1.61
;NSIS Modern User Interface version 1.62
;Macro System
;Written by Joost Verburg
@ -7,10 +7,6 @@
;--------------------------------
!ifndef NSIS_CONFIG_ENHANCEDUI_SUPPORT
!error "To use the Modern UI you must have a NSIS version compiled with NSIS_CONFIG_ENHANCEDUI_SUPPORT (in Source/exehead/config.h)!"
!endif
!verbose 3
!ifndef MUI_MACROS_USED
@ -975,7 +971,7 @@
;Write Finish text
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 2" "Text" "$(MUI_TEXT_FINISH_INFO_TITLE)"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "150"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "80"
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
@ -987,18 +983,18 @@
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Type" "RadioButton"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Text" "$(MUI_TEXT_FINISH_REBOOTNOW)"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "187"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "478"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "155"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "170"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "120"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "321"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "85"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "95"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "1"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Type" "RadioButton"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Text" "$(MUI_TEXT_FINISH_REBOOTLATER)"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Left" "187"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Right" "478"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Top" "185"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Bottom" "200"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Left" "120"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Right" "321"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Top" "105"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Bottom" "115"
Goto init
@ -1016,11 +1012,13 @@
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Type" "CheckBox"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Text" "$(MUI_TEXT_FINISH_RUN)"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "187"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "478"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "155"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "170"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "120"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "315"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "85"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "95"
!ifndef MUI_FINISHPAGE_RUN_NOTCHECKED
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "1"
!endif
!ifdef MUI_FINISHPAGE_SHOWREADME
@ -1028,27 +1026,28 @@
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Type" "CheckBox"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Text" "$(MUI_TEXT_FINISH_SHOWREADME)"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Left" "187"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Right" "478"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Top" "185"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Bottom" "200"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Left" "120"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Right" "315"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Top" "105"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Bottom" "115"
!ifndef MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "State" "1"
!endif
!endif
!else
!ifdef MUI_FINISHPAGE_SHOWREADME
!else ifdef MUI_FINISHPAGE_SHOWREADME
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "4"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Type" "CheckBox"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Text" "$(MUI_TEXT_FINISH_SHOWREADME)"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "187"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "478"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "155"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "170"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "120"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "315"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "85"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "95"
!ifndef MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "1"
!endif
!endif
@ -1099,17 +1098,13 @@
!endif
!else
!ifdef MUI_FINISHPAGE_SHOWREADME
!else ifdef MUI_FINISHPAGE_SHOWREADME
GetDlgItem ${MUI_TEMP2} ${MUI_TEMP1} 1203
SetStaticBkColor ${MUI_TEMP2} 0x00FFFFFF
!endif
!endif
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
show:
!endif
@ -1156,21 +1151,17 @@
!insertmacro MUI_INSTALLOPTIONS_READ ${MUI_TEMP1} "ioSpecial.ini" "Field 5" "State"
StrCmp ${MUI_TEMP1} "1" "" +3
StrCpy ${MUI_TEMP1} "$\"${MUI_FINISHPAGE_SHOWREADME}$\""
ExecShell "open" "{MUI_TEMP1}"
StrCmp ${MUI_TEMP1} "1" "" +2
ExecShell "open" "${MUI_FINISHPAGE_SHOWREADME}"
!endif
!else
!ifdef MUI_FINISHPAGE_SHOWREADME
!else ifdef MUI_FINISHPAGE_SHOWREADME
!insertmacro MUI_INSTALLOPTIONS_READ ${MUI_TEMP1} "ioSpecial.ini" "Field 4" "State"
StrCmp ${MUI_TEMP1} "1" "" +3
StrCpy ${MUI_TEMP1} ${MUI_FINISHPAGE_SHOWREADME}
ExecShell "open" '"${MUI_TEMP1}"'
StrCmp ${MUI_TEMP1} "1" "" +2
ExecShell "open" "${MUI_FINISHPAGE_SHOWREADME}"
!endif

View file

@ -4,18 +4,19 @@ NumFields=3
[Field 1]
Type=bitmap
Left=0
Right=164
Right=109
Top=0
Bottom=314
Bottom=193
Flags=RESIZETOFIT
[Field 2]
Type=label
Left=184
Right=478
Top=20
Bottom=60
Left=120
Right=315
Top=10
Bottom=32
[Field 3]
Type=label
Left=184
Right=478
Top=75
Bottom=300
Left=120
Right=315
Top=42
Bottom=185

View file

@ -1,4 +1,4 @@
;NSIS Modern User Interface version 1.61
;NSIS Modern User Interface version 1.62
;Basic Example Script
;Written by Joost Verburg

View file

@ -1,4 +1,4 @@
;NSIS Modern User Interface version 1.61
;NSIS Modern User Interface version 1.62
;Install Options Example Script
;Written by Joost Verburg

View file

@ -1,4 +1,4 @@
;NSIS Modern User Interface version 1.61
;NSIS Modern User Interface version 1.62
;MultiLanguage Example Script
;Written by Joost Verburg
@ -36,6 +36,7 @@
!insertmacro MUI_LANGUAGE "Ukrainian"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_LANGUAGE "Bulgarian"
!insertmacro MUI_LANGUAGE "Thai"
OutFile "MultiLanguage.exe"
@ -56,6 +57,7 @@
LicenseData /LANG=${LANG_UKRAINIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
LicenseData /LANG=${LANG_CZECH} "${NSISDIR}\Contrib\Modern UI\License.txt"
LicenseData /LANG=${LANG_BULGARIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
LicenseData /LANG=${LANG_THAI} "${NSISDIR}\Contrib\Modern UI\License.txt"
;Component-selection page
;Titles
@ -75,6 +77,7 @@
LangString TITLE_SecCopyUI ${LANG_UKRAINIAN} "modern.exe"
LangString TITLE_SecCopyUI ${LANG_CZECH} "modern.exe"
LangString TITLE_SecCopyUI ${LANG_BULGARIAN} "modern.exe"
LangString TITLE_SecCopyUI ${LANG_THAI} "modern.exe"
;Descriptions
LangString DESC_SecCopyUI ${LANG_ENGLISH} "modern.exe: English description"
@ -93,6 +96,7 @@
LangString DESC_SecCopyUI ${LANG_UKRAINIAN} "modern.exe: Ukrainian description"
LangString DESC_SecCopyUI ${LANG_CZECH} "modern.exe: Czechian description"
LangString DESC_SecCopyUI ${LANG_BULGARIAN} "modern.exe: Bulgarian description"
LangString DESC_SecCopyUI ${LANG_THAI} "modern.exe: Thai description"
;Folder-selection page
InstallDir "$PROGRAMFILES\${MUI_PRODUCT}"
@ -151,8 +155,9 @@ Function .onInit
!insertmacro MUI_LANGDLL_PUSH "Ukrainian"
!insertmacro MUI_LANGDLL_PUSH "Czech"
!insertmacro MUI_LANGDLL_PUSH "Bulgarian"
!insertmacro MUI_LANGDLL_PUSH "Thai"
Push 16F ;16 = number of languages, F = change font
Push 17F ;17 = number of languages, F = change font
LangDLL::LangDialog "Installer Language" "Please select a language."

View file

@ -1,4 +1,4 @@
;NSIS Modern User Interface version 1.61
;NSIS Modern User Interface version 1.62
;Start Menu Folder Selection Example Script
;Written by Joost Verburg
@ -12,7 +12,7 @@
;You can change this variable or the default Start Menu Folder by using
;these defines:
;!define MUI_STARTMENU_VARIABLE "$VARNAME"
;!define MUI_STARTMENU_VARIABLE "$VAR"
;!define MUI_STARTMENU_DEFAULTFOLDER "Folder Name"
;--------------------------------

View file

@ -1,4 +1,4 @@
;NSIS Modern User Interface version 1.61
;NSIS Modern User Interface version 1.62
;Welcome/Finish Page Example Script
;Written by Joost Verburg

View file

@ -5,6 +5,6 @@ NumFields=1
Type=label
Text=Install Options Page A
Left=0
Right=110
Right=-1
Top=0
Bottom=15
Bottom=10

View file

@ -5,6 +5,6 @@ NumFields=1
Type=label
Text=Install Options Page B
Left=0
Right=110
Right=-1
Top=0
Bottom=15
Bottom=10

View file

@ -5,15 +5,15 @@ NumFields=2
Type=label
Text=Instal Options Page C
Left=0
Right=110
Right=-1
Top=0
Bottom=15
Bottom=10
[Field 2]
Type=checkbox
Text=Display a MessageBox
Left=0
Right=125
Top=40
Bottom=55
Right=-1
Top=30
Bottom=40
State=1