← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: 3D resolver

 

Le 23/04/2016 09:16, Cirilo Bernardo a écrit :
> Thanks Jean-Pierre,  I'll go through the 3D model code and make sure it can
> use "${" and "$(".  I'm not sure about "%{", "%(" though since that wouldn't
> be portable.  In principle there can also be multiple substitutions and a
> substitution in the middle of a string such as
> "/path/${VAR1}/${VAR2}/model.wrl"
> but I think the current system should work fine; if people do something else
> they can be responsible for the resulting behavior.
> 
> - Cirilo

Supporting both "${" and "$(" is enough for me.
If "${" is the starting point, "}" is the end of var name, and for "$(" the end of var name is ")"


> 
> On Sat, Apr 23, 2016 at 4:28 PM, jp charras <jp.charras@xxxxxxxxxx> wrote:
> 
>> Le 23/04/2016 01:29, Cirilo Bernardo a écrit :
>>> Hi Wayne,
>>>
>>>  The attached patch was made against r6709.
>>>
>>> - Cirilo
>>
>> Cirilo, I just had a look at the patch, and noticed a (minor) issue:
>> you are searching an ENV VAR by searching "${"
>>
>> This is perfectly true, but incomplete.
>> wxWidgets accepts both "${" and "$(". (and on windows accept also "%{" and
>> "%(" and more)
>> The delimiters can be { and } or ( and )
>> They are equivalent in wxWidgets, and allows using ) or } in paths
>>
>> (have a look at wxString wxExpandEnvVars(const wxString& str) in
>> src/common/config.cpp, perhaps it
>> could be used )
>>
>>
>> This in important because we are using both in Kicad.
>> for instance the fp lib wizard uses $(xxx) and in docs we use ${xxx}
>> notation
>>
>> Thanks.
>>
>>>
>>>
>>> On Sat, Apr 23, 2016 at 12:52 AM, Wayne Stambaugh <stambaughw@xxxxxxxxx>
>>> wrote:
>>>
>>>> Cirilo,
>>>>
>>>> This patch no longer applies cleanly.  Would you please fix it an repost
>>>> it.
>>>>
>>>> Thanks,
>>>>
>>>> Wayne
>>>>
>>
>>
>> --
>> Jean-Pierre CHARRAS
>>
>> _______________________________________________
>> 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
>>
> 


-- 
Jean-Pierre CHARRAS


Follow ups

References