From b6a20a43e3d4dea67bd17aa34b59db4b3136c183 Mon Sep 17 00:00:00 2001 From: Evan Dixon Date: Wed, 10 Aug 2016 20:17:37 -0500 Subject: [PATCH 1/2] Reverted ClickOnce deployment code due to Mono and Wine not supporting it Should fix issue #161 --- PKHeX/MainWindow/Main.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/PKHeX/MainWindow/Main.cs b/PKHeX/MainWindow/Main.cs index cdd1fdf45..ba35fd652 100644 --- a/PKHeX/MainWindow/Main.cs +++ b/PKHeX/MainWindow/Main.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Deployment.Application; using System.Diagnostics; using System.Drawing; using System.IO; @@ -177,7 +176,18 @@ public Main() #region Path Variables - public static string WorkingDirectory => ApplicationDeployment.IsNetworkDeployed ? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "PKHeX") : Environment.CurrentDirectory; + public static string WorkingDirectory + { + get + { + // This is how we'd do it with ClickOnce deployment (after importing System.Deployment) + // return ApplicationDeployment.IsNetworkDeployed ? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "PKHeX") : Environment.CurrentDirectory; + + // However, Mono and Wine don't implement this, so we're going to leave it like this, until ClickOnce deployment is a public feature. + return Environment.CurrentDirectory; + } + } + public static string DatabasePath => Path.Combine(WorkingDirectory, "db"); private static string WC6DatabasePath => Path.Combine(WorkingDirectory, "wc6"); private static string BackupPath => Path.Combine(WorkingDirectory, "bak"); From 822810b00c9de9e19f338de63e3be57f4e37e879 Mon Sep 17 00:00:00 2001 From: Evan Dixon Date: Wed, 10 Aug 2016 20:20:36 -0500 Subject: [PATCH 2/2] Removed assembly reference --- PKHeX/PKHeX.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/PKHeX/PKHeX.csproj b/PKHeX/PKHeX.csproj index 86daecab2..304c061ea 100644 --- a/PKHeX/PKHeX.csproj +++ b/PKHeX/PKHeX.csproj @@ -62,7 +62,6 @@ -