|
From: <caw...@us...> - 2007-09-14 21:43:32
|
Revision: 3190
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3190&view=rev
Author: cawilliams
Date: 2007-09-14 14:42:41 -0700 (Fri, 14 Sep 2007)
Log Message:
-----------
try to pick proper JRuby executable on each platform
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/JRubyVMType.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/JRubyVMType.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/JRubyVMType.java 2007-09-14 21:38:32 UTC (rev 3189)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/JRubyVMType.java 2007-09-14 21:42:41 UTC (rev 3190)
@@ -164,7 +164,7 @@
for (int i = 0; i < fgCandidateRubyFiles.length; i++) {
for (int j = 0; j < fgCandidateRubyLocations.length; j++) {
File rubyFile = new File(vmInstallLocation, fgCandidateRubyLocations[j] + fgCandidateRubyFiles[i]);
- if (rubyFile.isFile()) { // FIXME Only check for .bat on win32 and others on other platforms
+ if (rubyFile.isFile() && isPlatformProper(rubyFile)) { // FIXME Only check for .bat on win32 and others on other platforms
return rubyFile;
}
}
@@ -172,6 +172,14 @@
return null;
}
+ private static boolean isPlatformProper(File rubyFile) {
+ if (Platform.getOS().equals(Platform.OS_WIN32)) {
+ return rubyFile.getName().endsWith(".bat");
+ } else {
+ return !rubyFile.getName().endsWith(".bat");
+ }
+ }
+
/**
* Parses the output from 'Standard Ruby VM Install Detector'.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|