[vlc-devel] [PATCH] bin/vlc: allow to override VLC_*_PATH envs on debug builds
Rémi Denis-Courmont
remi at remlab.net
Wed Dec 14 21:43:24 CET 2016
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/
More information about the vlc-devel
mailing list