|
From: <caw...@us...> - 2007-06-06 16:41:26
|
Revision: 2585
http://svn.sourceforge.net/rubyeclipse/?rev=2585&view=rev
Author: cawilliams
Date: 2007-06-06 09:40:25 -0700 (Wed, 06 Jun 2007)
Log Message:
-----------
when grabbing the RI or Rdoc paths, if we can't find the normal scripts, try appending the major version number to end for those weird OS installs like Debian (where they install ri1.8 and rdoc1.8 rather than ri and rdoc)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java 2007-06-06 14:37:04 UTC (rev 2584)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/launching/RubyRuntime.java 2007-06-06 16:40:25 UTC (rev 2585)
@@ -1674,6 +1674,20 @@
if (Platform.getOS().equals(Platform.OS_WIN32)) {
path += ".bat";
}
+ File file = new File(path);
+ if (file.exists()) return file;
+ // try adding major version number to end of command for OSes like Debian that do ri1.8
+ if (vm instanceof IVMInstall2) {
+ IVMInstall2 vm2 = (IVMInstall2) vm;
+ String version = vm2.getRubyVersion();
+ if (version == null || version.length() < 3) return file;
+ version = version.substring(0, 3);
+ path = installLocation.getAbsolutePath() + File.separator + "bin"
+ + File.separator + command + version;
+ if (Platform.getOS().equals(Platform.OS_WIN32)) {
+ path += ".bat";
+ }
+ }
return new File(path);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|