Open ivan-mogilko opened 8 months ago
Here's a different option:
Use a different folder structure, where each plugin has it's own directory.
EnginePlugins
plugin1
Windows
x86
agsplugin1.dll
depplugin1.dll
Linux
Pros: easy to update plugins separately, don't require additional plugin API, functionality is obvious Cons: lots of manual work to create the directories for the person releasing the plugin, no additional checking of dependencies - anything unintentionally placed in the directory gets copied.
Also possible for all of these is perhaps checking the dll for dependencies directly (through something like ldd
).
Example from SciCompanion approach:
Can game templates contain subdirectories? If so, then another approach is to make a game template, Blank Game With Steam, that includes the steam-api.dll in the Compiled\Windows folder. Building a game doesn't empty the folder, so once the DLL is there for a game, it's going to stay.
Can game templates contain subdirectories? If so, then another approach is to make a game template, Blank Game With Steam, that includes the steam-api.dll in the Compiled\Windows folder. Building a game doesn't empty the folder, so once the DLL is there for a game, it's going to stay.
Templates can contain subdirectories, but
Problem
In theory the game plugin may have dependencies. Prior to 3.6.0 some plugins required SDL, but that's not a problem now when engine itself requires it. In practice at the moment there's only 1 popular plugin which has a non-standard dependency: the AGSteam plugin which needs "steam-api.dll". Problem is that the Editor is not aware of that, and does not copy this dll along with the plugin's dll when making the game. Users have to know about this and do it themselves every time.
Proposal
Find a way to make Editor copy plugin dependencies along with plugins automatically. Checking for dll dependency using winapi is probably possible, but is not reliable, as the list of deps may include system libraries. So there will still be a problem of distinguishing "custom" ones. Three possible methods that came to my mind so far are: