Difference between revisions of "DualLaz"

From Free Pascal wiki
Jump to navigationJump to search
Line 54: Line 54:
 
[[File:LazPaths.png]]
 
[[File:LazPaths.png]]
  
WIP - not finished !
+
 
 +
... and we're done. We have 2 independent Lazarusses on disk ! Now you can repeat the routine n times with new paths, if you so desire.
 +
 
 
[[Category:Lazarus]]
 
[[Category:Lazarus]]
 
[[Category:Install]]
 
[[Category:Install]]

Revision as of 08:09, 20 February 2015

Two simultaneous Lazarus copies operational in Linux 64 bit

Typically, you have a primary install via fpcUP in ~/development.
But you also want a secondary test version in /workdir/LazB independently, possibly for release testing of Lazarus ver. 1.4
Windows users, see Multiple Lazarus install info.

Here is a run-through to achieve that. Let's assume:

  • We use the Linux distro: mint 17.1 KDE 64 bit of 2015 (Kubuntu should work too, I guess)
  • primary Lazarus resides in /home/you/development installed via fpcUP
  • secondary Lazarus will reside at /workDIR/LazB
  • no other Lazarus installed via a debian-package installer or whatever, which could interfere somehow (e.g. /usr/local/lib/fpc - so we delete it )
  • /home/you below refers to your ~ aka home-directory aka $HOME aka /home/michael or whatever name you chose.


By default, Lazarus uses ~/development/config_lazarus/ as the primary-config-path
We will override that:

In ~ create two shell scripts : runL1.sh and runL2.sh containing

#!/bin/sh
/home/you/development/lazarus/startlazarus --primary-config-path=~/.config_lazarus_1st

and

#!/bin/sh
/workDIR/LazCC/laz/startlazarus --primary-config-path=~/.config_lazarus_2nd

respectively. Use an explorer like dolphin etc. or type sth. like sudo mkdir /workDIR/LazB and chown to make it accessible to you as a non-root user.

Upon executing runL1.sh a path setting screen will pop up. There we choose

/home/you/development/fpc/bin/x86_64-linux/fpc.sh

as the compiler. Do not choose

/home/you/development/fpc/bin/x86_64-linux/fpc

because it will give you run time errors aplenty (system.ppu not found etc.).



fpc.sh contains

#!/bin/sh
# This script starts the fpc compiler installed by fpcup
# and ignores any system-wide fpc.cfg files
# Note: maintained by fpcup; do not edit directly, your edits will be lost.
/home/you/development/fpc/bin/x86_64-linux/fpc  -n @/home/you/development/fpc/bin/x86_64-linux/fpc.cfg "$@"

and will obviously be path-adapted for the secondary Lazarus. This is done automatically by fpcUP. We'll run it via fpcupGUI, which is contained in the source zip-archive of fpcUP. Compile and run it with a prior Lazarus install you made. fpcGUI LazCC.png


upon running abovementioned runL2.sh we must complete the path setup in the popup window like in below pic: LazPaths.png


... and we're done. We have 2 independent Lazarusses on disk ! Now you can repeat the routine n times with new paths, if you so desire.