Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-10

Fwd: Tamaho do executavel

12 messages · 10 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

William Oliveira Ferreira

On a Brazillian Lazarus Mailing List, someone asked once again how to reduce the executable's size generated by FPC/Lazarus. I've suggest him to generate a external debug symbol file on linking. That's help a lot with this issue, you know. But, Silvio and I have a little question: Why this isn't the default option? (Generate external debug symbol gdb).

Could someone set it as default? It will reduce the amount of questions about the size of the executable.

(Sorry about my F****** english, maybe you'll cry blood while reading) ________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informa??o

---------- Mensagem encaminhada ----------
De: William Oliveira Ferreira
Data: 3 de outubro de 2011 16:51
Assunto: Re: [lazarus-br] Tamaho do executavel
Para:

N?o precisa de Strip e muito menos do UPX. O Lazarus gera um execut?vel deste tamanho porque ele adiciona informa??es para depura??o (relacionadas ao gdb) ao execut?vel. Basta configurar para gerar em um arquivo externo ou mesmo n?o gerar que j? resolve.

Para fazer isto, siga o caminho:
[en] Project -> Project Options -> Linking -> [x] Use external gdb debug simbols file
[pb] Projecto -> Op??es de projeto -> Vinculando -> [x] Usar arquivo de depura??o externo gdb

S? isto j? ir? reduzir mais de 70% no tamanho do execut?vel. ________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informa??o

Em 3 de outubro de 2011 16:34, Everaldo escreveu:

fabio fer wrote 85 lines
Ol? pessoal, Rodei um programa simplezinho com apenas alguns forms e o execut?vel deu mais de 20 MB. Tem como minimizar isto? N?o sei se chega a ser um problema mas se for distribuir este aplicativo o tamanho do .exe fica incoerente com o seu porte pequeno. Grato -- Voc? recebeu esta mensagem porque est? inscrito no Grupo "Lazarus-BR" nos Grupos do Google. Para postar neste grupo, envie um e-mail para Para cancelar a sua inscri??o neste grupo, envie um e-mail para Para ver mais op??es, visite este grupo em http://groups.google.com.br/group/lazarus-br?hl=pt-BR Ol?, F?bio Bom, no windows, para ficar menor o execut?vel, eu configuro duas ferramentas, na seguinte ordem: Strip ------> que deve ser executado primeiro e; UPX ------> por ?ltimo. V? no menu Tools ----> External Tools ... Na janela que se abrir, pressione o bot?o "Add". Na janela que se abrir, coloque os seguinte par?metros para o Strip primeiro: Title: Strip Program Filename : C:\lazarus\fpc\2.4.2\bin\i386-win32\strip.exe Em Options, marque as duas caixas "Scan output ..." Em macros, ecolha a seguinte op??o: $TargetFile() E clique no bot?o que fica ao lado do ListBox, intitulado "Add" e; finalmente clique no bot?o "OK". Fa?a o mesmo para o UPX, s? inserindo o atributo "-9", que ? a m?xima compress?o para o upx, deixe da seguinte maneira: Title: UPX Program Filename : C:\lazarus\fpc\2.4.2\bin\i386-win32\upx.exe Em Options, marque as duas caixas "Scan output ..." Em macros, ecolha a seguinte op??o abaixo, precedida do "-9" e espa?o, assim: -9 $TargetFile() Por final, clique em "Ok" e na janela "External Tools ...", clique no bot?o "OK". Pronto!!! Aparecer?, ap?s essa configura??o, no menu "Tools", as op??es, primeiro Strip, que tu clicar?s primeiro ap?s j? ter feito teu programa e, por ?ltimo, UPX, que demorar? um pouquinho para mostrar a mensagem de ok na janela "Messages" da IDE Lazarus. Lembre-se, primeiro execute o "Strip" e, logo ap?s, o "UPX". Boa sorte amigo!!! Everaldo -- Voc? recebeu esta mensagem porque est? inscrito no Grupo "Lazarus-BR" nos Grupos do Google. Para postar neste grupo, envie um e-mail para Para cancelar a sua inscri??o neste grupo, envie um e-mail para Para ver mais op??es, visite este grupo em http://groups.google.com.br/group/lazarus-br?hl=pt-BR

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20111003/767d14c2/attachment.html>

Reply by email

Martin
to William Oliveira Ferreira
William Oliveira Ferreira wrote 9 lines
On a Brazillian Lazarus Mailing List, someone asked once again how to reduce the executable's size generated by FPC/Lazarus. I've suggest him to generate a external debug symbol file on linking. That's help a lot with this issue, you know. But, Silvio and I have a little question: Why this isn't the default option? (Generate external debug symbol gdb). Could someone set it as default? It will reduce the amount of questions about the size of the executable.

I don't know if there are other reasons. but I think for once, it has to be tested.

That is, using it on Windows, or a new Linux distro with a new gdb version, probably works. But Lazarus still runs in environments, that are forced to use older gdb. So changing the default means to check that all those gdb versions will work with the changed defaults.

There may be other reasons, of which I am not aware.. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20111004/f40c564d/attachment-0001.html>

Reply by email

Felipe Monteiro de Carvalho
to Martin

Does it generate for example valid LCL stacktraces on crashes? Those stacktraces generated by the LCL itself and printed on the console...

The alternative solution seam much safer: Add a "release" build mode to new projects.

Felipe Monteiro de Carvalho

Reply by email

William Oliveira Ferreira
to Felipe Monteiro de Carvalho

Hi Felipe,

Well, i'm thinking as at the beginner's side. Theses build modes maybe seems so obscure to them. I confess that i have no idea of how to configure them. Setting the debugger to generate a external file as default a good solution to beginners and also reduce all those threads.

Well, that's my opinion.
________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informa??o

2011/10/4 Felipe Monteiro de Carvalho

Show quoted text 15 lines
Does it generate for example valid LCL stacktraces on crashes? Those stacktraces generated by the LCL itself and printed on the console... The alternative solution seam much safer: Add a "release" build mode to new projects. -- Felipe Monteiro de Carvalho -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20111004/c15982af/attachment-0001.html>

Reply by email

silvioprog
to William Oliveira Ferreira

2011/10/4 William Oliveira Ferreira :

Show quoted text 11 lines
Hi Felipe, Well, i'm thinking as at the beginner's side. Theses build modes maybe seems so obscure to them. I confess that i have no idea of how to configure them. Setting the debugger to generate a external file as default a good solution to beginners and also reduce all those threads. Well, that's my opinion. ________________________________ William de Oliveira Ferreira Bacharel em Sistemas de Informa??o

I agree with William.

I'll configure my projects to generate the debugging file out of the executable.

Thx.

ps. Debugging file out of... I did not know that this possibility existed.

Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> Facebook - <facebook.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> LazWebSolutions - <code.google.com/p/lazwebsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

Felipe Monteiro de Carvalho
to William Oliveira Ferreira: Well, i'm thinking as at the beginner's side. Theses build modes maybe seems so obscure…

2011/10/5 William Oliveira Ferreira :

Well, i'm thinking as at the beginner's side. Theses build modes maybe seems so obscure to them.

The usage of a pre-configured build mode is trivial. See this:

http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Selecting_the_active_build_mode

I confess that i have no idea of how to configure them. Setting the debugger to generate a external file as default a good solution to beginners and also reduce all those threads.

Well, time to learn then! Build modes are extremely easy to use when you learn them. I even added a very easy tutorial of how to add a debug and a release build modes here, with many screenshots:

http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Adding_a_release_and_debug_build_modes

Felipe Monteiro de Carvalho

Reply by email

Paul Ishenin
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 5 lines
Well, time to learn then! Build modes are extremely easy to use when you learn them. I even added a very easy tutorial of how to add a debug and a release build modes here, with many screenshots: http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Adding_a_release_and_debug_build_modes

It would be much easier if debug and release modes were automatically added to the new projects.

Best regards,
Paul Ishenin.

Reply by email

Ludo Brands
to Paul Ishenin
Show quoted text 13 lines
05.10.2011 14:29, Felipe Monteiro de Carvalho wrote: > Well, time to learn then! Build modes are extremely easy to use when > you learn them. I even added a very easy tutorial of how to add a > debug and a release build modes here, with many screenshots: > > http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Adding > _a_release_and_debug_build_modes It would be much easier if debug and release modes were automatically added to the new projects.

+1

The "Use these compiler options as default for new projects" option should store also the different build modes and not just take the active mode as default.

Ludo

Reply by email

Miquel Bruns
to Ludo Brands

debug and release modes should be included in lazarus release by default...

cheers,
miquel.

Ludo Brands wrote 29 lines
> 05.10.2011 14:29, Felipe Monteiro de Carvalho wrote: > > Well, time to learn then! Build modes are extremely easy to > use when > > you learn them. I even added a very easy tutorial of how to add a > > debug and a release build modes here, with many screenshots: > > > > > http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Adding > > _a_release_and_debug_build_modes > > It would be much easier if debug and release modes were automatically > added to the new projects. > +1 The "Use these compiler options as default for new projects" option should store also the different build modes and not just take the active mode as default. Ludo -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20111005/598a7601/attachment.html>

Reply by email

Marcos Douglas
to Felipe Monteiro de Carvalho: 2011/10/5 William Oliveira Ferreira : The usage of a pre-configured build mode is…
Felipe Monteiro de Carvalho wrote 17 lines
2011/10/5 William Oliveira Ferreira : > Well, i'm thinking as at the beginner's side. Theses build modes maybe seems > so obscure to them. The usage of a pre-configured build mode is trivial. See this: http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Selecting_the_active_build_mode > I confess that i have no idea of how to configure them. > Setting the debugger to generate a external file as default a good solution > to beginners and also reduce all those threads. Well, time to learn then! Build modes are extremely easy to use when you learn them. I even added a very easy tutorial of how to add a debug and a release build modes here, with many screenshots: http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Adding_a_release_and_debug_build_modes

+1
I use that way.

Marcos Douglas

Reply by email

Antônio
to Marcos Douglas

http://bugs.freepascal.org/view.php?id=19641

Ant?nio

2011/10/5 Marcos Douglas :

Show quoted text 31 lines
On Wed, Oct 5, 2011 at 3:29 AM, Felipe Monteiro de Carvalho wrote: > 2011/10/5 William Oliveira Ferreira : >> Well, i'm thinking as at the beginner's side. Theses build modes maybe seems >> so obscure to them. > > The usage of a pre-configured build mode is trivial. See this: > > http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Selecting_the_active_build_mode > >> I confess that i have no idea of how to configure them. >> Setting the debugger to generate a external file as default a good solution >> to beginners and also reduce all those threads. > > Well, time to learn then! Build modes are extremely easy to use when > you learn them. I even added a very easy tutorial of how to add a > debug and a release build modes here, with many screenshots: > > http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Adding_a_release_and_debug_build_modes +1 I use that way. Marcos Douglas -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email