Shrinking B3D

Miscellaneous Forums/General Discussion/Shrinking B3D

OK I have searched (or attempted to...) and cannot find anything on shrinking the B3D programs I make. Does anyone know of something... I write an example that is mybe 30 lines of simple code and it comppiles to about 1.2meg

RZ

From what I've heard, Blitz3D links the entire core language module into every executable that gets created, which includes the entire command set -- including all the commands that you didn't use in your program.

You may be able to shrink the file a bit using the UPX executable compression program, but a B3D executable will always be fairly big, especially compared with something like BlitzMax where you can link in only the modules that you are actually using.

UPX is great for .exe compression and you can use it on .dll's too for extra minisculising. :)

There appears to be no way to reduce the size of Blitz .exe's via configuration, but older versions of the language produced smaller results (although have bugs and less features)

Also if you're only using 2D, BlitzPlus or BlitzBasic produce smaller exes also.

Also if you're only using 2D, BlitzPlus or BlitzBasic produce smaller exes also.
Or BlitzMAX, which can produce very small binaries.

Well, yes, but it's a little harder to port. And it's not straight 2D, which could be a bad thing, depending. But for small exes, it's the way to go. Or Purebasic. =]

If you pack it with eg. Molebox, it's gonna be around 700 KB, and that's almost nothing these days. A blitz App still fits on a floppy disk, that's great for a game enviroment. For small apps like one-purpose utilities I'd suggest to use BlitzMax, Purebasic Powerbasic etc., or use Blitz3D and don't worry too much about the size.

yeah see it was a really simple app that started this... essentially I just wanted to read all keyhits from the keyboard. I didn't even set a graphics mode or anything because it didn't need one. let me see molebox and PB...

Thnkas for the advice!

RZ