From: Peter S. <sch...@us...> - 2007-01-05 17:48:15
|
Update of /cvsroot/plb4jedit/plb4jedit/Plb/src/java/net/sf/plb4jedit/plb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15735/Plb/src/java/net/sf/plb4jedit/plb Modified Files: PLBCompiler.java Log Message: no default properties for unix Index: PLBCompiler.java =================================================================== RCS file: /cvsroot/plb4jedit/plb4jedit/Plb/src/java/net/sf/plb4jedit/plb/PLBCompiler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- PLBCompiler.java 5 Jan 2007 16:58:14 -0000 1.1 +++ PLBCompiler.java 5 Jan 2007 17:48:11 -0000 1.2 @@ -31,25 +31,8 @@ public PLBCompiler() throws IOException { tmp = File.createTempFile("PLBCompiler",".log"); - + tmp.deleteOnExit(); plbEnv = new Properties(); - if (File.separator.equals("/")) { - _unixDefaults(); - } - } - - - - private void _unixDefaults() { - plbEnv.setProperty("PLB_TERM", "linux"); - plbEnv.setProperty("PLB_SYSTEM", "/opt/rsi/plb"); - plbEnv.setProperty("PLB_FNC", "lower"); - plbEnv.setProperty("PLB_EOR", "LF, NOAUTO"); - plbEnv.setProperty("PLBCMP_EXT", "dbs"); - plbEnv.setProperty("PLB_PATH", - "/opt/rsi/plb:/home/schaefer/cvsroot/procars/incs/rcd:/home/schaefer/cvsroot/procars/incs/io:/home/schaefer/cvsroot/procars/incs/misc"); - plbEnv.setProperty("RSI_PLBCMD","plb"); - plbEnv.setProperty("RSI_PLCDIR","/opt/rsi/plc"); } public void usePlbWinINIFile(String wini) throws Exception { @@ -62,7 +45,7 @@ Enumeration keys = cmpenv.propertyNames(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); - if (StringUtils.isNotBlank(cmpenv.getProperty(key)) && key.toUpperCase().startsWith("RSI")) { + if (StringUtils.isNotBlank(cmpenv.getProperty(key))) { plbEnv.setProperty(key.toUpperCase(), cmpenv.getProperty(key)); } } @@ -89,10 +72,8 @@ cmd[++i] = plbEnv.getProperty("RSI_PLBCMD","plb"); } cmd[++i] = "plbcmp"; - //cmd[++i] = name; cmd[++i] = plbSource.getAbsolutePath(); cmd[++i] = plbEnv.getProperty("RSI_PLCDIR") + File.separator + StringUtils.replace(name, ".dbs", ".plc"); - //cmd[++i] = "-ZH ZT ZG ZV PE 99999 \"x header\" s"; cmd[++i] = "-EP"; cmd[++i] = "\"x header\""; cmd[++i] = "S"; @@ -107,7 +88,6 @@ public void analyzeListing(File plbSource) throws Exception { String listing = plbEnv.getProperty("RSI_PLCDIR") + File.separator + StringUtils.replace(plbSource.getName(), ".dbs", ".lst"); - //ListingAnalyzer analyzer = new ListingAnalyzer(tmp.getAbsolutePath(), plbSource.getAbsolutePath()); ListingAnalyzer analyzer = new ListingAnalyzer(listing, plbSource.getAbsolutePath()); analyzer.printGeneric(); } |