← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Run time advanced options

 

Hey John,

I'm not sure this is working correctly at least on windows.  I applied
all 3 patches and created a kicad_advanced file (attached) but I'm not
getting the debugging output I expect:

[1588] (KICAD_ADVANCED_CONFIG) Init advanced config
[1588] (KICAD_ADVANCED_CONFIG) Loading advanced config from:
C:\Users\wstambaugh\AppData\Roaming\kicad\kicad_advanced
[1588] (KICAD_ADVANCED_CONFIG) AllowLegacyCanvasInGtk3: false

I don't see the EnableSvgImport option and the AllowLegacyCanvasInGtk3
option is being read as false when it's set to true in the
kicad_advanced file.  Am I doing something wrong?

Cheers,

Wayne

On 12/13/2018 8:30 AM, John Beard wrote:
> Whoops: the 16kB 0001 patch should not be there, that's a very old draft!
> 
> Sorry,
> 
> John
> On Thu, Dec 13, 2018 at 12:57 PM John Beard <john.j.beard@xxxxxxxxx> wrote:
>>
>> Hi,
>>
>> This is a patch for run time options, which are a more flexible alternative to compiler flags. Advantages include:
>>
>> * you can change the config without rebuilding
>> * it's sensitive to XDG_CONFIG_DIR, so you can quickly flip back and forth
>> * there's better documention for the config (it's in doxygen all in one place) and theres a trace to show it
>> * better type safety if the config has a value
>> * better compiler coverage, so less opportunity to break a different build which uses a different preprocessor block and better static analysis coverage
>>
>> These configs are not intended for general use by users so they are in their own file. You don't need this file, if you don't have it, you get defaults.
>>
>> The second patch uses the framework to add a config for the SVG import. The disablement is recast so it happens in a single place, and the same system could be used in future for other experimental importers. The reason it's done as a blacklist is so that a unit test could be written that *doesn't* disable the SVG plugin. However, nothing in Pcbnew can be unit tested yet, as I haven't worked out how to link Pcbnew code as a unit test.
>>
>> The third patch does another one for disabling legacy canvas on GTK3. Again, this is done at run-time to avoid conditionally compiling code.
>>
>> Cheers,
>>
>> John
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 
EnableSvgImport=true
AllowLegacyCanvasInGtk3=true

Follow ups

References