How to set default options when installing Laz components? lazarus / 11-Options ---------------------------------------------------------------------- Stephan P. · 2015-01-08 11:03 Hi guys, I'm fairly new to Lazarus, coming from Delphi. I'm currently porting a Delphi VCL component library to Lazarus. I'm currently figuring out how I need to adapt my Delphi-specific installation procedure (using Inno Setup) for my components to Lazarus. One thing I don't know exactly how to do is how to provide default/custom environment options. Specifically, I want to set a system-wide (i.e. for all users of Lazarus) debugger language exception. It seems to me that debugger language exceptions are stored in the .lpi files for each project, but where are the defaults stored that are used when a user creates a new project? I hope this is the right (sub-)forum, I was looking for one that deals with deployment topics, but couldn't find one... I'm currently using 1.2.4 on Windows (XP, 7, 8 ). Thanks in advance for any pointers, Stephan ---------------------------------------------------------------------- typo · 2015-01-08 12:55 Maybe in the file "environmentoptions.xml" in Lazarus main directory. ---------------------------------------------------------------------- Stephan P. · 2015-01-08 14:28 Quote from: typo on January 08, 2015, 01:55:44 pmMaybe in the file "environmentoptions.xml" in Lazarus main directory. Hmm, I'm not sure... The language exceptions ignored by default in every newly created project are EAbort, ECodetoolError, and EFOpenError. I figured these 3 must be specified in some master/template option file somewhere too, right? But not in "environmentoptions.xml" in the Lazarus main directory... Stephan ---------------------------------------------------------------------- howardpc · 2015-01-08 15:42 They are hard coded near line 10320 in .../lazarus/debugger/debugger.pp ---------------------------------------------------------------------- Martin_fr · 2015-01-08 16:50 - Open any project (or a new empty) - Edit them in Tools/Options - Go to Project/ProjectOptions - Tick the chekbox "Save as default" (bottom of the dialog) - Close dialog wint ox Should do / not tested. Otherwise "primary config path"  projectoptions.xml e.g C:\Users\martin\AppData\Local\lazarus\projectoptions.xml ~/.lazarus/projectoptions.xml ---------------------------------------------------------------------- Stephan P. · 2015-01-09 08:47 Hi Martin, thanks for your quick reply. Quote from: Martin_fr on January 08, 2015, 05:50:08 pm- Open any project (or a new empty) - Edit them in Tools/Options - Go to Project/ProjectOptions - Tick the chekbox "Save as default" (bottom of the dialog) - Close dialog wint ox Should do / not tested. I tried it, it doesn't seem to work. I also see a problem here. Options such as this (debugger language exceptions) could be set in 2 different ways: a) As general IDE option (the way Delphi does it). This way it applies to every project. The option would be set in a IDE-specific config file, such as environmentoptions.xml. b) As project-specific option, then there should be a transparent, configurable way to set defaults for new projects. Since debugger language exceptions are more relevant for working in the IDE than anything else, I strongly favor a). As far as I know, this is also how Delphi has done it ever since. Currently Lazarus uses a mix, as far as I can see, and that's a problem. The debugger language exceptions are set in Tools -> Options, so as such they should be assumed to be an IDE wide option, but are in fact stored for every project individually in the project's .lpi (!). Yet under Project -> Project Options there's no trace of them. I don't know what project specific options have to do in Tools -> Options, especially considering that they are *not* used as defaults. But I am new to Lazarus, so I'm not sure if all these observations are correct... Quote from: Martin_fr on January 08, 2015, 05:50:08 pmOtherwise "primary config path"  projectoptions.xml e.g C:\Users\martin\AppData\Local\lazarus\projectoptions.xml ~/.lazarus/projectoptions.xml Hum, I can't find any info on this... I created a projectoptions.xml file and put the section in, and the file does get added to by Lazarus, but they doesn't seem to be considered when a new project is created. And even if they would, this still leaves the inconsistency regarding the fact that they are normally set via Tools -> Options. All the best, Stephan