Merge pull request #176 from kwsch/b/system-deployment-mono

Reverted ClickOnce deployment code due to Mono and Wine not supporting it.
This commit is contained in:
Kaphotics 2016-08-10 18:34:05 -07:00 committed by GitHub
commit 1bba0d32cf
2 changed files with 12 additions and 3 deletions

View file

@ -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 @@ namespace PKHeX
#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");

View file

@ -62,7 +62,6 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Web" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />