load all plugins from Plugins/Local
This commit is contained in:
@@ -1,4 +1,13 @@
|
|||||||
# UplinkSE
|
# UplinkSE
|
||||||
Менеджер плагинов для компьютерной видеоигры Space Engineers, созданной студией Keen Software House, не имеющий фатальных недостатков, присущих другим аналогичным менеджерам плагинов
|
Менеджер плагинов для компьютерной видеоигры Space Engineers, созданной студией Keen Software House, не имеющий фатальных недостатков, присущих другим аналогичным менеджерам плагинов
|
||||||
|
|
||||||
|
# How to:
|
||||||
|
Put your plugin dlls in `SpaceEngineers/Bin64/Plugins/Local`.
|
||||||
|
```sh
|
||||||
|
ln -s "XXX/SpaceEngineers/Bin64 ./"
|
||||||
|
./build.sh
|
||||||
|
./install.sh
|
||||||
|
./launch.sh
|
||||||
|
```
|
||||||
|
|
||||||

|

|
||||||
@@ -17,20 +17,17 @@ internal static class UplinkLauncher
|
|||||||
Console.WriteLine("Starting Uplink SE");
|
Console.WriteLine("Starting Uplink SE");
|
||||||
Console.WriteLine(new string('-', Console.WindowWidth));
|
Console.WriteLine(new string('-', Console.WindowWidth));
|
||||||
|
|
||||||
//MANUALLY ADDED, REMOVE LATER
|
|
||||||
string[] enabledPlugins =
|
|
||||||
{
|
|
||||||
"ModelSwap.dll",
|
|
||||||
"DontTellMeWhatToBuild.dll"
|
|
||||||
};
|
|
||||||
|
|
||||||
List<string> plugins = new List<string>();
|
List<string> plugins = new List<string>();
|
||||||
|
|
||||||
if (!Directory.Exists(PluginsLocalDir))
|
if (!Directory.Exists(PluginsLocalDir))
|
||||||
Directory.CreateDirectory(PluginsLocalDir);
|
Directory.CreateDirectory(PluginsLocalDir);
|
||||||
foreach (string plugin in enabledPlugins)
|
string[] localPlugins = Directory.GetFiles(
|
||||||
|
PluginsLocalDir, "*.dll", SearchOption.AllDirectories);
|
||||||
|
|
||||||
|
foreach (string plugin in localPlugins)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Adding plugin: " + plugin);
|
Console.WriteLine("Adding plugin: " + plugin);
|
||||||
plugins.Add(Path.GetFullPath(Path.Combine(PluginsLocalDir, plugin)));
|
plugins.Add(Path.GetFullPath(plugin));
|
||||||
}
|
}
|
||||||
|
|
||||||
MyPlugins.RegisterUserAssemblyFiles(plugins);
|
MyPlugins.RegisterUserAssemblyFiles(plugins);
|
||||||
|
|||||||
Reference in New Issue
Block a user