frodrum
1st July 2004 07:31 UTC
Help me pls!!
Hi i am a newbie to programing and I am currently a student who has been posted to a company for attachment. My task in this company is to create an installation disk for one of its applications. First I have to create an installer to install a small batch file. It is a HelloWorld class which i created using java. But i have no idea how to package it into an installer. I have read the NSIS manual and have gone through the forum but don't understand most of the stuff there as the only programming knowledge I have is of Java. I hope you could give me some examples on how to make an installer for a batch file. Thanks!!
deguix
1st July 2004 11:15 UTC
You can find scripts that help you inside Examples folder inside your NSIS dir, however I recommend looking inside Examples\Modern UI as the Modern UI adds more beauty to your installers.
The simplest installer you can create is this below:
OutFile a.exe
Section
SectionEnd
michaelmross
1st July 2004 16:04 UTC
See what each of the scripts in the NSIS\Examples folder does. It's very easy to adapt an existing script. Also try the great wizard that comes with http://hmne.sourceforge.net/
frodrum
2nd July 2004 03:25 UTC
Ok! Thanks for all your help.I really appreciate it.:)
frodrum
5th July 2004 05:04 UTC
Hey it's me again. I have a question regarding one of the examples given in the NSIS examples folder. This is from example2. Here's the code:
Section "Example2 (required)"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File "..\makensisw.exe"
For the last line (File "..\makensisw.exe"), is the makensisw.exe a file that already exists, one that will be created by the installer or is it the file that i would like to include in my installer.
And also to change the directory of $INSTDIR i think i need to use StrCpy but i am not sure how to use it. Could someone give me an example on how to do this.
Thanks again!
deguix
5th July 2004 07:34 UTC
is the makensisw.exe a file that already exists, one that will be created by the installer or is it the file that i would like to include in my installer.
It is a file that already exists, and the file that you would like to include in your installer:
Quote from example2.nsi:
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File "..\makensisw.exe"
It will include the file
makensisw.exe in the installer and extract it to $INSTDIR.
And also to change the directory of $INSTDIR i think i need to use StrCpy but i am not sure how to use it. Could someone give me an example on how to do this.
StrCpy $INSTDIR "C:\YourDir"
frodrum
5th July 2004 07:56 UTC
Ok thanks deguix...really appreciate your help.