mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-24 23:45:52 +00:00
Updates to fix building.
Reviewed by me.
This commit is contained in:
1 parent
99697926d9
commit
7864a9fa8e
2 files changed
+20
-4
No files matched your search
@@ -26,13 +26,24 @@ function compress(/*String*/ aCode, /*String*/ FIXME)
|
||||
{
|
||||
// FIXME: figure out why this doesn't work on Windows/Cygwin
|
||||
//var tmpFile = java.io.File.createTempFile("OBJJC", "");
|
||||
var tmpFile = new java.io.File("/tmp/" + FIXME + Math.random() + ".tmp");
|
||||
/*var tmpFile = new java.io.File("/tmp/" + FIXME + Math.random() + ".tmp");
|
||||
tmpFile.deleteOnExit();
|
||||
tmpFile = tmpFile.getAbsolutePath();
|
||||
*/
|
||||
|
||||
var tmpFile = FILE.join("/tmp", FIXME + Math.random() + ".tmp");
|
||||
|
||||
FILE.write(tmpFile, aCode, { charset:"UTF-8" });
|
||||
|
||||
return OS.command(["java", "-Dfile.encoding=UTF-8", "-classpath", [RHINO_PATH, SHRINKSAFE_PATH].join(":"), "org.dojotoolkit.shrinksafe.Main", tmpFile]);
|
||||
var shrinksafe = OS.popen("java -Dfile.encoding=UTF-8 -classpath " + RHINO_PATH + ":" + SHRINKSAFE_PATH + " org.dojotoolkit.shrinksafe.Main " + tmpFile),
|
||||
output = "",
|
||||
chunk = "";
|
||||
|
||||
while (chunk = shrinksafe.stdout.read())
|
||||
output += chunk;
|
||||
|
||||
return output;
|
||||
// return OS.command(["java", "-Dfile.encoding=UTF-8", "-classpath", [RHINO_PATH, SHRINKSAFE_PATH].join(":"), "org.dojotoolkit.shrinksafe.Main", tmpFile]);
|
||||
}
|
||||
|
||||
function compileWithResolvedFlags(aFilePath, objjcFlags, gccFlags)
|
||||
|
||||
+7
-2
@@ -91,8 +91,13 @@ global.rm_rf = function(/*String*/ aFilename)
|
||||
|
||||
global.cp_r = function(/*String*/ from, /*String*/ to)
|
||||
{
|
||||
rm_rf(to);
|
||||
FILE.copyTree(from, to);
|
||||
if (FILE.exists(to))
|
||||
rm_rf(to);
|
||||
|
||||
if (FILE.isDirectory(from))
|
||||
FILE.copyTree(from, to);
|
||||
else
|
||||
FILE.copy(from, to);
|
||||
}
|
||||
|
||||
global.cp = function(/*String*/ from, /*String*/ to)
|
||||
|
||||
Reference in new issue
Block a user