Sign in Join

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

Mailing lists / lazarus / 2015-08

Recommended install methods

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

DougC

Graeme just posted this to the fpc list as a recommended way to install fpc:

Remove all copies of FPC, no matter the
versions. Remove all copies of the fpc.cfg too. Look in /usr/local/etc and $HOME.

Then download the official FPC release install:

http://sourceforge.net/projects/freepascal/files/FreeBSD/2.6.4/

Untar the file to a temp directory and run the install script. Install to your own home directory location - that way you don't need root privileges. For example:

/home/freds/devel/fpc-2.6.4/

Using version numbers in the install location also means that you can install other versions of FPC concurrently. You can then tweak the ~/.fpc.cfg to use $fpcversion macros instead of hard-coded version numbers. That way all FPC install share the same ~/.fpc.cfg file.

If you need the FPC source code, download that from SF.net too, and unpack that in /home/freds/devel/fpc-2.6.4/src/

I then amend my PATH environment variable to include the stable FPC "bin" directory, so I can use FPC from anywhere in my system, simply by typing 'fpc <myprogram.pas>'. Other FPC versions can be used by specifying the full path to the fpc binary.

I've used this setup for years - first with Linux, then the last 3 years with FreeBSD. This has always worked without fail. I NEVER use any package management version of FPC, and neither to I use FreeBSD ports to install FPC. The official FPC release installer is all you need.

Regards,
- Graeme -

I like this approach. Is there a similar (not any more complex) recommended way to handle Lazarus installs that allows for multiple versions to be simultaneously installed and used interchangeably?

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

Reply by email

Graeme Geldenhuys
to DougC
DougC wrote
Is there a similar (not any more complex) recommended way to handle Lazarus installs that allows for multiple versions to be simultaneously installed and used interchangeably?

When you say "multiple versions", do you mean a copy of Lazarus using multiple versions of FPC, or do you mean multiple copies of Lazarus?

If you meant the first, the only thing you can do in Lazarus is to go to "Tools ? Options" and specify the full path to FPC and do a FPC Source Rescan. Lazarus will remember the last few compiler paths, so when you need to change them again, it will simply be a selection in the ComboBox.

If you meant the latter - multiple Lazarus copies - that is possible too. Again, I never use any package managers for Lazarus, I simply download and unpack the source code release and build Lazarus (normally with the latest stable FPC) from the command line. Any subsequent rebuilds, I'll do via the dialog inside Lazarus IDE itself. I install the stable version into ~/devel/lazarus/ , and then use Git to checkout the trunk one in ~/devel/lazarus-trunk/

On my desktop or window manager I would then setup two shortcuts to both Lazarus executables. The stable one is just the path to "lazarus". For the Trunk one I would setup the shortcut with the path to the unstable lazarus, and specify the --pcp=<my_new_config_dir> so the unstable one uses a different config directory to the stable one.

Hope this helps.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Aradeonas
to Graeme Geldenhuys

I prefer lazy way :

-Get Lazarus stable version from the site.
-Get Trunk or whatever I want with fpcup,just edit the ini and run,it will do all the works and in the end it make shortcut on the desktop with a correct profile.
-If you want more just edit options as Graeme said

Regards,
Ara

http://www.fastmail.com - The professional email service

Reply by email

Graeme Geldenhuys
to Aradeonas
Aradeonas wrote
in the end it make shortcut on the desktop with a correct profile.

I should probably have added that modifying the PATH environment variable and setting up desktop shortcuts is only a one-off thing. FPC stable releases are once every 1-2 years. Lazarus stable will be installed into the same ~/devel/lazarus/ so the shortcut doesn't need updating. A git update for Lazarus Trunk will also not affect the existing desktop shortcut.

So the effort is minimal. I don't need external scripts or utilities like fpcup (which I hear doesn't always work either).

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email