Skip to content
⌘ NSIS Forum Archive

Self extracting executable

4 posts

pgg1#

Self extracting executable

Hi

At present I have a compile directory which holds all my files along with my script. When I run the script I create a directory on my desktop and I copy all the files over to this directory along with the program executable that NSIS creates, everything in the directory makes up my program.

How do you get everything into a single executable? so all you have is one single executable with everything contained within, similar to the NSIS installation.

I have looked at makensis.nsi from the Examples directory within NSIS and to be honest it's not that clear to me.

Any advice will be a great help.

Cheers,

Paul
pgg1#
Thanks, I am using the File instruction in places. But I mainly use the ZipDLL.dll The main reason I use the ZipDLL is because I package the Java Runtime Environment (JRE) with my program and I need to extract all the files the JRE has. I use the ZipDLL like so:


Section "Extract Files"
!insertmacro ZIPDLL_EXTRACT "Release_DLL.zip" "$INSTDIR\bin\DLLs" <ALL>
!insertmacro ZIPDLL_EXTRACT "Client.zip" "$INSTDIR\Client" <ALL>
!insertmacro ZIPDLL_EXTRACT "JRE_v6.zip" "$INSTDIR\JRE_v6" <ALL>
!insertmacro ZIPDLL_EXTRACT "SomeOtherZip.zip" "$INSTDIR\Motorola" <ALL>
SectionEnd
Is this the reason why I am not getting a single executable
within everything contained within?

Cheers

Paul
Afrow UK#
There's no point using Zip files. Just put the files inside those Zip files in separate folders and then use File /r path\*.*.

With your method you're still going to have to compress the Zip files into your install with File instructions anyway meaning you'll be uncompressing the data twice.

Stu