mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
FILE.exists was being used to test for the existence of the symlink in /Applications, but that doesn't work. The correct way is to use ln -sfh. Note that the -h was missing before, which prevents an existing target symlink from being followed, which is why the symlink would end up inside XcodeCapp.app.
46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
|
|
require("../../common.jake");
|
|
|
|
var OS = require("os"),
|
|
task = require("jake").task,
|
|
stream = require("narwhal/term").stream,
|
|
applicationName = "XcodeCapp.app";
|
|
|
|
task ("build", function()
|
|
{
|
|
if (executableExists("xcodebuild"))
|
|
{
|
|
var args = "-sdk macosx -alltargets -configuration Release",
|
|
supportPath = FILE.join($BUILD_CJS_CAPPUCCINO, "support", applicationName),
|
|
installPath = FILE.join("/", "Applications", applicationName);
|
|
|
|
if (OS.system("xcodebuild " + args))
|
|
OS.exit(1);
|
|
|
|
rm_rf(supportPath);
|
|
FILE.mkdirs(supportPath);
|
|
cp_r(FILE.join("build", "Release", "XcodeCapp.app"), supportPath);
|
|
FILE.chmod(FILE.join(supportPath, "Contents", "MacOS", "XcodeCapp"), 0755);
|
|
|
|
OS.system(["/bin/ln", "-sfh", supportPath, installPath]);
|
|
}
|
|
else
|
|
{
|
|
print("Building " + applicationName + " 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"]);
|