# 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

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

• compiled lazbuild (LCL, components, lazbuild)
• all required packages must be setup and compiled
• the .lpk file must be registered
• setup the $HOME/.lazarus/staticpackages.inc file (or corresponding file in your primary config path) • setup$HOME/.lazarus/idemake.cfg (or corresponding file in your primary config path)
• compile the package with lazbuild
• execute make idepkg

### 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:

• In the $HOME/.lazarus/packagefiles.xml file • In the <lazarus_path>/packager/globallinks/ ### 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,




### Compile the IDE

• Execute make clean all to update lazbuild, startlazarus and other tools.
• Use the IDE or lazbuild to install all needed packages and compile the new IDE.

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

• You now have a lazarus directory with all needed .ppu files, the lazarus executable and common tools.

### 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.

• You can pass the PCP and SCP as command line options --pcp=<path> and --scp=<path> to lazarus and lazbuild.
• You can see the current values in the IDE via Main menu > View > IDE Internals > About IDE > Global IDE Options.
• The default SCP under Unix is /etc/lazarus, under Windows it is the Lazarus directory itself.
• The default PCP under Unix is ~/.lazarus.

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:

<?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.