[chronojump] Fix base paths in windows
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fix base paths in windows
- Date: Sun, 9 Feb 2014 22:16:20 +0000 (UTC)
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]