Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2018-02-23 17:05:59 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2018-02-23 17:05:59 +0300
commit509b3f316b29d6b5ee61752b91e9015c5c6e8623 (patch)
tree6aa82a1141b583c20f290a0b34f83539e058dad8 /Program.cs
parente4b68cba3788ff1e9b9813cf61e2df68e3842f10 (diff)
Release, v2.302.30
Diffstat (limited to 'Program.cs')
-rw-r--r--Program.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/Program.cs b/Program.cs
index e788fd3d..e804ff73 100644
--- a/Program.cs
+++ b/Program.cs
@@ -79,6 +79,7 @@ namespace com.clusterrr.hakchi_gui
if (createdNew)
{
BaseDirectoryInternal = Path.GetDirectoryName(Application.ExecutablePath);
+#if CLICKONCE
if (ApplicationDeployment.IsNetworkDeployed)
{
// This is not correct way for Windows 7+...
@@ -96,6 +97,7 @@ namespace com.clusterrr.hakchi_gui
}
}
else
+#endif
BaseDirectoryExternal = BaseDirectoryInternal;
Debug.WriteLine("Base directory: " + BaseDirectoryExternal);
ConfigIni.Load();
@@ -108,15 +110,17 @@ namespace com.clusterrr.hakchi_gui
// There are some folders which should be accessed by user
// Moving them to "My documents"
+#if CLICKONCE
if (ApplicationDeployment.IsNetworkDeployed && ApplicationDeployment.CurrentDeployment.IsFirstRun)
{
var externalDirs = new string[]
- {
- "art", "folder_images", "patches", "user_mods"
- };
+ {
+ "art", "folder_images", "patches", "user_mods"
+ };
foreach (var dir in externalDirs)
DirectoryCopy(Path.Combine(BaseDirectoryInternal, dir), Path.Combine(BaseDirectoryExternal, dir), true);
}
+#endif
string languagesDirectory = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "languages");
const string langFileNames = "hakchi.resources.dll";
@@ -128,6 +132,7 @@ namespace com.clusterrr.hakchi_gui
{
var dir = Path.GetDirectoryName(d);
Debug.WriteLine("Removing old directory: " + dir);
+#if CLICKONCE
if (ApplicationDeployment.IsNetworkDeployed)
{
var targetDir = Path.Combine(languagesDirectory, Path.GetFileName(dir));
@@ -138,6 +143,7 @@ namespace com.clusterrr.hakchi_gui
File.Move(Path.Combine(dir, langFileNames), targetFile);
}
else
+#endif
Directory.Delete(dir, true);
}