Sign in Join
Wiki copytemporary

Distributing Lazarus - Installers: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-This page is for expert users who know how to use/install Lazarus and want to write an installer for a platform.
1+This page is for expert users who know how to use/install Lazarus and want to write an installer for a platform.
22
3-If you have trouble installing Lazarus see [[Lazarus Documentation|Installation]].
3+If you have trouble installing Lazarus see [[Lazarus Documentation|Installation]].
44
5+## Contents
6+
7+ * 1 Primary and secondary config files
8+ * 2 Config files
9+ * 2.1 environmentoptions.xml
10+ * 2.2 Changing/Creating a config file
11+ * 3 Include third party packages
12+
513# Primary and secondary config files
614
7-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).
15+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).
816
917# Config files
1018
11-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.
19+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.
1220
13-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.
21+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.
1422
1523## environmentoptions.xml
1624
17-Here is an example for the environmentoptions.xml:
18-
19-``` xml
25+Here is an example for the environmentoptions.xml:
26+```
2027<?xml version="1.0"?>
21-<CONFIG>
22- <EnvironmentOptions>
23- <Version Value="106"/>
24- <LazarusDirectory Value="/usr/share/lazarus"/>
25- <CompilerFilename Value="/usr/bin/fpc"/>
26- <FPCSourceDirectory Value="/usr/share/fpcsrc/$(FPCVer)/fpc/"/>
27- <MakeFilename Value="make"/>
28- <TestBuildDirectory Value="/tmp"/>
29- <DebuggerFilename Value="/usr/bin/gdb"/>
30- </EnvironmentOptions>
31-</CONFIG>
28+ <CONFIG>
29+ <EnvironmentOptions>
30+ <Version Value="106"/>
31+ <LazarusDirectory Value="/usr/share/lazarus"/>
32+ <CompilerFilename Value="/usr/bin/fpc"/>
33+ <FPCSourceDirectory Value="/usr/share/fpcsrc/$(FPCVer)/fpc/"/>
34+ <MakeFilename Value="make"/>
35+ <TestBuildDirectory Value="/tmp"/>
36+ <DebuggerFilename Value="/usr/bin/gdb"/>
37+ </EnvironmentOptions>
38+ </CONFIG>
3239```
3340
3441**Notes:**
3542
36-- **LazarusDirectory** can not contain any macro.
37-- **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.
38-- The other values can use macros.
39-- See [[IDE Macros in paths and filenames|Macros]], especially the **env** macro.
43+ * **LazarusDirectory** can not contain any macro.
44+ * **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.
45+ * The other values can use macros.
46+ * See [[IDE Macros in paths and filenames|Macros]], especially the **env** macro.
4047
4148## Changing/Creating a config file
42-
43-``` pascal
49+```
4450uses laz2_xmlcfg;
45-var
46- cfg: TXMLConfig;
47-begin
48- cfg:=TXMLConfig.Create('/home/username/.lazarus/environmentoptions.xml');
49- try
50- cfg.SetDeleteValue('EnvironmentOptions/LazarusDirectory/Value','/home/username/new/path/lazarus','');
51- cfg.Flush;
52- finally
53- cfg.Free;
54- end;
55-end;
51+ var
52+ cfg: TXMLConfig;
53+ begin
54+ cfg:=TXMLConfig.Create('/home/username/.lazarus/environmentoptions.xml');
55+ try
56+ cfg.SetDeleteValue('EnvironmentOptions/LazarusDirectory/Value','/home/username/new/path/lazarus','');
57+ cfg.Flush;
58+ finally
59+ cfg.Free;
60+ end;
61+ end;
5662```
5763
58-The IDE saves all file names as relative file names(except for history lists and some minor items). So stop the IDE, change the value in the xml and start the IDE and that's it. The IDE will automatically load the new lpk files, the new fpdoc files, etc.
64+The IDE saves all file names as relative file names(except for history lists and some minor items). So stop the IDE, change the value in the xml and start the IDE and that's it. The IDE will automatically load the new lpk files, the new fpdoc files, etc.
5965
6066# Include third party packages
6167
6268If 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.
6369
6470---
65-*From the Free Pascal wiki, page "Distributing Lazarus - Installers", as it stood on 2020-02-13 after a change by Trev, 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](/wiki-contact).*
66-Category: Lazarus internals
71+*From the Free Pascal wiki, page "Distributing Lazarus - Installers", as the Internet Archive kept it on 2023-06-04. 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](/wiki-contact).*

Back to history