After compiling with Lazarus, the executable file is VERY large. To reduce it's size, I did the following:
Linux (OpenSUSE)
1) Install upx package if you don't have it (YaST > Software Management > Search for upx and install)
2) Open terminal (in Dolphin, right-click > Actions > Open terminal here)
3) Run the following commands:
strip --strip-all Program (! Linux is case sensitive)
upx -9 Program (! Linux is case sensitive)
The size of "Program" was reduced from 21580 KB to 1276 KB
"Program" is the name of the executable file in my case
And beacause Lazarus is cross-platform...
Windows (W7)
1) Start command prompt
2) Move to the application's directory (in my case: cd c:\Program\)
3) Run the following commands:
strip --strip-all program.exe
upx -9 program.exe
The size of "program.exe" was reduced from 14405 KB to 613 KB
Niciun comentariu:
Trimiteți un comentariu