How to lower the disk space taken by my programs!

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
GeraldG
Experienced Solver
Experienced Solver
Posts: 85
Joined: Mon May 16, 2005 12:30 pm

Post by GeraldG »

For Win dont compress .exe with upx or other things, use Installer without file compressing.
-> build a normal install.exe
-> this install.exe compress with 7-zip (ultra-mode) as .7z
-> run "copy /b 7zS.sfx + config.txt + install.7z install7z.exe
==>> smallest selfextracting install.exe

U can compress the 7zS.sfx with upx before.

config.txt:
;!@Install@!UTF-8!
RunProgram="install.exe"
;!@InstallEnd@!
lowjoel
Part Of The Furniture
Part Of The Furniture
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel »

UPX is great for windows, actually. 7zip just adds the need to get the program, isnt it not? and 7zip isnt exactly popular with windows users anyway
leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post by leio »

UPXing the exe gives you smaller INSTALLED executables/dll's aswell. Not just a smaller installer.
In todays computers it is often actually better to UPX due to efficiency, because the disk I/O time needed to load a larger exe is often more than the CPU time needed to uncompress the exe in memory.
So I don't see why should one UPX the installer, but not the executables/dll's that go inside the installer.
UPX'ing the installer too is a good idea to try though, in addition to UPXing exe's/dll's beforehand.
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/
GeraldG
Experienced Solver
Experienced Solver
Posts: 85
Joined: Mon May 16, 2005 12:30 pm

Post by GeraldG »

With 7-zip u can make archives .7z or selfextracting archives .exe.
The user doesnt need 7-zip if selfextracting archive is distributed.

With 7zS.sfx + config.txt + archive.7z its possible to run a .exe after uncompress (see config.txt). The uncompressed file is stored in temp-folder, after ending the application the temp-folder deletes automatic.
GeraldG
Experienced Solver
Experienced Solver
Posts: 85
Joined: Mon May 16, 2005 12:30 pm

Post by GeraldG »

I will have small installer-size for faster downloading from internet. The size after install on harddisk is not so much important for me.
For best results with 7-zip its better to have not compressed files. Thats the reason why i use no compress-mode in installer and compress the final install.exe.

I think its not important faster to load an 5 MB app.exe uncompressed as to load an compressed 2 MB app.exe from normal harddisc. (But if loaded over network its important)
lowjoel
Part Of The Furniture
Part Of The Furniture
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel »

leio wrote:UPXing the exe gives you smaller INSTALLED executables/dll's aswell. Not just a smaller installer.
In todays computers it is often actually better to UPX due to efficiency, because the disk I/O time needed to load a larger exe is often more than the CPU time needed to uncompress the exe in memory.
So I don't see why should one UPX the installer, but not the executables/dll's that go inside the installer.
UPX'ing the installer too is a good idea to try though, in addition to UPXing exe's/dll's beforehand.
i tried with jordan russel's inno setup compiler. it throws the "alreadypackedexception" i think i cant remember
metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic »

I use (Jordan Russell's) Inno Setup (http://www.jrsoftware.org/isinfo.php) and it has several levels of compression. I don't compress my program, just let Inno do it's job and I get very good results.

Still, if you want one of the smallest installers available, try NSIS (http://nsis.sourceforge.net/). Back when I tried it (about two years ago) it produced amazingly small installers. It was a bit of a pain in the butt to make an elaborate installer so I moved to Inno.

But if you want uncompromised installer size, NSIS is the way to go.
Tyler
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 246
Joined: Fri Sep 03, 2004 12:37 am
Contact:

Post by Tyler »

Inno Setup was great for me, for a while, but you get the same nice compression options with a much better look-and-feel from NSIS: http://nsis.sourceforge.net/ Don't get me wrong, I love Inno Setup, but as the OS has become more aesthetic, Inno has not progressed in this regard and is still creating NT-looking installers. It's true that setting up an NSIS installer is a little more troublesome than with Inno, but if you've conquered wx enough to write a production-level program, I don't see how this little bump in the road is anything to be afraid of.

Meanwhile, NSIS offers all kinds of different looks and the "Modern UI" is perhaps unparalleled in serving a proper first impression.
Last edited by Tyler on Wed Jul 20, 2005 12:13 am, edited 1 time in total.
metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic »

Tyler,
When did you last look at Inno? They've had the "Modern UI" installer for a very long time now.
Tyler
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 246
Joined: Fri Sep 03, 2004 12:37 am
Contact:

Post by Tyler »

metalogic wrote:Tyler,
When did you last look at Inno? They've had the "Modern UI" installer for a very long time now.
Indeed, but what's wrong with that? It's still more slick than the standard Inno. Unless Inno has updated since I last used them.
metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic »

That's what I meant :D
Inno has had the "Modern UI" style for a while. Probably just about as long as NSIS actually.

They both look about the same.
Tyler
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 246
Joined: Fri Sep 03, 2004 12:37 am
Contact:

Post by Tyler »

OHhh. Now I get you. I think my brain stopped working there for a moment because I misread "Inno" as "NSIS". lol.. I stand corrected. Thank you for pointing that out.. I've been up waay too long. :P
Post Reply