feat: add warning when bundling Dalamud dependencies

This commit is contained in:
goat 2021-09-29 02:09:23 +02:00
parent f2d604c4ef
commit a7c5394951
No known key found for this signature in database
GPG key ID: F18F057873895461

View file

@ -251,6 +251,16 @@ namespace Dalamud.Plugin.Internal
this.State = PluginState.InProgress;
Log.Information($"Loading {this.DllFile.Name}");
if (this.DllFile.DirectoryName != null && File.Exists(Path.Combine(this.DllFile.DirectoryName, "Dalamud.dll")))
{
Log.Error("==== IMPORTANT MESSAGE TO {0}, THE DEVELOPER OF {1} ====", this.Manifest.Author, this.Manifest.InternalName);
Log.Error("YOU ARE INCLUDING DALAMUD DEPENDENCIES IN YOUR BUILDS!!!");
Log.Error("You may not be able to load your plugin. \"<Private>False</Private>\" needs to be set in your csproj.");
Log.Error("If you are using ILMerge, do not merge anything other than your direct dependencies.");
Log.Error("Do not merge FFXIVClientStructs.Generators.dll.");
Log.Error("Please refer to https://github.com/goatcorp/Dalamud/discussions/603 for more information.");
}
try
{
this.loader ??= PluginLoader.CreateFromAssemblyFile(this.DllFile.FullName, this.SetupLoaderConfig);