← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: 3D resolver

 

The externally defined variables should take precedence so you don't
need to change anything.

Wayne

On 4/20/2016 10:26 PM, Cirilo Bernardo wrote:
> The code takes paths defined in GetLocalEnvVariables(). The only
> question I think, as Sergey pointed out, is whether environment vars do
> indeed override the variables defined in KiCad or if the KiCad vars have
> precedence. I wrote the code so that the shell definition has
> precedence, but that's easily changed.
> 
> - Cirilo
> 
> 
> On Wed, Apr 20, 2016 at 11:16 PM, Wayne Stambaugh <stambaughw@xxxxxxxxx
> <mailto:stambaughw@xxxxxxxxx>> wrote:
> 
>     Cirilo,
> 
>     I didn't notice but does your environment variable code check the
>     environment variable map returned by GetLocalEnvVariables()?  If not, it
>     should check if they exist in the map before calling wxEnvVar().  This
>     will ensure that the behavior is consistent for environment variables in
>     the map.
> 
>     Wayne
> 
> 
>     On 4/20/2016 5:24 AM, Cirilo Bernardo wrote:
>     > The attached patch does the following:
>     >
>     > 1. Ensures ${KISYS3DMOD} is in the resolver's path list even if
>     > it is not defined in KiCad's internal path list (Configure Paths).
>     > This fixes a bug which was described on the dev list but not
>     > reported to the bug tracker.
>     >
>     > 2. ENV VARs paths defined by the shell take precedence over
>     > what is defined within KiCad; this is consistent with typical
>     > UNIX use: ENV_VAR=something pcbnew test.kicad_pcb
>     >
>     > 3. If a user defines a path via ${ENV_VAR}/som/file.wrl where
>     > ENV_VAR is an arbitrary environment variable (as opposed to
>     > KISYS3DMOD and others defined via KiCad's Configure Paths)
>     > then that ENV_VAR is automatically added to the list of
>     > base search paths. Previous behavior was to only include
>     > KISYS3DMOD and ENV_VARS defined via Configure Paths.
>     >
>     > 4. General code cleanup removing functions which were not
>     > necessary since wxFileName already performed the required
>     > tasks.
>     >
>     > 5. Fix a bug in the file modification time check where a path to
>     > a non-existent file fires a wxASSERT within wxWidgets.
>     >
>     > - Cirilo
>     >
>     >
>     >
>     > _______________________________________________
>     > Mailing list: https://launchpad.net/~kicad-developers
>     > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     > Unsubscribe : https://launchpad.net/~kicad-developers
>     > More help   : https://help.launchpad.net/ListHelp
>     >
> 
>     _______________________________________________
>     Mailing list: https://launchpad.net/~kicad-developers
>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     Unsubscribe : https://launchpad.net/~kicad-developers
>     More help   : https://help.launchpad.net/ListHelp
> 
> 


References