From: <fu...@us...> - 2007-03-01 20:14:54
|
Revision: 371 http://svn.sourceforge.net/cishell/?rev=371&view=rev Author: fugu13 Date: 2007-03-01 12:14:17 -0800 (Thu, 01 Mar 2007) Log Message: ----------- Fix to deal with arbitrary algorithm locations. Modified Paths: -------------- trunk/templates/org.cishell.templates/src/org/cishell/templates/staticexecutable/StaticExecutableAlgorithmFactory.java Modified: trunk/templates/org.cishell.templates/src/org/cishell/templates/staticexecutable/StaticExecutableAlgorithmFactory.java =================================================================== --- trunk/templates/org.cishell.templates/src/org/cishell/templates/staticexecutable/StaticExecutableAlgorithmFactory.java 2007-03-01 19:56:09 UTC (rev 370) +++ trunk/templates/org.cishell.templates/src/org/cishell/templates/staticexecutable/StaticExecutableAlgorithmFactory.java 2007-03-01 20:14:17 UTC (rev 371) @@ -66,12 +66,12 @@ } private class StaticExecutableAlgorithm implements Algorithm { - private static final String ALGORITHM = "ALGORITHM/"; - private static final String ALGORITHM_MACOSX_PPC = ALGORITHM + "macosx.ppc/"; - private static final String MACOSX = "macosx"; - private static final String ALGORITHM_WIN32 = ALGORITHM + "/win32/"; - private static final String WIN32 = "win32"; - private static final String ALGORITHM_DEFAULT = ALGORITHM + "/default/"; + private String ALGORITHM; + private String ALGORITHM_MACOSX_PPC; + private String MACOSX; + private String ALGORITHM_WIN32; + private String WIN32; + private String ALGORITHM_DEFAULT; Data[] data; Dictionary parameters; CIShellContext context; @@ -80,6 +80,14 @@ this.data = data; this.parameters = parameters; this.context = context; + + ALGORITHM = algName + "/"; + ALGORITHM_MACOSX_PPC = ALGORITHM + "macosx.ppc/"; + MACOSX = "macosx"; + ALGORITHM_WIN32 = ALGORITHM + "/win32/"; + WIN32 = "win32"; + ALGORITHM_DEFAULT = ALGORITHM + "/default/"; + } public Data[] execute() { @@ -142,24 +150,6 @@ path = platform_path; } - - - /*while (e != null && e.hasMoreElements()) { - String path = (String)entryPath; - - if (path.endsWith("/")) { - if (path.endsWith("default/")) { - copyDir(dir, path); - } else if (path.endsWith(os+"."+arch+"/") || - (path.endsWith("win32/") && os.equals("win32")) || (path.endsWith("macosx.ppc/") && os.equals("macosx") && arch.equals("x86"))) { - copyDir(dir, path); - foundExecutable = true; - } - } else { - //copyFile(dir, path); - } - }*/ - if (path == null) { throw new RuntimeException("Unable to find compatible executable"); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |