mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Some jake build tasks test whether the 10.5 SDK is present, and if so, they build using it. However, the path to the SDK is not necessarily consistent across installations, so testing for path existence is not the best way to check whether the SDK is present. Doing it that way caused build failures on machines with both Xcode 3 and Xcode 4 installed. In this fix, we now ask xcodebuild what SDKs are present, and only fall back on the path existence test if the local copy of xcodebuild does not support listing SDKs (as is the case for old versions of xcodebuild).
46 lines
1.0 KiB
JavaScript
46 lines
1.0 KiB
JavaScript
|
|
require("../../common.jake");
|
|
|
|
var OS = require("os");
|
|
var task = require("jake").task
|
|
var stream = require("narwhal/term").stream;
|
|
|
|
task ("build", function()
|
|
{
|
|
if (executableExists("xcodebuild"))
|
|
{
|
|
var args = "-alltargets -configuration Release";
|
|
|
|
if (xcodebuildHasTenPointFiveSDK())
|
|
args = "-sdk macosx10.5 " + args;
|
|
|
|
else
|
|
args = "-sdk macosx " + args;
|
|
|
|
if (OS.system("xcodebuild " + args))
|
|
OS.exit(1);
|
|
|
|
rm_rf(FILE.join($BUILD_CJS_CAPPUCCINO, "support", "NativeHost.app"));
|
|
FILE.mkdirs(FILE.join($BUILD_CJS_CAPPUCCINO, "support"))
|
|
cp_r(FILE.join("build", "Release", "NativeHost.app"), FILE.join($BUILD_CJS_CAPPUCCINO, "support", "NativeHost.app"));
|
|
}
|
|
else
|
|
{
|
|
print("Building NativeHost requires Xcode.");
|
|
}
|
|
});
|
|
|
|
task ("clean", function()
|
|
{
|
|
if (OS.system("xcodebuild clean"))
|
|
OS.exit(1);
|
|
});
|
|
|
|
task ("clobber", function()
|
|
{
|
|
if (OS.system("xcodebuild clean"))
|
|
OS.exit(1);
|
|
});
|
|
|
|
task ("default", ["build"]);
|