[vlc-devel] [PATCH] bin/vlc: allow to override VLC_*_PATH envs on debug builds

Rémi Denis-Courmont remi at remlab.net
Thu Dec 15 09:13:01 CET 2016


On December 15, 2016 9:47:03 AM GMT+02:00, Steve Lhomme <robux4 at gmail.com> wrote:
>Couldn't this be a configure setting ?
>
>On Wed, Dec 14, 2016 at 9:43 PM, Rémi Denis-Courmont <remi at remlab.net>
>wrote:
>> This looks like a great way to get very confusing debug results, and
>I can´t
>> fathom the rationale.
>>
>> No thanks.
>>
>> Le keskiviikkona 14. joulukuuta 2016, 14.09.52 EET Thomas Guillem a
>écrit :
>>> ---
>>>  bin/darwinvlc.m | 10 ++++++++--
>>>  bin/vlc.c       | 10 ++++++++--
>>>  2 files changed, 16 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/bin/darwinvlc.m b/bin/darwinvlc.m
>>> index 93314c8..d9b6076 100644
>>> --- a/bin/darwinvlc.m
>>> +++ b/bin/darwinvlc.m
>>> @@ -94,8 +94,14 @@ int main(int i_argc, const char *ppsz_argv[])
>>>  #endif
>>>
>>>  #ifdef TOP_BUILDDIR
>>> -    setenv("VLC_PLUGIN_PATH", TOP_BUILDDIR"/modules", 1);
>>> -    setenv("VLC_DATA_PATH", TOP_SRCDIR"/share", 1);
>>> +# ifndef NDEBUG
>>> +#  define ENV_OVERWRITE 0
>>> +# else
>>> +#  define ENV_OVERWRITE 1
>>> +# endif
>>> +    setenv("VLC_PLUGIN_PATH", TOP_BUILDDIR"/modules",
>ENV_OVERWRITE);
>>> +    setenv("VLC_DATA_PATH", TOP_SRCDIR"/share", ENV_OVERWRITE);
>>> +# undef ENV_OVERWRITE
>>>  #endif
>>>
>>>  #ifndef ALLOW_RUN_AS_ROOT
>>> diff --git a/bin/vlc.c b/bin/vlc.c
>>> index 0a33a0f..c7a95c7 100644
>>> --- a/bin/vlc.c
>>> +++ b/bin/vlc.c
>>> @@ -131,8 +131,14 @@ int main( int i_argc, const char *ppsz_argv[] )
>>>  #endif
>>>
>>>  #ifdef TOP_BUILDDIR
>>> -    setenv ("VLC_PLUGIN_PATH", TOP_BUILDDIR"/modules", 1);
>>> -    setenv ("VLC_DATA_PATH", TOP_SRCDIR"/share", 1);
>>> +# ifndef NDEBUG
>>> +#  define ENV_OVERWRITE 0
>>> +# else
>>> +#  define ENV_OVERWRITE 1
>>> +# endif
>>> +    setenv ("VLC_PLUGIN_PATH", TOP_BUILDDIR"/modules",
>ENV_OVERWRITE);
>>> +    setenv ("VLC_DATA_PATH", TOP_SRCDIR"/share", ENV_OVERWRITE);
>>> +# undef ENV_OVERWRITE
>>>  #endif
>>>
>>>      /* Clear the X.Org startup notification ID. Otherwise the UI
>might try
>>> to
>>
>>
>> --
>> Rémi Denis-Courmont
>> https://www.remlab.net/
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

It can but I utterly fail to see a point in this.
-- 
Rémi Denis-Courmont


More information about the vlc-devel mailing list