문제

My server is Ubuntu Server 12.04, and my clients are all use Windows.

So I want to build some windows installer for them.

Finally, I found that 7z SelF-eXtracting installer is very easy for me. Ubuntu has p7zip, it can make 7z compress file, and can use sfx module to make windows 7z SelF-eXtracting installer by this command: cat 7zSD.sfx installer_config installer.7z > installer.exe

I downloaded the 7zip extra package to use its sfx modules at http://downloads.sourceforge.net/sevenzip/7z920_extra.7z

Everything is OK. The only problem is how to change the exe icon ? I want my installer have some different icons. Use script or some cli software is better because my server have no X and I want batched operation.

Thank you.

도움이 되었습니까?

해결책

Concatenating data together will seldom generate a valid PE executable unless you modify the PE header to consider that extra data. It might actually "work" right now because the Windows version is forgiving in loading the file and the 7z executable loads the payload from disk but the fact remains that your PE executable is invalid and might not work on some Windows versions.

The good news though is that by using a resource compiler you will solve both your problems: Both the icon and the payload are typically resources so you could have an "empty" 7z executable that you add an icon and your data to using a resource compiler.

I never tried compiling windows executables on Unix, but if I would, I'd look at Wine, IIRC it has a resource compiler that works on Unix.

Update: http://www.winehq.org/docs/winelib-guide/wrc

다른 팁

I don't think, that it's possible.

I would suggest to use nsis.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top