Jochanan
14th March 2003 11:47 UTC
OutFile to desktop
Hi
I'm quite newbie with NSIS but here is my quetion:
Is it possible create outputfile to desktop?
OutFile "${DESKTOP}..." or Outfile "$DESKTOP..." won't work
because it just gives "Can't open output file" error.
Thanks.
Joni Halmelahti
Joost Verburg
14th March 2003 13:54 UTC
$DESKTOP is a run-time variable. You have to give the full path.
It's 'C:\Documents and Settings\UserName\Desktop' for Windows 2000/XP.
Jochanan
14th March 2003 16:49 UTC
Right.
But i'm intend use that script in different platforms like windows 95/98/NT4/2000 and XP so how should i configure that OutFile to work with those?
-jh
virtlink
14th March 2003 17:49 UTC
Do you want to distribute the script or the installer that is compiled from it?
Joost Verburg
14th March 2003 18:02 UTC
I think he wants to distribute the script. OutFile is the filename of the installer to generate.
viper0179
14th March 2003 19:09 UTC
Joost, would the same concept you had me apply to using /DMUI_VERSION apply to him somehow? Possibly defining the OutFile outside of the script?
I made a small application to compile Visual Basic projects and set MUI_VERSION and MUI_NAME automatically. Then it just runs the MakeNSIS.exe file on its own.
Joost Verburg
14th March 2003 19:12 UTC
Yep. A solution is to create an app that gets the desktop directory (using an API call), LAUNCH makensis with a /DDESKTOPDIR="dir" flag and use "${DESKTOPDIR}" for the directory.
kichik
15th March 2003 11:53 UTC
Or just create another installer that will call makensis with /X"OutFile $DESKTOP\myInstall.exe". There is no need for another program.
Jochanan
14th April 2003 13:34 UTC
Some example code? Pls. :)
kichik
14th April 2003 17:49 UTC
In the compiler script:
Section compile
Exec '"${NSISDIR}\makensisw.exe" /X"OutFile $DESKTOP\myInstall.exe" "my script.nsi"'
# or
Exec '"${NSISDIR}\makensisw.exe" /D"DESKTOP=$DESKTOP" "my script.nsi"'
SectionEnd
In the main script (if second method [/D] used):
OutFile "${DESKTOP}\myInstall.exe"