- NSIS Discussion
- MUI Custom Page
Archive: MUI Custom Page
Boyito
2nd January 2007 15:50 UTC
MUI Custom Page
Hi, in my actual IS installer i have two pages
One "Licence" and the other "Lastest Information"
In this one ive put my Readme File, because i dont want THE final user avoid to read it.
I think the way to do that in NSIS is by a Custom Page.
Anyone know how or send to me an example?
Thanks
Red Wine
2nd January 2007 15:53 UTC
Easily you may add a second license page and modify it to look like a readme page :-)
Boyito
3rd January 2007 16:24 UTC
LOL
There is the problem, How I "Easily add a second license page and modify it to look like a readme page "??
Because de license page its predefined like this
!insertmacro MUI_PAGE_LICENSE $(MUILicense)
TIA
Backland
3rd January 2007 16:57 UTC
Look in the plugins section of the wiki for a license page plugin
Red Wine
3rd January 2007 17:01 UTC
;license page
!insertmacro MUI_PAGE_LICENSE "path_to_license\license.txt/rtf"
; ReadMe created from the license page
!define MUI_PAGE_HEADER_TEXT "Read Me"
!define MUI_PAGE_HEADER_SUBTEXT "Please read the following important information."
!define MUI_LICENSEPAGE_TEXT_TOP "About my program:"
!define MUI_LICENSEPAGE_TEXT_BOTTOM "$\n* Click on the arrows or use the PageDown \
button to scroll down to the end of the text."
!define MUI_LICENSEPAGE_BUTTON "Next >"
!insertmacro MUI_PAGE_LICENSE "path_to_readme\readme.txt/rtf"
Boyito
3rd January 2007 17:06 UTC
Thanks a lot RW, you are my idol :-D
Red Wine
16th January 2007 21:50 UTC
Just uploaded a header at wiki regarding to the subject, aimed in help users to add a MUI multilang readme page.
http://nsis.sourceforge.net/Readme_P...I_License_Page
Boyito
17th January 2007 13:15 UTC
Thanks again
coviex
8th February 2007 19:23 UTC
How to make custom page or something like that to show big bitmap? I need some kind of licence page but show image instead of text there. And it would be great to be able to goto that page upon .onSelChange.
Red Wine
8th February 2007 19:59 UTC
Custom page (InstallOptions plugin) is powerful and adds many amazing abilities to nsis, however painful sometimes, (I guess the one wouldn't exist without the other ;)).
OutFile 'test.exe'
Page Custom custcreate
Section
SectionEnd
Function custcreate
InstallOptions::Dialog "$PLUGINSDIR\custom.ini"
FunctionEnd
Function .onInit
InitPluginsDir
File /oname=$PLUGINSDIR\sample_image.bmp sample_image.bmp
GetTempFileName $0
Rename $0 "$PLUGINSDIR\custom.ini"
WriteINIStr "$PLUGINSDIR\custom.ini" "settings" "numfields" "1"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "type" "bitmap"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "text" "$PLUGINSDIR\sample_image.bmp"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "left" "0"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "right" "-1"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "top" "0"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "bottom" "-1"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "flags" "RESIZETOFIT"
FunctionEnd
you need an image named sample_image.bmp into the same folder where compiling the script.
coviex
9th February 2007 08:27 UTC
Here is what I have now:
Page directory
!insertmacro MUI_PAGE_COMPONENTS
Page instfiles
Function custcreate
InitPluginsDir
File /oname=$PLUGINSDIR\bmp_nsi.bmp bmp_nsi.bmp
GetTempFileName $0
Rename $0 "$PLUGINSDIR\custom.ini"
WriteINIStr "$PLUGINSDIR\custom.ini" "settings" "numfields" "1"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "type" "bitmap"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "text" "$PLUGINSDIR\bmp_nsi.bmp"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "left" "0"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "right" "-1"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "top" "0"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "bottom" "-1"
WriteINIStr "$PLUGINSDIR\custom.ini" "field 1" "flags" "RESIZETOFIT"
InstallOptions::Dialog "$PLUGINSDIR\custom.ini"
FunctionEnd
Function .onSelChange
!insertmacro StartRadioButtons $1
${If} ${SectionIsSelected} ${variant_1}
!insertmacro RadioButton ${variant_1}
MessageBox MB_ICONEXCLAMATION|MB_OK "1"
Call custcreate
${EndIf}
FunctionEnd
After first component selected custom page appears but it`s "Back" button throws me to directory page and not back to components. How to handle it right?
coviex
9th February 2007 08:32 UTC
I got it. This picture is just over components so that I don`t see them.
But how call new page or something like that from
${If} ${SectionIsSelected} ${variant_1}
...
${EndIf}