Files
cappuccino/Tests/Manual/CGPath/Jakefile
T
Alexandre Wilhelm b5df5f730b Fixed: CGPath is wrong when creating an arc
Previously when creating a CGPath with an arc, the path was wrong. It added a line when it wasn't necessary and when it was necessary it added a line to a wrong point.
Now CGPath works like in cocoa (If the specified path already contains a subpath, Quartz implicitly adds a line connecting the subpath’s current point to the beginning of the arc. If the path is empty, Quartz creates a new subpath with a starting point set to the starting point of the arc.)

Test app in Tests/Manual/CGPath/AppController.j
2013-05-23 14:07:04 -07:00

99 lines
2.8 KiB
JavaScript

/*
* Jakefile
* CGPath
*
* Created by You on May 23, 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 ("CGPath", function(task)
{
ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks";
if (configuration === "Debug")
ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration);
task.setBuildIntermediatesPath(FILE.join("Build", "CGPath.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("CGPath");
task.setIdentifier("com.yourcompany.CGPath");
task.setVersion("1.0");
task.setAuthor("Your Company");
task.setEmail("feedback @nospam@ yourcompany.com");
task.setSummary("CGPath");
task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**")));
task.setResources(new FileList("Resources/**"));
task.setIndexFilePath("index.html");
task.setInfoPlistPath("Info.plist");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
else
task.setCompilerFlags("-O");
});
task ("default", ["CGPath"], 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", "CGPath", "index.html")]);
});
task ("run-release", ["release"], function()
{
OS.system(["open", FILE.join("Build", "Release", "CGPath", "index.html")]);
});
task ("deploy", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Deployment", "CGPath"));
OS.system(["press", "-f", FILE.join("Build", "Release", "CGPath"), FILE.join("Build", "Deployment", "CGPath")]);
printResults("Deployment")
});
task ("desktop", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Desktop", "CGPath"));
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CGPath"), FILE.join("Build", "Desktop", "CGPath", "CGPath.app"));
printResults("Desktop")
});
task ("run-desktop", ["desktop"], function()
{
OS.system([FILE.join("Build", "Desktop", "CGPath", "CGPath.app", "Contents", "MacOS", "NativeHost"), "-i"]);
});
function printResults(configuration)
{
print("----------------------------");
print(configuration+" app built at path: "+FILE.join("Build", configuration, "CGPath"));
print("----------------------------");
}