I found NSIS easy to create installation pages.Now i have a welcome page,user agreement page,choose directory page etc in different pages.How can i create a installation with welcome page,user agreement and choosing path for installation in single page in a simple way? Any template for this design?
Announcement
Collapse
No announcement yet.
NSIS install pages
Collapse
X
-
No. You'll have to create a custom page using nsDialogs.
-
-
where should i do the coding of nsdialogs? Right now i am using default installer pages with welcome page,licence page etc for which i have !insertmacro MUI_PAGE_WELCOME etc in my nsi file.But if i use the nsdialogs then should i use MUI_PAGE_WELCOME etc macros?
Where to include the code of nsDialogs?If you have any example please let me know.If possible plz give reference of a full script which uses all types of nsdialogs so that i can understand it easily..
Thank you
Comment
-
-
There's an excellent tutorial in the nsDialogs readme. You can simply add a 'page custom yourpagefunction' inbetween your MUI page macro calls.
In your custom page function you can use the MUI_HEADER_TEXT macro just before you call nsDialogs::show to set the page's header text.
Comment
-
-
It's best to use a DIRECTORY page for setting install locations. If you need a second install location, use a second directory page with the MUI_DIRECTORYPAGE_VARIABLE define. (And perhaps MUI_DIRECTORYPAGE_TEXT_DESTINATION and MUI_DIRECTORYPAGE_TEXT_TOP defines.)
But if you still want your own directory field, use NSD_CreateDirRequest.
Comment
-
-
Yes, you can create your own custom page with nsDialogs, that's what it's for. But note that both the standard MUI license page and directory page do some very fancy stuff that is not easy to reproduce. Things like install folder verification, free space check, richtext rendering, etc...
I once created my own directory page, and it was a lot of work. You're probably better off using two standard pages separately.
Comment
-
-
Ok so i think its difficult to include both licence page and directory page together.but i think i can do welcome page and directory for installation can be combined in same page.Now i already have standard welcome page.How i can include directory selection in same page easily?Can i change the standard page script?if possible how?
Also how to add scroll bar for a text field in nsdialog(like in the licence agreement)?Last edited by winman2004; 2 November 2012, 11:54.
Comment
-
-
The MUI2 welcome page is a purely nsDialogs page, you can find the code in NSIS\Contrib\ModernUI2\pages\welcome.nsh (or whatever it's called, my memory isn't perfect). You can either copy and edit this code, or you can use the page's SHOW function to add some elements manually.
Comment
-
-
What is the major changes in mui.nsh and mui2.nsh? Now i am using mui.nsh. If i want to use mui2.nsh then what changes i should do(in mui 2.nsh document i got like "The interface settings provided by the NSIS compiler itself (such as LicenseText, Icon, CheckBitmap, InstallColors) should not be used in Modern UI scripts.")
So should i change anything?
If i use mui2.nsh then should i remove reference to mui.nsh(!include mui.nsh required or not?)
I tried copying welcome.nsh from the path u specified to my script path and added one extra label. i also included !include welcome.nsh in script.When compiling i got error like "!macro:macro named "MUI_WELCOMEPAGE_INTERFACE" already found!".Can u please help me on all of these errors??
Comment
-
-
Don't just blatantly copy code you don't fully understand... The functionname "${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageLoadFullWindow" cannot be found by the compiler. This is logical, because you don't even have that function.
All you should copy from welcome.nsh is things like
${NSD_CreateBitmap} 0u 0u 109u 193u ""
Pop $mui.WelcomePage.Image
${NSD_SetStretchedImage} $mui.WelcomePage.Image $PLUGINSDIR\modern-wizard.bmp $mui.WelcomePage.Image.Bitmap
Of course, you would need to change all the ${MUI_ETC} defines to actual values. ${MUI_WELCOMEPAGE_TITLE_HEIGHT} would be 28, ${MUI_WELCOMEPAGE_TEXT_TOP} would be 45, etc...
Comment
-
Comment