mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
57 lines
1.3 KiB
JavaScript
57 lines
1.3 KiB
JavaScript
require("../../common.jake");
|
|
|
|
var /* OS = require("os"), */
|
|
task = JAKE.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, {stdio: 'inherit'});
|
|
} catch (error) {
|
|
process.exit(1);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
console.log("Building fontinfo requires Xcode.");
|
|
}
|
|
});
|
|
|
|
task ("clean", function()
|
|
{
|
|
if (executableExists("xcodebuild")) {
|
|
try {
|
|
child_process.execSync("xcodebuild clean", {stdio: 'inherit'});
|
|
} catch (error) {
|
|
process.exit(1);
|
|
}
|
|
}
|
|
});
|
|
|
|
task ("clobber", function()
|
|
{
|
|
if (executableExists("xcodebuild")) {
|
|
try {
|
|
child_process.execSync("xcodebuild clean", {stdio: 'inherit'});
|
|
} catch (error) {
|
|
process.exit(1);
|
|
}
|
|
}
|
|
});
|
|
|
|
task ("default", ["build"]);
|