Distributing Lazarus - Installers

From Lazarus wiki
Jump to navigationJump to search

This page is for expert users who know how to use/install Lazarus and want to write an installer for a platform.

If you have trouble installing Lazarus see Installation.

Primary and secondary config files

For a multi user environment you can install default config files in the secondary config path. When a user starts the IDE, Lazarus will automatically copy these files to the primary config path. It does not copy all files; it copies each file when needed (i.e. the primary file does not exist).

Config files

All config files are created on the fly. They only contain values that differ from defaults. Note: If they contain more, then it means there is no default or you found a bug.

The easiest way to get the config files is to start an IDE, setup and install packages and then use the created configs. You should remove everything personal.

Here is an example for the environmentoptions.xml:

<?xml version="1.0"?>
<CONFIG>
  <EnvironmentOptions>
    <Version Value="106"/>
    <LazarusDirectory Value="/usr/share/lazarus"/>
    <CompilerFilename Value="/usr/bin/fpc"/>
    <FPCSourceDirectory Value="/usr/share/fpcsrc/$(FPCVer)/fpc/"/>
    <MakeFilename Value="make"/>
    <TestBuildDirectory Value="/tmp"/>
    <DebuggerFilename Value="/usr/bin/gdb"/>
  </EnvironmentOptions>
</CONFIG>

Notes:

  • LazarusDirectory can not contain any macro.
  • CompilerFilename can use macros, sets the macro CompPath. You can not use the FPCVer macro, because the IDE fetches it from the compiler using the CompilerFilename.
  • The other values can use macros.
  • See [[[IDE_Macros_in_paths_and_filenames|Macros]], especially the env macro.

Include third party packages

If you want to use third party packages, you can put them somewhere and create a lpl file in packager/globallinks. You can put the package into the components directory or at a fixed location on the users machine.