Old 29th June 2011, 15:49   #1
ripper17
Junior Member
 
Join Date: May 2006
Location: Germany
Posts: 6
Send a message via ICQ to ripper17
Question Custom Messagebox

Hi all,

since the messagebox plug-in has been removed (see this thread) (and didn't work on 64-bit systems anyway):
Is there a 'new' way to make a custom messagebox?

What I'm trying to do is: display a messagebox With buttons "Default" "Custom Installation" and "Cancel" during the MUI_PAGE_INSTFILES.

What's happening is: I'm checking JAVA if the user selected one specific section in my installer, if it's not installed, I'll install it (yes, JAVA is included in my installer) but want to ask the user if (s)he wants to do a silent (=Default) installation of JAVA, or a customized one.

I've got the same situation later with MySQL, where the options are "Default", "Default, but change root PW" and "Custom".

Does anybody know of a good way to do this during MUI_PAGE_INSTFILES or will I have to create another two custom pages in my installer with radio-buttons?

Best

Martin
ripper17 is offline   Reply With Quote
Old 29th June 2011, 19:27   #2
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
i never had any problems using the messagebox plugin on 64-bit systems. however, if you prefer not to use it, you could fake some messageboxes using nswindows.
Yathosho is offline   Reply With Quote
Old 29th June 2011, 20:12   #3
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
You're missing a trailing 1 in your link.
http://forums.winamp.com/showthread.php?t=304431
MSG is offline   Reply With Quote
Old 30th June 2011, 13:02   #4
ripper17
Junior Member
 
Join Date: May 2006
Location: Germany
Posts: 6
Send a message via ICQ to ripper17
OK, I should have been more precise: The messagebox plug-in is not working in Windows Server 2008R2 64-bit, because the DLL has non-resolved dependencies (i.e. try to open the plugin DLL with DependencyWalker). The result is, that the messagebox is not displayed.

Thanks for pointing out nsWindows - but unfortunately it does not work as I had expected: I'm creating a nsWindow inside of a section, which (of course) means that the nsWindow will be opened during the install-files page. Unfortunately the window closes immediately when the Instfiles page is done. I would like to have it stop the Instfiles progress and wait until the user clicks one of the buttons. Am I missing something? Is there documentation for this plugin?
ripper17 is offline   Reply With Quote
Old 1st July 2011, 05:58   #5
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 531
Send a message via ICQ to T.Slappy
Pausing installation progress is a little tricky, check this thread to grasp some ideas: http://nsis.sourceforge.net/InstFile...ring_InstFiles

If your plugin has sources you can easily remove dependencies bby rebuilding it with static libs.
Or you can supply dependencies (.dll) with your installer.

Cool looking installer with custom design: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsigned.sk
Develop NSIS projects in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.3 Rio: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 1st July 2011, 07:20   #6
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
Originally Posted by ripper17 View Post
The messagebox plug-in is not working in Windows Server 2008R2 64-bit, because the DLL has non-resolved dependencies (i.e. try to open the plugin DLL with DependencyWalker).
Dependency Walker always shows non-resolved dependencies though you might be using the 64-bit version which gives even more missing results i've found. However that wouldn't be the cause of it not working - on 64-bit platforms due to how the messagebox plug-in was compiled, it's just not DEP compatible which most 64-bit Windows versions will refuse to allow it to be properly used. That is due to some slightly over aggressive compiler optimisations which turned out to cause DEP issues ~3years after the last version of the plug-in was made. Not that that helps much now but wanted to clarify that as a final reason for why the plug-in was pulled.

-daz
DrO is offline   Reply With Quote
Old 8th January 2013, 20:17   #7
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
it's a big joke anyway that there was even a need for an extra plugin to accomplish this. the messagebox command should've supported custom buttons years ago, especially since it has become common practise to avoid buttons labeled ok/cancel or yes/no to ensure better user interaction.

http://ignorethecode.net/blog/2008/10/31/nobody-reads/
http://ux.stackexchange.com/a/9960

but apart from that, it always should have been clear there would be demand for custom buttons.
Yathosho is offline   Reply With Quote
Old 8th January 2013, 20:40   #8
DrO
 
Join Date: Sep 2003
Posts: 27,873
and that is why you're meant to create a dialog window rather than re-purposing an OS api which was meant for a specific need only. that's all a messagebox is at it's most basic way of thinking, a specific dialog window. or even better you provide a more sensible means of reporting an error.

-daz
DrO is offline   Reply With Quote
Old 9th January 2013, 09:36   #9
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
Quote:
Originally Posted by DrO View Post
and that is why you're meant to create a dialog window
not that i need this, but out of general interest: what does this mean, using nsWindows? there's no other way provided by the OS?

as i said, i'm not in need for that myself, but i always find it unfortunate when i have to blow up my installer size with extra plugins (and yes, i'm aware that for most people an extra 5kb means nothing)

i just think that such a basic feature should be core functionality, but well, with the current state of nsis that would probably mean that users have to wait years to get such a new feature (if there'll ever be a new version)
Yathosho is offline   Reply With Quote
Old 9th January 2013, 10:19   #10
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,150
The MessageBox instruction just uses the MessageBox API in Windows...

You could also try http://nsis.sourceforge.net/DlgHost_plug-in

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 9th January 2013, 20:13   #11
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
same problem as nsWindows though, wouldn't work onInit iirc
Yathosho is offline   Reply With Quote
Old 9th January 2013, 21:11   #12
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,150
Well, you are not really supposed to display UI in .oninit, use .onguiint or the show callback of your first page.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump