mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-27 22:17:03 +00:00
- showRelativeToRect:ofView:preferredEdge: must take provide a view, and if the rect is empty it defaults to the view's bounds. - If If showRelativeToRect is called while a popover is closing, it is ignored. - If showRelativeToRect is called when the popover is already open, it should just reposition the existing popover. - close should NOT consult the delegate's popoverShouldClose. Only performClose should do that. - If a window is closed, all of its popovers immediately order out. - Updated demo app to cover more cases. - Note that child popovers are currently not supported, as this requires support for child windows in CPWindow.
95 lines
2.7 KiB
JavaScript
95 lines
2.7 KiB
JavaScript
/*
|
|
* Jakefile
|
|
* CPPopover
|
|
*
|
|
* Created by You on March 29, 2012.
|
|
* Copyright 2012, 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 ("CPPopover", function(task)
|
|
{
|
|
task.setBuildIntermediatesPath(FILE.join("Build", "CPPopover.build", configuration));
|
|
task.setBuildPath(FILE.join("Build", configuration));
|
|
|
|
task.setProductName("CPPopover");
|
|
task.setIdentifier("com.yourcompany.CPPopover");
|
|
task.setVersion("1.0");
|
|
task.setAuthor("Your Company");
|
|
task.setEmail("feedback @nospam@ yourcompany.com");
|
|
task.setSummary("CPPopover");
|
|
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", ["CPPopover"], 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", "CPPopover", "index.html")]);
|
|
});
|
|
|
|
task ("run-release", ["release"], function()
|
|
{
|
|
OS.system(["open", FILE.join("Build", "Release", "CPPopover", "index.html")]);
|
|
});
|
|
|
|
task ("deploy", ["release"], function()
|
|
{
|
|
FILE.mkdirs(FILE.join("Build", "Deployment", "CPPopover"));
|
|
OS.system(["press", "-f", FILE.join("Build", "Release", "CPPopover"), FILE.join("Build", "Deployment", "CPPopover")]);
|
|
printResults("Deployment")
|
|
});
|
|
|
|
task ("desktop", ["release"], function()
|
|
{
|
|
FILE.mkdirs(FILE.join("Build", "Desktop", "CPPopover"));
|
|
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPPopover"), FILE.join("Build", "Desktop", "CPPopover", "CPPopover.app"));
|
|
printResults("Desktop")
|
|
});
|
|
|
|
task ("run-desktop", ["desktop"], function()
|
|
{
|
|
OS.system([FILE.join("Build", "Desktop", "CPPopover", "CPPopover.app", "Contents", "MacOS", "NativeHost"), "-i"]);
|
|
});
|
|
|
|
function printResults(configuration)
|
|
{
|
|
print("----------------------------");
|
|
print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPPopover"));
|
|
print("----------------------------");
|
|
}
|