tags:

views:

352

answers:

3

In my NSIS script, I use this line:

 File "..\help\*.*"

My problem is that I have the help directory in my subversion repository (its constantly updated as we add new functionality). This means that the help directory contains a .svn directory.

I wish to view the contents of the setup.exe that NSIS created to verify that it does not have the .svn directory.

P.s. I experimented to see if NSIS recursively adds files when wildcards are used. It doesn't. But I want to verify this, hence the question.

+2  A: 

These things are typically compressed files.
You could check with 7z/7-zip to open the EXE archive.


As a record, after the comments below,
I'd like to point to my recent notes on the merits of 7-zip at Superuser,
Compressing with RAR vs ZIP

nik
I tried with WinRar and the only thing it extracted was the .NET framework installer. Hmmm. Now that I think about it, maybe the .NET installer's header was read instead of my setup.exe. I'll remove the redistributables I have and try again.
MrValdez
Doesn't work. Removing the redistributables (basically compressed files such as the .NET installer) makes WinRar complain that the created setup.exe have "no archived files found"
MrValdez
I do not use WinRAR. Have you figured out the container this setup.exe has? If a (good) archiving tool says there are no compressed files, its usually just the executable code in there.
nik
@nik I've just tried out all the possible Compression options (ZLIB, BZIP2, LZMA) and none of them allows WinRar to view the contents. I'm gonna try 7-zip just in case.
MrValdez
It only works in 7-zip, so I don't understand why you keep going on about WinRar.
Anders
7-zip works. I'm ditching WinRar and telling everyone I know who use WinRar to switch.
MrValdez
@Anders Cause I thought WinRar would work. :P
MrValdez
A: 

Instead of unzipping, my suggestion is to look at the NSIS compilation log. It will tell you everything about files included. When doing changes in my NSIS scripts I always check the logs to make sure that everything is going according to plan. Streaming the log from the command line to a text file, then read it from your favorite editor.

daramarak
+1  A: 

Rather than look at what's in your NSIS exe itself, just exclude the .svn directories so you know they'll never be in there.

Something like this will do the trick:

File /r /x .svn "..\help\*.*"

The /x .svn bit tells NSIS to exclude those directories.

Coincidentally, if you're not using the /r switch, then you're not adding files and folders recursively, so it wouldn't add the .svn subdirectories anyway.

Keithius