PageRenderTime 29ms CodeModel.GetById 25ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/Tests/Manual/ScrollviewTheming/Jakefile

http://github.com/cacaodev/cappuccino
#! | 94 lines | 80 code | 14 blank | 0 comment | 0 complexity | 758fd6b1a412d74d2fac5591dd9d00bb MD5 | raw file
 1/*
 2 * Jakefile
 3 * ScrollviewTheming
 4 *
 5 * Created by You on September 9, 2010.
 6 * Copyright 2010, Your Company 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 ("ScrollviewTheming", function(task)
19{
20    task.setBuildIntermediatesPath(FILE.join("Build", "ScrollviewTheming.build", configuration));
21    task.setBuildPath(FILE.join("Build", configuration));
22
23    task.setProductName("ScrollviewTheming");
24    task.setIdentifier("com.yourcompany.ScrollviewTheming");
25    task.setVersion("1.0");
26    task.setAuthor("Your Company");
27    task.setEmail("feedback @nospam@ yourcompany.com");
28    task.setSummary("ScrollviewTheming");
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", ["ScrollviewTheming"], 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", "ScrollviewTheming", "index.html")]);
63});
64
65task ("run-release", ["release"], function()
66{
67    OS.system(["open", FILE.join("Build", "Release", "ScrollviewTheming", "index.html")]);
68});
69
70task ("deploy", ["release"], function()
71{
72    FILE.mkdirs(FILE.join("Build", "Deployment", "ScrollviewTheming"));
73    OS.system(["press", "-f", FILE.join("Build", "Release", "ScrollviewTheming"), FILE.join("Build", "Deployment", "ScrollviewTheming")]);
74    printResults("Deployment")
75});
76
77task ("desktop", ["release"], function()
78{
79    FILE.mkdirs(FILE.join("Build", "Desktop", "ScrollviewTheming"));
80    require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "ScrollviewTheming"), FILE.join("Build", "Desktop", "ScrollviewTheming", "ScrollviewTheming.app"));
81    printResults("Desktop")
82});
83
84task ("run-desktop", ["desktop"], function()
85{
86    OS.system([FILE.join("Build", "Desktop", "ScrollviewTheming", "ScrollviewTheming.app", "Contents", "MacOS", "NativeHost"), "-i"]);
87});
88
89function printResults(configuration)
90{
91    print("----------------------------");
92    print(configuration+" app built at path: "+FILE.join("Build", configuration, "ScrollviewTheming"));
93    print("----------------------------");
94}