skewltek
3rd April 2007 15:32 UTC
Zip2exe command line arguments
I just completed a project using NSIS and it works beautifully. Thanks for all of the contributions to this very robust software.
The second stage for this project involves making small packages that users will create and upload to an internal web server. The missing link that will make this process seamless is a simple install creator (like zip2exe) that supports command line arguments (like zip2exe -input file.zip -classic -lzma)
I know that there are other options in this forum, but i can't find anything about command line switches or arguments. I also know that several developers also make a zip to exe maker (7zip, powerarchiver...) but I tried them and didn't like them, despite the fact that they do, of course, use command line switches.
Can someone point me in the right direction?
Red Wine
3rd April 2007 16:20 UTC
Instead of compressing files to file.zip and pass them to zip2exe utility, you can use NSIS to compress a whole directory structure with File /r instruction.
As for command line arguments there is the included FileFunc header.
http://nsis.sourceforge.net/Docs/AppendixE.html#E.1
Brummelchen
4th April 2007 22:24 UTC
NSIS has a tiny overhead instead RAR, 7Zip or ZIP - 18k is the smallest.
But it always needs a script thats a bit annoying for a quick release.
myself i have 7zip and winrar on folder/file context and that
is mostly all i need instead a small handy tool that creates
and compile in one instance my files.
nevertheless zip2exe was never really usefull couse it always
needed an installed nsis compiler afair.
skewltek
9th April 2007 19:53 UTC
Thanx Red Wine & Brummelchen. You both hit on a couple of my problems. I really wanted to use 7zip originally, but the exe stub doesn't allow you to choose an output directory, it just writes to a random folder in the temp directory. I could attach a script that writes it to the correct directory in Program Files, but that's messy, and this will be executed on a limited user account so that is just a bad idea. I also need a free solution, so WinRAR is out.
I am also trying to keep this trimmed to a few support files, and not have the creator have to install NSIS to use it (I currently have Zip2EXE in a folder with all of it's support files, stripping out the unnecessary NSIS files, and ended up with a lightweight 750Kb folder.)
Don't take this the wrong way, but I'm really suprised that there are no command line arguments in Zip2exe! If I'm the only person to ever ask for them it's pretty obvious why it's never been done, though...
If anyone knows of another program that does what zip2exe does in a relatively streamlined fashion AND allows for command-line arguments, please chime in!
Thanx again, everyone!
kichik
9th April 2007 20:00 UTC
I am also trying to keep this trimmed to a few support files, and not have the creator have to install NSIS to use it (I currently have Zip2EXE in a folder with all of it's support files, stripping out the unnecessary NSIS files, and ended up with a lightweight 750Kb folder.)
Then you don't need zip2exe, you just need makensis.exe. zip2exe uses makensis.exe, so when trying to keep things trimmed, it's dead weight. Create a batch file that'd use 7za.exe to extract files and run makensis.exe to compile a script you wrote.
skewltek
9th April 2007 20:04 UTC
OH, so Zip2EXE is just a gui frontend for makensis.exe?!? DOH! (lightbulb flickers...)
OK, I'm off to find doc's on makensis. Thanks!