Sign in Join
Wiki copytemporary

Distributing Lazarus - Installers: what changed

Revision 2 to 3. 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.
2-
3-If you have trouble installing Lazarus see [[Lazarus Documentation|Installation]].
4-
5-## Contents
1+This page is for expert users who know how to use/install Lazarus and want to write an installer for a platform.
62
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
3+If you have trouble installing Lazarus see [[Lazarus Documentation|Installation]].
124
135# Primary and secondary config files
146
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).
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).
168
179# Config files
1810
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.
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.
2012
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.
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.
2214
2315## environmentoptions.xml
2416
25-Here is an example for the environmentoptions.xml:
26-```
17+Here is an example for the environmentoptions.xml:
18+
19+``` xml
2720<?xml version="1.0"?>
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>
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>
3932```
4033
4134**Notes:**
4235
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.
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.
4740
4841## Changing/Creating a config file
49-```
42+
43+``` pascal
5044uses laz2_xmlcfg;
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;
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;
6256```
6357
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.
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.
6559
6660# Include third party packages
6761
6862If 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.
6963
7064---
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).*
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

Back to history