Sign in Join
Wiki copytemporary

Install IDE packages without the IDE

Install with command line tool lazbuild

With current Lazarus, it is possible to compile and install IDE packages using the lazbuild tool. See lazbuild.

Install manually without IDE nor lazbuild

For completeness/reference, the old version of this article is presented below.

Warning: Old information below. There is a much easier way to install packages in current Lazarus.

To manually install a package in the IDE you need the following

Quick

The easiest way is to install the package in the IDE, copy the needed files to the target directory/filesystem and adapt the filenames.

Compile lazbuild

Install FPC and lazarus - or do a make lazbuild. See .

Compile and register the required packages

Do the steps on this page recursively until only the base Lazarus packages are needed.

Register the .lpk file

The IDE must find the .lpk file for a packagename. It searches the .lpk file in the following places:

Setup the $HOME/.lazarus/staticpackages.inc file

Create this file if it does not exist. Add the packagename plus a comma to this file. For example this file can look like this:

 Printer4Lazarus,
 RunTimeTypeInfoControls,
 H2PasWizard,

Setup $HOME/.lazarus/idemake.cfg

The idemake.cfg contains the compile parameters. The easiest way to create this file is to install the package in a IDE and then copy the file to the target machine and adapt the file paths.

Please note that under Windows you need to place idemake.cfg into Lazarus directory (e.g. C:\Lazarus\) instead of your user profile directory. Note: May 2012 BigChimp: is this still true? I found it in my primary config path!!

Compile the package with lazbuild

bash
lazbuild path_to_package.lpk

Execute make idepkg

bash
cd path_to_lazarus
make idepkg

Distributing an IDE with preinstalled packages

Third party packages

Let's say you copied the third party package "Closy" into lazarus/components/closy. When the IDE searches for a package "closy", it searches in its recently used list and in <lazarus>/packager/globallinks. An installer should use the latter.

Create an .lpl file:

lazarus/packager/globallinks/closy-1.lpl

The file name of the lpl file consists of <package name>-<short version>.lpl. In this example the package name is the lowercase "closy". Closy has the version 1.0.0.0. Trailing 0 can be omitted, creating the short version 1. The file must contain the path to the lpk:

$(LazarusDir)/components/closy/closy.lpk

Compile the IDE

Hint: Since 1.2 lazbuild contains the option --add-package to install packages.

User Options

Now you need to setup the start configuration for the user.

When the IDE starts, it loads its configuration files from the PCP (primary config path). If it cannot find a configuration file it tries the SCP (secondary config path) and copies the file from the SCP directory to the PCP directory.

The list of packages to be installed into the IDE are listed in miscellaneousoptions.xml. Your installer should create the file <SCP>/miscellaneousoptions.xml with the following content:

pascal
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
  <MiscellaneousOptions>
    <Version Value="3"/>
    <BuildLazarusOptions>
      <StaticAutoInstallPackages Count="6">
        <Item1 Value="AnchorDocking"/>
        <Item2 Value="InstantFPCLaz"/>
        <Item3 Value="Cody"/>
        <Item4 Value="AnchorDockingDsgn"/>
        <Item5 Value="SynEditDsgn"/>
        <Item6 Value="TurboPowerIProDsgn"/>
      </StaticAutoInstallPackages>
    </BuildLazarusOptions>
  </MiscellaneousOptions>
</CONFIG>

If the user does not already have a Lazarus configuration the IDE will use the above file as a start.

See Also


From the Free Pascal wiki, page "Install IDE packages without the IDE", as it stood on 2014-11-12 after a change by BigChimp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.