Executable Size

BlitzPlus Forums/BlitzPlus Programming/Executable Size

Gabriel(Posted 2003) [#1]
I don't normally write apps, but I have to write a couple, and I may use BlitzPlus. Now I know BlitzPlus is exploring some technology which will make it into BlitzMax, so I'm guessing that includes a more intelligent compiler for smaller exe's. But how small are "hello world" exe's in B+?

Yes, I know this question has been asked 1,000 times before but I can't find the answer in the first few pages, and the search gives me bugger all.


CS_TBL(Posted 2003) [#2]
a=CreateWindow("",32,32,96,96)
b=CreateLabel("",2,2,64,24,a)
SetGadgetText b,"Hello World"
WaitKey()
End


and the exe is 680kb!


Binary_Moon(Posted 2003) [#3]
"so I'm guessing that includes a more intelligent compiler for smaller exe's."

-- you're guessing wrong :)


Jim Teeuwen(Posted 2003) [#4]
I think I remember reading a post by mark (does he actually still live btw? Havnt read anything from him for quite a while :( ), where he was explaining that BlitzMax will consists of modules wich would (theoreticly) cause the final exe to be compiled with the entire DX/GL library, but only the functions and stuff that was actually used.. this should create smaller executables.. But, as said before 'I think I remember reading' so dont take my word for it


Warren(Posted 2003) [#5]
and the exe is 680kb!

That gets amortized though. As you add more code, the EXE size won't grow linearly.


dirkduck(Posted 2003) [#6]
Yep, it's because it includes a "runtime" into the exe (not sure how, i've been wondering for a long time...) which makes it big.


Gabriel(Posted 2003) [#7]
Ok, thanks for the answers guys. Yes, it does seem I guessed wrong. In that case I may as well stick with Blitz2d and XLnt. Exe sizes appear to be about the same.


Seldon(Posted 2003) [#8]
A final Blitz .EXE is the run-time itself, while your own code is included as a resource in the DATA field of the .EXE file. I guess this part is loaded and started by the run-time.


Hotcakes(Posted 2003) [#9]
Actually, there's a chance a Blitz2D exe will be smaller than a Blitz+ exe, for lack of the gui code. On the other hand, Blitz+ is more optimised, so it could balance out. Ish.


cyberseth(Posted 2003) [#10]
I've heard that if you UPX the DLLs in your Blitz folder, then all compiled Blitz EXEs come out smaller!! :D


skn3(Posted 2003) [#11]
yeah you can get an exe down to 350-400k (using UPX)


Hotcakes(Posted 2003) [#12]
Protean (www.proteanide.co.uk) actually allows you to set a pre and post processor exe/script, so you could set this up as a postprocessor and never have to worry about your Blitz exes being huge again =]

Well, in the next update, ish, anyway... ;]