Skip to content

Commit

Permalink
Reverted ClickOnce deployment code due to Mono and Wine not supportin…
Browse files Browse the repository at this point in the history
…g it

Should fix issue #161
  • Loading branch information
evandixon committed Aug 11, 2016
1 parent 43cf237 commit b6a20a4
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions 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;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit b6a20a4

Please sign in to comment.