[vlc-devel] [PATCH] Enable Lua SD loading with -S<name>

Rémi Denis-Courmont remi at remlab.net
Tue Feb 16 23:07:38 CET 2010


Le mardi 16 février 2010 23:26:58 Fabio Ritrovato, vous avez écrit :
> 2010/2/16 Rémi Denis-Courmont <remi at remlab.net>:
> > Yes, the user cannot f*ck them up so easily.
> 
> But he won't have something as a reference to make other scripts
> (unless he'll go check the source...)

...which s/he will do to get the 'readme' files anyway.

> > They end up being parsed zero times.
> >
> > And running them twice looks like a bug in the design. I would not blame
> > tokenization for design mistakes.
> 
> vlclua_scripts_batch_execute will run every file unless one return
> success, so if there's both the script and the compiled version, both
> will be tried...

IOW, they only run once because the packager has a clue and did not install 
both tokenized and source version.

From the build tree, .luac are not run anyhow as VLC scans 
$(top_srcdir)/share/lua/$role but not $(top_builddir)/share/lua/$role. First, 
I thought it was a bug. But it actually makes things easier for developers, so 
I decided to leave it unaddressed. The 5 developers (out of millions of users) 
running VLC from $(srcdir) can suffer duplicate entries; the sky won't fall 
for this.

> > Packagers are not that stupid. automake only installs the tokenized
> > version. I trust also Windows and MacOS packagers have enough clue not to
> > ship both the tokenized and the source versions of each script.
> 
> Currently, we ship both, at least in windows nightlies...
> And, if I'm not using a packed version but compiling, I'll have them
> duplicated...

Actually, we do not ship nightlies at all currently since the build broke 
before LUAC support was added.

And we don't copy .luac files in most cases. In other cases, the problem would 
not exist if Windows used staged installation before packaging. But I gave up 
on this a long time ago. The Windows packagers have decided to keep their 
miserable system. I won't argue with this and I don't care anymore.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list