PageRenderTime 17ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/Tests/Manual/CPPopUpButtonTest/Jakefile

http://github.com/cacaodev/cappuccino
#! | 93 lines | 79 code | 14 blank | 0 comment | 0 complexity | bd04390fe1e562e1ce37891d349a4d68 MD5 | raw file
 1/*
 2 * Jakefile
 3 * CPPopUpButtonTest
 4 *
 5 * Created by You on December 8, 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 ("CPPopUpButtonTest", function(task)
19{
20    task.setBuildIntermediatesPath(FILE.join("Build", "CPPopUpButtonTest.build", configuration));
21    task.setBuildPath(FILE.join("Build", configuration));
22
23    task.setProductName("CPPopUpButtonTest");
24    task.setIdentifier("com.yourcompany.CPPopUpButtonTest");
25    task.setVersion("1.0");
26    task.setAuthor("Your Company");
27    task.setEmail("feedback @nospam@ yourcompany.com");
28    task.setSummary("CPPopUpButtonTest");
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
34    if (configuration === "Debug")
35        task.setCompilerFlags("-DDEBUG -g");
36    else
37        task.setCompilerFlags("-O");
38});
39
40task ("default", ["CPPopUpButtonTest"], function()
41{
42    printResults(configuration);
43});
44
45task ("build", ["default"]);
46
47task ("debug", function()
48{
49    ENV["CONFIGURATION"] = "Debug";
50    JAKE.subjake(["."], "build", ENV);
51});
52
53task ("release", function()
54{
55    ENV["CONFIGURATION"] = "Release";
56    JAKE.subjake(["."], "build", ENV);
57});
58
59task ("run", ["debug"], function()
60{
61    OS.system(["open", FILE.join("Build", "Debug", "CPPopUpButtonTest", "index.html")]);
62});
63
64task ("run-release", ["release"], function()
65{
66    OS.system(["open", FILE.join("Build", "Release", "CPPopUpButtonTest", "index.html")]);
67});
68
69task ("deploy", ["release"], function()
70{
71    FILE.mkdirs(FILE.join("Build", "Deployment", "CPPopUpButtonTest"));
72    OS.system(["press", "-f", FILE.join("Build", "Release", "CPPopUpButtonTest"), FILE.join("Build", "Deployment", "CPPopUpButtonTest")]);
73    printResults("Deployment")
74});
75
76task ("desktop", ["release"], function()
77{
78    FILE.mkdirs(FILE.join("Build", "Desktop", "CPPopUpButtonTest"));
79    require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPPopUpButtonTest"), FILE.join("Build", "Desktop", "CPPopUpButtonTest", "CPPopUpButtonTest.app"));
80    printResults("Desktop")
81});
82
83task ("run-desktop", ["desktop"], function()
84{
85    OS.system([FILE.join("Build", "Desktop", "CPPopUpButtonTest", "CPPopUpButtonTest.app", "Contents", "MacOS", "NativeHost"), "-i"]);
86});
87
88function printResults(configuration)
89{
90    print("----------------------------");
91    print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPPopUpButtonTest"));
92    print("----------------------------");
93}