SRL Archive - RS3 Help

[Lape] Can you load plugin from external path?


bg5

2015-02-26 13:22:49

I'm testing a plugin and I'm trying to load it directly from output location.

{$loadlib C:\Users\user\Documents\Codeblocks\etl3\bin\Debug\etl.dll} 

,but:

Error: Plugin(C:\Users\user\Documents\Codeblocks\etl3\bin\Debug\etl) has not been found

Have I missed something?

Olly

2015-02-26 14:00:39

I think you have to go 'back' (IDK correct syntax) from the plugins directory.

{$loadlib \..\includes\ThisPluginIsInIncludesFolder.dll}

I do also have a pull request pending to search the scripts location for plugins.

Turpinator

2015-02-26 15:44:01

From: Olly
I think you have to go 'back' (IDK correct syntax) from the plugins directory.

{$loadlib \..\includes\ThisPluginIsInIncludesFolder.dll}

I do also have a pull request pending to search the scripts location for plugins.


Well… itd be
{$loadlib ..\..\Users\user\Documents\Codeblocks\etl3\bin\Debug\etl.dll}
me thinks. the first \ probably will throw it off, because thats generally the root of the drive.

Olly

2015-02-26 15:48:29

From: Turpinator
Well… itd be
{$loadlib ..\..\Users\user\Documents\Codeblocks\etl3\bin\Debug\etl.dll}
me thinks. the first \ probably will throw it off, because thats generally the root of the drive.


https://github.com/WarPie/SimbaExt/blob/master/SimbaExt_Core.pas#L84

bg5

2015-02-26 16:18:24

{$loadlib \..\..\..\..\..\Users\user\Documents\Codeblocks\etl3\bin\Debug\etl.dll}   

worked

btw.

This class is created to handle many plugin dirs.
https://github.com/MerlijnWajer/Simba/blob/65480539458130e559999f99d28046a186f10f10/Units/MMLCore/libloader.pas#L1
all you need to do is to use this function more than once:
https://github.com/MerlijnWajer/Simba/blob/1327b37c83a99d14279c25fd610b134bbcadba39/Projects/Simba/simbaunit.pas#L1975

would be nice if you could add your pathes in settings separated with semicolon, like:
C:\Users\user\Desktop\Simba5\Plugins\;C:\Users\user\Documents\MyPlugins
and
  tempPluginPathArray := Explode(';',SimbaSettings.Plugins.Path.Value);
for i := 0 to length( tempPluginPathArray-1) do
begin
if DirectoryExists(tempPluginPathArray[i]) then
PluginsGlob.AddPath(tempPluginPathArray[i]);
end;