/etc/lazarus/editoroptions.xml is ignored
Original Reporter info from Mantis: 7bit
-
Reporter name: Bernd Kreuss
Original Reporter info from Mantis: 7bit
- Reporter name: Bernd Kreuss
Description:
This is a very strange problem
When starting a newly intalled IDE for the first time (when no ~/.lazarus exist yet) then it should copy the config file /etc/lazarus/editoroptions.xml into the home directory.
The code to use /etc/lazarus secondary config exists and looks ok but it somehow fails to have any effect with this particular config file (for other files it works). When TEditorOptions is created then it will indeed copy the file from /etc/lazarus to ~/.lazarus/ (one can verify this by halting all execution at that moment and look into the primary config directory, it will contain an exact copy of the config file from /etc/lazarus) but when Lazarus continues its startup then at some point (don't know how and why and how to debug that) it will suddenly be completely replaced by the empty default config.
When the exact same identical editoroptions.xml is present in ~/.lazarus before lazarus is started then everything will be ok. But the constructor of TEditorOptions (editoroptions.pp near line 3622) won't do anything different, in either case it will have the same config file to open after the CopySecondaryConfigFile() call. In both cases (existing old file or newly copied template) it will open the correct file with TRttiXMLConfig.Create() but if its an old file it will work and if it has been copied there moments ago it wont. What is going on here?
When looking at old installer scripts then it seems that this must be a regression. At some time in the past it must have worked already because there exist installer scripts (the .deb packaging) that are using exactly this mechanism (secondary config path) to copy customized editoroptions.xml (and other config files) into /etc/lazarus/ to customize the installation for a certain platform.
Mantis conversion info:
- Mantis ID: 23128
- Version: 1.0.3 (SVN)