잠깐 Lazarus 사용해 보았는데 실행파일 크기가 너무 커서 실행파일 크기를 줄이는 방법을 찾아 보았다.

Lazarus Wiki 페이지에서 방법을 찾았다. 

Quick guide to Lazarus/FPC application size reduction (tested with Lazarus 0.9.26)
  • Project|Compiler Options|Code|Smart Linkable (-CX) -> Checked
  • Project|Compiler Options|Linking|Debugging| Uncheck all except
    Strip Symbols From Executable (-Xs) -> Checked 
  • Project|Compiler Options|Linking|Link Style|Link Smart (-XX) -> Checked
    The most important items seem to be 2. For a simple application the executable size should now be 1-3 MB instead of 15-20 MB. At this point you can also try: Project|Compiler Options|Code|Optimizations|smaller rather than faster -> Checked (Warning: this might decrease performance) 
  • (Optional) Run UPX <your_executable> to compress your binary by an additional factor of 2-3 (Warning: as indicated above, there are drawbacks to using UPX).



이 방법을 사용하면 원래 크기인 12MB 짜리 실행파일이 2MB 정도로 줄어 들었다. 하지만 마지막 방법인 UPX로 압축하는 방법은 정상 동작을 하지 않았다. 최신 UPX 로 압축을 시도하였지만 실패 하였다.

출처 : http://wiki.lazarus.freepascal.org/Lazarus_Faq#Why_are_the_generated_binaries_so_big.3F
 
Posted by NeoDreamer
:
BLOG main image
사람의 발목을 잡는건 '절망'이 아니라 '체념'이고 앞으로 나아가게 하는건 '희망'이 아니라 '의지'다. - 암스 중에서 - by NeoDreamer

공지사항

카테고리

전체보기 (793)
Life Story (1)
Thinking (2)
Nothing (5)
---------------* (0)
Dev Story (701)
Com. Story (80)
IT Story (1)
---------------+ (0)
Etc (2)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

Total :
Today : Yesterday :
05-05 13:29