mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
52 lines
1.1 KiB
JavaScript
52 lines
1.1 KiB
JavaScript
require("../../common.jake");
|
|
|
|
const child_process = require("child_process");
|
|
const task = JAKE.task;
|
|
|
|
task ("build", function()
|
|
{
|
|
if (executableExists("xcodebuild"))
|
|
{
|
|
var args = "-alltargets -configuration Release";
|
|
|
|
if (xcodebuildHasTenPointFiveSDK())
|
|
args = "-sdk macosx10.5 " + args;
|
|
else
|
|
args = "-sdk macosx " + args;
|
|
|
|
try {
|
|
child_process.execSync("xcodebuild " + args, {stdio: 'inherit'});
|
|
} catch(err) {
|
|
process.exit(1);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
print("Building imagesize 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"]);
|