Sign in Join

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

Mailing lists / lazarus / 2016-03

Having multiple Lazarus like GetLazarus version

26 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

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

Aradeonas

Hi,

As Wiki said here?http://wiki.freepascal.org/Multiple_Lazarus?I should make a shortcut for second Lazarus like this :

--primary-config-path=lazarusconf

But I dont want to make a shortcut like this and like GetLazarus version I want to somehow set this config without making a new shortcut.

Any one or @Anthony can tell me how?

Regards,
Ara

http://www.fastmail.com - IMAP accessible web-mail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160323/905526f0/attachment.html>

Reply by email

Werner Pamler
to Aradeonas

Put a "lazarus.cfg" into the folder with lazarus.exe and write exactly this line into this file.

Aradeonas wrote 20 lines
Hi, As Wiki said here http://wiki.freepascal.org/Multiple_Lazarus I should make a shortcut for second Lazarus like this : --primary-config-path=lazarusconf But I dont want to make a shortcut like this and like GetLazarus version I want to somehow set this config without making a new shortcut. Any one or @Anthony can tell me how? Regards, Ara -- http://www.fastmail.com - IMAP accessible web-mail -- _______________________________________________ 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/20160323/98fa9d3d/attachment.html>

Reply by email

Aradeonas
to Werner Pamler
Put a "lazarus.cfg" into the folder with lazarus.exe and write exactly this line into this file.

Thanks but it seems not a good way. Lazarus will lose all the setting ans installed package and also GetLazarus version doesn't use a cfg file as I searched so it can has a better answer.

Regards,
Ara

http://www.fastmail.com - Does exactly what it says on the tin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160323/6570740e/attachment.html>

Reply by email

Sven Barth
to Aradeonas
"Aradeonas" wrote
> > Put a "lazarus.cfg" into the folder with lazarus.exe and write exactly

this line into this file.

Thanks but it seems not a good way. Lazarus will lose all the setting ans

installed package and also GetLazarus version doesn't use a cfg file as I searched so it can has a better answer.

Of course it looses all the settings, because you just told it to look in a different directory. Copy your original settings from their default location over to the new one and you should be good to go.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/249958c0/attachment.html>

Reply by email

Werner Pamler
to Sven Barth

Be careful. When copying all settings between too-different versions it may call for trouble. editoroptions.xml is ok. fpcdefines.xml, codetoolsoptions.xml and environmentoptions.xml could lead to issues since they contain absolute paths of the original installation. package-related files (packagefiles.xml, miscellaneousoptions.xml and staticpackages.inc) can cause trouble if the new installation does not support all required features of the old one.

Sven Barth wrote 25 lines
Am 24.03.2016 01:45 schrieb "Aradeonas" < <mailto:>>: >> >> Put a "lazarus.cfg" into the folder with lazarus.exe and write exactly this line into this file. > > Thanks but it seems not a good way. Lazarus will lose all the setting ans installed package and also GetLazarus version doesn't use a cfg file as I searched so it can has a better answer. Of course it looses all the settings, because you just told it to look in a different directory. Copy your original settings from their default location over to the new one and you should be good to go. Regards, Sven -- _______________________________________________ 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/20160324/5fa28ec7/attachment.html>

Reply by email

Aradeonas
to Werner Pamler
Of course it looses all the settings, because you just told it to look in a different directory. Copy your original settings from their default location over to the new one and you should be good to go.

Ichecked and there is not any old cfg file.

Show quoted text 7 lines
Be careful. When copying all settings between too-different versions it may call for trouble. editoroptions.xml is ok. fpcdefines.xml, codetoolsoptions.xml and environmentoptions.xml could lead to issues since they contain absolute paths of the original installation. package- related files (packagefiles.xml, miscellaneousoptions.xml and staticpackages.inc) can cause trouble if the new installation does not support all required features of the old one.

Yes I tried that and ?you are right.

It is interesting that how GetLazarus version works.

Regards,
Ara

http://www.fastmail.com - Same, same, but different... -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/24490bde/attachment.html>

Reply by email

Michael Van Canneyt
to Aradeonas
Aradeonas wrote 14 lines
> Of course it looses all the settings, because you just told it to look > in a different directory. Copy your original settings from their > default location over to the new one and you should be good to go. Ichecked and there is not any old cfg file. > Be careful. When copying all settings between too-different versions > it may call for trouble. editoroptions.xml is ok. fpcdefines.xml, > codetoolsoptions.xml and environmentoptions.xml could lead to issues > since they contain absolute paths of the original installation. package- > related files (packagefiles.xml, miscellaneousoptions.xml and > staticpackages.inc) can cause trouble if the new installation does not > support all required features of the old one. Yes I tried that and ?you are right. It is interesting that how GetLazarus version works.

How do you know that it works ?

Michael.

Reply by email

Aradeonas
to Michael Van Canneyt
How do you know that it works ?

What do mean from that? If you mean GetLaarus version I have one installed and if you mean I have another old Lazarus that I tried using cfg.
But I want the best way for my trunk version so I can run it beside of stable version without making shortcut.

Regards,
Ara

http://www.fastmail.com - Choose from over 50 domains or use your own -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/a8e51b09/attachment.html>

Reply by email

Bart
to Aradeonas
Aradeonas wrote
But I want the best way for my trunk version so I can run it beside of stable version without making shortcut.

The recommende way is and has always been to use the --pcp=path/to/config commandline parameter.
Why do you insist that it must be done in another way? Why can you simpy use the mechanismes we have provided for just that?

If you don want a shortcut (why???) then just start it from the console (as i do with lazarus fixes branch).

Bart

Reply by email

Aradeonas
to Bart
Show quoted text 5 lines
The recommende way is and has always been to use the -- pcp=path/to/config commandline parameter. Why do you insist that it must be done in another way? Why can you simpy use the mechanismes we have provided for just that? If you don want a shortcut (why???) then just start it from the console (as i do with lazarus fixes branch).

Ok. One simple reason I dont like to make shortcut with custom parameter with my apps and one good reason for that is, Windows Taskbar that you can pin apps dont accept parameters so if you pin you Lazarus that runs with parameters and next time click on icon on taskbar it will open but keep another shortcut on Taskabr.
It is annoying for someone likes me that like to keep my stuff organized.
Second reason is Im curious, everytime I saw shortcut way for running multiple reason and it seems there is a better reason out there and Im a programmer I like to find a better way and when I cant I ask from others.
Originally I should ask @Anthony about his works but it seems he refuse answering or supporting about his works so I ask here for future needs of others like me.

Regards,
Ara

http://www.fastmail.com - Send your email first class -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/4efd63e5/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 4364 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/4efd63e5/attachment.png>

Reply by email

Martin Frb
to Aradeonas
Aradeonas wrote 23 lines
The recommende way is and has always been to use the --pcp=path/to/config commandline parameter. Why do you insist that it must be done in another way? Why can you simpy use the mechanismes we have provided for just that? If you don want a shortcut (why???) then just start it from the console (as i do with lazarus fixes branch). Ok. One simple reason I dont like to make shortcut with custom parameter with my apps and one good reason for that is, Windows Taskbar that you can pin apps dont accept parameters so if you pin you Lazarus that runs with parameters and next time click on icon on taskbar it will open but keep another shortcut on Taskabr. It is annoying for someone likes me that like to keep my stuff organized. Second reason is Im curious, everytime I saw shortcut way for running multiple reason and it seems there is a better reason out there and Im a programmer I like to find a better way and when I cant I ask from others. Originally I should ask @Anthony about his works but it seems he refuse answering or supporting about his works so I ask here for future needs of others like me.

That is what the lazarus.cfg file is for.

Instead of supplying the parameters fer --pcp, you put them into the cfg file.

lazarus.exe, when started, looks for a lazarus.cfg file in the same folder as the exe. If found it adds the content to its command line params. (one per line).

so if you have
c:\lazarus installation of 1.6, should use config in the default location c:\laz_trunk needs different config

then you add
c:\laz_trunk\lazarus.cfg
with the --pcp param you need.

And with that you can start c:\laz_trunk\lazarus.exe anyway you want, it will use the pcp given in the cfg file.

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

Reply by email

Paul van Helden
to Aradeonas: Ok. One simple reason I dont like to make shortcut with custom parameter with my apps and…
Show quoted text 9 lines
Ok. One simple reason I dont like to make shortcut with custom parameter with my apps and one good reason for that is, Windows Taskbar that you can pin apps dont accept parameters so if you pin you Lazarus that runs with parameters and next time click on icon on taskbar it will open but keep another shortcut on Taskabr. It is annoying for someone likes me that like to keep my stuff organized.

Right-click on pinned Lazarus, right-click on Lazarus, properties and edit the target to add --pcp= (at least it works on my Win7) -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/77f8f1ad/attachment.html>

Reply by email

Aradeonas
to Paul van Helden
Show quoted text 20 lines
That is what the lazarus.cfg file is for. Instead of supplying the parameters fer --pcp, you put them into the cfg file. lazarus.exe, when started, looks for a lazarus.cfg file in the same folder as the exe. If found it adds the content to its command line params. (one per line). so if you have c:\lazarus?? installation of 1.6, should use config in the default location c:\laz_trunk?? needs different config then you add c:\laz_trunk\lazarus.cfg with the --pcp param you need. And with that you can start c:\laz_trunk\lazarus.exe anyway you want, it will use the pcp given in the cfg file.

I done that but it will be the reason of many errors about installing packages. and again I cant find any cfg file about this config with GetLazarus version.

Right-click on pinned Lazarus, right-click on Lazarus, properties and edit the target to add --pcp= (at least it works on my Win7)

Thanks but my shortcut have this but problem is still there at least in Windows10.

Can anyone with more experience than me if he got time get www.getlazarus.org?version and give it a try?

Regards,
Ara

http://www.fastmail.com - Same, same, but different... -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/75080eb7/attachment.html>

Reply by email

ListMember
to Aradeonas: Ok. One simple reason I dont like to make shortcut with custom parameter with my apps and…
Aradeonas wrote
Windows Taskbar that you can pin apps dont accept parameters so if you pin you Lazarus that runs with parameters and next time click on icon on taskbar it will open but keep another shortcut on Taskabr.

Could you try this:

1) Create shortcut on the desktop.
2) Using Properties, add the parameters to it (and of course, save it).
3) Use 'Pin to Taskbar'
4) Delete the shortcut on the desktop.

This way, it should behave the way you want it to.

As I said, I cannot guarantee that it will work (though it takes a few seconds to try), but this was how I put a shortcut on the taskbar with 'Run as Administrator'; so there's a good chance it will work with parameters too.

Reply by email

Aradeonas
to ListMember
Could you try this: 1) Create shortcut on the desktop. 2) Using Properties, add the parameters to it (and of course, save it). 3) Use 'Pin to Taskbar' 4) Delete the shortcut on the desktop.

I checked and it doesn't solve the problem and still there will be one opened Lazarus and one shortcut.

Regards,
Ara

http://www.fastmail.com - IMAP accessible web-mail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/71f090d7/attachment-0001.html>

Reply by email

Martin Frb
to Aradeonas: I done that but it will be the reason of many errors about installing packages. and again…
Aradeonas wrote 7 lines
And with that you can start c:\laz_trunk\lazarus.exe anyway you want, it will use the pcp given in the cfg file. I done that but it will be the reason of many errors about installing packages. and again I cant find any cfg file about this config with GetLazarus version.

The same as when you specified --pcp

If you copied the lazarus.exe from another install, then you need to rebuild it once. And add or remove packages if needed.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/13a5275e/attachment.html>

Reply by email

Aradeonas
to Martin Frb
The same as when you specified --pcp If you copied the lazarus.exe from another install, then you need to rebuild it once. And add or remove packages if needed.

unfortunately I cant understand you.

Regards,
Ara

http://www.fastmail.com - A no graphics, no pop-ups email service -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/a63b4f2c/attachment.html>

Reply by email

Martin Frb
to Aradeonas: Yes and I want to know how. Ara http://www.fastmail.com - Send your email first class…
Aradeonas wrote 6 lines
I understood your remark as "getlazarus offers this functionality already". Yes and I want to know how.

Lazarus itself only offers --pcp
that can be given
- on the commandline
- in a bat file
- in a shortcut
- in the lazarus.cfg

If GetLazarus does it in another way, then they added that. And you need to ask them.

I dont see a need for another way. The lazarus.cfg should be good. (it was created for that purpose only)

If you install different versions of Lazarus (1.4 up, when this was added), using the installer, then there is a checkbox, and it will set it all up for you.
Independent installs.
No missing package error.

Of course there is no installer for trunk. So when you get the sources, you need do build your first lazarus.exe (you can use make and the makefile, I never tried).
If you copy a lazarus.exe from another install, that is when you get warnings. But rebuild it once, and that is it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/b657d05a/attachment.html>

Reply by email

Martin Frb
to Aradeonas: unfortunately I cant understand you. Ara http://www.fastmail.com - A no graphics, no…
Aradeonas wrote 7 lines
The same as when you specified --pcp If you copied the lazarus.exe from another install, then you need to rebuild it once. And add or remove packages if needed. unfortunately I cant understand you.

well using a lazarus.cfg file (with --pcp inside) is exactly the same as specifying --pcp on the commandline or in a shortcutp

If you get warnings with --pcp in one case, you get them in the other case too.
Otherwise you made some mistake and the --pcp was not is internally handled as part of the commandline.

The advantage of lazarus.cfg is, that you can create as many shortcuts (or pin it) as you like. They all go to the same lazarus.exe, and then the lazarus.cfg is loaded.
So you do not need to add --pcp to all the shorcuts.

My lazarus.cfg contains one line
--primary-config-path=B:\laz_configs\lazarus_latest

And one the first start that path (must exist) will be populated with default config. And since them it is an independend installation.

-----------
As for the warnings about packages.
I do not know what you did.
But lets say you got trunk from svn. Then copied the lazarus.exe from your 1.6 install into that folder. Added the --pcp (in lazarus.cfg). And then run it. This exe will give warnings, as it now no longer has its conf. You can ignore them. Menu Tools, build ide. And all is fine. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/c902413f/attachment.html>

Reply by email

Aradeonas
to Martin Frb

Thanks Martin.
This is what I done:
* Get a Trunk Lazarus version and make it and make a shortcut and install all my packages and settings and ...
* Make cfg file and add what you said in it with my Lazarus path something like this : --primary-config-path=C:\Trunk\lazarus
* Run Lazarus and it cant find any package and settings! like a complete new install.

Regards,
Ara

http://www.fastmail.com - The professional email service -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/ab96e3b8/attachment.html>

Reply by email

Aradeonas
to Aradeonas

Aha!
If found the problem!

I have a config folder in my Lazarus directory that has every config xml files like default Lazarus have in Appdata.
When I open Lazarus forms shortcut like I said there was no problem but when I add that path to cfg it has problem until I changed the address to this :?--primary-config-path=C:\Trunk\lazarus\config and now it solved and no problem.

But Im still curios about how GetLazarus version works without a cfg file and it will be very good?if any one can check that.

Regards,
Ara

http://www.fastmail.com - mmm... Fastmail... -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/153f2cd7/attachment.html>

Reply by email

Martin Frb
to Aradeonas
Aradeonas wrote 8 lines
Aha! If found the problem! I have a config folder in my Lazarus directory that has every config xml files like default Lazarus have in Appdata. When I open Lazarus forms shortcut like I said there was no problem but when I add that path to cfg it has problem until I changed the address to this : --primary-config-path=C:\Trunk\lazarus\config and now it solved and no problem.

What did you use before? --pcp? If that works on commandline but not in .cfg, then report a bug please.

But Im still curios about how GetLazarus version works without a cfg file and it will be very good if any one can check that.

You need to ask them.

Just to understand, you can download getlazarus, install the same version into 2 different folders, and run them and they have separate config?

Maybe they changed the code to use a folder inside the install dir? The problem with the install dir is that on Linux you can not always find it easily. E.g. if the lazarus exe is linked (hard linked) to another location. (In that case the lazarus.cfg can not be found either). On Windows that is on problem.

Lazarus stores the config files by default in the location that is typical for the OS (each OS has guidelines for that). Storing inside the exe folder is against that rules. It can cause problems if:
- the install folder is read only to the user (the lazarus.cfg file is part of the install, it does not get changed by lazarus, so no problem)
- the folder can not be found, because the exe is outside the folder (hard link on linux). In this case lazarus.cfg will not work either, but at least a normal install will still work. lazarus.cfg is optional.

If the folder can not be found, lazarus will find the install folder, once it has the config, because the config contains the location where the lazarus sources are installed.
(Obviously if you get the install folder only from the config, then it is to late for --pcp)

And yes an install folder can be write protected (default on many linux installs), if you rebuild the IDE, then all the new ppu files are created inside the config folder.

So there are good reasons why Lazarus does it the way it does.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/040a9504/attachment.html>

Reply by email

Aradeonas
to Martin Frb
What did you use before? --pcp? If that works on commandline but not in .cfg, then report a bug please.

I will check more.

You need to ask them.

I tried but he didnt answer this question nor previous one about his custom version so I asked maybe someone else know about that.

So there are good reasons why Lazarus does it the way it does.

I can guessed that but my problem from the beginning was finding a better way and now I will edit Wiki for future.

Regards,
Ara

http://www.fastmail.com - Does exactly what it says on the tin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160324/db3b65b4/attachment.html>

Reply by email

Bo Berglund
to Martin Frb: Lazarus itself only offers --pcp that can be given - on the commandline - in a bat file -…
Martin Frb wrote 5 lines
Of course there is no installer for trunk. So when you get the sources, you need do build your first lazarus.exe (you can use make and the makefile, I never tried). If you copy a lazarus.exe from another install, that is when you get warnings. But rebuild it once, and that is it.

I have built multiple versions of Lazarus (1.6RC1, 1.6RC2, 1.6) on Linux using FPC 3.0.0.
All were done using svn retrieved sources and after the download finished, by entering the source dir and launch:
make bigide
Then create a config directory at $HOME/.lazarus_1.6... where the name reflects the version of Lazarus.
Create a start menu entry where the start command is set to: <path to lazaus>/startide --pcp=<path to config dir>

This has worked flawlessly for me in a number of installations and I have also created a script to do all of the needed operations for installation of FPC 3.0.0 and Lazarus 1.6 unattended on Linux including setting up the config dir and menu entries.

The result is multiple versions of Lazarus which have to be set up individually at first start and are isolated from each other. Just like it is supposed to work!

I find it very simple and efficient to do when one wants for example a stable version and a trunk version to compare.

I can't imagine that there is not a similar way for doing this on Windows, if nothing else you can create batch files to launch your Lazarus versions and in these include the --pcp parameter.

Bo Berglund Developer in Sweden

Reply by email