PageRenderTime 18ms CodeModel.GetById 10ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Tests/Manual/CPTabViewNib/Jakefile

http://github.com/cacaodev/cappuccino
#! | 94 lines | 80 code | 14 blank | 0 comment | 0 complexity | 3ee22e5e332cf550a8c52a735dc54e41 MD5 | raw file
 1/*
 2 * Jakefile
 3 * CPTabViewNib
 4 *
 5 * Created by Alexander Ljungberg on November 5, 2010.
 6 * Copyright 2010, WireLoad, LLC All rights reserved.
 7 */
 8
 9var ENV = require("system").env,
10    FILE = require("file"),
11    JAKE = require("jake"),
12    task = JAKE.task,
13    FileList = JAKE.FileList,
14    app = require("cappuccino/jake").app,
15    configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug",
16    OS = require("os");
17
18app ("CPTabViewNib", function(task)
19{
20    task.setBuildIntermediatesPath(FILE.join("Build", "CPTabViewNib.build", configuration));
21    task.setBuildPath(FILE.join("Build", configuration));
22
23    task.setProductName("CPTabViewNib");
24    task.setIdentifier("com.yourcompany.CPTabViewNib");
25    task.setVersion("1.0");
26    task.setAuthor("WireLoad, LLC");
27    task.setEmail("feedback @nospam@ yourcompany.com");
28    task.setSummary("CPTabViewNib");
29    task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**")));
30    task.setResources(new FileList("Resources/**"));
31    task.setIndexFilePath("index.html");
32    task.setInfoPlistPath("Info.plist");
33    task.setNib2CibFlags("-R Resources/");
34
35    if (configuration === "Debug")
36        task.setCompilerFlags("-DDEBUG -g");
37    else
38        task.setCompilerFlags("-O");
39});
40
41task ("default", ["CPTabViewNib"], function()
42{
43    printResults(configuration);
44});
45
46task ("build", ["default"]);
47
48task ("debug", function()
49{
50    ENV["CONFIGURATION"] = "Debug";
51    JAKE.subjake(["."], "build", ENV);
52});
53
54task ("release", function()
55{
56    ENV["CONFIGURATION"] = "Release";
57    JAKE.subjake(["."], "build", ENV);
58});
59
60task ("run", ["debug"], function()
61{
62    OS.system(["open", FILE.join("Build", "Debug", "CPTabViewNib", "index.html")]);
63});
64
65task ("run-release", ["release"], function()
66{
67    OS.system(["open", FILE.join("Build", "Release", "CPTabViewNib", "index.html")]);
68});
69
70task ("deploy", ["release"], function()
71{
72    FILE.mkdirs(FILE.join("Build", "Deployment", "CPTabViewNib"));
73    OS.system(["press", "-f", FILE.join("Build", "Release", "CPTabViewNib"), FILE.join("Build", "Deployment", "CPTabViewNib")]);
74    printResults("Deployment")
75});
76
77task ("desktop", ["release"], function()
78{
79    FILE.mkdirs(FILE.join("Build", "Desktop", "CPTabViewNib"));
80    require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPTabViewNib"), FILE.join("Build", "Desktop", "CPTabViewNib", "CPTabViewNib.app"));
81    printResults("Desktop")
82});
83
84task ("run-desktop", ["desktop"], function()
85{
86    OS.system([FILE.join("Build", "Desktop", "CPTabViewNib", "CPTabViewNib.app", "Contents", "MacOS", "NativeHost"), "-i"]);
87});
88
89function printResults(configuration)
90{
91    print("----------------------------");
92    print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPTabViewNib"));
93    print("----------------------------");
94}