Author Topic: Exe Size  (Read 8564 times)

0 Members and 1 Guest are viewing this topic.

Offline bubzuru

  • Knight
  • **
  • Posts: 395
  • Cookies: 21
  • everything is contained in the data
    • View Profile
    • New School Tools
Exe Size
« on: November 11, 2011, 01:18:05 am »
i just opend my delphi 2010 ide for the first time in a while and built a standerd console app
complied it and the exe size is 63kb wtf i disabeldas much of RTTI as possible and only saved 3kb , delphi 2007 ever had exe sizes like this

any ideas on how to shrink the file size ???
Damm it feels good to be gangsta
http://bubzuru.comule.com

Offline bubzuru

  • Knight
  • **
  • Posts: 395
  • Cookies: 21
  • everything is contained in the data
    • View Profile
    • New School Tools
Re: Exe Size
« Reply #1 on: November 11, 2011, 01:47:50 am »
omg i hate delphi 2010 if i want my app unicode then i will do it no be forced to
im uninstalling it now. dephi 2009 is going back on all i want is a nice language with easy access to the windows api
Damm it feels good to be gangsta
http://bubzuru.comule.com

Offline xzid

  • Knight
  • **
  • Posts: 329
  • Cookies: 41
    • View Profile
Re: Exe Size
« Reply #2 on: November 11, 2011, 02:56:56 am »
Use pascal? Don't code either, but from what I hear pascal matches up w/C. A nice language with easy access to WinAPI: C, MASM32.


Offline bubzuru

  • Knight
  • **
  • Posts: 395
  • Cookies: 21
  • everything is contained in the data
    • View Profile
    • New School Tools
Re: Exe Size
« Reply #3 on: November 11, 2011, 03:22:06 am »
Use pascal? Don't code either, but from what I hear pascal matches up w/C. A nice language with easy access to WinAPI: C, MASM32.



well delphi is (object) pascal with a few nice unit threw in plus a nice RAD environment
basically just an IDE for object pascal and yup im pretty sure u can use MASM from delphi code

i just dont like delphi 2010 because of the unicode , plus the standard exe size has gone up.
you call a api function like CreateProcess and it calls CreateProcessW :S im installing delphi 2009 or maybe 7 

Damm it feels good to be gangsta
http://bubzuru.comule.com

Offline xzid

  • Knight
  • **
  • Posts: 329
  • Cookies: 41
    • View Profile
Re: Exe Size
« Reply #4 on: November 11, 2011, 03:47:25 am »
Uhh.. I just disassembled a hello world freepascal app.  :o

Was 30k, kinda big, not huge though. maybe comparing it to gcc(8k) was unfair.

Offline bubzuru

  • Knight
  • **
  • Posts: 395
  • Cookies: 21
  • everything is contained in the data
    • View Profile
    • New School Tools
Re: Exe Size
« Reply #5 on: November 11, 2011, 04:03:18 am »
Uhh.. I just disassembled a hello world freepascal app.  :o

Was 30k, kinda big, not huge though. maybe comparing it to gcc(8k) was unfair.


take a look at this
http://www.delphibasics.info/home/delphibasicsarticles/smallapplicationsindelphibyn0v4

1kb 'delphi' (not 2010) file, basically just strips out everything that makes it delphi
might aswell write in c\++ if your gunna do this, but still a nice read
Damm it feels good to be gangsta
http://bubzuru.comule.com

Offline xzid

  • Knight
  • **
  • Posts: 329
  • Cookies: 41
    • View Profile
Re: Exe Size
« Reply #6 on: November 11, 2011, 04:30:47 am »
Yeah you can do that with most compiled languages, just made equivalent in C(1.5k). If I played around w/it could bring it down to 1k. -> edit: will try, --> re-edit: can only go smaller w/o winapi, tired of trying.

My comparison was with everything the compiler wants you to include, with asm you can go pretty damn small:

PE(133 bytes):
http://www.phreedom.org/solar/code/tinype/

ELF(45 bytes):
http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
« Last Edit: November 11, 2011, 05:09:00 am by xzid »

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Exe Size
« Reply #7 on: November 11, 2011, 09:01:10 am »
If you think this is big - try FreePascal :D
Empty form takes 11mb LOL.
Did you try using StripReloc? it reduces the size a little by stripping some shit out: http://www.jrsoftware.org/striprlc.php
Also there is UPX but you probably knew about that :P
Oh and for FreePascal I am using a different tool to strip stuff. I'll upload if you like.

Offline bubzuru

  • Knight
  • **
  • Posts: 395
  • Cookies: 21
  • everything is contained in the data
    • View Profile
    • New School Tools
Re: Exe Size
« Reply #8 on: November 11, 2011, 04:18:53 pm »
If you think this is big - try FreePascal :D
Empty form takes 11mb LOL.
Did you try using StripReloc? it reduces the size a little by stripping some shit out: http://www.jrsoftware.org/striprlc.php
Also there is UPX but you probably knew about that :P
Oh and for FreePascal I am using a different tool to strip stuff. I'll upload if you like.

empty form in delphi 2010 is 80kb ha
fuck it im just gunna use delphi 2009 and put up with a 50k file
Damm it feels good to be gangsta
http://bubzuru.comule.com