Recent

Author Topic: Compiled file weight  (Read 6396 times)

ninobi

  • Guest
Compiled file weight
« on: July 12, 2005, 01:00:40 pm »
Hi, I'm new for this forum.
I used a little, in the past, Delphi, but I abandoned it for its commercial nature. I tried, now, to start doing something with Lazarus. It was a small thing and inactive yet (only the GUI, by now), but, when I built it, I had a file of 5.43 Mb! I remember that Delphi compiled far lighter files...
Is it normal or was something wrong with my file?
nino

carbohydrate

  • New member
  • *
  • Posts: 8
Compiled file weight
« Reply #1 on: July 12, 2005, 04:15:49 pm »
You can use the search function within the forum section (not of the website!).
Type "size", for example, and enjoy the results.

ninobi

  • Guest
Compiled file weight
« Reply #2 on: July 13, 2005, 07:50:12 am »
Many thanks and excuse me.
I searched with the keyword "weight" (English is not my language, it's quite clear) and did't find anything...
Bye,
nino

Anonymous

  • Guest
Compiled file weight
« Reply #3 on: September 15, 2005, 05:29:32 pm »
Quote from: "ninobi"
Many thanks and excuse me.
I searched with the keyword "weight" (English is not my language, it's quite clear) and did't find anything...
Bye,
nino

You can reduce the size of the executable using strip utility and *then* even reduce it further with UPX of the strip-ped executable.
You can strip the executable with the specific version of strip for the operating system you are targheting but you can UPX nearly any kind of executable without needing a specific UPX version.
An executable of a simple Lazarus app with a form and some logic (5,4 MB) is stripped to about 1,9 MB, then you can pack it with UPX to about 400 KB.
I think the answer to that question should be put in the FAQ at first place since it's a very common question (and I think Lazarus should at least strip executables by default, leaving as a project's option to don't use strip).

 

TinyPortal © 2005-2018