Sign in Join

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

Mailing lists / lazarus / 2010-01

Build/Rebuild lazarus with components

23 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

Kjow

Hi all,

I need to compile lazarus in terminal (or command prompt) including all components already installed.
I mean that I made a simple batch script on windows startup that download fpc svn, lazarus svn, recompile fpc and finally recompile lazarus, but every time I run Lazarus (after relative "make clean all") I haven't any extra component. I need to click in "build" voice in IDE menu.

How can I include all packages (extra and not) in command line compiling?

I noticed also that lazarus.exe hasn't the icon, how to associate it to the exe?

Finally, how to automatically strip lazarus.exe? It is 119Mb... :)

Many thanks!

Reply by email

Mattias Gaertner
to Kjow
Show quoted text 11 lines
Hi all, I need to compile lazarus in terminal (or command prompt) including all components already installed. I mean that I made a simple batch script on windows startup that download fpc svn, lazarus svn, recompile fpc and finally recompile lazarus, but every time I run Lazarus (after relative "make clean all") I haven't any extra component. I need to click in "build" voice in IDE menu. How can I include all packages (extra and not) in command line compiling?

See
http://wiki.lazarus.freepascal.org/Installing_Lazarus#Compiling_and_running

I noticed also that lazarus.exe hasn't the icon, how to associate it to the exe?

It is already compiled in.
Maybe Paul can answer this?

Finally, how to automatically strip lazarus.exe? It is 119Mb... :)

Add to your script:
strip --strip-all lazarus.exe

Mattias

Reply by email

Paul Ishenin
to Mattias Gaertner
Mattias Gaertner wrote
> I noticed also that lazarus.exe hasn't the icon, how to associate it to the exe? It is already compiled in. Maybe Paul can answer this?

Windows uses built-in icon automatically. On linux you need to assign project ico file to desktop shortcut manually. I don't know if this can be automated since even kde and gnome requires different actions for that.

On OSX we are thinking about the possibility to automatically generate a bundle with .icns inside - then OSX will show application using that icon.

> Finally, how to automatically strip lazarus.exe? It is 119Mb... :) Add to your script: strip --strip-all lazarus.exe

There are other possibilities too. Compiler can strip if -Xs is passed but I remember some conflicts with -g options. You can also ask fpc to separate debug info from the executable using -Xg switch. I can be wrong but as I remember -Xg works correctly starting from fpc 2.4.0

Best regards,
Paul Ishenin.

Reply by email

Kjow
to Mattias Gaertner: On Mon, 18 Jan 2010 00:17:34 +0100 See http://wiki.lazarus.freepascal.org/Installing_Lazar…

2010/1/18 Mattias Gaertner :

Oh, OK.
So to upgrade svn revisions I need to do "make" instead "make clean all".

> I noticed also that lazarus.exe hasn't the icon, how to associate it to the exe? It is already compiled in. Maybe Paul can answer this?

startlazarus.exe and lazbuild.exe have both the icon, but lazarus.exe hasn't.

> Finally, how to automatically strip lazarus.exe? It is 119Mb... :) Add to your script: strip --strip-all lazarus.exe

Whops, I mean directly in "make" string... but it isn't a problem to add a row in the script ;)

Thanks!

Reply by email

Kjow
to Paul Ishenin: Windows uses built-in icon automatically. On linux you need to assign project ico file to…

2010/1/18 Paul Ishenin :

Show quoted text 6 lines
Windows uses built-in icon automatically. On linux you need to assign project ico file to desktop shortcut manually. I don't know if this can be automated since even kde and gnome requires different actions for that. On OSX we are thinking about the possibility to automatically generate a bundle with .icns inside - then OSX will show application using that icon.

As just worte, startlazarus.exe and lazbuild.exe have both the icon, but lazarus.exe hasn't.

There are other possibilities too. Compiler can strip if -Xs is passed but I remember some conflicts with -g options. You can also ask fpc to separate debug info from the executable using -Xg switch. I can be wrong but as I remember -Xg works correctly starting from fpc 2.4.0

So can I add -Xs or -Xg to the "make" for lazarus compile? e.g. c:\develop\lazarus\> make -Xs

Thanks
Kjow

Reply by email

Mattias Gaertner
to Kjow
Show quoted text 18 lines
2010/1/18 Paul Ishenin : > Windows uses built-in icon automatically. On linux you need to assign > project ico file to desktop shortcut manually. I don't know if this can be > automated since even kde and gnome requires different actions for that. > > On OSX we are thinking about the possibility to automatically generate a > bundle with .icns inside - then OSX will show application using that icon. As just worte, startlazarus.exe and lazbuild.exe have both the icon, but lazarus.exe hasn't. > There are other possibilities too. Compiler can strip if -Xs is passed but I > remember some conflicts with -g options. You can also ask fpc to separate > debug info from the executable using -Xg switch. I can be wrong but as I > remember -Xg works correctly starting from fpc 2.4.0 So can I add -Xs or -Xg to the "make" for lazarus compile? e.g. c:\develop\lazarus\> make -Xs

No,
the syntax is:

make OPT='-Xs'

But this won't work. See my other mail.

Mattias

Reply by email

Mattias Gaertner
to Kjow: 2010/1/18 Mattias Gaertner : Oh, OK. So to upgrade svn revisions I need to do "make"…
Show quoted text 6 lines
2010/1/18 Mattias Gaertner : > See > http://wiki.lazarus.freepascal.org/Installing_Lazarus#Compiling_and_running Oh, OK. So to upgrade svn revisions I need to do "make" instead "make clean all".

I guess you mean you have to use
"make clean all"

Show quoted text 6 lines
>> I noticed also that lazarus.exe hasn't the icon, how to associate it to the exe? > > It is already compiled in. > Maybe Paul can answer this? startlazarus.exe and lazbuild.exe have both the icon, but lazarus.exe hasn't.

Paul?

Show quoted text 7 lines
>> Finally, how to automatically strip lazarus.exe? It is 119Mb... :) > > Add to your script: > strip --strip-all lazarus.exe Whops, I mean directly in "make" string... but it isn't a problem to add a row in the script ;)

AFAIK this is not possible, because you can not disable the -g options that are always passed by the makefile.

Mattias

Reply by email

Kjow
to Mattias Gaertner

2010/1/18 Mattias Gaertner :

I guess you mean you have to use "make clean all"

Umm... I do "make clean all", then it compile right, but without installed extra packages.
Then if I try to do "lazbuild --build-all" or "lazbuild -B", I get:

c:\Develop\Lazarus>lazbuild --build-all
Error: missing file

lazbuild [options] <project or package-filename>

Parametri:

--help or -? questo messaggio di aiuto

-B or --build-all fai il build di tutti i file del progetto/pacchetto/ID E
-r or --recursive apply build flags (-B) to dependencies too -d or --skip-dependencies Non compilare le dipendenze --build-ide=<options> fai il build dell'IDE con i pacchetti -v or --version Mostra versione ed esci

--primary-config-path=<path>
or --pcp=<path>
directory di configurazione primaria, dove Lazarus salva i suoi file di configurazione. Per default ? C:\User s\Kjow\AppData\Local\lazarus

--secondary-config-path=<path>
or --scp=<path>
directory di configurazione secondaria, dove
Lazarus cerca i modelli di file di configurazione. Per default ? C:\Develop\Lazarus

--operating-system=<operating-system>
or --os=<operating-system>
override the project operating system. e.g. win32
linux. default: win32

--widgetset=<widgetset>
or --ws=<widgetset>
override the project widgetset. e.g. gtk gtk2 qt
win32 carbon. default: win32

--cpu=<cpu>
override the project cpu. e.g. i386 x86_64 powerpc powerpc_64 etc. default: i386

--compiler=<ppcXXX>
override the default compiler. e.g. ppc386 ppcx64
ppcppc etc. default is stored in
environmentoptions.xml

--language=
Override del linguaggo. Per esempio --language=de. Per i possibili valori vedi i files nella directory languages.

c:\Develop\Lazarus>

But If I click on Tools->build lazarus I get lazarus compiled with all packages I installed before the re-build.
Other thing I just noticed is that making lazarus by command line I lose language setting and it returns to system language, but building lazarus by IDE it returns to english (language I choose to use).

AFAIK this is not possible, because you can not disable the -g options that are always passed by the makefile.

Ok, thanks you!

Kjow

Reply by email

Luca Olivetti
to Kjow

En/na Kjow ha escrit:

Show quoted text 10 lines
2010/1/18 Mattias Gaertner : > I guess you mean you have to use > "make clean all" Umm... I do "make clean all", then it compile right, but without installed extra packages. Then if I try to do "lazbuild --build-all" or "lazbuild -B", I get: c:\Develop\Lazarus>lazbuild --build-all Error: missing file

You need to specify the "--build-ide=" option as well

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007

Reply by email

Mattias Gaertner
to Kjow: 2010/1/18 Mattias Gaertner : Umm... I do "make clean all", then it compile right, but…
Show quoted text 10 lines
2010/1/18 Mattias Gaertner : > I guess you mean you have to use > "make clean all" Umm... I do "make clean all", then it compile right, but without installed extra packages. Then if I try to do "lazbuild --build-all" or "lazbuild -B", I get: c:\Develop\Lazarus>lazbuild --build-all Error: missing file

lazbuild --build-ide=

[...] But If I click on Tools->build lazarus I get lazarus compiled with all packages I installed before the re-build.

yes

Other thing I just noticed is that making lazarus by command line I lose language setting and it returns to system language, but building lazarus by IDE it returns to english (language I choose to use).

The language settings are not compiled in. They are fetched from the environment variables.
Maybe it didn't found the lazarus source directory?

> AFAIK this is not possible, because you can not disable the -g options > that are always passed by the makefile. Ok, thanks you!

Mattias

Reply by email

Paul Ishenin
to Mattias Gaertner: On Mon, 18 Jan 2010 12:06:28 +0100 I guess you mean you have to use "make clean all" Paul?
Mattias Gaertner wrote 6 lines
> > startlazarus.exe and lazbuild.exe have both the icon, but lazarus.exe hasn't. > Paul?

No idea. Lazarus.exe has the same icon as startlazarus and lazbuild here.

Show quoted text 7 lines
> Whops, I mean directly in "make" string... but it isn't a problem to > add a row in the script ;) > AFAIK this is not possible, because you can not disable the -g options that are always passed by the makefile.

I think OPT=-Xg will work but -Xs will not.

Best regards,
Paul Ishenin.

Reply by email

Paul Ishenin
to Kjow: 2010/1/18 Paul Ishenin : Can I force to link the icon? (e.g windres in my own script, but…
Kjow wrote 5 lines
> No idea. Lazarus.exe has the same icon as startlazarus and lazbuild here. > Can I force to link the icon? (e.g windres in my own script, but which syntax?)

Can you tell me what lazarus version do you have?

If 0.9.28 then which must contain a manifest and an icon. If 0.9.29 then lazarus.res must be in the ide folder which contains an icon.

Best regards,
Paul Ishenin.

Reply by email

Kjow
to Paul Ishenin

2010/1/18 Paul Ishenin :

Can you tell me what lazarus version do you have? If 0.9.28 then which must contain a manifest and an icon. If 0.9.29 then lazarus.res must be in the ide folder which contains an icon.

As I said on first message, I made a simple batch script on windows startup that download fpc svn, lazarus svn, recompile fpc and finally recompile lazarus, but every time I run Lazarus (after relative "make clean all") I haven't any extra component. I need to click in "build" voice in IDE menu."

So, I'm using latest revisions of SVN trunk (both lazarus and fpc)

Reply by email

Paul Ishenin
to Kjow: 2010/1/18 Paul Ishenin : As I said on first message, I made a simple batch script on…
Kjow wrote 8 lines
As I said on first message, I made a simple batch script on windows startup that download fpc svn, lazarus svn, recompile fpc and finally recompile lazarus, but every time I run Lazarus (after relative "make clean all") I haven't any extra component. I need to click in "build" voice in IDE menu." So, I'm using latest revisions of SVN trunk (both lazarus and fpc)

Good to know - we have similar environment.

Lazarus trunk has a lazarus.res file:
http://svn.freepascal.org/svn/lazarus/trunk/ide/lazarus.res Do you have one?

Ide using here: http://svn.freepascal.org/svn/lazarus/trunk/ide/lazarus.pp

[part of lazarus.pp]
  MainBase, compiler_conditionals_options;
{$I revision.inc}
{$R lazarus.res}
begin

[/part of lazarus.pp]

This adds a manifest and an icon to the lazarus.exe. No idea why it is not so for you.

Best regards,
Paul Ishenin.

Reply by email

Kjow
to Paul Ishenin

2010/1/19 Paul Ishenin :

Show quoted text 20 lines
Good to know - we have similar environment. Lazarus trunk has a lazarus.res file: http://svn.freepascal.org/svn/lazarus/trunk/ide/lazarus.res Do you have one? Ide using here: http://svn.freepascal.org/svn/lazarus/trunk/ide/lazarus.pp [part of lazarus.pp] ?MainBase, compiler_conditionals_options; {$I revision.inc} {$R lazarus.res} begin [/part of lazarus.pp] This adds a manifest and an icon to the lazarus.exe. No idea why it is not so for you.

Oh! Now I understand, it is a my "mistake"... I edited lazarus.pp from {$R lazarus.res} to { $R lazarus.res} because I use glscene that makes a lot of graphical glitches with windows manifest, so I need to disable this functions in lazarus IDE (otherwise, there is no way to use design time editor).

How can I make my own lazarus.res that include all resources, but without Windows manifest?

Thanks,
Kjow

Reply by email

Paul Ishenin
to Kjow
Kjow wrote 8 lines
Oh! Now I understand, it is a my "mistake"... I edited lazarus.pp from {$R lazarus.res} to { $R lazarus.res} because I use glscene that makes a lot of graphical glitches with windows manifest, so I need to disable this functions in lazarus IDE (otherwise, there is no way to use design time editor). How can I make my own lazarus.res that include all resources, but without Windows manifest?

You can open lazarus.lpi in lazarus and edit the project options.

Best regards,
Paul Ishenin.

Reply by email

Kjow
to Paul Ishenin

2010/1/19 Paul Ishenin :

You can open lazarus.lpi in lazarus and edit the project options.

Thank you very much, now it is almost perfect :)

I noticed that if I want associate lazarus to open .lpi file, the icon in file exploer isn't beauty (the real icon is at the center of a white "box"), so I searched for the regedit key and I found that when I want to associate a program to open a file Windows (seven in my case) doesn't create the right key after windows "association":

HKEY_CLASSES_ROOT\lpi_auto_file\DefaultIcon

then I edited the string value with:
C:\Develop\Lazarus\ide\lazarus.ico

Now it is ok, lpi files have the right and beautiful icon! In attachment my exported .reg to doubleclick for future (editing with right path needed).

It would be nice if will be in lazarus IDE a function to automatically associate the right things in each OS (like with the installer version).

Thank you very much for help,
Lazarus community is fantastic!

Regards,
Kjow
-------------- next part --------------
A non-text attachment was scrubbed...
Name: laz_icon.reg
Type: application/octet-stream
Size: 268 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100119/9ada0a37/attachment.obj>

Reply by email

Hans-Peter Diettrich
to Kjow: 2010/1/18 Paul Ishenin : As I said on first message, I made a simple batch script on…
Show quoted text 5 lines
As I said on first message, I made a simple batch script on windows startup that download fpc svn, lazarus svn, recompile fpc and finally recompile lazarus, but every time I run Lazarus (after relative "make clean all") I haven't any extra component. I need to click in "build" voice in IDE menu."

AFAIK there is something like "make bigide", that includes the previously installed packages.

DoDi

Reply by email

Mattias Gaertner
to Hans-Peter Diettrich
Show quoted text 10 lines
Kjow schrieb: > As I said on first message, I made a simple batch script on windows > startup that download fpc svn, lazarus svn, recompile fpc and finally > recompile lazarus, but every time I run Lazarus (after relative "make > clean all") I haven't any extra component. I need to click in "build" > voice in IDE menu." AFAIK there is something like "make bigide", that includes the previously installed packages.

make bigide compiles an IDE as found in the windows installer. To compile an IDE with your current set of installed packages, use

lazbuild --build-ide=

Mattias

Reply by email

Kjow
to Mattias Gaertner

2010/1/19 Mattias Gaertner :

make bigide compiles an IDE as found in the windows installer. To compile an IDE with your current set of installed packages, use lazbuild --build-ide=

After an svn update, it is better to do:

make clean all
lazbuild --build-all --build-ide=

or just:

lazbuild --build-all --build-ide=

Thanks!
Kjow

Reply by email