Skip to content
⌘ NSIS Forum Archive

Multiple License Pages

12 posts

cpriest#

Multiple License Pages

Hello, I'm trying to create an installation with multiple license pages, I can get the license page to show twice, but not with different license files.

Is there any way I can do this? I'm fairly new to this package, but it looks awsomely powerful..

Thanks,

-Clint
Joel#
I don't know .... 🤪
[Old UI]
Try the order of pages:

Page ...
Page license
Page ...
Page ...
Page license
With [Modern UI]

!define MUI_CUSTOMPAGECOMMANDS
...
!insertmacro MUI_PAGECOMMAND_WELCOME
!insertmacro MUI_PAGECOMMAND_LICENSE
!insertmacro MUI_PAGECOMMAND_COMPONENTS
!insertmacro MUI_PAGECOMMAND_DIRECTORY
!insertmacro MUI_PAGECOMMAND_INSTFILES
!insertmacro MUI_PAGECOMMAND_LICENSE
!insertmacro MUI_PAGECOMMAND_FINISH
Joel#
Didn't you want the same license file?
Oh... well
Now, that's impossible in the current CVS.
But there's a past post with a fixed UI that might help you:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
kichik#
It's not entirely impossible, just a bit hard. You can create two license Pages (in one of the ways Lobo Lunar mentioned) and then on the show function of one of them use SendMessage (hwnd) ${WM_SETTEXT} 0 "STR:Another license$\r$\nRead this...". You can't use RTFs with this, and the text size is limited to 1024 unless you've recompiled NSIS with a larger NSIS_MAX_STRLEN.

To find the HWND of the license box use GetDlgItem and FindWindow. For example:

FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 1024 
Replace 1024 with the license box control id and you'll get it's HWND.

WM_SETTEXT is defined in WinMessages.nsh (!include WinMessages.nsh).
cpriest#
I needed it to deal with more than 1024 bytes of data, so I wrote a plugin to do it, and I've uploaded that plugin to the archive...

Joel#
What's lame dkt44_56 ? 🤪

[edit]
Sounds good the plugin 👍
Do you think will support old versions of Nsis
or just the current CVS and above.
[/edit]

[edit]
dkt44_56 was Banned because he/she was flaming at the Forums.
[/edit]
cpriest#
What are the major differences to make it backward compatible?

I've just been poking around to get it to work right, not being able to find much documentation on how to do this, and none using MFC.
kichik#
As the paging system, especially the custom pages code is changing a lot there isn't any documentation for it yet. There aren't any GoBack(), GoPrev(), or GoCancel() functions because NSIS handles that, you just need to know to destroy your dialog and return the control to NSIS when the NSIS window gets WM_NOTIFY_OUTER_NEXT. StartMenu is a fairly simple example to that.

The differences between 1.98 and NSIS 2 pages system are quite numerous. I wouldn't waste my time porting it backwards.

As for your plug-in specifically, it's always good to see another plug-in 🙂
Too bad it uses MFC though... You'll need to include MFC distribution files and install them if needed just to run the installer.