Modifying Installers in Linux
I thought perhaps that I could modify a file in an installer created in NSIS with the Windows 'zip' command by running the following:
[list=1][*]echo "Referer: ..." > referer.txt[*]zip -J example1.exe [*]zip -u example1.zip referer.txt [*]zip -A example1.exe [/list=1]
For those unfamiliar with Info-Zip: #2 strips the SFX stub, #3 updates the file in the zip archive and #4 adds the SFX stub back again.
And that perhaps I'd be able to compile Info-Zip to do this in Linux (ie. modify Windows SFX files in Linux). Well, it appears I can't even do this with Info-Zip in Windows, so that's not going to work. I tried all the compression options. It's probably obvious to everyone else but me that NSIS doesn't create zip-compatible SFX files. (Please tell me I'm wrong!)
Is there an easy solution to this without running a Windows server?
I have an installer for a client application which offered for download via an Apache/Linux server. I want my Apache/Linux server to tag installers before each download with referer info for that particular user. That way when the user registers (via the client they just downloaded and installed), I know where they heard about the application.
I've also looked at NSIS Self-Extractor but that doesn't seem to be what I want either.
Thanks in advance everyone.
EDIT: I tried using UPX to pack the EXE. After adding the proper !packhdr line to my .nsi file:
!packhdr "$%TEMP%\exehead.tmp" '"C:\Progra~1\UPX\upx.exe" "$%TEMP%\exehead.tmp"'MakeNSISW seems to be using UPX. But, if I run 'upx -t example1.exe' on the binary output by MakeNSISW it says "not packed by UPX".