Recent

Author Topic: New User - Compiling Problem  (Read 18732 times)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: New User - Compiling Problem
« Reply #15 on: February 06, 2010, 07:10:12 am »
Quote
Here is the my command line parameters to achieve 1.50Mb with Windows XP
Not look much different from me. Except that I use -O3, -CfSSE3 and -OpPENTIUMM. And of course it's also applied to RTL and FCL, probably you miss the last two.
Quote
Is anybody worried about file size when downloading the application? I doubt it.
Agree, but some of us are just size freak :P

thierrybo

  • Full Member
  • ***
  • Posts: 146
Re: New User - Compiling Problem
« Reply #16 on: February 06, 2010, 12:02:17 pm »
And of course it's also applied to RTL and FCL, probably you miss the last two.

That's it! I never rebuild RTL and FCL, only LCL

Quote
Is anybody worried about file size when downloading the application? I doubt it.
Agree, but some of us are just size freak :P


Don't be fooled, I am on your side and think 1,5 Mb is normal from a Lazarus point of view, I just want to be sure my "starting point" is well optimized, and thanks to you Leledumbo I realized I can do better.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12014
  • Debugger - SynEdit - and more
    • wiki
Re: New User - Compiling Problem
« Reply #17 on: February 06, 2010, 02:20:25 pm »
the 1.5 MB  (or 1.6) are the current correct minimal size.

Because the compiler can not know what resources are later loaded (like maybe a gif, or png is opened from an external file). So all the decoders must be included, even if you do not use them.
Probably some icons for error/warning dialogs, that could happen.
Similar a lot of other stuff is included. (but I do not have a full list)

I have made a test once. If you do not use gfx (except the program icon) => you can modify the LCL and throw out the code from the graphic unit (it is a bit more work than it sounds). That saves about another 100 MB.
But then it will affect the LCL for all apps, and you can't use it any more for apps that require gfx....


thierrybo

  • Full Member
  • ***
  • Posts: 146
Re: New User - Compiling Problem
« Reply #18 on: February 06, 2010, 05:20:20 pm »
Yep,

I just built fpc 2.4.1 adding smartlinking and so on and built again with this new compiler with the same result. By the way seeing default options for building fpc it seems this is already the case.

 

TinyPortal © 2005-2018