mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-15 12:27:43 +01:00
This reverts commit 845a3fba4f.
This commit is contained in:
parent
845a3fba4f
commit
681cda91a4
5 changed files with 39 additions and 5 deletions
|
|
@ -57,6 +57,15 @@ internal partial class PluginManager : IDisposable, IServiceType
|
|||
/// </summary>
|
||||
public const int PluginWaitBeforeFreeDefault = 1000; // upped from 500ms, seems more stable
|
||||
|
||||
private const string DevPluginsDisclaimerFilename = "DONT_USE_THIS_FOLDER.txt";
|
||||
|
||||
private const string DevPluginsDisclaimerText = @"Hey!
|
||||
The devPlugins folder is deprecated and will be removed soon. Please don't use it anymore for plugin development.
|
||||
Instead, open the Dalamud settings and add the path to your plugins build output folder as a dev plugin location.
|
||||
Remove your devPlugin from this folder.
|
||||
|
||||
Thanks and have fun!";
|
||||
|
||||
private static readonly ModuleLog Log = new("PLUGINM");
|
||||
|
||||
private readonly object pluginListLock = new();
|
||||
|
|
@ -79,10 +88,18 @@ internal partial class PluginManager : IDisposable, IServiceType
|
|||
private PluginManager()
|
||||
{
|
||||
this.pluginDirectory = new DirectoryInfo(this.startInfo.PluginDirectory!);
|
||||
this.devPluginDirectory = new DirectoryInfo(this.startInfo.DefaultPluginDirectory!);
|
||||
|
||||
if (!this.pluginDirectory.Exists)
|
||||
this.pluginDirectory.Create();
|
||||
|
||||
if (!this.devPluginDirectory.Exists)
|
||||
this.devPluginDirectory.Create();
|
||||
|
||||
var disclaimerFileName = Path.Combine(this.devPluginDirectory.FullName, DevPluginsDisclaimerFilename);
|
||||
if (!File.Exists(disclaimerFileName))
|
||||
File.WriteAllText(disclaimerFileName, DevPluginsDisclaimerText);
|
||||
|
||||
this.SafeMode = EnvironmentConfiguration.DalamudNoPlugins || this.configuration.PluginSafeMode || this.startInfo.NoLoadPlugins;
|
||||
|
||||
try
|
||||
|
|
@ -377,6 +394,9 @@ internal partial class PluginManager : IDisposable, IServiceType
|
|||
if (!this.pluginDirectory.Exists)
|
||||
this.pluginDirectory.Create();
|
||||
|
||||
if (!this.devPluginDirectory.Exists)
|
||||
this.devPluginDirectory.Create();
|
||||
|
||||
// Add installed plugins. These are expected to be in a specific format so we can look for exactly that.
|
||||
foreach (var pluginDir in this.pluginDirectory.GetDirectories())
|
||||
{
|
||||
|
|
@ -417,7 +437,7 @@ internal partial class PluginManager : IDisposable, IServiceType
|
|||
}
|
||||
|
||||
// devPlugins are more freeform. Look for any dll and hope to get lucky.
|
||||
var devDllFiles = new List<FileInfo>();
|
||||
var devDllFiles = this.devPluginDirectory.GetFiles("*.dll", SearchOption.AllDirectories).ToList();
|
||||
|
||||
foreach (var setting in this.configuration.DevPluginLoadLocations)
|
||||
{
|
||||
|
|
@ -640,8 +660,11 @@ internal partial class PluginManager : IDisposable, IServiceType
|
|||
/// </summary>
|
||||
public void ScanDevPlugins()
|
||||
{
|
||||
if (!this.devPluginDirectory.Exists)
|
||||
this.devPluginDirectory.Create();
|
||||
|
||||
// devPlugins are more freeform. Look for any dll and hope to get lucky.
|
||||
var devDllFiles = new List<FileInfo>();
|
||||
var devDllFiles = this.devPluginDirectory.GetFiles("*.dll", SearchOption.AllDirectories).ToList();
|
||||
|
||||
foreach (var setting in this.configuration.DevPluginLoadLocations)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue