mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-02 15:16:17 +00:00
49 lines
1.1 KiB
JavaScript
49 lines
1.1 KiB
JavaScript
|
|
require ("../../common.jake");
|
|
|
|
var OS = require("os"),
|
|
task = require("../../../jake/lib/jake.js").task;
|
|
//SYSTEM = require("system");
|
|
|
|
const child_process = require("child_process");
|
|
|
|
task ("build", function()
|
|
{
|
|
if (executableExists("xcodebuild"))
|
|
{
|
|
var args = "-alltargets -configuration Release";
|
|
|
|
if (xcodebuildHasTenPointFiveSDK())
|
|
args = "-sdk macosx10.5 " + args;
|
|
|
|
else
|
|
args = "-sdk macosx " + args;
|
|
|
|
var xcodebuild = process.env.CAPP_BUILD ? "xcodebuild " : "CAPP_BUILD=../../Build xcodebuild ";
|
|
|
|
try {
|
|
child_process.execSync(xcodebuild + args);
|
|
} catch (error) {
|
|
process.exit(1);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
print("Building fontinfo requires Xcode.");
|
|
}
|
|
});
|
|
|
|
task ("clean", function()
|
|
{
|
|
if (executableExists("xcodebuild") && OS.system("xcodebuild clean"))
|
|
OS.exit(1);
|
|
});
|
|
|
|
task ("clobber", function()
|
|
{
|
|
if (executableExists("xcodebuild") && OS.system("xcodebuild clean"))
|
|
OS.exit(1);
|
|
});
|
|
|
|
task ("default", ["build"]);
|