From 3e429736d55802daca9c09dbc62a049b1c4cdf37 Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 25 Oct 2013 16:00:34 +0000 Subject: [PATCH] Move PathManager and SavestateManager to Client.Common, also remove the dependency for System.Web in PathManager by doing a more logical way of getting the executing assembly path --- BizHawk.Client.Common/BizHawk.Client.Common.csproj | 1 + .../config => BizHawk.Client.Common}/PathManager.cs | 8 ++------ .../SavestateManager.cs | 4 +--- BizHawk.MultiClient/AVOut/FFmpegWriter.cs | 2 ++ BizHawk.MultiClient/BizHawk.MultiClient.csproj | 2 -- 5 files changed, 6 insertions(+), 11 deletions(-) rename {BizHawk.MultiClient/config => BizHawk.Client.Common}/PathManager.cs (93%) rename {BizHawk.MultiClient => BizHawk.Client.Common}/SavestateManager.cs (90%) diff --git a/BizHawk.Client.Common/BizHawk.Client.Common.csproj b/BizHawk.Client.Common/BizHawk.Client.Common.csproj index 8eec8ff392..9f6fc92af9 100644 --- a/BizHawk.Client.Common/BizHawk.Client.Common.csproj +++ b/BizHawk.Client.Common/BizHawk.Client.Common.csproj @@ -100,6 +100,7 @@ + diff --git a/BizHawk.MultiClient/config/PathManager.cs b/BizHawk.Client.Common/PathManager.cs similarity index 93% rename from BizHawk.MultiClient/config/PathManager.cs rename to BizHawk.Client.Common/PathManager.cs index 16c47670bf..c2e6bcaf5a 100644 --- a/BizHawk.MultiClient/config/PathManager.cs +++ b/BizHawk.Client.Common/PathManager.cs @@ -3,17 +3,13 @@ using System.Linq; using System.IO; using System.Reflection; -using BizHawk.Client.Common; - -namespace BizHawk.MultiClient +namespace BizHawk.Client.Common { public static class PathManager { public static string GetExeDirectoryAbsolute() { - var uri = new Uri(Assembly.GetEntryAssembly().GetName().CodeBase); - string module = uri.LocalPath + System.Web.HttpUtility.UrlDecode(uri.Fragment); - return Path.GetDirectoryName(module); + return AppDomain.CurrentDomain.BaseDirectory; } /// diff --git a/BizHawk.MultiClient/SavestateManager.cs b/BizHawk.Client.Common/SavestateManager.cs similarity index 90% rename from BizHawk.MultiClient/SavestateManager.cs rename to BizHawk.Client.Common/SavestateManager.cs index c4ac71c5a6..9d67771b19 100644 --- a/BizHawk.MultiClient/SavestateManager.cs +++ b/BizHawk.Client.Common/SavestateManager.cs @@ -1,8 +1,6 @@ using System.IO; -using BizHawk.Client.Common; - -namespace BizHawk.MultiClient +namespace BizHawk.Client.Common { class SavestateManager { diff --git a/BizHawk.MultiClient/AVOut/FFmpegWriter.cs b/BizHawk.MultiClient/AVOut/FFmpegWriter.cs index b4931131f3..07dcf31290 100644 --- a/BizHawk.MultiClient/AVOut/FFmpegWriter.cs +++ b/BizHawk.MultiClient/AVOut/FFmpegWriter.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System.Text; using System.Diagnostics; +using BizHawk.Client.Common; + namespace BizHawk.MultiClient { /// diff --git a/BizHawk.MultiClient/BizHawk.MultiClient.csproj b/BizHawk.MultiClient/BizHawk.MultiClient.csproj index ab20e0914d..d805c5fccb 100644 --- a/BizHawk.MultiClient/BizHawk.MultiClient.csproj +++ b/BizHawk.MultiClient/BizHawk.MultiClient.csproj @@ -84,7 +84,6 @@ - 3.5 @@ -232,7 +231,6 @@ PathInfo.cs - Form