|
From: <hu...@us...> - 2006-12-05 20:52:42
|
Revision: 344
http://svn.sourceforge.net/cishell/?rev=344&view=rev
Author: huangb
Date: 2006-12-05 12:52:38 -0800 (Tue, 05 Dec 2006)
Log Message:
-----------
Changed executable runner to check for .bat file, and will execute
a batch file if an executable does not exists (for Windows).
Modified Paths:
--------------
trunk/templates/org.cishell.templates/src/org/cishell/templates/staticexecutable/StaticExecutableRunner.java
Modified: trunk/templates/org.cishell.templates/src/org/cishell/templates/staticexecutable/StaticExecutableRunner.java
===================================================================
--- trunk/templates/org.cishell.templates/src/org/cishell/templates/staticexecutable/StaticExecutableRunner.java 2006-12-04 22:10:24 UTC (rev 343)
+++ trunk/templates/org.cishell.templates/src/org/cishell/templates/staticexecutable/StaticExecutableRunner.java 2006-12-05 20:52:38 UTC (rev 344)
@@ -241,6 +241,13 @@
for (int i=0; i < cmdarray.length; i++) {
cmdarray[i] = substiteVars(cmdarray[i]);
}
+
+ //TODO: Expanded later to support .cmd and other extensions
+ if (!new File(algDir + cmdarray[0]).exists()) {
+ if (new File(algDir + cmdarray[0] + ".bat").exists()) {
+ cmdarray[0] = cmdarray[0]+".bat";
+ }
+ }
cmdarray[0] = algDir + cmdarray[0];
return cmdarray;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|