View Full Version : file locations as subdirs of registered plugin dir?
zettai
19th October 2002, 17:03
Hi there,
I was wondering if there was any way I could specify file locatinos as, say
loadplugin("\notloaded\warpsharp.dll")
which would locate the file in a subdir of the registered plugin directory.
This would be really useful for things that do not autoload very well or perhaps for use in functions.
If there is some way of doing this already, I'd love to know :)
[edit: Perhaps the plugindir could be predefined so you could say
loadplugin(defplugindir+"\extra\warpsharp.dll")]
Richard Berg
19th October 2002, 17:44
I added a SetWorkingDir function lately -- its original motivation was to have it affect AviSource et al., but it should work for LoadPlugin too.
I agree, though, there should also be a script-time string variable. It would make your application cleaner than a separate SetWorkingDir call, of course, but would also allow it to be used with MessageClip etc. etc.
I was also thinking there should be a default projects directory from which to load function collections, other AviSynth scripts, and of course the source clips themselves. Looking for "plugindir\..\projects" works, but strike me as hackish when it's simple enough to add another registry key (and thus, user configurability) for this functionality.
zettai
19th October 2002, 18:01
Yeah, but the SetWorkingDir() function still doesn't help me, I'll explain.
I'm writing an .avs with functions to manipulate certain filters, but I'd ideally like for these filters to be located in the default plugin dir (it helps both me and the user).
Unfortunately, there's no way of knowing what this plugin directory is - I'd have to tell people to define it in the script, which I'd rather not do when there's a perfectly good preset already there... its just I can't access it :)
Oh well, maybe I could make an installer that would read the registry and write the .avs file with the necessary path defined :D
Richard Berg
20th October 2002, 06:25
:confused:
If the plugin directory is set in the registry, and the DLLs are there, they should be autoloaded.
zettai
20th October 2002, 14:38
Don't get me wrong - they are autoloaded....
but they break avisynth when they are autoloaded :)
The YUV warpsharp script with a million different other filters in it kills avisynth when autoloading and there are scripts that have subtle differences but have the same function names that fight it out when you autoload - such as mpeg2dec and mpeg2dec3... both of which have their own use.
For whatever reason, I still think this could be a useful feature for script creation.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.