Recent

Author Topic: How to reduce EXE program size?  (Read 12005 times)

Dodfr

  • New member
  • *
  • Posts: 6
Re: How to reduce EXE program size?
« Reply #60 on: June 30, 2021, 04:27:01 pm »
KOL is not Delphi only. It works with our favorite compiler as well...
https://wiki.freepascal.org/KOL

Excellent :-) I have an old Ressource Meter for years made with on D7+KOL and I wanted to make it x64



marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 9589
  • FPC developer.
Re: How to reduce EXE program size?
« Reply #61 on: June 30, 2021, 04:48:48 pm »
64-bit is always larger, so if you want to keep it small....

Dodfr

  • New member
  • *
  • Posts: 6
Re: How to reduce EXE program size?
« Reply #62 on: June 30, 2021, 06:17:41 pm »
64-bit is always larger, so if you want to keep it small....

The thing is that I also check for some infos of running process it is to retrieve start command line that I can get from 32bits to 32bits processes but not from 32bits to 64bits (the ressource meter also show Top most CPU process Top RAM Top DiskActivity but for this I use Perfomance Counters) original size is 450KB and once compressed with UPX it is 150KB standalone fully portable exe zero install zero DLL.

Seenkao

  • Full Member
  • ***
  • Posts: 249
Re: How to reduce EXE program size?
« Reply #63 on: June 30, 2021, 11:11:04 pm »
Для уменьшения исполняемого файла надо перебрать файл system.pp для данной системы и исключить всё что вам не нужно или "минимизировать" код. Это было уже сделано Владимиром Кладовым, но на ассемблере для Delphi и для 32-х битной системы. Возможно тот код можно использовать для FPC/Lazarus (что-то уже переводилось для FPC/Lazarus).

Всю информацию и связаться с Владимиром Кладовым вы можете на сайте http://f0460945.xsph.ru/rindex.htm

google translate:
To reduce the executable file, you need to iterate over the system.pp file for the given system and exclude everything that you do not need or "minify" the code. This was already done by Vladimir Kladov, but in assembler for Delphi and for a 32-bit system. Maybe that code can be used for FPC/Lazarus (something has already been translated for FPC/Lazarus).

All information and contact with Vladimir Kladov you can visit the website http://f0460945.xsph.ru/rindex.htm

WackaMold

  • Newbie
  • Posts: 4
Re: How to reduce EXE program size?
« Reply #64 on: July 19, 2021, 10:12:01 pm »
UPX Exe-packer from https://upx.github.io shrinks the empty program after compiling+linking from 44,032 bytes to 19,968 ... and a demo GUI About program from 2,853,376 bytes to 826,880 (68% shrinkage).

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 9589
  • FPC developer.
Re: How to reduce EXE program size?
« Reply #65 on: July 19, 2021, 10:13:49 pm »
UPX Exe-packer from https://upx.github.io shrinks the empty program after compiling+linking from 44,032 bytes to 19,968 ... and a demo GUI About program from 2,853,376 bytes to 826,880 (68% shrinkage).

UPX is known, the FPC distribution even used to use it, but it was removed because it caused more problems (read: antivirus problems) than it solved.

 

TinyPortal © 2005-2018