- NSIS Discussion
- Creating DesktopShortcut
Archive: Creating DesktopShortcut
2shepi
13th March 2003 14:49 UTC
Creating DesktopShortcut
Hi
its the first day i work with nsis and i think its a great thing, but i couldnt find out how i could create Desktop Shortcuts...
could u help me out pls.
my nsi file
[edit by kichik]Please attach large scripts. attached below :down:[/edit]
tnx 4 supporting me...
kichik
13th March 2003 15:52 UTC
Welcome to the forum! :D
To create a shortcut on the desktop use CreateShortcut with the $DESKTOP variable. For example (taken from <NSIS Dir>\Examples\makensis.nsi):
CreateShortCut "$DESKTOP\Nullsoft Install System.lnk" "$INSTDIR\NSIS.exe"
2shepi
13th March 2003 16:05 UTC
hi kichik
tnx 4 ur fast answer.
Not creating the shortcut is my problem, the problems comes up with generating a custompage!
When i declare a custompage the others, "pre defined" pages dont have any "pre defined" text. hope u could follow..
[edit]
Sorry 4 File pasting...
kichik
13th March 2003 16:14 UTC
Sorry, lost you... If you want to create a custom page have a look at the InstallOptions.nsi example in Examples\Modern UI. But what does a custom page have to do with a desktop shortcut? Are you trying to give the user the option to create a desktop icon? If so, maybe you should create another section that will do it, just like in Examples\makensis.nsi.
2shepi
13th March 2003 16:22 UTC
kk now lets initialize our mind :confused:
From the beginning.
The User could choose which components will be installed, next screen he could choose, creating startmenu entries and in the next screen i wanne let the user choose creating a shortcut on his desktop. imho - i already said, the first day with nsis, so dont judge me - this have to be realize by a custompage.
Hope know u understand! sorry 4 :igor:
kichik
13th March 2003 16:34 UTC
Then what you need is to have a look at the InstallOptions.nsi example in Examples\Modern UI. It will show you how to create a custom page, and how to read the user input from it.
2shepi
13th March 2003 16:51 UTC
ok now works over.. ill take a look tomorrow nd will post the result. hope gonna get it! tnx 4 supporting me
2shepi
14th March 2003 07:33 UTC
hope smn gonna read this post at this time :D
now i tested with the "InstallOptions.nsi" but when i compile "InstallOptions.nsi" i dont see any fields is this normal?
2shepi
14th March 2003 07:57 UTC
!insertmacro: macro named "MUI_FINISHPAGE" not found!
hm why?
deguix
14th March 2003 08:03 UTC
is: !define MUI_FINISHPAGE
2shepi
14th March 2003 08:17 UTC
yes it is
!define MUI_FINISHPAGE
!define MUI_FINISHPAGE_RUN "$INSTDIR\maintlog.cmd"
2shepi
14th March 2003 08:53 UTC
i dont look trough.
!define mui_[pagename]
!insertmacro MUI_PAGECOMMAND_LICENSE
could i see anywhere which "macro" are real or so? couldnt follow, where does it get the license page and so?
Joost Verburg
14th March 2003 09:00 UTC
What is exactly your problem? Why not add an an extra section, so the user can choose for a desktop shortcut on the components page?
2shepi
14th March 2003 09:35 UTC
ok now i did it with a section, the simplest way 4 me as a beginner.
My next problem - someone will know why im sure - is the startmenu entrie wouldnt be created.
could u have a look into my source pls! tnx.
kichik
15th March 2003 11:25 UTC
Defining MUI_STARTMENUPAGE is not enough. You have to create the shortcuts too. Have a look at Examples\Modern UI\StartMenu.nsi and especially the part that starts with:
!insertmacro MUI_STARTMENU_WRITE_BEGIN