[chronojump] Fix base paths in windows



commit 923f616b2f2d66050bd27d8bc8933489bf852756
Author: Windows Build <windows chronojump org>
Date:   Sun Feb 9 22:46:04 2014 +0100

    Fix base paths in windows

 src/chronojump.cs |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/src/chronojump.cs b/src/chronojump.cs
index 0136b9a..89b3fc5 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -70,14 +70,21 @@ public class ChronoJump
                System.Console.SetError(sw);
                sw.AutoFlush = true;
                */
+
+               
+               var envPath = Environment.GetEnvironmentVariable ("PATH");
+               baseDirectory = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "..");
+               if (!Directory.Exists(Path.Combine (baseDirectory, "chronojump"))) {
+                       baseDirectory = System.IO.Path.Combine(baseDirectory, "..");
+               }
+               if(UtilAll.IsWindows()) {
+                       Environment.SetEnvironmentVariable ("R_HOME", RelativeToPrefix ("library"));
+               } else {
+                       var rBinPath = @"/usr/lib/R/lib";
+                       Environment.SetEnvironmentVariable ("R_HOME", @"/usr/lib/R");
+                       Environment.SetEnvironmentVariable ("PATH", envPath + Path.PathSeparator + rBinPath);
+               }
 
-               var envPath = Environment.GetEnvironmentVariable ("PATH");
-               var rBinPath = @"/usr/lib/R/lib";
-               Environment.SetEnvironmentVariable ("R_HOME", @"/usr/lib/R");
-               Environment.SetEnvironmentVariable ("PATH", envPath + Path.PathSeparator + rBinPath);
-
-               
-               baseDirectory = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,"../../");
                if(UtilAll.IsWindows())
                        
Environment.SetEnvironmentVariable("GST_PLUGIN_PATH",RelativeToPrefix("lib\\gstreamer-0.10"));
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]