mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-04 08:06:16 +00:00
- Update clean and clobber targets in Tests/Manual/Jakefile to enforce -mindepth 2 -maxdepth 2 traversal. This accurately purges subsidiary Build directories and Frameworks symlinks without triggering subjake dependency cycles. - Inject explicit clean and clobber overrides into all 150+ subsidiary application Jakefiles. This forces local execution to wipe the top-level Build directory, bypassing applicationtask's default behavior of only targeting configuration-specific intermediate paths. - Harmonizes artifact sweeping across both root-level orchestration and local leaf-level execution.
105 lines
2.9 KiB
JavaScript
105 lines
2.9 KiB
JavaScript
/*
|
|
* Jakefile
|
|
* DataView
|
|
*
|
|
* Created by You on February 12, 2013.
|
|
* Copyright 2013, Your Company All rights reserved.
|
|
*/
|
|
|
|
var ENV = require("system").env,
|
|
FILE = require("file"),
|
|
JAKE = require("jake"),
|
|
task = JAKE.task,
|
|
FileList = JAKE.FileList,
|
|
app = require("cappuccino/jake").app,
|
|
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug",
|
|
OS = require("os");
|
|
|
|
app ("DataView", function(task)
|
|
{
|
|
task.setBuildIntermediatesPath(FILE.join("Build", "DataView.build", configuration));
|
|
task.setBuildPath(FILE.join("Build", configuration));
|
|
|
|
task.setProductName("DataView");
|
|
task.setIdentifier("com.yourcompany.DataView");
|
|
task.setVersion("1.0");
|
|
task.setAuthor("Your Company");
|
|
task.setEmail("feedback @nospam@ yourcompany.com");
|
|
task.setSummary("DataView");
|
|
task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**")));
|
|
task.setResources(new FileList("Resources/**"));
|
|
task.setIndexFilePath("index.html");
|
|
task.setInfoPlistPath("Info.plist");
|
|
task.setNib2CibFlags("-R Resources/");
|
|
|
|
if (configuration === "Debug")
|
|
task.setCompilerFlags("-DDEBUG -g");
|
|
else
|
|
task.setCompilerFlags("-O");
|
|
});
|
|
|
|
task ("default", ["DataView"], function()
|
|
{
|
|
printResults(configuration);
|
|
});
|
|
|
|
task ("build", ["default"]);
|
|
|
|
task ("debug", function()
|
|
{
|
|
ENV["CONFIGURATION"] = "Debug";
|
|
JAKE.subjake(["."], "build", ENV);
|
|
});
|
|
|
|
task ("release", function()
|
|
{
|
|
ENV["CONFIGURATION"] = "Release";
|
|
JAKE.subjake(["."], "build", ENV);
|
|
});
|
|
|
|
task ("run", ["debug"], function()
|
|
{
|
|
OS.system(["open", FILE.join("Build", "Debug", "DataView", "index.html")]);
|
|
});
|
|
|
|
task ("run-release", ["release"], function()
|
|
{
|
|
OS.system(["open", FILE.join("Build", "Release", "DataView", "index.html")]);
|
|
});
|
|
|
|
task ("deploy", ["release"], function()
|
|
{
|
|
FILE.mkdirs(FILE.join("Build", "Deployment", "DataView"));
|
|
OS.system(["press", "-f", FILE.join("Build", "Release", "DataView"), FILE.join("Build", "Deployment", "DataView")]);
|
|
printResults("Deployment")
|
|
});
|
|
|
|
task ("desktop", ["release"], function()
|
|
{
|
|
FILE.mkdirs(FILE.join("Build", "Desktop", "DataView"));
|
|
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "DataView"), FILE.join("Build", "Desktop", "DataView", "DataView.app"));
|
|
printResults("Desktop")
|
|
});
|
|
|
|
task ("run-desktop", ["desktop"], function()
|
|
{
|
|
OS.system([FILE.join("Build", "Desktop", "DataView", "DataView.app", "Contents", "MacOS", "NativeHost"), "-i"]);
|
|
});
|
|
|
|
function printResults(configuration)
|
|
{
|
|
print("----------------------------");
|
|
print(configuration+" app built at path: "+FILE.join("Build", configuration, "DataView"));
|
|
print("----------------------------");
|
|
}
|
|
|
|
task ("clean", function()
|
|
{
|
|
cp.execSync("rm -rf Build", { stdio: "inherit" });
|
|
});
|
|
|
|
task ("clobber", ["clean"], function()
|
|
{
|
|
cp.execSync("rm -rf Frameworks", { stdio: "inherit" });
|
|
});
|