[Laszlo-checkins] r10734 - openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc
dda@openlaszlo.org
dda at openlaszlo.org
Thu Aug 21 19:51:35 PDT 2008
Author: dda
Date: 2008-08-21 19:51:33 -0700 (Thu, 21 Aug 2008)
New Revision: 10734
Modified:
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
Log:
Change 20080821-dda-T by dda at lester.local on 2008-08-21 17:03:27 EDT
in /Users/dda/laszlo/src/svn/openlaszlo/trunk-a
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Fix error line parsing for Windows
New Features:
Bugs Fixed: LPP-6834 [Line unkown compiler error]
Technical Reviewer: ptw (pending)
QA Reviewer: promanik (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
A final line number parsing error that is related to Windows only:
Windows pathnames include backslashes, and the regular expression to handle
file separators (slashes and backslashes) was not escaped properly.
In addition, improved the build.sh script that is generated in each
lzgen* directory, this is sometimes useful for debugging. When on
Windows, it is now called build.bat, file names with spaces are now
quoted correctly, and the comment line is now appropriate for Windows cmd.
Tests:
built the last test case from LPP-6834 on Unix and Windows for SWF9 and see the
compilation error with correct line number. Used build.sh and build.bat to
do builds on OSX and Windows respectively.
smokecheck (SWF8, DHTML)
weather, lzpix (ALL)
Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java 2008-08-21 21:13:52 UTC (rev 10733)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java 2008-08-22 02:51:33 UTC (rev 10734)
@@ -355,7 +355,7 @@
// Expect errors to look like File.as(48): col: 1 Error: some message
- String pat = "([^\\/]+)\\.as\\(([0-9]+)\\): *col: *([0-9]*) *(.*)";
+ String pat = "([^\\\\/]+)\\.as\\(([0-9]+)\\): *col: *([0-9]*) *(.*)";
errPattern = Pattern.compile(pat);
//System.out.println("Using error pattern: " + pat);
}
@@ -405,8 +405,7 @@
* True if UNIX quoting rules are in effect.
*/
public static boolean useUnixQuoting() {
- String osname = System.getProperty("os.name");
- return !osname.startsWith("Windows");
+ return !isWindows();
}
/**
@@ -426,10 +425,10 @@
// goodness, both $ and \ are special characters for regex.
arg = arg.replaceAll("[$]", "\\\\\\$");
- if (arg.indexOf(' ') >= 0) {
- arg = "\"" + arg + "\"";
- }
}
+ if (arg.indexOf(' ') >= 0) {
+ arg = "\"" + arg + "\"";
+ }
cmdstr += arg;
}
return cmdstr;
@@ -464,10 +463,11 @@
// Generate a small script (unix style) to document how
// to build this batch of files.
- String buildsh = "#!/bin/sh\n";
- buildsh += "cd " + dir + "\n";
+ String buildsh = isWindows() ? "rem build script\n" : "#!/bin/sh\n";
+ buildsh += "cd \"" + dir + "\"\n";
buildsh += prettycmd + "\n";
- Compiler.emitFile(workDirectoryName("build.sh"), buildsh);
+ String buildfn = isWindows() ? "build.bat" : "build.sh";
+ Compiler.emitFile(workDirectoryName(buildfn), buildsh);
List newenv = new ArrayList();
newenv.add("FLEX_HOME="+FLEX_HOME());
More information about the Laszlo-checkins
mailing list