Skip to content

Commit

Permalink
Merge pull request #61 from ZehMatt/fix-60
Browse files Browse the repository at this point in the history
#60: Place cache in x64/x86 directories
  • Loading branch information
mrexodia authored Sep 17, 2022
2 parents fe8657f + 56352ec commit 2ade8ad
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
3 changes: 1 addition & 2 deletions src/Dotx64Managed/Plugins.Hotload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.Loader;
using System.Runtime.Serialization;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -521,7 +520,7 @@ bool ReloadPlugin(Plugin plugin, string newAssemblyPath, CancellationToken token
}
catch (Exception ex)
{
throw;
Utils.PrintException(ex);
}
}
}
Expand Down
15 changes: 6 additions & 9 deletions src/Dotx64Managed/Plugins.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;

namespace Dotx64Dbg
{
Expand Down Expand Up @@ -73,12 +70,12 @@ private void SetupDirectories()
Console.WriteLine("DotX64Dbg Plugins Path: {0}", PluginsPath);

AppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "DotX64Dbg");
if (!Directory.Exists(AppDataPath))
{
Directory.CreateDirectory(AppDataPath);
}

PluginOutputPath = Path.Combine(AppDataPath, "Plugins");
#if _X64_
PluginOutputPath = Path.Combine(AppDataPath, "x64");
#else
PluginOutputPath = Path.Combine(AppDataPath, "x86");
#endif
PluginOutputPath = Path.Combine(PluginOutputPath, "Plugins");
if (!Directory.Exists(PluginOutputPath))
{
Directory.CreateDirectory(PluginOutputPath);
Expand Down
16 changes: 7 additions & 9 deletions src/Dotx64Managed/ScriptLoader.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System;
using System.Collections.Generic;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Dotx64Dbg
Expand All @@ -28,12 +26,12 @@ private static bool RunScriptCommand(string[] args)
private static void SetupDirectories()
{
string AppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "DotX64Dbg");
if (!Directory.Exists(AppDataPath))
{
Directory.CreateDirectory(AppDataPath);
}

ScriptBuildOutputPath = Path.Combine(AppDataPath, "Scripts");
#if _X64_
ScriptBuildOutputPath = Path.Combine(AppDataPath, "x64");
#else
ScriptBuildOutputPath = Path.Combine(AppDataPath, "x86");
#endif
ScriptBuildOutputPath = Path.Combine(ScriptBuildOutputPath, "Scripts");
if (!Directory.Exists(ScriptBuildOutputPath))
{
Directory.CreateDirectory(ScriptBuildOutputPath);
Expand Down

0 comments on commit 2ade8ad

Please sign in to comment.