|
|
#1 |
|
Junior Member
Join Date: Mar 2012
Posts: 3
|
newbie question: nsdialog example
hi all,
I'm trying to make an installer for my application, from examples and wiki I managed to make NSIS script which compiles and does the requested job, now I'm trying to add a simple dialog option which would give the user an option to put shortcuts on desktop and in quick launch (I know how to create shortcuts, but "option screen" is beyond me.... Would someone experienced be willing to make an example how to accomplish this ? my script so far: code: |
|
|
|
|
|
#2 |
|
Major Dude
|
There are several ways how to do it:
1) simple MessageBox with yes/no buttons askin "Do you want to place shortcut of Your_Software on Desktop?" or 2) Create nsDialogs forms with two checkboxes - a) shortcuts on desktop b) in quick launch in dialog Leave function simply check whether boxes are checked -> if yes then do the same as in 1 P.S.: Use pastebin for huge scripts
Cool looking installers with custom design: www.graphical-installer.com Create Setup Pages easily: www.install-designer.com Build installers in Visual Studio 2005-2022: www.visual-installer.com or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com |
|
|
|
|
|
#3 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
There's an excellent tutorial in the nsDialogs readme: http://nsis.sourceforge.net/Docs/nsDialogs/Readme.html
And yes, please use pastebin or attachments for huge scripts. |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Mar 2012
Posts: 3
|
hi again,
found some time to work on installer, so far I've got this "code" http://pastebin.com/Q5Gbh4BG GUI representation is OK but installer always writes shortcuts (not dependent on checkbox selection). thanks in advance |
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
You should not create shortcuts in a page function, you should do it in a section. (Otherwise you're making changes to a system before the user has started the actual installation process!) Also, I've no idea what you're trying to accomplish by comparing $DESKTOP to $TEMP... o__O
Try this: http://pastebin.com/MN3uHy6h |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Mar 2012
Posts: 3
|
thanks mate, your example worked nicely (I had to change state "0" to "1"). as you can see the original thread title is truthful
, I'm a newbie and that comparison is not needed at all....cheers |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|