From 53784f0e10ab8c8a03498138ce950bc8b30cc3c2 Mon Sep 17 00:00:00 2001 From: David Richardson Date: Tue, 8 Sep 2026 19:08:43 -0600 Subject: [PATCH] Migrate subsidiary test Jakefiles to @objj/jake toolchain Applies the transformation script across all applications in the Tests/Manual directory to eliminate Narwhal-era dependencies and establish compatibility with the modern Node-based runner. * Removes explicit `require("jake")` calls in favor of the injected JAKE global. * Replaces legacy `cappuccino/jake` application instantiation with the `CAPPUCCINO.Jake.applicationtask.app` hook. * Substitutes archaic `system`, `file`, and `os` API calls with native Node `child_process`, `fs`, and `path` modules. * Corrects package paths for nativehost deployment targets. --- .../Jakefile | 38 ++++++------ .../ArrayControllerRemovingFirstTest/Jakefile | 38 ++++++------ Tests/Manual/ArrayControllerTest/Jakefile | 38 ++++++------ Tests/Manual/AttachedSheet2Test/Jakefile | 40 ++++++------- Tests/Manual/BindingContentArrayTest/Jakefile | 38 ++++++------ Tests/Manual/CGCanvasContextTest/Jakefile | 38 ++++++------ Tests/Manual/CGPathTest/Jakefile | 40 ++++++------- Tests/Manual/CPAlertTest/Jakefile | 38 ++++++------ .../Jakefile | 38 ++++++------ Tests/Manual/CPAnimationContextTest/Jakefile | 60 +++++++++---------- Tests/Manual/CPAnimationTest/Jakefile | 60 +++++++++---------- Tests/Manual/CPBinderEchoBug/Jakefile | 38 ++++++------ Tests/Manual/CPBoxTest/Jakefile | 38 ++++++------ Tests/Manual/CPBrowserTest/Jakefile | 32 +++++----- Tests/Manual/CPButtonBarTest/Jakefile | 32 +++++----- .../Manual/CPByteCountFormatterTest/Jakefile | 38 ++++++------ Tests/Manual/CPCollectionViewNibTest/Jakefile | 38 ++++++------ .../CPColorCPImageDescriptionTest/Jakefile | 38 ++++++------ Tests/Manual/CPColorWellBindingsTest/Jakefile | 38 ++++++------ Tests/Manual/CPComboBoxTest/Jakefile | 38 ++++++------ Tests/Manual/CPControlSizeTest/Jakefile | 60 +++++++++---------- Tests/Manual/CPCursorTest/Jakefile | 8 +-- Tests/Manual/CPDateFormatterTest/Jakefile | 38 ++++++------ Tests/Manual/CPDatePickerTest/Jakefile | 38 ++++++------ .../CPDictionaryControllerTest/Jakefile | 38 ++++++------ Tests/Manual/CPFormatterTest/Jakefile | 38 ++++++------ .../Jakefile | 54 ++++++++--------- .../CPImageViewAlignmentScaling/Jakefile | 38 ++++++------ Tests/Manual/CPImageViewTest/Jakefile | 38 ++++++------ Tests/Manual/CPImageViewbindingsTest/Jakefile | 38 ++++++------ .../CPLanguageModelChatbotTest/Jakefile | 38 ++++++------ Tests/Manual/CPLevelIndicator/Jakefile | 38 ++++++------ Tests/Manual/CPLevelIndicatorTest/Jakefile | 38 ++++++------ Tests/Manual/CPLocalizationTest/Jakefile | 60 +++++++++---------- Tests/Manual/CPMarkdownParserTest/Jakefile | 38 ++++++------ Tests/Manual/CPMenuCALayerTest/Jakefile | 38 ++++++------ .../Manual/CPMenuEnabledBindingsTest/Jakefile | 38 ++++++------ .../Manual/CPMenuKeyEquivalentsTest/Jakefile | 38 ++++++------ Tests/Manual/CPMenuRemoveAllTest/Jakefile | 38 ++++++------ .../Jakefile | 38 ++++++------ Tests/Manual/CPMenuTest/Jakefile | 38 ++++++------ Tests/Manual/CPOutlineViewCibTest/Jakefile | 38 ++++++------ Tests/Manual/CPOutlineViewTest/Jakefile | 8 +-- .../CPOutlineViewViewBasedCibTest/Jakefile | 38 ++++++------ Tests/Manual/CPPanelTest/Jakefile | 60 +++++++++---------- Tests/Manual/CPPlatformWindow/Jakefile | 60 +++++++++---------- .../Manual/CPPlattformWindowMinSize/Jakefile | 38 ++++++------ .../Manual/CPPopUpButtonBindingsTest/Jakefile | 38 ++++++------ Tests/Manual/CPPopUpButtonTest/Jakefile | 38 ++++++------ Tests/Manual/CPPopoverTest/Jakefile | 38 ++++++------ .../Manual/CPPredicateEditorCibTest/Jakefile | 38 ++++++------ Tests/Manual/CPProgressIndicatorTest/Jakefile | 38 ++++++------ .../CPPropertyListSerializationTest/Jakefile | 38 ++++++------ Tests/Manual/CPRadioBindingsTest/Jakefile | 38 ++++++------ Tests/Manual/CPRuleEditorCibTest/Jakefile | 38 ++++++------ Tests/Manual/CPRuleEditorTest/Jakefile | 38 ++++++------ Tests/Manual/CPScrollView2Test/Jakefile | 38 ++++++------ .../CPSearchFieldPredicateBinding/Jakefile | 54 ++++++++--------- Tests/Manual/CPSearchFieldTest/Jakefile | 38 ++++++------ .../CPSegmentedControlBindingsTest/Jakefile | 38 ++++++------ Tests/Manual/CPSegmentedControlTest/Jakefile | 38 ++++++------ Tests/Manual/CPSoundTest/Jakefile | 38 ++++++------ Tests/Manual/CPSplitViewDividerTest/Jakefile | 60 +++++++++---------- Tests/Manual/CPSplitViewTest/Jakefile | 38 ++++++------ Tests/Manual/CPStepperBindingsTest/Jakefile | 38 ++++++------ Tests/Manual/CPStepperNibTest/Jakefile | 38 ++++++------ Tests/Manual/CPTabView2Test/Jakefile | 38 ++++++------ Tests/Manual/CPTabViewBindingsTest/Jakefile | 60 +++++++++---------- Tests/Manual/CPTabViewNibTest/Jakefile | 38 ++++++------ .../Manual/CPTableViewGroupRowsTest/Jakefile | 38 ++++++------ .../CPTextFieldEditingStyleTest/Jakefile | 60 +++++++++---------- .../Manual/CPTextFieldMovementsTest/Jakefile | 60 +++++++++---------- .../Manual/CPTextFieldMultiLineTest/Jakefile | 60 +++++++++---------- Tests/Manual/CPTextFieldTest/Jakefile | 38 ++++++------ Tests/Manual/CPTextViewCibTest/Jakefile | 60 +++++++++---------- .../Jakefile | 54 ++++++++--------- Tests/Manual/CPTimeZoneTest/Jakefile | 38 ++++++------ Tests/Manual/CPTokenFieldTest/Jakefile | 38 ++++++------ Tests/Manual/CPToolTipTest/Jakefile | 38 ++++++------ Tests/Manual/CPToolbarTest/Jakefile | 38 ++++++------ Tests/Manual/CPTreeControllerTest/Jakefile | 38 ++++++------ .../Manual/CPURLConnectionAsyncTest/Jakefile | 38 ++++++------ .../CPURLConnectionSynchronousTest/Jakefile | 38 ++++++------ .../CPUserDefaultsControllerTest/Jakefile | 38 ++++++------ Tests/Manual/CPUserDefaultsTest/Jakefile | 38 ++++++------ Tests/Manual/CPUserNotificationTest/Jakefile | 60 +++++++++---------- Tests/Manual/CPViewControllerTest/Jakefile | 60 +++++++++---------- Tests/Manual/CPVisualEffectViewTest/Jakefile | 60 +++++++++---------- Tests/Manual/CPWebViewTest/Jakefile | 38 ++++++------ Tests/Manual/CPWebViewTest2/Jakefile | 38 ++++++------ Tests/Manual/CPWindowLiveResizeTest/Jakefile | 54 ++++++++--------- Tests/Manual/CPWindowMovableTest/Jakefile | 38 ++++++------ Tests/Manual/CPWindowResizeStyleTest/Jakefile | 38 ++++++------ Tests/Manual/ChildWindowsTest/Jakefile | 38 ++++++------ .../ContinuouslyUpdatesValueBinding/Jakefile | 38 ++++++------ Tests/Manual/CopyAndPasteTest/Jakefile | 40 ++++++------- Tests/Manual/CrossOriginTest/Jakefile | 60 +++++++++---------- Tests/Manual/FF4096Test/Jakefile | 38 ++++++------ Tests/Manual/FontEnhancementTest/Jakefile | 38 ++++++------ Tests/Manual/KeyEquivalentsTest/Jakefile | 38 ++++++------ Tests/Manual/KeyViewLoopTest/Jakefile | 38 ++++++------ .../Jakefile | 54 ++++++++--------- Tests/Manual/LayoutTest/Jakefile | 38 ++++++------ .../Manual/LoadDynamicFrameworksTest/Jakefile | 38 ++++++------ Tests/Manual/LoadTimeTest/Jakefile | 8 +-- Tests/Manual/LongBindingsTest/Jakefile | 38 ++++++------ Tests/Manual/MobileTest/Jakefile | 54 ++++++++--------- .../Manual/MultipleValueBindingsTest/Jakefile | 38 ++++++------ Tests/Manual/NSBoxTest/Jakefile | 38 ++++++------ Tests/Manual/NSBrowserTest/Jakefile | 38 ++++++------ Tests/Manual/NewTextFieldBezelTest/Jakefile | 38 ++++++------ Tests/Manual/Nib2CibAlignmentTest/Jakefile | 38 ++++++------ .../Nib2CibBaselineAlignementTest/Jakefile | 38 ++++++------ .../Manual/Nib2CibSubviewsOrderTest/Jakefile | 54 ++++++++--------- Tests/Manual/NibAppRemixedTest/Jakefile | 38 ++++++------ Tests/Manual/PatternFillTest/Jakefile | 38 ++++++------ Tests/Manual/PopUpButtonEscTest/Jakefile | 40 ++++++------- Tests/Manual/PredicateWithFormatTest/Jakefile | 38 ++++++------ .../Jakefile | 38 ++++++------ Tests/Manual/Scaling2Test/Jakefile | 54 ++++++++--------- Tests/Manual/ScalingTest/Jakefile | 40 ++++++------- Tests/Manual/ScrollviewThemingTest/Jakefile | 38 ++++++------ Tests/Manual/SizeToFitTest/Jakefile | 38 ++++++------ Tests/Manual/SmartFoldersTest/Jakefile | 38 ++++++------ Tests/Manual/ThemeKitchenSinkTest/Jakefile | 60 +++++++++---------- Tests/Manual/TrackingAreaTest/Jakefile | 60 +++++++++---------- .../UndoRedoWithMenuUpdateTest/Jakefile | 38 ++++++------ Tests/Manual/UserlandNSTest/Jakefile | 38 ++++++------ Tests/Manual/WindowSheetOrderTest/Jakefile | 54 ++++++++--------- .../layoutEphemeralSubviewTest/Jakefile | 38 ++++++------ .../Manual/performKeyEquivalentTest/Jakefile | 38 ++++++------ 131 files changed, 2713 insertions(+), 2713 deletions(-) diff --git a/Tests/Manual/ArrayControllerInitialSelectionTest/Jakefile b/Tests/Manual/ArrayControllerInitialSelectionTest/Jakefile index a0e64eac4..80742c5d7 100644 --- a/Tests/Manual/ArrayControllerInitialSelectionTest/Jakefile +++ b/Tests/Manual/ArrayControllerInitialSelectionTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("ArrayControllerInitialSelectionTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "ArrayControllerInitialSelectionTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "ArrayControllerInitialSelectionTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("ArrayControllerInitialSelectionTest"); task.setIdentifier("com.yourcompany.ArrayControllerInitialSelectionTest"); @@ -26,7 +26,7 @@ app ("ArrayControllerInitialSelectionTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("ArrayControllerInitialSelectionTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "ArrayControllerInitialSelectionTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "ArrayControllerInitialSelectionTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "ArrayControllerInitialSelectionTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "ArrayControllerInitialSelectionTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "ArrayControllerInitialSelectionTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "ArrayControllerInitialSelectionTest"), FILE.join("Build", "Deployment", "ArrayControllerInitialSelectionTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "ArrayControllerInitialSelectionTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "ArrayControllerInitialSelectionTest"), path.join("Build", "Deployment", "ArrayControllerInitialSelectionTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "ArrayControllerInitialSelectionTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "ArrayControllerInitialSelectionTest"), FILE.join("Build", "Desktop", "ArrayControllerInitialSelectionTest", "ArrayControllerInitialSelectionTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "ArrayControllerInitialSelectionTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "ArrayControllerInitialSelectionTest"), path.join("Build", "Desktop", "ArrayControllerInitialSelectionTest", "ArrayControllerInitialSelectionTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "ArrayControllerInitialSelectionTest", "ArrayControllerInitialSelectionTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "ArrayControllerInitialSelectionTest", "ArrayControllerInitialSelectionTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "ArrayControllerInitialSelectionTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "ArrayControllerInitialSelectionTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/ArrayControllerRemovingFirstTest/Jakefile b/Tests/Manual/ArrayControllerRemovingFirstTest/Jakefile index 6f4a90273..3b1d49d4b 100644 --- a/Tests/Manual/ArrayControllerRemovingFirstTest/Jakefile +++ b/Tests/Manual/ArrayControllerRemovingFirstTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("ArrayControllerRemovingFirstTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "ArrayControllerRemovingFirstTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "ArrayControllerRemovingFirstTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("ArrayControllerRemovingFirstTest"); task.setIdentifier("com.yourcompany.ArrayControllerRemovingFirstTest"); @@ -26,7 +26,7 @@ app ("ArrayControllerRemovingFirstTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("ArrayControllerRemovingFirstTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "ArrayControllerRemovingFirstTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "ArrayControllerRemovingFirstTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "ArrayControllerRemovingFirstTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "ArrayControllerRemovingFirstTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "ArrayControllerRemovingFirstTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "ArrayControllerRemovingFirstTest"), FILE.join("Build", "Deployment", "ArrayControllerRemovingFirstTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "ArrayControllerRemovingFirstTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "ArrayControllerRemovingFirstTest"), path.join("Build", "Deployment", "ArrayControllerRemovingFirstTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "ArrayControllerRemovingFirstTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "ArrayControllerRemovingFirstTest"), FILE.join("Build", "Desktop", "ArrayControllerRemovingFirstTest", "ArrayControllerRemovingFirstTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "ArrayControllerRemovingFirstTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "ArrayControllerRemovingFirstTest"), path.join("Build", "Desktop", "ArrayControllerRemovingFirstTest", "ArrayControllerRemovingFirstTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "ArrayControllerRemovingFirstTest", "ArrayControllerRemovingFirstTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "ArrayControllerRemovingFirstTest", "ArrayControllerRemovingFirstTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "ArrayControllerRemovingFirstTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "ArrayControllerRemovingFirstTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/ArrayControllerTest/Jakefile b/Tests/Manual/ArrayControllerTest/Jakefile index 61b479bbf..4cfff7788 100644 --- a/Tests/Manual/ArrayControllerTest/Jakefile +++ b/Tests/Manual/ArrayControllerTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, WireLoad All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("ArrayControllerTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "ArrayControllerTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "ArrayControllerTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("ArrayControllerTest"); task.setIdentifier("com.yourcompany.ArrayControllerTest"); @@ -26,7 +26,7 @@ app ("ArrayControllerTest", function(task) task.setAuthor("WireLoad"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("ArrayControllerTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "ArrayControllerTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "ArrayControllerTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "ArrayControllerTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "ArrayControllerTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "ArrayControllerTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "ArrayControllerTest"), FILE.join("Build", "Deployment", "ArrayControllerTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "ArrayControllerTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "ArrayControllerTest"), path.join("Build", "Deployment", "ArrayControllerTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "ArrayControllerTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "ArrayControllerTest"), FILE.join("Build", "Desktop", "ArrayControllerTest", "ArrayControllerTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "ArrayControllerTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "ArrayControllerTest"), path.join("Build", "Desktop", "ArrayControllerTest", "ArrayControllerTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "ArrayControllerTest", "ArrayControllerTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "ArrayControllerTest", "ArrayControllerTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "ArrayControllerTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "ArrayControllerTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/AttachedSheet2Test/Jakefile b/Tests/Manual/AttachedSheet2Test/Jakefile index 38d158db9..4f6aabc61 100644 --- a/Tests/Manual/AttachedSheet2Test/Jakefile +++ b/Tests/Manual/AttachedSheet2Test/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, gomockingbird.com All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("AttachedSheet2Test", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "AttachedSheet2Test.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "AttachedSheet2Test.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("AttachedSheet2Test"); task.setIdentifier("com.gomockingbird.AttachedSheet2Test"); @@ -26,7 +26,7 @@ app ("AttachedSheet2Test", function(task) task.setAuthor("Saikat Chakrabarti and Sheena Pakanati"); task.setEmail("contact @nospam@ gomockingbird.com"); task.setSummary("AttachedSheet2Test"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/*")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -39,9 +39,9 @@ app ("AttachedSheet2Test", function(task) function printResults(configuration) { - print("----------------------------") - print(configuration+" app built at path: "+FILE.join("Build", configuration, "AttachedSheet2Test")); - print("----------------------------") + console.log("----------------------------") + console.log(configuration+" app built at path: "+path.join("Build", configuration, "AttachedSheet2Test")); + console.log("----------------------------") } task ("default", ["AttachedSheet2Test"], function() @@ -65,29 +65,29 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "AttachedSheet2Test", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "AttachedSheet2Test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "AttachedSheet2Test", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "AttachedSheet2Test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "AttachedSheet2Test")); - OS.system(["press", "-f", FILE.join("Build", "Release", "AttachedSheet2Test"), FILE.join("Build", "Deployment", "AttachedSheet2Test")]); + fs.mkdirSync(path.join("Build", "Deployment", "AttachedSheet2Test"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "AttachedSheet2Test"), path.join("Build", "Deployment", "AttachedSheet2Test")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("press", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Press", "AttachedSheet2Test")); - OS.system(["press", "-f", FILE.join("Build", "Release", "AttachedSheet2Test"), FILE.join("Build", "Press", "AttachedSheet2Test")]); + fs.mkdirSync(path.join("Build", "Press", "AttachedSheet2Test"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "AttachedSheet2Test"), path.join("Build", "Press", "AttachedSheet2Test")].join(" "), { stdio: "inherit" }); }); task ("flatten", ["press"], function() { - FILE.mkdirs(FILE.join("Build", "Flatten", "AttachedSheet2Test")); - OS.system(["flatten", "-f", "--verbose", "--split", "3", "-c", "closure-compiler", FILE.join("Build", "Press", "AttachedSheet2Test"), FILE.join("Build", "Flatten", "AttachedSheet2Test")]); + fs.mkdirSync(path.join("Build", "Flatten", "AttachedSheet2Test"), { recursive: true }); + cp.execSync(["flatten", "-f", "--verbose", "--split", "3", "-c", "closure-compiler", path.join("Build", "Press", "AttachedSheet2Test"), path.join("Build", "Flatten", "AttachedSheet2Test")].join(" "), { stdio: "inherit" }); }); diff --git a/Tests/Manual/BindingContentArrayTest/Jakefile b/Tests/Manual/BindingContentArrayTest/Jakefile index a5d4665b0..3a0b50f5e 100644 --- a/Tests/Manual/BindingContentArrayTest/Jakefile +++ b/Tests/Manual/BindingContentArrayTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("BindingContentArrayTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "BindingContentArrayTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "BindingContentArrayTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("BindingContentArrayTest"); task.setIdentifier("com.aparajita.BindingContentArrayTest"); @@ -26,7 +26,7 @@ app ("BindingContentArrayTest", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("BindingContentArrayTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "BindingContentArrayTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "BindingContentArrayTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "BindingContentArrayTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "BindingContentArrayTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "BindingContentArrayTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "BindingContentArrayTest"), FILE.join("Build", "Deployment", "BindingContentArrayTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "BindingContentArrayTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "BindingContentArrayTest"), path.join("Build", "Deployment", "BindingContentArrayTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "BindingContentArrayTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "BindingContentArrayTest"), FILE.join("Build", "Desktop", "BindingContentArrayTest", "BindingContentArrayTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "BindingContentArrayTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "BindingContentArrayTest"), path.join("Build", "Desktop", "BindingContentArrayTest", "BindingContentArrayTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "BindingContentArrayTest", "BindingContentArrayTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "BindingContentArrayTest", "BindingContentArrayTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "BindingContentArrayTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "BindingContentArrayTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CGCanvasContextTest/Jakefile b/Tests/Manual/CGCanvasContextTest/Jakefile index 1c978e827..e99120061 100644 --- a/Tests/Manual/CGCanvasContextTest/Jakefile +++ b/Tests/Manual/CGCanvasContextTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2013, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CGCanvasContextTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CGCanvasContextTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CGCanvasContextTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CGCanvasContextTest"); task.setIdentifier("com.yourcompany.CGCanvasContextTest"); @@ -26,7 +26,7 @@ app ("CGCanvasContextTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CGCanvasContextTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CGCanvasContextTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CGCanvasContextTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CGCanvasContextTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CGCanvasContextTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CGCanvasContextTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CGCanvasContextTest"), FILE.join("Build", "Deployment", "CGCanvasContextTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CGCanvasContextTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CGCanvasContextTest"), path.join("Build", "Deployment", "CGCanvasContextTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CGCanvasContextTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CGCanvasContextTest"), FILE.join("Build", "Desktop", "CGCanvasContextTest", "CGCanvasContextTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CGCanvasContextTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CGCanvasContextTest"), path.join("Build", "Desktop", "CGCanvasContextTest", "CGCanvasContextTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CGCanvasContextTest", "CGCanvasContextTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CGCanvasContextTest", "CGCanvasContextTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CGCanvasContextTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CGCanvasContextTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CGPathTest/Jakefile b/Tests/Manual/CGPathTest/Jakefile index c326713b9..c103a3db0 100644 --- a/Tests/Manual/CGPathTest/Jakefile +++ b/Tests/Manual/CGPathTest/Jakefile @@ -6,24 +6,24 @@ * Copyright 2013, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CGPathTest", function(task) { ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CGPathTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CGPathTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CGPathTest"); task.setIdentifier("com.yourcompany.CGPathTest"); @@ -31,7 +31,7 @@ app ("CGPathTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CGPathTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -63,36 +63,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CGPathTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CGPathTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CGPathTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CGPathTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CGPathTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CGPathTest"), FILE.join("Build", "Deployment", "CGPathTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CGPathTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CGPathTest"), path.join("Build", "Deployment", "CGPathTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CGPathTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CGPathTest"), FILE.join("Build", "Desktop", "CGPathTest", "CGPathTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CGPathTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CGPathTest"), path.join("Build", "Desktop", "CGPathTest", "CGPathTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CGPathTest", "CGPathTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CGPathTest", "CGPathTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CGPathTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CGPathTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPAlertTest/Jakefile b/Tests/Manual/CPAlertTest/Jakefile index a776e282b..8af8084fe 100644 --- a/Tests/Manual/CPAlertTest/Jakefile +++ b/Tests/Manual/CPAlertTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, WireLoad, LLC All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPAlertTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPAlertTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPAlertTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPAlertTest"); task.setIdentifier("com.yourcompany.CPAlertTest"); @@ -26,7 +26,7 @@ app ("CPAlertTest", function(task) task.setAuthor("WireLoad, LLC"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPAlertTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPAlertTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPAlertTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPAlertTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPAlertTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPAlertTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPAlertTest"), FILE.join("Build", "Deployment", "CPAlertTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPAlertTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPAlertTest"), path.join("Build", "Deployment", "CPAlertTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPAlertTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPAlertTest"), FILE.join("Build", "Desktop", "CPAlertTest", "CPAlertTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPAlertTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPAlertTest"), path.join("Build", "Desktop", "CPAlertTest", "CPAlertTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPAlertTest", "CPAlertTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPAlertTest", "CPAlertTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPAlertTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPAlertTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPAnimatablePropertyContainerTest/Jakefile b/Tests/Manual/CPAnimatablePropertyContainerTest/Jakefile index 142cbe5ad..6322c356e 100644 --- a/Tests/Manual/CPAnimatablePropertyContainerTest/Jakefile +++ b/Tests/Manual/CPAnimatablePropertyContainerTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPAnimatablePropertyContainerTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPAnimatablePropertyContainerTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPAnimatablePropertyContainerTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPAnimatablePropertyContainerTest"); task.setIdentifier("com.yourcompany.CPAnimatablePropertyContainerTest"); @@ -26,7 +26,7 @@ app ("CPAnimatablePropertyContainerTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPAnimatablePropertyContainerTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPAnimatablePropertyContainerTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPAnimatablePropertyContainerTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPAnimatablePropertyContainerTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPAnimatablePropertyContainerTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPAnimatablePropertyContainerTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPAnimatablePropertyContainerTest"), FILE.join("Build", "Deployment", "CPAnimatablePropertyContainerTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPAnimatablePropertyContainerTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPAnimatablePropertyContainerTest"), path.join("Build", "Deployment", "CPAnimatablePropertyContainerTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPAnimatablePropertyContainerTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPAnimatablePropertyContainerTest"), FILE.join("Build", "Desktop", "CPAnimatablePropertyContainerTest", "CPAnimatablePropertyContainerTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPAnimatablePropertyContainerTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPAnimatablePropertyContainerTest"), path.join("Build", "Desktop", "CPAnimatablePropertyContainerTest", "CPAnimatablePropertyContainerTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPAnimatablePropertyContainerTest", "CPAnimatablePropertyContainerTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPAnimatablePropertyContainerTest", "CPAnimatablePropertyContainerTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPAnimatablePropertyContainerTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPAnimatablePropertyContainerTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPAnimationContextTest/Jakefile b/Tests/Manual/CPAnimationContextTest/Jakefile index c3db5628c..8a53ad02e 100644 --- a/Tests/Manual/CPAnimationContextTest/Jakefile +++ b/Tests/Manual/CPAnimationContextTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2017, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPAnimationContextTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPAnimationContextTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPAnimationContextTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPAnimationContextTest"); task.setIdentifier("com.yourcompany.CPAnimationContextTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPAnimationContextTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPAnimationContextTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPAnimationContextTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPAnimationContextTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPAnimationContextTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPAnimationTest/Jakefile b/Tests/Manual/CPAnimationTest/Jakefile index a7cfaae61..1e727f3af 100644 --- a/Tests/Manual/CPAnimationTest/Jakefile +++ b/Tests/Manual/CPAnimationTest/Jakefile @@ -1,9 +1,9 @@ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPAnimationTest"; @@ -13,10 +13,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPAnimationTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPAnimationTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPAnimationTest"); task.setIdentifier("com.yourcompany.CPAnimationTest"); @@ -24,7 +24,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPAnimationTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,45 +59,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPAnimationTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPAnimationTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPAnimationTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPAnimationTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -106,14 +106,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (ENV["CONFIGURATION"] === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -121,17 +121,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); + addBundleFileSizes(path.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -141,34 +141,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPBinderEchoBug/Jakefile b/Tests/Manual/CPBinderEchoBug/Jakefile index 69d96ac73..d7b0d6ad0 100644 --- a/Tests/Manual/CPBinderEchoBug/Jakefile +++ b/Tests/Manual/CPBinderEchoBug/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPBinderEchoBug", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPBinderEchoBug.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPBinderEchoBug.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPBinderEchoBug"); task.setIdentifier("com.yourcompany.CPBinderEchoBug"); @@ -26,7 +26,7 @@ app ("CPBinderEchoBug", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPBinderEchoBug"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPBinderEchoBug", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPBinderEchoBug", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPBinderEchoBug", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPBinderEchoBug", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPBinderEchoBug")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPBinderEchoBug"), FILE.join("Build", "Deployment", "CPBinderEchoBug")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPBinderEchoBug"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPBinderEchoBug"), path.join("Build", "Deployment", "CPBinderEchoBug")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPBinderEchoBug")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPBinderEchoBug"), FILE.join("Build", "Desktop", "CPBinderEchoBug", "CPBinderEchoBug.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPBinderEchoBug"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPBinderEchoBug"), path.join("Build", "Desktop", "CPBinderEchoBug", "CPBinderEchoBug.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPBinderEchoBug", "CPBinderEchoBug.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPBinderEchoBug", "CPBinderEchoBug.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPBinderEchoBug")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPBinderEchoBug")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPBoxTest/Jakefile b/Tests/Manual/CPBoxTest/Jakefile index 9b5faa62e..7465ed2b8 100644 --- a/Tests/Manual/CPBoxTest/Jakefile +++ b/Tests/Manual/CPBoxTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPBoxTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPBoxTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPBoxTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPBoxTest"); task.setIdentifier("com.yourcompany.CPBoxTest"); @@ -26,7 +26,7 @@ app ("CPBoxTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPBoxTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPBoxTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPBoxTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPBoxTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPBoxTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPBoxTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPBoxTest"), FILE.join("Build", "Deployment", "CPBoxTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPBoxTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPBoxTest"), path.join("Build", "Deployment", "CPBoxTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPBoxTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPBoxTest"), FILE.join("Build", "Desktop", "CPBoxTest", "CPBoxTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPBoxTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPBoxTest"), path.join("Build", "Desktop", "CPBoxTest", "CPBoxTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPBoxTest", "CPBoxTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPBoxTest", "CPBoxTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPBoxTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPBoxTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPBrowserTest/Jakefile b/Tests/Manual/CPBrowserTest/Jakefile index 542de14fd..6207adf86 100644 --- a/Tests/Manual/CPBrowserTest/Jakefile +++ b/Tests/Manual/CPBrowserTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPBrowserTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPBrowserTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPBrowserTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPBrowserTest"); task.setIdentifier("com.yourcompany.CPBrowserTest"); @@ -26,7 +26,7 @@ app ("CPBrowserTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPBrowserTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/*")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -39,9 +39,9 @@ app ("CPBrowserTest", function(task) function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPBrowserTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPBrowserTest")); + console.log("----------------------------"); } task ("default", ["CPBrowserTest"], function() @@ -65,17 +65,17 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPBrowserTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPBrowserTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPBrowserTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPBrowserTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPBrowserTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPBrowserTest"), FILE.join("Build", "Deployment", "CPBrowserTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPBrowserTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPBrowserTest"), path.join("Build", "Deployment", "CPBrowserTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); diff --git a/Tests/Manual/CPButtonBarTest/Jakefile b/Tests/Manual/CPButtonBarTest/Jakefile index 542de14fd..6207adf86 100644 --- a/Tests/Manual/CPButtonBarTest/Jakefile +++ b/Tests/Manual/CPButtonBarTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPBrowserTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPBrowserTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPBrowserTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPBrowserTest"); task.setIdentifier("com.yourcompany.CPBrowserTest"); @@ -26,7 +26,7 @@ app ("CPBrowserTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPBrowserTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/*")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -39,9 +39,9 @@ app ("CPBrowserTest", function(task) function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPBrowserTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPBrowserTest")); + console.log("----------------------------"); } task ("default", ["CPBrowserTest"], function() @@ -65,17 +65,17 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPBrowserTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPBrowserTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPBrowserTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPBrowserTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPBrowserTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPBrowserTest"), FILE.join("Build", "Deployment", "CPBrowserTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPBrowserTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPBrowserTest"), path.join("Build", "Deployment", "CPBrowserTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); diff --git a/Tests/Manual/CPByteCountFormatterTest/Jakefile b/Tests/Manual/CPByteCountFormatterTest/Jakefile index b48031d7b..d65acb549 100644 --- a/Tests/Manual/CPByteCountFormatterTest/Jakefile +++ b/Tests/Manual/CPByteCountFormatterTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2013, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPByteCountFormatterTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPByteCountFormatterTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPByteCountFormatterTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPByteCountFormatterTest"); task.setIdentifier("com.yourcompany.CPByteCountFormatterTest"); @@ -26,7 +26,7 @@ app ("CPByteCountFormatterTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPByteCountFormatterTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPByteCountFormatterTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPByteCountFormatterTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPByteCountFormatterTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPByteCountFormatterTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPByteCountFormatterTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPByteCountFormatterTest"), FILE.join("Build", "Deployment", "CPByteCountFormatterTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPByteCountFormatterTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPByteCountFormatterTest"), path.join("Build", "Deployment", "CPByteCountFormatterTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPByteCountFormatterTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPByteCountFormatterTest"), FILE.join("Build", "Desktop", "CPByteCountFormatterTest", "CPByteCountFormatterTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPByteCountFormatterTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPByteCountFormatterTest"), path.join("Build", "Desktop", "CPByteCountFormatterTest", "CPByteCountFormatterTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPByteCountFormatterTest", "CPByteCountFormatterTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPByteCountFormatterTest", "CPByteCountFormatterTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPByteCountFormatterTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPByteCountFormatterTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPCollectionViewNibTest/Jakefile b/Tests/Manual/CPCollectionViewNibTest/Jakefile index f9718dfcd..1917b32f1 100644 --- a/Tests/Manual/CPCollectionViewNibTest/Jakefile +++ b/Tests/Manual/CPCollectionViewNibTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPCollectionViewNibTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPCollectionViewNibTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPCollectionViewNibTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPCollectionViewNibTest"); task.setIdentifier("com.yourcompany.CPCollectionViewNibTest"); @@ -26,7 +26,7 @@ app ("CPCollectionViewNibTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPCollectionViewNibTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPCollectionViewNibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPCollectionViewNibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPCollectionViewNibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPCollectionViewNibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPCollectionViewNibTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPCollectionViewNibTest"), FILE.join("Build", "Deployment", "CPCollectionViewNibTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPCollectionViewNibTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPCollectionViewNibTest"), path.join("Build", "Deployment", "CPCollectionViewNibTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPCollectionViewNibTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPCollectionViewNibTest"), FILE.join("Build", "Desktop", "CPCollectionViewNibTest", "CPCollectionViewNibTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPCollectionViewNibTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPCollectionViewNibTest"), path.join("Build", "Desktop", "CPCollectionViewNibTest", "CPCollectionViewNibTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPCollectionViewNibTest", "CPCollectionViewNibTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPCollectionViewNibTest", "CPCollectionViewNibTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPCollectionViewNibTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPCollectionViewNibTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPColorCPImageDescriptionTest/Jakefile b/Tests/Manual/CPColorCPImageDescriptionTest/Jakefile index 25523f130..41831f770 100644 --- a/Tests/Manual/CPColorCPImageDescriptionTest/Jakefile +++ b/Tests/Manual/CPColorCPImageDescriptionTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("test", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "test.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "test.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("test"); task.setIdentifier("com.aparajita.test"); @@ -26,7 +26,7 @@ app ("test", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("test"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "test", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "test", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "test")); - OS.system(["press", "-f", FILE.join("Build", "Release", "test"), FILE.join("Build", "Deployment", "test")]); + fs.mkdirSync(path.join("Build", "Deployment", "test"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "test"), path.join("Build", "Deployment", "test")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "test")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "test"), FILE.join("Build", "Desktop", "test", "test.app")); + fs.mkdirSync(path.join("Build", "Desktop", "test"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "test"), path.join("Build", "Desktop", "test", "test.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "test", "test.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "test", "test.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "test")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "test")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPColorWellBindingsTest/Jakefile b/Tests/Manual/CPColorWellBindingsTest/Jakefile index e7bb5e63e..3b6b54da8 100644 --- a/Tests/Manual/CPColorWellBindingsTest/Jakefile +++ b/Tests/Manual/CPColorWellBindingsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPColorWellBindingsTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPColorWellBindingsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPColorWellBindingsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPColorWellBindingsTest"); task.setIdentifier("com.yourcompany.CPColorWellBindingsTest"); @@ -26,7 +26,7 @@ app ("CPColorWellBindingsTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPColorWellBindingsTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPColorWellBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPColorWellBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPColorWellBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPColorWellBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPColorWellBindingsTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPColorWellBindingsTest"), FILE.join("Build", "Deployment", "CPColorWellBindingsTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPColorWellBindingsTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPColorWellBindingsTest"), path.join("Build", "Deployment", "CPColorWellBindingsTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPColorWellBindingsTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPColorWellBindingsTest"), FILE.join("Build", "Desktop", "CPColorWellBindingsTest", "CPColorWellBindingsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPColorWellBindingsTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPColorWellBindingsTest"), path.join("Build", "Desktop", "CPColorWellBindingsTest", "CPColorWellBindingsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPColorWellBindingsTest", "CPColorWellBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPColorWellBindingsTest", "CPColorWellBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPColorWellBindingsTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPColorWellBindingsTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPComboBoxTest/Jakefile b/Tests/Manual/CPComboBoxTest/Jakefile index a83c45d07..6eef59818 100644 --- a/Tests/Manual/CPComboBoxTest/Jakefile +++ b/Tests/Manual/CPComboBoxTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("test", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "test.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "test.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("test"); task.setIdentifier("com.aparajita.test"); @@ -26,7 +26,7 @@ app ("test", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("test"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "test", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "test", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "test")); - OS.system(["press", "-f", FILE.join("Build", "Release", "test"), FILE.join("Build", "Deployment", "test")]); + fs.mkdirSync(path.join("Build", "Deployment", "test"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "test"), path.join("Build", "Deployment", "test")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "test")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "test"), FILE.join("Build", "Desktop", "test", "test.app")); + fs.mkdirSync(path.join("Build", "Desktop", "test"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "test"), path.join("Build", "Desktop", "test", "test.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "test", "test.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "test", "test.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "test")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "test")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPControlSizeTest/Jakefile b/Tests/Manual/CPControlSizeTest/Jakefile index 834b2052e..accda81cb 100644 --- a/Tests/Manual/CPControlSizeTest/Jakefile +++ b/Tests/Manual/CPControlSizeTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2014, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPControlSizeTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPControlSizeTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPControlSizeTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPControlSizeTest"); task.setIdentifier("com.yourcompany.CPControlSizeTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPControlSizeTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPControlSizeTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPControlSizeTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPControlSizeTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPControlSizeTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (ENV["CONFIGURATION"] === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); + addBundleFileSizes(path.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPCursorTest/Jakefile b/Tests/Manual/CPCursorTest/Jakefile index a2b1b3986..d6a85e840 100644 --- a/Tests/Manual/CPCursorTest/Jakefile +++ b/Tests/Manual/CPCursorTest/Jakefile @@ -6,17 +6,17 @@ * Copyright 2009, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), task = require("jake").task, FileList = require("jake").FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPCursorTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPCursorTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPCursorTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPCursorTest"); task.setIdentifier("com.yourcompany.CPCursorTest"); diff --git a/Tests/Manual/CPDateFormatterTest/Jakefile b/Tests/Manual/CPDateFormatterTest/Jakefile index 24c7daa20..2050e6a59 100644 --- a/Tests/Manual/CPDateFormatterTest/Jakefile +++ b/Tests/Manual/CPDateFormatterTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2013, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPDateFormatterTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPDateFormatterTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPDateFormatterTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPDateFormatterTest"); task.setIdentifier("com.yourcompany.CPDateFormatterTest"); @@ -26,7 +26,7 @@ app ("CPDateFormatterTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPDateFormatterTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPDateFormatterTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPDateFormatterTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPDateFormatterTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPDateFormatterTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPDateFormatterTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPDateFormatterTest"), FILE.join("Build", "Deployment", "CPDateFormatterTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPDateFormatterTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPDateFormatterTest"), path.join("Build", "Deployment", "CPDateFormatterTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPDateFormatterTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPDateFormatterTest"), FILE.join("Build", "Desktop", "CPDateFormatterTest", "CPDateFormatterTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPDateFormatterTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPDateFormatterTest"), path.join("Build", "Desktop", "CPDateFormatterTest", "CPDateFormatterTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPDateFormatterTest", "CPDateFormatterTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPDateFormatterTest", "CPDateFormatterTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPDateFormatterTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPDateFormatterTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPDatePickerTest/Jakefile b/Tests/Manual/CPDatePickerTest/Jakefile index 693ded808..c134e40b4 100644 --- a/Tests/Manual/CPDatePickerTest/Jakefile +++ b/Tests/Manual/CPDatePickerTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2013, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPDatePickerTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPDatePickerTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPDatePickerTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPDatePickerTest"); task.setIdentifier("com.yourcompany.CPDatePickerTest"); @@ -26,7 +26,7 @@ app ("CPDatePickerTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPDatePickerTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPDatePickerTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPDatePickerTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPDatePickerTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPDatePickerTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPDatePickerTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPDatePickerTest"), FILE.join("Build", "Deployment", "CPDatePickerTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPDatePickerTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPDatePickerTest"), path.join("Build", "Deployment", "CPDatePickerTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPDatePickerTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPDatePickerTest"), FILE.join("Build", "Desktop", "CPDatePickerTest", "CPDatePickerTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPDatePickerTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPDatePickerTest"), path.join("Build", "Desktop", "CPDatePickerTest", "CPDatePickerTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPDatePickerTest", "CPDatePickerTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPDatePickerTest", "CPDatePickerTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPDatePickerTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPDatePickerTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPDictionaryControllerTest/Jakefile b/Tests/Manual/CPDictionaryControllerTest/Jakefile index 84548c48d..951686000 100644 --- a/Tests/Manual/CPDictionaryControllerTest/Jakefile +++ b/Tests/Manual/CPDictionaryControllerTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2013, SGL Studio, BBDO Toronto All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPDictionaryControllerTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPDictionaryControllerTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPDictionaryControllerTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPDictionaryControllerTest"); task.setIdentifier("com.yourcompany.CPDictionaryControllerTest"); @@ -26,7 +26,7 @@ app ("CPDictionaryControllerTest", function(task) task.setAuthor("SGL Studio, BBDO Toronto"); task.setEmail("Blair.Duncan@BBDO.com"); task.setSummary("CPDictionaryControllerTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPDictionaryControllerTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPDictionaryControllerTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPDictionaryControllerTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPDictionaryControllerTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPDictionaryControllerTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPDictionaryControllerTest"), FILE.join("Build", "Deployment", "CPDictionaryControllerTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPDictionaryControllerTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPDictionaryControllerTest"), path.join("Build", "Deployment", "CPDictionaryControllerTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPDictionaryControllerTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPDictionaryControllerTest"), FILE.join("Build", "Desktop", "CPDictionaryControllerTest", "CPDictionaryControllerTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPDictionaryControllerTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPDictionaryControllerTest"), path.join("Build", "Desktop", "CPDictionaryControllerTest", "CPDictionaryControllerTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPDictionaryControllerTest", "CPDictionaryControllerTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPDictionaryControllerTest", "CPDictionaryControllerTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPDictionaryControllerTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPDictionaryControllerTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPFormatterTest/Jakefile b/Tests/Manual/CPFormatterTest/Jakefile index 4b4864d37..8c4b41d16 100644 --- a/Tests/Manual/CPFormatterTest/Jakefile +++ b/Tests/Manual/CPFormatterTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPFormatterTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPFormatterTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPFormatterTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPFormatterTest"); task.setIdentifier("com.aparajita.CPFormatterTest"); @@ -26,7 +26,7 @@ app ("CPFormatterTest", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPFormatterTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPFormatterTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPFormatterTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPFormatterTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPFormatterTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPFormatterTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPFormatterTest"), FILE.join("Build", "Deployment", "CPFormatterTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPFormatterTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPFormatterTest"), path.join("Build", "Deployment", "CPFormatterTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPFormatterTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPFormatterTest"), FILE.join("Build", "Desktop", "CPFormatterTest", "CPFormatterTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPFormatterTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPFormatterTest"), path.join("Build", "Desktop", "CPFormatterTest", "CPFormatterTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPFormatterTest", "CPFormatterTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPFormatterTest", "CPFormatterTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPFormatterTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPFormatterTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPImageAndTextViewImageScalingTest/Jakefile b/Tests/Manual/CPImageAndTextViewImageScalingTest/Jakefile index 26c4d2dab..da40aa916 100644 --- a/Tests/Manual/CPImageAndTextViewImageScalingTest/Jakefile +++ b/Tests/Manual/CPImageAndTextViewImageScalingTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2020, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPImageAndTextViewImageScalingTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPImageAndTextViewImageScalingTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPImageAndTextViewImageScalingTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPImageAndTextViewImageScalingTest"); task.setIdentifier("com.yourcompany.CPImageAndTextViewImageScalingTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPImageAndTextViewImageScalingTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,33 +67,33 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -102,14 +102,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -117,17 +117,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -137,34 +137,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPImageViewAlignmentScaling/Jakefile b/Tests/Manual/CPImageViewAlignmentScaling/Jakefile index e0f9f9845..8c65c5d02 100644 --- a/Tests/Manual/CPImageViewAlignmentScaling/Jakefile +++ b/Tests/Manual/CPImageViewAlignmentScaling/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPImageViewScaling", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPImageViewScaling.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPImageViewScaling.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPImageViewScaling"); task.setIdentifier("com.aparajita.CPImageViewScaling"); @@ -26,7 +26,7 @@ app ("CPImageViewScaling", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPImageViewScaling"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPImageViewScaling", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPImageViewScaling", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPImageViewScaling", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPImageViewScaling", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPImageViewScaling")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPImageViewScaling"), FILE.join("Build", "Deployment", "CPImageViewScaling")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPImageViewScaling"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPImageViewScaling"), path.join("Build", "Deployment", "CPImageViewScaling")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPImageViewScaling")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPImageViewScaling"), FILE.join("Build", "Desktop", "CPImageViewScaling", "CPImageViewScaling.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPImageViewScaling"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPImageViewScaling"), path.join("Build", "Desktop", "CPImageViewScaling", "CPImageViewScaling.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPImageViewScaling", "CPImageViewScaling.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPImageViewScaling", "CPImageViewScaling.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPImageViewScaling")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPImageViewScaling")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPImageViewTest/Jakefile b/Tests/Manual/CPImageViewTest/Jakefile index e129b8934..89b10a023 100644 --- a/Tests/Manual/CPImageViewTest/Jakefile +++ b/Tests/Manual/CPImageViewTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, SlevenBits Ltd All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPImageViewTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPImageViewTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPImageViewTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPImageViewTest"); task.setIdentifier("com.yourcompany.CPImageViewTest"); @@ -26,7 +26,7 @@ app ("CPImageViewTest", function(task) task.setAuthor("SlevenBits Ltd"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPImageViewTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPImageViewTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPImageViewTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPImageViewTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPImageViewTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPImageViewTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPImageViewTest"), FILE.join("Build", "Deployment", "CPImageViewTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPImageViewTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPImageViewTest"), path.join("Build", "Deployment", "CPImageViewTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPImageViewTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPImageViewTest"), FILE.join("Build", "Desktop", "CPImageViewTest", "CPImageViewTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPImageViewTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPImageViewTest"), path.join("Build", "Desktop", "CPImageViewTest", "CPImageViewTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPImageViewTest", "CPImageViewTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPImageViewTest", "CPImageViewTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPImageViewTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPImageViewTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPImageViewbindingsTest/Jakefile b/Tests/Manual/CPImageViewbindingsTest/Jakefile index 6bdfbd679..a8cc03300 100644 --- a/Tests/Manual/CPImageViewbindingsTest/Jakefile +++ b/Tests/Manual/CPImageViewbindingsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPImageViewbindingsTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPImageViewbindingsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPImageViewbindingsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPImageViewbindingsTest"); task.setIdentifier("com.yourcompany.CPImageViewbindingsTest"); @@ -26,7 +26,7 @@ app ("CPImageViewbindingsTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPImageViewbindingsTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPImageViewbindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPImageViewbindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPImageViewbindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPImageViewbindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPImageViewbindingsTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPImageViewbindingsTest"), FILE.join("Build", "Deployment", "CPImageViewbindingsTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPImageViewbindingsTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPImageViewbindingsTest"), path.join("Build", "Deployment", "CPImageViewbindingsTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPImageViewbindingsTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPImageViewbindingsTest"), FILE.join("Build", "Desktop", "CPImageViewbindingsTest", "CPImageViewbindingsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPImageViewbindingsTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPImageViewbindingsTest"), path.join("Build", "Desktop", "CPImageViewbindingsTest", "CPImageViewbindingsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPImageViewbindingsTest", "CPImageViewbindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPImageViewbindingsTest", "CPImageViewbindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPImageViewbindingsTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPImageViewbindingsTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPLanguageModelChatbotTest/Jakefile b/Tests/Manual/CPLanguageModelChatbotTest/Jakefile index e29ed030f..a68fee0de 100644 --- a/Tests/Manual/CPLanguageModelChatbotTest/Jakefile +++ b/Tests/Manual/CPLanguageModelChatbotTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, WireLoad All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPLanguageModelChatbotTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPLanguageModelChatbotTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPLanguageModelChatbotTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPLanguageModelChatbotTest"); task.setIdentifier("com.yourcompany.CPLanguageModelChatbotTest"); @@ -26,7 +26,7 @@ app ("CPLanguageModelChatbotTest", function(task) task.setAuthor("WireLoad"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPLanguageModelChatbotTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPLanguageModelChatbotTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPLanguageModelChatbotTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPLanguageModelChatbotTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPLanguageModelChatbotTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPLanguageModelChatbotTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPLanguageModelChatbotTest"), FILE.join("Build", "Deployment", "CPLanguageModelChatbotTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPLanguageModelChatbotTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPLanguageModelChatbotTest"), path.join("Build", "Deployment", "CPLanguageModelChatbotTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPLanguageModelChatbotTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPLanguageModelChatbotTest"), FILE.join("Build", "Desktop", "CPLanguageModelChatbotTest", "CPLanguageModelChatbotTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPLanguageModelChatbotTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPLanguageModelChatbotTest"), path.join("Build", "Desktop", "CPLanguageModelChatbotTest", "CPLanguageModelChatbotTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPLanguageModelChatbotTest", "CPLanguageModelChatbotTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPLanguageModelChatbotTest", "CPLanguageModelChatbotTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPLanguageModelChatbotTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPLanguageModelChatbotTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPLevelIndicator/Jakefile b/Tests/Manual/CPLevelIndicator/Jakefile index bd57b7a0d..ba5cb126e 100644 --- a/Tests/Manual/CPLevelIndicator/Jakefile +++ b/Tests/Manual/CPLevelIndicator/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, WireLoad All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPLevelIndicator", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPLevelIndicator.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPLevelIndicator.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPLevelIndicator"); task.setIdentifier("com.yourcompany.CPLevelIndicator"); @@ -26,7 +26,7 @@ app ("CPLevelIndicator", function(task) task.setAuthor("WireLoad"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPLevelIndicator"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPLevelIndicator", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPLevelIndicator", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPLevelIndicator", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPLevelIndicator", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPLevelIndicator")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPLevelIndicator"), FILE.join("Build", "Deployment", "CPLevelIndicator")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPLevelIndicator"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPLevelIndicator"), path.join("Build", "Deployment", "CPLevelIndicator")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPLevelIndicator")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPLevelIndicator"), FILE.join("Build", "Desktop", "CPLevelIndicator", "CPLevelIndicator.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPLevelIndicator"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPLevelIndicator"), path.join("Build", "Desktop", "CPLevelIndicator", "CPLevelIndicator.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPLevelIndicator", "CPLevelIndicator.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPLevelIndicator", "CPLevelIndicator.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPLevelIndicator")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPLevelIndicator")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPLevelIndicatorTest/Jakefile b/Tests/Manual/CPLevelIndicatorTest/Jakefile index c81c3c04e..7bcaa6ac7 100644 --- a/Tests/Manual/CPLevelIndicatorTest/Jakefile +++ b/Tests/Manual/CPLevelIndicatorTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, WireLoad All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPLevelIndicatorTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPLevelIndicatorTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPLevelIndicatorTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPLevelIndicatorTest"); task.setIdentifier("com.yourcompany.CPLevelIndicatorTest"); @@ -26,7 +26,7 @@ app ("CPLevelIndicatorTest", function(task) task.setAuthor("WireLoad"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPLevelIndicatorTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPLevelIndicatorTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPLevelIndicatorTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPLevelIndicatorTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPLevelIndicatorTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPLevelIndicatorTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPLevelIndicatorTest"), FILE.join("Build", "Deployment", "CPLevelIndicatorTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPLevelIndicatorTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPLevelIndicatorTest"), path.join("Build", "Deployment", "CPLevelIndicatorTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPLevelIndicatorTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPLevelIndicatorTest"), FILE.join("Build", "Desktop", "CPLevelIndicatorTest", "CPLevelIndicatorTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPLevelIndicatorTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPLevelIndicatorTest"), path.join("Build", "Desktop", "CPLevelIndicatorTest", "CPLevelIndicatorTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPLevelIndicatorTest", "CPLevelIndicatorTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPLevelIndicatorTest", "CPLevelIndicatorTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPLevelIndicatorTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPLevelIndicatorTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPLocalizationTest/Jakefile b/Tests/Manual/CPLocalizationTest/Jakefile index 991dcebdc..a897e2035 100644 --- a/Tests/Manual/CPLocalizationTest/Jakefile +++ b/Tests/Manual/CPLocalizationTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2015, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPLocalizationTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPLocalizationTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPLocalizationTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPLocalizationTest"); task.setIdentifier("com.yourcompany.CPLocalizationTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPLocalizationTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPLocalizationTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPLocalizationTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPLocalizationTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPLocalizationTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPMarkdownParserTest/Jakefile b/Tests/Manual/CPMarkdownParserTest/Jakefile index 1ca64f318..43c85ab1a 100644 --- a/Tests/Manual/CPMarkdownParserTest/Jakefile +++ b/Tests/Manual/CPMarkdownParserTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, WireLoad All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPMarkdownParserTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPMarkdownParserTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPMarkdownParserTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPMarkdownParserTest"); task.setIdentifier("com.yourcompany.CPMarkdownParserTest"); @@ -26,7 +26,7 @@ app ("CPMarkdownParserTest", function(task) task.setAuthor("WireLoad"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPMarkdownParserTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPMarkdownParserTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPMarkdownParserTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPMarkdownParserTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPMarkdownParserTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPMarkdownParserTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPMarkdownParserTest"), FILE.join("Build", "Deployment", "CPMarkdownParserTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPMarkdownParserTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPMarkdownParserTest"), path.join("Build", "Deployment", "CPMarkdownParserTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPMarkdownParserTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPMarkdownParserTest"), FILE.join("Build", "Desktop", "CPMarkdownParserTest", "CPMarkdownParserTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPMarkdownParserTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPMarkdownParserTest"), path.join("Build", "Desktop", "CPMarkdownParserTest", "CPMarkdownParserTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPMarkdownParserTest", "CPMarkdownParserTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPMarkdownParserTest", "CPMarkdownParserTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPMarkdownParserTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPMarkdownParserTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPMenuCALayerTest/Jakefile b/Tests/Manual/CPMenuCALayerTest/Jakefile index 0c730a17a..ddb48bd1f 100644 --- a/Tests/Manual/CPMenuCALayerTest/Jakefile +++ b/Tests/Manual/CPMenuCALayerTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2014, Vidinoti SA, All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPMenuCALayerTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPMenuCALayerTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPMenuCALayerTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPMenuCALayerTest"); task.setIdentifier("com.yourcompany.CPMenuCALayerTest"); @@ -26,7 +26,7 @@ app ("CPMenuCALayerTest", function(task) task.setAuthor("WireLoad, LLC"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPMenuCALayerTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPMenuCALayerTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPMenuCALayerTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPMenuCALayerTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPMenuCALayerTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPMenuCALayerTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPMenuCALayerTest"), FILE.join("Build", "Deployment", "CPMenuCALayerTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPMenuCALayerTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPMenuCALayerTest"), path.join("Build", "Deployment", "CPMenuCALayerTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPMenuCALayerTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPMenuCALayerTest"), FILE.join("Build", "Desktop", "CPMenuCALayerTest", "CPMenuCALayerTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPMenuCALayerTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPMenuCALayerTest"), path.join("Build", "Desktop", "CPMenuCALayerTest", "CPMenuCALayerTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPMenuCALayerTest", "CPMenuCALayerTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPMenuCALayerTest", "CPMenuCALayerTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPMenuCALayerTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPMenuCALayerTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPMenuEnabledBindingsTest/Jakefile b/Tests/Manual/CPMenuEnabledBindingsTest/Jakefile index 0c132c972..ec76e1dfb 100644 --- a/Tests/Manual/CPMenuEnabledBindingsTest/Jakefile +++ b/Tests/Manual/CPMenuEnabledBindingsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, WireLoad, LLC All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPMenuTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPMenuTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPMenuTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPMenuTest"); task.setIdentifier("com.yourcompany.CPMenuTest"); @@ -26,7 +26,7 @@ app ("CPMenuTest", function(task) task.setAuthor("WireLoad, LLC"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPMenuTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPMenuTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPMenuTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPMenuTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPMenuTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPMenuTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPMenuTest"), FILE.join("Build", "Deployment", "CPMenuTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPMenuTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPMenuTest"), path.join("Build", "Deployment", "CPMenuTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPMenuTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPMenuTest"), FILE.join("Build", "Desktop", "CPMenuTest", "CPMenuTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPMenuTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPMenuTest"), path.join("Build", "Desktop", "CPMenuTest", "CPMenuTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPMenuTest", "CPMenuTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPMenuTest", "CPMenuTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPMenuTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPMenuTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPMenuKeyEquivalentsTest/Jakefile b/Tests/Manual/CPMenuKeyEquivalentsTest/Jakefile index 53e89305a..374a4c36c 100644 --- a/Tests/Manual/CPMenuKeyEquivalentsTest/Jakefile +++ b/Tests/Manual/CPMenuKeyEquivalentsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPMenuKeyEquivalentsTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPMenuKeyEquivalentsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPMenuKeyEquivalentsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("menu-keyequivs"); task.setIdentifier("com.yourcompany.CPMenuKeyEquivalentsTest"); @@ -26,7 +26,7 @@ app ("CPMenuKeyEquivalentsTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("menu-keyequivs"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPMenuKeyEquivalentsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPMenuKeyEquivalentsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPMenuKeyEquivalentsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPMenuKeyEquivalentsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPMenuKeyEquivalentsTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPMenuKeyEquivalentsTest"), FILE.join("Build", "Deployment", "CPMenuKeyEquivalentsTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPMenuKeyEquivalentsTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPMenuKeyEquivalentsTest"), path.join("Build", "Deployment", "CPMenuKeyEquivalentsTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPMenuKeyEquivalentsTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPMenuKeyEquivalentsTest"), FILE.join("Build", "Desktop", "CPMenuKeyEquivalentsTest", "CPMenuKeyEquivalentsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPMenuKeyEquivalentsTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPMenuKeyEquivalentsTest"), path.join("Build", "Desktop", "CPMenuKeyEquivalentsTest", "CPMenuKeyEquivalentsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPMenuKeyEquivalentsTest", "CPMenuKeyEquivalentsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPMenuKeyEquivalentsTest", "CPMenuKeyEquivalentsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPMenuKeyEquivalentsTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPMenuKeyEquivalentsTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPMenuRemoveAllTest/Jakefile b/Tests/Manual/CPMenuRemoveAllTest/Jakefile index 3fcf47fb2..f64dde437 100644 --- a/Tests/Manual/CPMenuRemoveAllTest/Jakefile +++ b/Tests/Manual/CPMenuRemoveAllTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPMenuRemoveAllTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPMenuRemoveAllTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPMenuRemoveAllTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPMenuRemoveAllTest"); task.setIdentifier("com.aparajita.CPMenuRemoveAllTest"); @@ -26,7 +26,7 @@ app ("CPMenuRemoveAllTest", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPMenuRemoveAllTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPMenuRemoveAllTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPMenuRemoveAllTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPMenuRemoveAllTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPMenuRemoveAllTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPMenuRemoveAllTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPMenuRemoveAllTest"), FILE.join("Build", "Deployment", "CPMenuRemoveAllTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPMenuRemoveAllTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPMenuRemoveAllTest"), path.join("Build", "Deployment", "CPMenuRemoveAllTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPMenuRemoveAllTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPMenuRemoveAllTest"), FILE.join("Build", "Desktop", "CPMenuRemoveAllTest", "CPMenuRemoveAllTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPMenuRemoveAllTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPMenuRemoveAllTest"), path.join("Build", "Desktop", "CPMenuRemoveAllTest", "CPMenuRemoveAllTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPMenuRemoveAllTest", "CPMenuRemoveAllTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPMenuRemoveAllTest", "CPMenuRemoveAllTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPMenuRemoveAllTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPMenuRemoveAllTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPMenuSubmenuPlacementConstraints/Jakefile b/Tests/Manual/CPMenuSubmenuPlacementConstraints/Jakefile index 0c132c972..ec76e1dfb 100644 --- a/Tests/Manual/CPMenuSubmenuPlacementConstraints/Jakefile +++ b/Tests/Manual/CPMenuSubmenuPlacementConstraints/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, WireLoad, LLC All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPMenuTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPMenuTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPMenuTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPMenuTest"); task.setIdentifier("com.yourcompany.CPMenuTest"); @@ -26,7 +26,7 @@ app ("CPMenuTest", function(task) task.setAuthor("WireLoad, LLC"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPMenuTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPMenuTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPMenuTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPMenuTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPMenuTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPMenuTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPMenuTest"), FILE.join("Build", "Deployment", "CPMenuTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPMenuTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPMenuTest"), path.join("Build", "Deployment", "CPMenuTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPMenuTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPMenuTest"), FILE.join("Build", "Desktop", "CPMenuTest", "CPMenuTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPMenuTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPMenuTest"), path.join("Build", "Desktop", "CPMenuTest", "CPMenuTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPMenuTest", "CPMenuTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPMenuTest", "CPMenuTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPMenuTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPMenuTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPMenuTest/Jakefile b/Tests/Manual/CPMenuTest/Jakefile index 0c132c972..ec76e1dfb 100644 --- a/Tests/Manual/CPMenuTest/Jakefile +++ b/Tests/Manual/CPMenuTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, WireLoad, LLC All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPMenuTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPMenuTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPMenuTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPMenuTest"); task.setIdentifier("com.yourcompany.CPMenuTest"); @@ -26,7 +26,7 @@ app ("CPMenuTest", function(task) task.setAuthor("WireLoad, LLC"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPMenuTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPMenuTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPMenuTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPMenuTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPMenuTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPMenuTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPMenuTest"), FILE.join("Build", "Deployment", "CPMenuTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPMenuTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPMenuTest"), path.join("Build", "Deployment", "CPMenuTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPMenuTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPMenuTest"), FILE.join("Build", "Desktop", "CPMenuTest", "CPMenuTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPMenuTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPMenuTest"), path.join("Build", "Desktop", "CPMenuTest", "CPMenuTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPMenuTest", "CPMenuTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPMenuTest", "CPMenuTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPMenuTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPMenuTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPOutlineViewCibTest/Jakefile b/Tests/Manual/CPOutlineViewCibTest/Jakefile index 262b7c3dd..a46310b44 100644 --- a/Tests/Manual/CPOutlineViewCibTest/Jakefile +++ b/Tests/Manual/CPOutlineViewCibTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPOutlineViewCibTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPOutlineViewCibTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPOutlineViewCibTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPOutlineViewCibTest"); task.setIdentifier("com.yourcompany.CPOutlineViewCibTest"); @@ -26,7 +26,7 @@ app ("CPOutlineViewCibTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPOutlineViewCibTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPOutlineViewCibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPOutlineViewCibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPOutlineViewCibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPOutlineViewCibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPOutlineViewCibTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPOutlineViewCibTest"), FILE.join("Build", "Deployment", "CPOutlineViewCibTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPOutlineViewCibTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPOutlineViewCibTest"), path.join("Build", "Deployment", "CPOutlineViewCibTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPOutlineViewCibTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPOutlineViewCibTest"), FILE.join("Build", "Desktop", "CPOutlineViewCibTest", "CPOutlineViewCibTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPOutlineViewCibTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPOutlineViewCibTest"), path.join("Build", "Desktop", "CPOutlineViewCibTest", "CPOutlineViewCibTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPOutlineViewCibTest", "CPOutlineViewCibTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPOutlineViewCibTest", "CPOutlineViewCibTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPOutlineViewCibTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPOutlineViewCibTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPOutlineViewTest/Jakefile b/Tests/Manual/CPOutlineViewTest/Jakefile index 3a5432575..860e6556e 100644 --- a/Tests/Manual/CPOutlineViewTest/Jakefile +++ b/Tests/Manual/CPOutlineViewTest/Jakefile @@ -6,17 +6,17 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), task = require("jake").task, FileList = require("jake").FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("outlineview", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "outlineview.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "outlineview.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("outlineview"); task.setIdentifier("com.yourcompany.outlineview"); diff --git a/Tests/Manual/CPOutlineViewViewBasedCibTest/Jakefile b/Tests/Manual/CPOutlineViewViewBasedCibTest/Jakefile index 07ad54e8b..f1a31e4f4 100644 --- a/Tests/Manual/CPOutlineViewViewBasedCibTest/Jakefile +++ b/Tests/Manual/CPOutlineViewViewBasedCibTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPOutlineViewViewBasedCibTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPOutlineViewViewBasedCibTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPOutlineViewViewBasedCibTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPOutlineViewViewBasedCibTest"); task.setIdentifier("com.yourcompany.CPOutlineViewViewBasedCibTest"); @@ -26,7 +26,7 @@ app ("CPOutlineViewViewBasedCibTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPOutlineViewViewBasedCibTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPOutlineViewViewBasedCibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPOutlineViewViewBasedCibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPOutlineViewViewBasedCibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPOutlineViewViewBasedCibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPOutlineViewViewBasedCibTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPOutlineViewViewBasedCibTest"), FILE.join("Build", "Deployment", "CPOutlineViewViewBasedCibTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPOutlineViewViewBasedCibTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPOutlineViewViewBasedCibTest"), path.join("Build", "Deployment", "CPOutlineViewViewBasedCibTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPOutlineViewViewBasedCibTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPOutlineViewViewBasedCibTest"), FILE.join("Build", "Desktop", "CPOutlineViewViewBasedCibTest", "CPOutlineViewViewBasedCibTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPOutlineViewViewBasedCibTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPOutlineViewViewBasedCibTest"), path.join("Build", "Desktop", "CPOutlineViewViewBasedCibTest", "CPOutlineViewViewBasedCibTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPOutlineViewViewBasedCibTest", "CPOutlineViewViewBasedCibTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPOutlineViewViewBasedCibTest", "CPOutlineViewViewBasedCibTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPOutlineViewViewBasedCibTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPOutlineViewViewBasedCibTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPPanelTest/Jakefile b/Tests/Manual/CPPanelTest/Jakefile index 4ce399d39..0daf85b69 100644 --- a/Tests/Manual/CPPanelTest/Jakefile +++ b/Tests/Manual/CPPanelTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2014, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPPanelTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPPanelTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPPanelTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPPanelTest"); task.setIdentifier("com.yourcompany.CPPanelTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPPanelTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPPanelTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPPanelTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPPanelTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPPanelTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (ENV["CONFIGURATION"] === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); + addBundleFileSizes(path.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPPlatformWindow/Jakefile b/Tests/Manual/CPPlatformWindow/Jakefile index 57c0bad39..8f3494863 100644 --- a/Tests/Manual/CPPlatformWindow/Jakefile +++ b/Tests/Manual/CPPlatformWindow/Jakefile @@ -6,12 +6,12 @@ * Copyright 2014, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPPlatformWindow"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPPlatformWindow.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPPlatformWindow.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPPlatformWindow"); task.setIdentifier("com.yourcompany.CPPlatformWindow"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPPlatformWindow"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPPlatformWindow.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPPlatformWindow.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPPlatformWindow.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPPlatformWindow.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (ENV["CONFIGURATION"] === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); + addBundleFileSizes(path.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPPlattformWindowMinSize/Jakefile b/Tests/Manual/CPPlattformWindowMinSize/Jakefile index cc5c666cb..1752378a2 100644 --- a/Tests/Manual/CPPlattformWindowMinSize/Jakefile +++ b/Tests/Manual/CPPlattformWindowMinSize/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPPopUpButtonTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPPopUpButtonTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPPopUpButtonTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPPopUpButtonTest"); task.setIdentifier("com.yourcompany.CPPopUpButtonTest"); @@ -26,7 +26,7 @@ app ("CPPopUpButtonTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPPopUpButtonTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPPopUpButtonTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPPopUpButtonTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPPopUpButtonTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPPopUpButtonTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPPopUpButtonTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPPopUpButtonTest"), FILE.join("Build", "Deployment", "CPPopUpButtonTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPPopUpButtonTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPPopUpButtonTest"), path.join("Build", "Deployment", "CPPopUpButtonTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPPopUpButtonTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPPopUpButtonTest"), FILE.join("Build", "Desktop", "CPPopUpButtonTest", "CPPopUpButtonTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPPopUpButtonTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPPopUpButtonTest"), path.join("Build", "Desktop", "CPPopUpButtonTest", "CPPopUpButtonTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPPopUpButtonTest", "CPPopUpButtonTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPPopUpButtonTest", "CPPopUpButtonTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPPopUpButtonTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPPopUpButtonTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPPopUpButtonBindingsTest/Jakefile b/Tests/Manual/CPPopUpButtonBindingsTest/Jakefile index 602a6bc49..3f4ee4c7c 100644 --- a/Tests/Manual/CPPopUpButtonBindingsTest/Jakefile +++ b/Tests/Manual/CPPopUpButtonBindingsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPPopUpButtonBindingsTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPPopUpButtonBindingsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPPopUpButtonBindingsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPPopUpButtonBindingsTest"); task.setIdentifier("com.yourcompany.CPPopUpButtonBindingsTest"); @@ -26,7 +26,7 @@ app ("CPPopUpButtonBindingsTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPPopUpButtonBindingsTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPPopUpButtonBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPPopUpButtonBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPPopUpButtonBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPPopUpButtonBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPPopUpButtonBindingsTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPPopUpButtonBindingsTest"), FILE.join("Build", "Deployment", "CPPopUpButtonBindingsTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPPopUpButtonBindingsTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPPopUpButtonBindingsTest"), path.join("Build", "Deployment", "CPPopUpButtonBindingsTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPPopUpButtonBindingsTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPPopUpButtonBindingsTest"), FILE.join("Build", "Desktop", "CPPopUpButtonBindingsTest", "CPPopUpButtonBindingsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPPopUpButtonBindingsTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPPopUpButtonBindingsTest"), path.join("Build", "Desktop", "CPPopUpButtonBindingsTest", "CPPopUpButtonBindingsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPPopUpButtonBindingsTest", "CPPopUpButtonBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPPopUpButtonBindingsTest", "CPPopUpButtonBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPPopUpButtonBindingsTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPPopUpButtonBindingsTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPPopUpButtonTest/Jakefile b/Tests/Manual/CPPopUpButtonTest/Jakefile index cc5c666cb..1752378a2 100644 --- a/Tests/Manual/CPPopUpButtonTest/Jakefile +++ b/Tests/Manual/CPPopUpButtonTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPPopUpButtonTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPPopUpButtonTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPPopUpButtonTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPPopUpButtonTest"); task.setIdentifier("com.yourcompany.CPPopUpButtonTest"); @@ -26,7 +26,7 @@ app ("CPPopUpButtonTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPPopUpButtonTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPPopUpButtonTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPPopUpButtonTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPPopUpButtonTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPPopUpButtonTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPPopUpButtonTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPPopUpButtonTest"), FILE.join("Build", "Deployment", "CPPopUpButtonTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPPopUpButtonTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPPopUpButtonTest"), path.join("Build", "Deployment", "CPPopUpButtonTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPPopUpButtonTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPPopUpButtonTest"), FILE.join("Build", "Desktop", "CPPopUpButtonTest", "CPPopUpButtonTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPPopUpButtonTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPPopUpButtonTest"), path.join("Build", "Desktop", "CPPopUpButtonTest", "CPPopUpButtonTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPPopUpButtonTest", "CPPopUpButtonTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPPopUpButtonTest", "CPPopUpButtonTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPPopUpButtonTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPPopUpButtonTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPPopoverTest/Jakefile b/Tests/Manual/CPPopoverTest/Jakefile index 2896b2138..f7b6758d1 100644 --- a/Tests/Manual/CPPopoverTest/Jakefile +++ b/Tests/Manual/CPPopoverTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPPopoverTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPPopoverTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPPopoverTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPPopoverTest"); task.setIdentifier("com.yourcompany.CPPopoverTest"); @@ -26,7 +26,7 @@ app ("CPPopoverTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPPopoverTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPPopoverTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPPopoverTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPPopoverTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPPopoverTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPPopoverTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPPopoverTest"), FILE.join("Build", "Deployment", "CPPopoverTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPPopoverTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPPopoverTest"), path.join("Build", "Deployment", "CPPopoverTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPPopoverTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPPopoverTest"), FILE.join("Build", "Desktop", "CPPopoverTest", "CPPopoverTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPPopoverTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPPopoverTest"), path.join("Build", "Desktop", "CPPopoverTest", "CPPopoverTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPPopoverTest", "CPPopoverTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPPopoverTest", "CPPopoverTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPPopoverTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPPopoverTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPPredicateEditorCibTest/Jakefile b/Tests/Manual/CPPredicateEditorCibTest/Jakefile index 773e9ac9e..feb0d2275 100644 --- a/Tests/Manual/CPPredicateEditorCibTest/Jakefile +++ b/Tests/Manual/CPPredicateEditorCibTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPPredicateEditorTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPPredicateEditorTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPPredicateEditorTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPPredicateEditorTest"); task.setIdentifier("com.yourcompany.CPPredicateEditorTest"); @@ -26,7 +26,7 @@ app ("CPPredicateEditorTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPPredicateEditorTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPPredicateEditorTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPPredicateEditorTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPPredicateEditorTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPPredicateEditorTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPPredicateEditorTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPPredicateEditorTest"), FILE.join("Build", "Deployment", "CPPredicateEditorTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPPredicateEditorTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPPredicateEditorTest"), path.join("Build", "Deployment", "CPPredicateEditorTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPPredicateEditorTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPPredicateEditorTest"), FILE.join("Build", "Desktop", "CPPredicateEditorTest", "CPPredicateEditorTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPPredicateEditorTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPPredicateEditorTest"), path.join("Build", "Desktop", "CPPredicateEditorTest", "CPPredicateEditorTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPPredicateEditorTest", "CPPredicateEditorTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPPredicateEditorTest", "CPPredicateEditorTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPPredicateEditorTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPPredicateEditorTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPProgressIndicatorTest/Jakefile b/Tests/Manual/CPProgressIndicatorTest/Jakefile index b45ca0e1a..15942fcea 100644 --- a/Tests/Manual/CPProgressIndicatorTest/Jakefile +++ b/Tests/Manual/CPProgressIndicatorTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, SlevenBits Ltd. All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPProgressIndicatorTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPProgressIndicatorTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPProgressIndicatorTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPProgressIndicatorTest"); task.setIdentifier("com.yourcompany.CPProgressIndicatorTest"); @@ -26,7 +26,7 @@ app ("CPProgressIndicatorTest", function(task) task.setAuthor("SlevenBits Ltd"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPProgressIndicatorTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPProgressIndicatorTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPProgressIndicatorTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPProgressIndicatorTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPProgressIndicatorTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPProgressIndicatorTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPProgressIndicatorTest"), FILE.join("Build", "Deployment", "CPProgressIndicatorTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPProgressIndicatorTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPProgressIndicatorTest"), path.join("Build", "Deployment", "CPProgressIndicatorTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPProgressIndicatorTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPProgressIndicatorTest"), FILE.join("Build", "Desktop", "CPProgressIndicatorTest", "CPProgressIndicatorTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPProgressIndicatorTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPProgressIndicatorTest"), path.join("Build", "Desktop", "CPProgressIndicatorTest", "CPProgressIndicatorTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPProgressIndicatorTest", "CPProgressIndicatorTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPProgressIndicatorTest", "CPProgressIndicatorTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPProgressIndicatorTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPProgressIndicatorTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPPropertyListSerializationTest/Jakefile b/Tests/Manual/CPPropertyListSerializationTest/Jakefile index 0ec2c726b..55b60ee65 100644 --- a/Tests/Manual/CPPropertyListSerializationTest/Jakefile +++ b/Tests/Manual/CPPropertyListSerializationTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPPropertyListSerializationTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPPropertyListSerializationTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPPropertyListSerializationTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPPropertyListSerializationTest"); task.setIdentifier("com.yourcompany.CPPropertyListSerializationTest"); @@ -26,7 +26,7 @@ app ("CPPropertyListSerializationTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPPropertyListSerializationTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPPropertyListSerializationTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPPropertyListSerializationTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPPropertyListSerializationTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPPropertyListSerializationTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPPropertyListSerializationTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPPropertyListSerializationTest"), FILE.join("Build", "Deployment", "CPPropertyListSerializationTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPPropertyListSerializationTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPPropertyListSerializationTest"), path.join("Build", "Deployment", "CPPropertyListSerializationTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPPropertyListSerializationTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPPropertyListSerializationTest"), FILE.join("Build", "Desktop", "CPPropertyListSerializationTest", "CPPropertyListSerializationTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPPropertyListSerializationTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPPropertyListSerializationTest"), path.join("Build", "Desktop", "CPPropertyListSerializationTest", "CPPropertyListSerializationTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPPropertyListSerializationTest", "CPPropertyListSerializationTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPPropertyListSerializationTest", "CPPropertyListSerializationTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPPropertyListSerializationTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPPropertyListSerializationTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPRadioBindingsTest/Jakefile b/Tests/Manual/CPRadioBindingsTest/Jakefile index fb971f79f..6bf66196f 100644 --- a/Tests/Manual/CPRadioBindingsTest/Jakefile +++ b/Tests/Manual/CPRadioBindingsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2013, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPRadioBindingsTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPRadioBindingsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPRadioBindingsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPRadioBindingsTest"); task.setIdentifier("com.yourcompany.CPRadioBindingsTest"); @@ -26,7 +26,7 @@ app ("CPRadioBindingsTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPRadioBindingsTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPRadioBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPRadioBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPRadioBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPRadioBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPRadioBindingsTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPRadioBindingsTest"), FILE.join("Build", "Deployment", "CPRadioBindingsTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPRadioBindingsTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPRadioBindingsTest"), path.join("Build", "Deployment", "CPRadioBindingsTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPRadioBindingsTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPRadioBindingsTest"), FILE.join("Build", "Desktop", "CPRadioBindingsTest", "CPRadioBindingsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPRadioBindingsTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPRadioBindingsTest"), path.join("Build", "Desktop", "CPRadioBindingsTest", "CPRadioBindingsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPRadioBindingsTest", "CPRadioBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPRadioBindingsTest", "CPRadioBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPRadioBindingsTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPRadioBindingsTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPRuleEditorCibTest/Jakefile b/Tests/Manual/CPRuleEditorCibTest/Jakefile index c66879a92..1f0c202fc 100644 --- a/Tests/Manual/CPRuleEditorCibTest/Jakefile +++ b/Tests/Manual/CPRuleEditorCibTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPRuleEditorCibTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPRuleEditorCibTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPRuleEditorCibTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPRuleEditorCibTest"); task.setIdentifier("com.yourcompany.CPRuleEditorCibTest"); @@ -26,7 +26,7 @@ app ("CPRuleEditorCibTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPRuleEditorCibTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPRuleEditorCibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPRuleEditorCibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPRuleEditorCibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPRuleEditorCibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPRuleEditorCibTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPRuleEditorCibTest"), FILE.join("Build", "Deployment", "CPRuleEditorCibTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPRuleEditorCibTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPRuleEditorCibTest"), path.join("Build", "Deployment", "CPRuleEditorCibTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPRuleEditorCibTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPRuleEditorCibTest"), FILE.join("Build", "Desktop", "CPRuleEditorCibTest", "CPRuleEditorCibTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPRuleEditorCibTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPRuleEditorCibTest"), path.join("Build", "Desktop", "CPRuleEditorCibTest", "CPRuleEditorCibTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPRuleEditorCibTest", "CPRuleEditorCibTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPRuleEditorCibTest", "CPRuleEditorCibTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPRuleEditorCibTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPRuleEditorCibTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPRuleEditorTest/Jakefile b/Tests/Manual/CPRuleEditorTest/Jakefile index c66879a92..1f0c202fc 100644 --- a/Tests/Manual/CPRuleEditorTest/Jakefile +++ b/Tests/Manual/CPRuleEditorTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPRuleEditorCibTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPRuleEditorCibTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPRuleEditorCibTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPRuleEditorCibTest"); task.setIdentifier("com.yourcompany.CPRuleEditorCibTest"); @@ -26,7 +26,7 @@ app ("CPRuleEditorCibTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPRuleEditorCibTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPRuleEditorCibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPRuleEditorCibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPRuleEditorCibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPRuleEditorCibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPRuleEditorCibTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPRuleEditorCibTest"), FILE.join("Build", "Deployment", "CPRuleEditorCibTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPRuleEditorCibTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPRuleEditorCibTest"), path.join("Build", "Deployment", "CPRuleEditorCibTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPRuleEditorCibTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPRuleEditorCibTest"), FILE.join("Build", "Desktop", "CPRuleEditorCibTest", "CPRuleEditorCibTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPRuleEditorCibTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPRuleEditorCibTest"), path.join("Build", "Desktop", "CPRuleEditorCibTest", "CPRuleEditorCibTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPRuleEditorCibTest", "CPRuleEditorCibTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPRuleEditorCibTest", "CPRuleEditorCibTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPRuleEditorCibTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPRuleEditorCibTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPScrollView2Test/Jakefile b/Tests/Manual/CPScrollView2Test/Jakefile index 256245a1b..f74598b2f 100644 --- a/Tests/Manual/CPScrollView2Test/Jakefile +++ b/Tests/Manual/CPScrollView2Test/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPScrollView2Test", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPScrollView2Test.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPScrollView2Test.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPScrollView2Test"); task.setIdentifier("com.yourcompany.CPScrollView2Test"); @@ -26,7 +26,7 @@ app ("CPScrollView2Test", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPScrollView2Test"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPScrollView2Test", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPScrollView2Test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPScrollView2Test", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPScrollView2Test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPScrollView2Test")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPScrollView2Test"), FILE.join("Build", "Deployment", "CPScrollView2Test")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPScrollView2Test"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPScrollView2Test"), path.join("Build", "Deployment", "CPScrollView2Test")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPScrollView2Test")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPScrollView2Test"), FILE.join("Build", "Desktop", "CPScrollView2Test", "CPScrollView2Test.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPScrollView2Test"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPScrollView2Test"), path.join("Build", "Desktop", "CPScrollView2Test", "CPScrollView2Test.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPScrollView2Test", "CPScrollView2Test.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPScrollView2Test", "CPScrollView2Test.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPScrollView2Test")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPScrollView2Test")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPSearchFieldPredicateBinding/Jakefile b/Tests/Manual/CPSearchFieldPredicateBinding/Jakefile index 6f3616e21..e8f6810c4 100755 --- a/Tests/Manual/CPSearchFieldPredicateBinding/Jakefile +++ b/Tests/Manual/CPSearchFieldPredicateBinding/Jakefile @@ -6,12 +6,12 @@ * Copyright 2018, Army of Me, Inc. All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "44SortingCPTableView"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "44SortingCPTableView.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "44SortingCPTableView.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("44-Sorting-CPTableView"); task.setIdentifier("com.yourcompany.44SortingCPTableView"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Army of Me, Inc."); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("44-Sorting-CPTableView"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,33 +67,33 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -102,14 +102,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -117,17 +117,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -137,34 +137,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPSearchFieldTest/Jakefile b/Tests/Manual/CPSearchFieldTest/Jakefile index bb6d1fc63..a4d98e6a6 100644 --- a/Tests/Manual/CPSearchFieldTest/Jakefile +++ b/Tests/Manual/CPSearchFieldTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPSearchFieldTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPSearchFieldTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPSearchFieldTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPSearchFieldTest"); task.setIdentifier("com.yourcompany.CPSearchFieldTest"); @@ -26,7 +26,7 @@ app ("CPSearchFieldTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPSearchFieldTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPSearchFieldTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPSearchFieldTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPSearchFieldTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPSearchFieldTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPSearchFieldTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPSearchFieldTest"), FILE.join("Build", "Deployment", "CPSearchFieldTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPSearchFieldTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPSearchFieldTest"), path.join("Build", "Deployment", "CPSearchFieldTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPSearchFieldTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPSearchFieldTest"), FILE.join("Build", "Desktop", "CPSearchFieldTest", "CPSearchFieldTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPSearchFieldTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPSearchFieldTest"), path.join("Build", "Desktop", "CPSearchFieldTest", "CPSearchFieldTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPSearchFieldTest", "CPSearchFieldTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPSearchFieldTest", "CPSearchFieldTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPSearchFieldTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPSearchFieldTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPSegmentedControlBindingsTest/Jakefile b/Tests/Manual/CPSegmentedControlBindingsTest/Jakefile index dae28859a..6ad4ce8ae 100644 --- a/Tests/Manual/CPSegmentedControlBindingsTest/Jakefile +++ b/Tests/Manual/CPSegmentedControlBindingsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPSegmentedControlBindingsTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPSegmentedControlBindingsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPSegmentedControlBindingsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPSegmentedControlBindingsTest"); task.setIdentifier("com.yourcompany.CPSegmentedControlBindingsTest"); @@ -26,7 +26,7 @@ app ("CPSegmentedControlBindingsTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPSegmentedControlBindingsTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPSegmentedControlBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPSegmentedControlBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPSegmentedControlBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPSegmentedControlBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPSegmentedControlBindingsTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPSegmentedControlBindingsTest"), FILE.join("Build", "Deployment", "CPSegmentedControlBindingsTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPSegmentedControlBindingsTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPSegmentedControlBindingsTest"), path.join("Build", "Deployment", "CPSegmentedControlBindingsTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPSegmentedControlBindingsTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPSegmentedControlBindingsTest"), FILE.join("Build", "Desktop", "CPSegmentedControlBindingsTest", "CPSegmentedControlBindingsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPSegmentedControlBindingsTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPSegmentedControlBindingsTest"), path.join("Build", "Desktop", "CPSegmentedControlBindingsTest", "CPSegmentedControlBindingsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPSegmentedControlBindingsTest", "CPSegmentedControlBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPSegmentedControlBindingsTest", "CPSegmentedControlBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPSegmentedControlBindingsTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPSegmentedControlBindingsTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPSegmentedControlTest/Jakefile b/Tests/Manual/CPSegmentedControlTest/Jakefile index a880534d4..5c718fa83 100644 --- a/Tests/Manual/CPSegmentedControlTest/Jakefile +++ b/Tests/Manual/CPSegmentedControlTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2013, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPSegmentedControlTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPSegmentedControlTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPSegmentedControlTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPSegmentedControlTest"); task.setIdentifier("com.yourcompany.CPSegmentedControlTest"); @@ -26,7 +26,7 @@ app ("CPSegmentedControlTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPSegmentedControlTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPSegmentedControlTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPSegmentedControlTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPSegmentedControlTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPSegmentedControlTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPSegmentedControlTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPSegmentedControlTest"), FILE.join("Build", "Deployment", "CPSegmentedControlTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPSegmentedControlTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPSegmentedControlTest"), path.join("Build", "Deployment", "CPSegmentedControlTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPSegmentedControlTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPSegmentedControlTest"), FILE.join("Build", "Desktop", "CPSegmentedControlTest", "CPSegmentedControlTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPSegmentedControlTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPSegmentedControlTest"), path.join("Build", "Desktop", "CPSegmentedControlTest", "CPSegmentedControlTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPSegmentedControlTest", "CPSegmentedControlTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPSegmentedControlTest", "CPSegmentedControlTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPSegmentedControlTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPSegmentedControlTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPSoundTest/Jakefile b/Tests/Manual/CPSoundTest/Jakefile index ba92517b5..400bec84e 100644 --- a/Tests/Manual/CPSoundTest/Jakefile +++ b/Tests/Manual/CPSoundTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, WireLoad, LLC All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPSoundTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPSoundTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPSoundTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPSoundTest"); task.setIdentifier("com.yourcompany.CPSoundTest"); @@ -26,7 +26,7 @@ app ("CPSoundTest", function(task) task.setAuthor("WireLoad, LLC"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPSoundTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPSoundTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPSoundTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPSoundTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPSoundTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPSoundTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPSoundTest"), FILE.join("Build", "Deployment", "CPSoundTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPSoundTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPSoundTest"), path.join("Build", "Deployment", "CPSoundTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPSoundTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPSoundTest"), FILE.join("Build", "Desktop", "CPSoundTest", "CPSoundTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPSoundTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPSoundTest"), path.join("Build", "Desktop", "CPSoundTest", "CPSoundTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPSoundTest", "CPSoundTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPSoundTest", "CPSoundTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPSoundTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPSoundTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPSplitViewDividerTest/Jakefile b/Tests/Manual/CPSplitViewDividerTest/Jakefile index 903ede1f0..a52430991 100644 --- a/Tests/Manual/CPSplitViewDividerTest/Jakefile +++ b/Tests/Manual/CPSplitViewDividerTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2016, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPSplitViewDividerTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPSplitViewDividerTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPSplitViewDividerTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPSplitViewDividerTest"); task.setIdentifier("com.yourcompany.CPSplitViewDividerTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPSplitViewDividerTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPSplitViewDividerTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPSplitViewDividerTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPSplitViewDividerTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPSplitViewDividerTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPSplitViewTest/Jakefile b/Tests/Manual/CPSplitViewTest/Jakefile index a4174055a..b68fa917e 100644 --- a/Tests/Manual/CPSplitViewTest/Jakefile +++ b/Tests/Manual/CPSplitViewTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, WireLoad All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPSplitViewTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPSplitViewTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPSplitViewTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPSplitViewTest"); task.setIdentifier("com.yourcompany.CPSplitViewTest"); @@ -26,7 +26,7 @@ app ("CPSplitViewTest", function(task) task.setAuthor("WireLoad"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPSplitViewTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPSplitViewTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPSplitViewTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPSplitViewTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPSplitViewTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPSplitViewTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPSplitViewTest"), FILE.join("Build", "Deployment", "CPSplitViewTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPSplitViewTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPSplitViewTest"), path.join("Build", "Deployment", "CPSplitViewTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPSplitViewTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPSplitViewTest"), FILE.join("Build", "Desktop", "CPSplitViewTest", "CPSplitViewTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPSplitViewTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPSplitViewTest"), path.join("Build", "Desktop", "CPSplitViewTest", "CPSplitViewTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPSplitViewTest", "CPSplitViewTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPSplitViewTest", "CPSplitViewTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPSplitViewTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPSplitViewTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPStepperBindingsTest/Jakefile b/Tests/Manual/CPStepperBindingsTest/Jakefile index 968879fa1..341abd513 100644 --- a/Tests/Manual/CPStepperBindingsTest/Jakefile +++ b/Tests/Manual/CPStepperBindingsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPStepperBindingsTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPStepperBindingsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPStepperBindingsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPStepperBindingsTest"); task.setIdentifier("com.yourcompany.CPStepperBindingsTest"); @@ -26,7 +26,7 @@ app ("CPStepperBindingsTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPStepperBindingsTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPStepperBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPStepperBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPStepperBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPStepperBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPStepperBindingsTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPStepperBindingsTest"), FILE.join("Build", "Deployment", "CPStepperBindingsTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPStepperBindingsTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPStepperBindingsTest"), path.join("Build", "Deployment", "CPStepperBindingsTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPStepperBindingsTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPStepperBindingsTest"), FILE.join("Build", "Desktop", "CPStepperBindingsTest", "CPStepperBindingsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPStepperBindingsTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPStepperBindingsTest"), path.join("Build", "Desktop", "CPStepperBindingsTest", "CPStepperBindingsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPStepperBindingsTest", "CPStepperBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPStepperBindingsTest", "CPStepperBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPStepperBindingsTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPStepperBindingsTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPStepperNibTest/Jakefile b/Tests/Manual/CPStepperNibTest/Jakefile index bddff968d..0c747cd4d 100644 --- a/Tests/Manual/CPStepperNibTest/Jakefile +++ b/Tests/Manual/CPStepperNibTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPStepperNibTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPStepperNibTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPStepperNibTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPStepperNibTest"); task.setIdentifier("com.yourcompany.CPStepperNibTest"); @@ -26,7 +26,7 @@ app ("CPStepperNibTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPStepperNibTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPStepperNibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPStepperNibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPStepperNibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPStepperNibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPStepperNibTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPStepperNibTest"), FILE.join("Build", "Deployment", "CPStepperNibTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPStepperNibTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPStepperNibTest"), path.join("Build", "Deployment", "CPStepperNibTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPStepperNibTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPStepperNibTest"), FILE.join("Build", "Desktop", "CPStepperNibTest", "CPStepperNibTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPStepperNibTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPStepperNibTest"), path.join("Build", "Desktop", "CPStepperNibTest", "CPStepperNibTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPStepperNibTest", "CPStepperNibTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPStepperNibTest", "CPStepperNibTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPStepperNibTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPStepperNibTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPTabView2Test/Jakefile b/Tests/Manual/CPTabView2Test/Jakefile index abc44cda6..858b8239c 100644 --- a/Tests/Manual/CPTabView2Test/Jakefile +++ b/Tests/Manual/CPTabView2Test/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPTabView2Test", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPTabView2Test.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPTabView2Test.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPTabView2Test"); task.setIdentifier("com.yourcompany.CPTabView2Test"); @@ -26,7 +26,7 @@ app ("CPTabView2Test", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPTabView2Test"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPTabView2Test", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPTabView2Test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPTabView2Test", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPTabView2Test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPTabView2Test")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPTabView2Test"), FILE.join("Build", "Deployment", "CPTabView2Test")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPTabView2Test"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPTabView2Test"), path.join("Build", "Deployment", "CPTabView2Test")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPTabView2Test")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPTabView2Test"), FILE.join("Build", "Desktop", "CPTabView2Test", "CPTabView2Test.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPTabView2Test"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPTabView2Test"), path.join("Build", "Desktop", "CPTabView2Test", "CPTabView2Test.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPTabView2Test", "CPTabView2Test.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPTabView2Test", "CPTabView2Test.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPTabView2Test")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPTabView2Test")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPTabViewBindingsTest/Jakefile b/Tests/Manual/CPTabViewBindingsTest/Jakefile index 338ac9d97..544c0d386 100644 --- a/Tests/Manual/CPTabViewBindingsTest/Jakefile +++ b/Tests/Manual/CPTabViewBindingsTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2015, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPTabViewBindingsTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPTabViewBindingsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPTabViewBindingsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPTabViewBindingsTest"); task.setIdentifier("com.yourcompany.CPTabViewBindingsTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPTabViewBindingsTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPTabViewBindingsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPTabViewBindingsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPTabViewBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPTabViewBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPTabViewNibTest/Jakefile b/Tests/Manual/CPTabViewNibTest/Jakefile index 9445df3e6..713a5ec3d 100644 --- a/Tests/Manual/CPTabViewNibTest/Jakefile +++ b/Tests/Manual/CPTabViewNibTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, WireLoad, LLC All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPTabViewNibTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPTabViewNibTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPTabViewNibTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPTabViewNibTest"); task.setIdentifier("com.yourcompany.CPTabViewNibTest"); @@ -26,7 +26,7 @@ app ("CPTabViewNibTest", function(task) task.setAuthor("WireLoad, LLC"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPTabViewNibTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPTabViewNibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPTabViewNibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPTabViewNibTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPTabViewNibTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPTabViewNibTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPTabViewNibTest"), FILE.join("Build", "Deployment", "CPTabViewNibTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPTabViewNibTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPTabViewNibTest"), path.join("Build", "Deployment", "CPTabViewNibTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPTabViewNibTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPTabViewNibTest"), FILE.join("Build", "Desktop", "CPTabViewNibTest", "CPTabViewNibTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPTabViewNibTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPTabViewNibTest"), path.join("Build", "Desktop", "CPTabViewNibTest", "CPTabViewNibTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPTabViewNibTest", "CPTabViewNibTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPTabViewNibTest", "CPTabViewNibTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPTabViewNibTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPTabViewNibTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPTableViewGroupRowsTest/Jakefile b/Tests/Manual/CPTableViewGroupRowsTest/Jakefile index 2ffb8ab1f..19a4febae 100644 --- a/Tests/Manual/CPTableViewGroupRowsTest/Jakefile +++ b/Tests/Manual/CPTableViewGroupRowsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPTableViewGroupRowsTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPTableViewGroupRowsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPTableViewGroupRowsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPTableViewGroupRowsTest"); task.setIdentifier("com.yourcompany.CPTableViewGroupRowsTest"); @@ -26,7 +26,7 @@ app ("CPTableViewGroupRowsTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPTableViewGroupRowsTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPTableViewGroupRowsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPTableViewGroupRowsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPTableViewGroupRowsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPTableViewGroupRowsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPTableViewGroupRowsTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPTableViewGroupRowsTest"), FILE.join("Build", "Deployment", "CPTableViewGroupRowsTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPTableViewGroupRowsTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPTableViewGroupRowsTest"), path.join("Build", "Deployment", "CPTableViewGroupRowsTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPTableViewGroupRowsTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPTableViewGroupRowsTest"), FILE.join("Build", "Desktop", "CPTableViewGroupRowsTest", "CPTableViewGroupRowsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPTableViewGroupRowsTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPTableViewGroupRowsTest"), path.join("Build", "Desktop", "CPTableViewGroupRowsTest", "CPTableViewGroupRowsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPTableViewGroupRowsTest", "CPTableViewGroupRowsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPTableViewGroupRowsTest", "CPTableViewGroupRowsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPTableViewGroupRowsTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPTableViewGroupRowsTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPTextFieldEditingStyleTest/Jakefile b/Tests/Manual/CPTextFieldEditingStyleTest/Jakefile index 8d30e7c27..df5d138bc 100644 --- a/Tests/Manual/CPTextFieldEditingStyleTest/Jakefile +++ b/Tests/Manual/CPTextFieldEditingStyleTest/Jakefile @@ -5,12 +5,12 @@ * Created by Alexandre Wilhelm on June 9, 2014. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPTextFieldEditingStyleTest"; @@ -20,10 +20,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPTextFieldEditingStyleTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPTextFieldEditingStyleTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPTextFieldEditingStyleTest"); task.setIdentifier("com.yourcompany.CPTextFieldEditingStyleTest"); @@ -31,7 +31,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPTextFieldEditingStyleTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -66,45 +66,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPTextFieldEditingStyleTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPTextFieldEditingStyleTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPTextFieldEditingStyleTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPTextFieldEditingStyleTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -113,14 +113,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (ENV["CONFIGURATION"] === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -128,17 +128,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); + addBundleFileSizes(path.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -148,34 +148,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPTextFieldMovementsTest/Jakefile b/Tests/Manual/CPTextFieldMovementsTest/Jakefile index 702305450..87b14dbb0 100644 --- a/Tests/Manual/CPTextFieldMovementsTest/Jakefile +++ b/Tests/Manual/CPTextFieldMovementsTest/Jakefile @@ -5,12 +5,12 @@ * Created by Alexandre Wilhelm on October 29, 2013. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPTextFieldMovementsTest"; @@ -20,10 +20,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPTextFieldMovementsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPTextFieldMovementsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPTextFieldMovementsTest"); task.setIdentifier("com.yourcompany.CPTextFieldMovementsTest"); @@ -31,7 +31,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPTextFieldMovementsTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -66,45 +66,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPTextFieldMovementsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPTextFieldMovementsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPTextFieldMovementsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPTextFieldMovementsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -113,14 +113,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (ENV["CONFIGURATION"] === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -128,17 +128,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); + addBundleFileSizes(path.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -148,34 +148,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPTextFieldMultiLineTest/Jakefile b/Tests/Manual/CPTextFieldMultiLineTest/Jakefile index 96cebfce4..3164a51ca 100644 --- a/Tests/Manual/CPTextFieldMultiLineTest/Jakefile +++ b/Tests/Manual/CPTextFieldMultiLineTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2014, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPTextFieldMultiLineTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPTextFieldMultiLineTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPTextFieldMultiLineTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPTextFieldMultiLineTest"); task.setIdentifier("com.yourcompany.CPTextFieldMultiLineTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPTextFieldMultiLineTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPTextFieldMultiLineTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPTextFieldMultiLineTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPTextFieldMultiLineTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPTextFieldMultiLineTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (ENV["CONFIGURATION"] === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); + addBundleFileSizes(path.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPTextFieldTest/Jakefile b/Tests/Manual/CPTextFieldTest/Jakefile index 75a812f7f..2c57b9160 100644 --- a/Tests/Manual/CPTextFieldTest/Jakefile +++ b/Tests/Manual/CPTextFieldTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, WireLoad, LLC All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPTextFieldTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPTextFieldTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPTextFieldTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPTextFieldTest"); task.setIdentifier("com.yourcompany.CPTextFieldTest"); @@ -26,7 +26,7 @@ app ("CPTextFieldTest", function(task) task.setAuthor("WireLoad, LLC"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPTextFieldTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPTextFieldTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPTextFieldTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPTextFieldTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPTextFieldTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPTextFieldTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPTextFieldTest"), FILE.join("Build", "Deployment", "CPTextFieldTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPTextFieldTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPTextFieldTest"), path.join("Build", "Deployment", "CPTextFieldTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPTextFieldTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPTextFieldTest"), FILE.join("Build", "Desktop", "CPTextFieldTest", "CPTextFieldTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPTextFieldTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPTextFieldTest"), path.join("Build", "Desktop", "CPTextFieldTest", "CPTextFieldTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPTextFieldTest", "CPTextFieldTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPTextFieldTest", "CPTextFieldTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPTextFieldTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPTextFieldTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPTextViewCibTest/Jakefile b/Tests/Manual/CPTextViewCibTest/Jakefile index eb85f3135..7d468420b 100644 --- a/Tests/Manual/CPTextViewCibTest/Jakefile +++ b/Tests/Manual/CPTextViewCibTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2014, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPTextViewCibTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPTextViewCibTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPTextViewCibTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPTextViewCibTest"); task.setIdentifier("com.yourcompany.CPTextViewCibTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPTextViewCibTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPTextViewCibTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPTextViewCibTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPTextViewCibTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPTextViewCibTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (ENV["CONFIGURATION"] === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); + addBundleFileSizes(path.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPTextViewDelegateAndNotificationsTest/Jakefile b/Tests/Manual/CPTextViewDelegateAndNotificationsTest/Jakefile index be874866c..8f2d96f9d 100644 --- a/Tests/Manual/CPTextViewDelegateAndNotificationsTest/Jakefile +++ b/Tests/Manual/CPTextViewDelegateAndNotificationsTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2017, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPTextViewDelegateAndNotificationsTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPTextViewDelegateAndNotificationsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPTextViewDelegateAndNotificationsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPTextViewDelegateAndNotificationsTest"); task.setIdentifier("com.yourcompany.CPTextViewDelegateAndNotificationsTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPTextViewDelegateAndNotificationsTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,33 +67,33 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -102,14 +102,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -117,17 +117,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -137,34 +137,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPTimeZoneTest/Jakefile b/Tests/Manual/CPTimeZoneTest/Jakefile index 258af5eb9..0205d6548 100644 --- a/Tests/Manual/CPTimeZoneTest/Jakefile +++ b/Tests/Manual/CPTimeZoneTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2013, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPTimeZoneTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPTimeZoneTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPTimeZoneTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPTimeZoneTest"); task.setIdentifier("com.yourcompany.CPTimeZoneTest"); @@ -26,7 +26,7 @@ app ("CPTimeZoneTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPTimeZoneTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPTimeZoneTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPTimeZoneTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPTimeZoneTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPTimeZoneTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPTimeZoneTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPTimeZoneTest"), FILE.join("Build", "Deployment", "CPTimeZoneTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPTimeZoneTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPTimeZoneTest"), path.join("Build", "Deployment", "CPTimeZoneTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPTimeZoneTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPTimeZoneTest"), FILE.join("Build", "Desktop", "CPTimeZoneTest", "CPTimeZoneTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPTimeZoneTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPTimeZoneTest"), path.join("Build", "Desktop", "CPTimeZoneTest", "CPTimeZoneTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPTimeZoneTest", "CPTimeZoneTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPTimeZoneTest", "CPTimeZoneTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPTimeZoneTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPTimeZoneTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPTokenFieldTest/Jakefile b/Tests/Manual/CPTokenFieldTest/Jakefile index 329de3d67..a2e08ea44 100644 --- a/Tests/Manual/CPTokenFieldTest/Jakefile +++ b/Tests/Manual/CPTokenFieldTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, WireLoad, LLC All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPTokenFieldTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPTokenFieldTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPTokenFieldTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPTokenFieldTest"); task.setIdentifier("com.yourcompany.CPTokenFieldTest"); @@ -26,7 +26,7 @@ app ("CPTokenFieldTest", function(task) task.setAuthor("WireLoad, LLC"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPTokenFieldTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPTokenFieldTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPTokenFieldTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPTokenFieldTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPTokenFieldTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPTokenFieldTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPTokenFieldTest"), FILE.join("Build", "Deployment", "CPTokenFieldTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPTokenFieldTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPTokenFieldTest"), path.join("Build", "Deployment", "CPTokenFieldTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPTokenFieldTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPTokenFieldTest"), FILE.join("Build", "Desktop", "CPTokenFieldTest", "CPTokenFieldTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPTokenFieldTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPTokenFieldTest"), path.join("Build", "Desktop", "CPTokenFieldTest", "CPTokenFieldTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPTokenFieldTest", "CPTokenFieldTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPTokenFieldTest", "CPTokenFieldTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPTokenFieldTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPTokenFieldTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPToolTipTest/Jakefile b/Tests/Manual/CPToolTipTest/Jakefile index 203d18c83..97dc86e51 100644 --- a/Tests/Manual/CPToolTipTest/Jakefile +++ b/Tests/Manual/CPToolTipTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPToolTipTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPToolTipTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPToolTipTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPToolTipTest"); task.setIdentifier("com.yourcompany.CPToolTipTest"); @@ -26,7 +26,7 @@ app ("CPToolTipTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPToolTipTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPToolTipTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPToolTipTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPToolTipTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPToolTipTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPToolTipTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPToolTipTest"), FILE.join("Build", "Deployment", "CPToolTipTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPToolTipTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPToolTipTest"), path.join("Build", "Deployment", "CPToolTipTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPToolTipTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPToolTipTest"), FILE.join("Build", "Desktop", "CPToolTipTest", "CPToolTipTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPToolTipTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPToolTipTest"), path.join("Build", "Desktop", "CPToolTipTest", "CPToolTipTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPToolTipTest", "CPToolTipTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPToolTipTest", "CPToolTipTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPToolTipTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPToolTipTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPToolbarTest/Jakefile b/Tests/Manual/CPToolbarTest/Jakefile index 157653e69..37c13f52c 100644 --- a/Tests/Manual/CPToolbarTest/Jakefile +++ b/Tests/Manual/CPToolbarTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, SlevenBits Ltd. All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPToolbarTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPToolbarTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPToolbarTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPToolbarTest"); task.setIdentifier("com.slevenbits.CPToolbarTest"); @@ -26,7 +26,7 @@ app ("CPToolbarTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPToolbarTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPToolbarTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPToolbarTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPToolbarTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPToolbarTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPToolbarTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPToolbarTest"), FILE.join("Build", "Deployment", "CPToolbarTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPToolbarTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPToolbarTest"), path.join("Build", "Deployment", "CPToolbarTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPToolbarTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPToolbarTest"), FILE.join("Build", "Desktop", "CPToolbarTest", "CPToolbarTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPToolbarTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPToolbarTest"), path.join("Build", "Desktop", "CPToolbarTest", "CPToolbarTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPToolbarTest", "CPToolbarTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPToolbarTest", "CPToolbarTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPToolbarTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPToolbarTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPTreeControllerTest/Jakefile b/Tests/Manual/CPTreeControllerTest/Jakefile index 8f62ca5cd..968573d7b 100644 --- a/Tests/Manual/CPTreeControllerTest/Jakefile +++ b/Tests/Manual/CPTreeControllerTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("tooltips", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "tooltips.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "tooltips.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("tooltips"); task.setIdentifier("com.yourcompany.tooltips"); @@ -26,7 +26,7 @@ app ("tooltips", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("tooltips"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "tooltips", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "tooltips", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "tooltips", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "tooltips", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "tooltips")); - OS.system(["press", "-f", FILE.join("Build", "Release", "tooltips"), FILE.join("Build", "Deployment", "tooltips")]); + fs.mkdirSync(path.join("Build", "Deployment", "tooltips"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "tooltips"), path.join("Build", "Deployment", "tooltips")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "tooltips")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "tooltips"), FILE.join("Build", "Desktop", "tooltips", "tooltips.app")); + fs.mkdirSync(path.join("Build", "Desktop", "tooltips"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "tooltips"), path.join("Build", "Desktop", "tooltips", "tooltips.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "tooltips", "tooltips.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "tooltips", "tooltips.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "tooltips")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "tooltips")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPURLConnectionAsyncTest/Jakefile b/Tests/Manual/CPURLConnectionAsyncTest/Jakefile index 8012b7016..44a5aafa8 100644 --- a/Tests/Manual/CPURLConnectionAsyncTest/Jakefile +++ b/Tests/Manual/CPURLConnectionAsyncTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPURLConnectionAsyncTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPURLConnectionAsyncTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPURLConnectionAsyncTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPURLConnectionAsyncTest"); task.setIdentifier("com.yourcompany.CPURLConnectionAsyncTest"); @@ -26,7 +26,7 @@ app ("CPURLConnectionAsyncTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPURLConnectionAsyncTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPURLConnectionAsyncTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPURLConnectionAsyncTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPURLConnectionAsyncTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPURLConnectionAsyncTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPURLConnectionAsyncTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPURLConnectionAsyncTest"), FILE.join("Build", "Deployment", "CPURLConnectionAsyncTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPURLConnectionAsyncTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPURLConnectionAsyncTest"), path.join("Build", "Deployment", "CPURLConnectionAsyncTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPURLConnectionAsyncTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPURLConnectionAsyncTest"), FILE.join("Build", "Desktop", "CPURLConnectionAsyncTest", "CPURLConnectionAsyncTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPURLConnectionAsyncTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPURLConnectionAsyncTest"), path.join("Build", "Desktop", "CPURLConnectionAsyncTest", "CPURLConnectionAsyncTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPURLConnectionAsyncTest", "CPURLConnectionAsyncTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPURLConnectionAsyncTest", "CPURLConnectionAsyncTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPURLConnectionAsyncTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPURLConnectionAsyncTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPURLConnectionSynchronousTest/Jakefile b/Tests/Manual/CPURLConnectionSynchronousTest/Jakefile index d92409917..001bf1f8c 100644 --- a/Tests/Manual/CPURLConnectionSynchronousTest/Jakefile +++ b/Tests/Manual/CPURLConnectionSynchronousTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPURLConnectionSynchronousTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPURLConnectionSynchronousTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPURLConnectionSynchronousTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPURLConnectionSynchronousTest"); task.setIdentifier("com.yourcompany.CPURLConnectionSynchronousTest"); @@ -26,7 +26,7 @@ app ("CPURLConnectionSynchronousTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPURLConnectionSynchronousTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPURLConnectionSynchronousTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPURLConnectionSynchronousTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPURLConnectionSynchronousTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPURLConnectionSynchronousTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPURLConnectionSynchronousTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPURLConnectionSynchronousTest"), FILE.join("Build", "Deployment", "CPURLConnectionSynchronousTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPURLConnectionSynchronousTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPURLConnectionSynchronousTest"), path.join("Build", "Deployment", "CPURLConnectionSynchronousTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPURLConnectionSynchronousTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPURLConnectionSynchronousTest"), FILE.join("Build", "Desktop", "CPURLConnectionSynchronousTest", "CPURLConnectionSynchronousTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPURLConnectionSynchronousTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPURLConnectionSynchronousTest"), path.join("Build", "Desktop", "CPURLConnectionSynchronousTest", "CPURLConnectionSynchronousTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPURLConnectionSynchronousTest", "CPURLConnectionSynchronousTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPURLConnectionSynchronousTest", "CPURLConnectionSynchronousTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPURLConnectionSynchronousTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPURLConnectionSynchronousTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPUserDefaultsControllerTest/Jakefile b/Tests/Manual/CPUserDefaultsControllerTest/Jakefile index 856aa9289..ea85e95be 100644 --- a/Tests/Manual/CPUserDefaultsControllerTest/Jakefile +++ b/Tests/Manual/CPUserDefaultsControllerTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, WireLoad All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPUserDefaultsControllerTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPUserDefaultsControllerTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPUserDefaultsControllerTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPUserDefaultsControllerTest"); task.setIdentifier("com.yourcompany.CPUserDefaultsControllerTest"); @@ -26,7 +26,7 @@ app ("CPUserDefaultsControllerTest", function(task) task.setAuthor("WireLoad"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPUserDefaultsControllerTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPUserDefaultsControllerTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPUserDefaultsControllerTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPUserDefaultsControllerTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPUserDefaultsControllerTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPUserDefaultsControllerTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPUserDefaultsControllerTest"), FILE.join("Build", "Deployment", "CPUserDefaultsControllerTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPUserDefaultsControllerTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPUserDefaultsControllerTest"), path.join("Build", "Deployment", "CPUserDefaultsControllerTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPUserDefaultsControllerTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPUserDefaultsControllerTest"), FILE.join("Build", "Desktop", "CPUserDefaultsControllerTest", "CPUserDefaultsControllerTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPUserDefaultsControllerTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPUserDefaultsControllerTest"), path.join("Build", "Desktop", "CPUserDefaultsControllerTest", "CPUserDefaultsControllerTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPUserDefaultsControllerTest", "CPUserDefaultsControllerTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPUserDefaultsControllerTest", "CPUserDefaultsControllerTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPUserDefaultsControllerTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPUserDefaultsControllerTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPUserDefaultsTest/Jakefile b/Tests/Manual/CPUserDefaultsTest/Jakefile index fb6fedce3..c64d38445 100644 --- a/Tests/Manual/CPUserDefaultsTest/Jakefile +++ b/Tests/Manual/CPUserDefaultsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPUserDefaultsTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPUserDefaultsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPUserDefaultsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPUserDefaultsTest"); task.setIdentifier("com.yourcompany.CPUserDefaultsTest"); @@ -26,7 +26,7 @@ app ("CPUserDefaultsTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPUserDefaultsTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPUserDefaultsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPUserDefaultsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPUserDefaultsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPUserDefaultsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPUserDefaultsTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPUserDefaultsTest"), FILE.join("Build", "Deployment", "CPUserDefaultsTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPUserDefaultsTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPUserDefaultsTest"), path.join("Build", "Deployment", "CPUserDefaultsTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPUserDefaultsTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPUserDefaultsTest"), FILE.join("Build", "Desktop", "CPUserDefaultsTest", "CPUserDefaultsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPUserDefaultsTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPUserDefaultsTest"), path.join("Build", "Desktop", "CPUserDefaultsTest", "CPUserDefaultsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPUserDefaultsTest", "CPUserDefaultsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPUserDefaultsTest", "CPUserDefaultsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPUserDefaultsTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPUserDefaultsTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPUserNotificationTest/Jakefile b/Tests/Manual/CPUserNotificationTest/Jakefile index 92fd159c5..c41d83212 100644 --- a/Tests/Manual/CPUserNotificationTest/Jakefile +++ b/Tests/Manual/CPUserNotificationTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2015, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPUserNotificationTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPUserNotificationTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPUserNotificationTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPUserNotificationTest"); task.setIdentifier("com.yourcompany.CPUserNotificationTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPUserNotificationTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPUserNotificationTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPUserNotificationTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPUserNotificationTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPUserNotificationTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPViewControllerTest/Jakefile b/Tests/Manual/CPViewControllerTest/Jakefile index f54ae354a..f9ad48a50 100644 --- a/Tests/Manual/CPViewControllerTest/Jakefile +++ b/Tests/Manual/CPViewControllerTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2015, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPViewControllerTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPViewControllerTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPViewControllerTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPViewControllerTest"); task.setIdentifier("com.yourcompany.CPViewControllerTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPViewControllerTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPViewControllerTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPViewControllerTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPViewControllerTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPViewControllerTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPVisualEffectViewTest/Jakefile b/Tests/Manual/CPVisualEffectViewTest/Jakefile index 690674428..8f824430b 100644 --- a/Tests/Manual/CPVisualEffectViewTest/Jakefile +++ b/Tests/Manual/CPVisualEffectViewTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2015, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPVisualEffectViewTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPVisualEffectViewTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPVisualEffectViewTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPVisualEffectViewTest"); task.setIdentifier("com.yourcompany.CPVisualEffectViewTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPVisualEffectViewTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CPVisualEffectViewTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CPVisualEffectViewTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CPVisualEffectViewTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CPVisualEffectViewTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPWebViewTest/Jakefile b/Tests/Manual/CPWebViewTest/Jakefile index f4365f04e..189829470 100644 --- a/Tests/Manual/CPWebViewTest/Jakefile +++ b/Tests/Manual/CPWebViewTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Alexander Ljungberg All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPWebViewTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPWebViewTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPWebViewTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPWebViewTest"); task.setIdentifier("com.yourcompany.CPWebViewTest"); @@ -26,7 +26,7 @@ app ("CPWebViewTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPWebViewTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPWebViewTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPWebViewTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPWebViewTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPWebViewTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPWebViewTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPWebViewTest"), FILE.join("Build", "Deployment", "CPWebViewTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPWebViewTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPWebViewTest"), path.join("Build", "Deployment", "CPWebViewTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPWebViewTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPWebViewTest"), FILE.join("Build", "Desktop", "CPWebViewTest", "CPWebViewTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPWebViewTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPWebViewTest"), path.join("Build", "Desktop", "CPWebViewTest", "CPWebViewTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPWebViewTest", "CPWebViewTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPWebViewTest", "CPWebViewTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPWebViewTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPWebViewTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPWebViewTest2/Jakefile b/Tests/Manual/CPWebViewTest2/Jakefile index 4dcc5a105..f1aa39144 100644 --- a/Tests/Manual/CPWebViewTest2/Jakefile +++ b/Tests/Manual/CPWebViewTest2/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, WireLoad All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPWebViewTest2", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPWebViewTest2.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPWebViewTest2.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPWebViewTest2"); task.setIdentifier("com.yourcompany.CPWebViewTest2"); @@ -26,7 +26,7 @@ app ("CPWebViewTest2", function(task) task.setAuthor("WireLoad"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPWebViewTest2"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPWebViewTest2", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPWebViewTest2", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPWebViewTest2", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPWebViewTest2", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPWebViewTest2")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPWebViewTest2"), FILE.join("Build", "Deployment", "CPWebViewTest2")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPWebViewTest2"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPWebViewTest2"), path.join("Build", "Deployment", "CPWebViewTest2")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPWebViewTest2")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPWebViewTest2"), FILE.join("Build", "Desktop", "CPWebViewTest2", "CPWebViewTest2.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPWebViewTest2"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPWebViewTest2"), path.join("Build", "Desktop", "CPWebViewTest2", "CPWebViewTest2.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPWebViewTest2", "CPWebViewTest2.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPWebViewTest2", "CPWebViewTest2.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPWebViewTest2")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPWebViewTest2")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPWindowLiveResizeTest/Jakefile b/Tests/Manual/CPWindowLiveResizeTest/Jakefile index c21b42e5f..a2c973d86 100644 --- a/Tests/Manual/CPWindowLiveResizeTest/Jakefile +++ b/Tests/Manual/CPWindowLiveResizeTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2017, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CPWindowLiveResizeTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CPWindowLiveResizeTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPWindowLiveResizeTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPWindowLiveResizeTest"); task.setIdentifier("com.yourcompany.CPWindowLiveResizeTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPWindowLiveResizeTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,33 +67,33 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -102,14 +102,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -117,17 +117,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -137,34 +137,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/CPWindowMovableTest/Jakefile b/Tests/Manual/CPWindowMovableTest/Jakefile index 8ca955d00..101075c91 100644 --- a/Tests/Manual/CPWindowMovableTest/Jakefile +++ b/Tests/Manual/CPWindowMovableTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPWindowMovableTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPWindowMovableTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPWindowMovableTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPWindowMovableTest"); task.setIdentifier("com.yourcompany.CPWindowMovableTest"); @@ -26,7 +26,7 @@ app ("CPWindowMovableTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPWindowMovableTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPWindowMovableTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPWindowMovableTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPWindowMovableTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPWindowMovableTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPWindowMovableTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPWindowMovableTest"), FILE.join("Build", "Deployment", "CPWindowMovableTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPWindowMovableTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPWindowMovableTest"), path.join("Build", "Deployment", "CPWindowMovableTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPWindowMovableTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPWindowMovableTest"), FILE.join("Build", "Desktop", "CPWindowMovableTest", "CPWindowMovableTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPWindowMovableTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPWindowMovableTest"), path.join("Build", "Desktop", "CPWindowMovableTest", "CPWindowMovableTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPWindowMovableTest", "CPWindowMovableTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPWindowMovableTest", "CPWindowMovableTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPWindowMovableTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPWindowMovableTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CPWindowResizeStyleTest/Jakefile b/Tests/Manual/CPWindowResizeStyleTest/Jakefile index a603fc4c8..ba2c8a2a9 100644 --- a/Tests/Manual/CPWindowResizeStyleTest/Jakefile +++ b/Tests/Manual/CPWindowResizeStyleTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPWindowResizeStyleTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPWindowResizeStyleTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPWindowResizeStyleTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPWindowResizeStyleTest"); task.setIdentifier("com.yourcompany.CPWindowResizeStyleTest"); @@ -26,7 +26,7 @@ app ("CPWindowResizeStyleTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPWindowResizeStyleTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPWindowResizeStyleTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPWindowResizeStyleTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPWindowResizeStyleTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPWindowResizeStyleTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPWindowResizeStyleTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPWindowResizeStyleTest"), FILE.join("Build", "Deployment", "CPWindowResizeStyleTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPWindowResizeStyleTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPWindowResizeStyleTest"), path.join("Build", "Deployment", "CPWindowResizeStyleTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPWindowResizeStyleTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPWindowResizeStyleTest"), FILE.join("Build", "Desktop", "CPWindowResizeStyleTest", "CPWindowResizeStyleTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPWindowResizeStyleTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPWindowResizeStyleTest"), path.join("Build", "Desktop", "CPWindowResizeStyleTest", "CPWindowResizeStyleTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPWindowResizeStyleTest", "CPWindowResizeStyleTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPWindowResizeStyleTest", "CPWindowResizeStyleTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPWindowResizeStyleTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPWindowResizeStyleTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/ChildWindowsTest/Jakefile b/Tests/Manual/ChildWindowsTest/Jakefile index b9fed0b7b..ec43e58f9 100644 --- a/Tests/Manual/ChildWindowsTest/Jakefile +++ b/Tests/Manual/ChildWindowsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2013, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("ChildWindowsTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "ChildWindowsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "ChildWindowsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("ChildWindowsTest"); task.setIdentifier("com.yourcompany.ChildWindowsTest"); @@ -26,7 +26,7 @@ app ("ChildWindowsTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("ChildWindowsTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "ChildWindowsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "ChildWindowsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "ChildWindowsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "ChildWindowsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "ChildWindowsTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "ChildWindowsTest"), FILE.join("Build", "Deployment", "ChildWindowsTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "ChildWindowsTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "ChildWindowsTest"), path.join("Build", "Deployment", "ChildWindowsTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "ChildWindowsTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "ChildWindowsTest"), FILE.join("Build", "Desktop", "ChildWindowsTest", "ChildWindowsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "ChildWindowsTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "ChildWindowsTest"), path.join("Build", "Desktop", "ChildWindowsTest", "ChildWindowsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "ChildWindowsTest", "ChildWindowsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "ChildWindowsTest", "ChildWindowsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "ChildWindowsTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "ChildWindowsTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/ContinuouslyUpdatesValueBinding/Jakefile b/Tests/Manual/ContinuouslyUpdatesValueBinding/Jakefile index 941b9a92a..07b5f704b 100644 --- a/Tests/Manual/ContinuouslyUpdatesValueBinding/Jakefile +++ b/Tests/Manual/ContinuouslyUpdatesValueBinding/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, WireLoad All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("BindingContiniouslyUpdatesValue", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "BindingContiniouslyUpdatesValue.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "BindingContiniouslyUpdatesValue.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("BindingContiniouslyUpdatesValue"); task.setIdentifier("com.yourcompany.BindingContiniouslyUpdatesValue"); @@ -26,7 +26,7 @@ app ("BindingContiniouslyUpdatesValue", function(task) task.setAuthor("WireLoad"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("BindingContiniouslyUpdatesValue"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "BindingContiniouslyUpdatesValue", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "BindingContiniouslyUpdatesValue", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "BindingContiniouslyUpdatesValue", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "BindingContiniouslyUpdatesValue", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "BindingContiniouslyUpdatesValue")); - OS.system(["press", "-f", FILE.join("Build", "Release", "BindingContiniouslyUpdatesValue"), FILE.join("Build", "Deployment", "BindingContiniouslyUpdatesValue")]); + fs.mkdirSync(path.join("Build", "Deployment", "BindingContiniouslyUpdatesValue"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "BindingContiniouslyUpdatesValue"), path.join("Build", "Deployment", "BindingContiniouslyUpdatesValue")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "BindingContiniouslyUpdatesValue")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "BindingContiniouslyUpdatesValue"), FILE.join("Build", "Desktop", "BindingContiniouslyUpdatesValue", "BindingContiniouslyUpdatesValue.app")); + fs.mkdirSync(path.join("Build", "Desktop", "BindingContiniouslyUpdatesValue"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "BindingContiniouslyUpdatesValue"), path.join("Build", "Desktop", "BindingContiniouslyUpdatesValue", "BindingContiniouslyUpdatesValue.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "BindingContiniouslyUpdatesValue", "BindingContiniouslyUpdatesValue.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "BindingContiniouslyUpdatesValue", "BindingContiniouslyUpdatesValue.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "BindingContiniouslyUpdatesValue")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "BindingContiniouslyUpdatesValue")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CopyAndPasteTest/Jakefile b/Tests/Manual/CopyAndPasteTest/Jakefile index da84ddcf9..52ef6d1eb 100644 --- a/Tests/Manual/CopyAndPasteTest/Jakefile +++ b/Tests/Manual/CopyAndPasteTest/Jakefile @@ -6,24 +6,24 @@ * Copyright 2013, SlevenBits, Ltd. All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CopyAndPasteTest", function(task) { ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CopyAndPasteTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CopyAndPasteTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CopyAndPasteTest"); task.setIdentifier("com.yourcompany.CopyAndPasteTest"); @@ -31,7 +31,7 @@ app ("CopyAndPasteTest", function(task) task.setAuthor("SlevenBits, Ltd."); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CopyAndPasteTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -63,36 +63,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CopyAndPasteTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CopyAndPasteTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CopyAndPasteTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CopyAndPasteTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CopyAndPasteTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CopyAndPasteTest"), FILE.join("Build", "Deployment", "CopyAndPasteTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CopyAndPasteTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CopyAndPasteTest"), path.join("Build", "Deployment", "CopyAndPasteTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CopyAndPasteTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CopyAndPasteTest"), FILE.join("Build", "Desktop", "CopyAndPasteTest", "CopyAndPasteTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CopyAndPasteTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CopyAndPasteTest"), path.join("Build", "Desktop", "CopyAndPasteTest", "CopyAndPasteTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CopyAndPasteTest", "CopyAndPasteTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CopyAndPasteTest", "CopyAndPasteTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CopyAndPasteTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CopyAndPasteTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/CrossOriginTest/Jakefile b/Tests/Manual/CrossOriginTest/Jakefile index 6a448e9b0..61337f05f 100644 --- a/Tests/Manual/CrossOriginTest/Jakefile +++ b/Tests/Manual/CrossOriginTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2014, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "CrossOriginTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "CrossOriginTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CrossOriginTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CrossOriginTest"); task.setIdentifier("com.yourcompany.CrossOriginTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CrossOriginTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CrossOriginTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "CrossOriginTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "CrossOriginTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "CrossOriginTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/FF4096Test/Jakefile b/Tests/Manual/FF4096Test/Jakefile index c5c8bd8d1..ff9d239c5 100755 --- a/Tests/Manual/FF4096Test/Jakefile +++ b/Tests/Manual/FF4096Test/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, BBDO All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("FFTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "FFTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "FFTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("FFTest"); task.setIdentifier("com.yourcompany.FFTest"); @@ -26,7 +26,7 @@ app ("FFTest", function(task) task.setAuthor("BBDO"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("FFTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "FFTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "FFTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "FFTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "FFTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "FFTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "FFTest"), FILE.join("Build", "Deployment", "FFTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "FFTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "FFTest"), path.join("Build", "Deployment", "FFTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "FFTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "FFTest"), FILE.join("Build", "Desktop", "FFTest", "FFTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "FFTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "FFTest"), path.join("Build", "Desktop", "FFTest", "FFTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "FFTest", "FFTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "FFTest", "FFTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "FFTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "FFTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/FontEnhancementTest/Jakefile b/Tests/Manual/FontEnhancementTest/Jakefile index cdafe78a4..e9d819ef5 100644 --- a/Tests/Manual/FontEnhancementTest/Jakefile +++ b/Tests/Manual/FontEnhancementTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("test", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "test.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "test.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("test"); task.setIdentifier("com.aparajitaworld.test"); @@ -26,7 +26,7 @@ app ("test", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("test"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "test", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "test", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "test")); - OS.system(["press", "-f", FILE.join("Build", "Release", "test"), FILE.join("Build", "Deployment", "test")]); + fs.mkdirSync(path.join("Build", "Deployment", "test"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "test"), path.join("Build", "Deployment", "test")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "test")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "test"), FILE.join("Build", "Desktop", "test", "test.app")); + fs.mkdirSync(path.join("Build", "Desktop", "test"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "test"), path.join("Build", "Desktop", "test", "test.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "test", "test.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "test", "test.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "test")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "test")); + console.log("----------------------------"); } diff --git a/Tests/Manual/KeyEquivalentsTest/Jakefile b/Tests/Manual/KeyEquivalentsTest/Jakefile index 73b322165..f19178cad 100644 --- a/Tests/Manual/KeyEquivalentsTest/Jakefile +++ b/Tests/Manual/KeyEquivalentsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, WireLoad, LLC All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("KeyEquivalentsTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "KeyEquivalentsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "KeyEquivalentsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("cappuccino-keyequivalents"); task.setIdentifier("com.yourcompany.KeyEquivalentsTest"); @@ -26,7 +26,7 @@ app ("KeyEquivalentsTest", function(task) task.setAuthor("WireLoad, LLC"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("cappuccino-keyequivalents"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "KeyEquivalentsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "KeyEquivalentsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "KeyEquivalentsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "KeyEquivalentsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "KeyEquivalentsTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "KeyEquivalentsTest"), FILE.join("Build", "Deployment", "KeyEquivalentsTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "KeyEquivalentsTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "KeyEquivalentsTest"), path.join("Build", "Deployment", "KeyEquivalentsTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "KeyEquivalentsTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "KeyEquivalentsTest"), FILE.join("Build", "Desktop", "KeyEquivalentsTest", "KeyEquivalentsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "KeyEquivalentsTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "KeyEquivalentsTest"), path.join("Build", "Desktop", "KeyEquivalentsTest", "KeyEquivalentsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "KeyEquivalentsTest", "KeyEquivalentsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "KeyEquivalentsTest", "KeyEquivalentsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "KeyEquivalentsTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "KeyEquivalentsTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/KeyViewLoopTest/Jakefile b/Tests/Manual/KeyViewLoopTest/Jakefile index c5530d946..c2fb7bfb4 100644 --- a/Tests/Manual/KeyViewLoopTest/Jakefile +++ b/Tests/Manual/KeyViewLoopTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2013, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("panel", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "panel.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "panel.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("panel"); task.setIdentifier("com.yourcompany.panel"); @@ -26,7 +26,7 @@ app ("panel", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("panel"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "panel", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "panel", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "panel", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "panel", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "panel")); - OS.system(["press", "-f", FILE.join("Build", "Release", "panel"), FILE.join("Build", "Deployment", "panel")]); + fs.mkdirSync(path.join("Build", "Deployment", "panel"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "panel"), path.join("Build", "Deployment", "panel")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "panel")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "panel"), FILE.join("Build", "Desktop", "panel", "panel.app")); + fs.mkdirSync(path.join("Build", "Desktop", "panel"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "panel"), path.join("Build", "Desktop", "panel", "panel.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "panel", "panel.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "panel", "panel.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "panel")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "panel")); + console.log("----------------------------"); } diff --git a/Tests/Manual/KeyWindowInTheBackgroundActivation/Jakefile b/Tests/Manual/KeyWindowInTheBackgroundActivation/Jakefile index f158726dc..9abd1726b 100644 --- a/Tests/Manual/KeyWindowInTheBackgroundActivation/Jakefile +++ b/Tests/Manual/KeyWindowInTheBackgroundActivation/Jakefile @@ -6,12 +6,12 @@ * Copyright 2018, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "WindowFrontTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "WindowFrontTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "WindowFrontTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("WindowFrontTest"); task.setIdentifier("com.yourcompany.WindowFrontTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("WindowFrontTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,33 +67,33 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -102,14 +102,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -117,17 +117,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -137,34 +137,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/LayoutTest/Jakefile b/Tests/Manual/LayoutTest/Jakefile index 79642b37d..75a129e4a 100644 --- a/Tests/Manual/LayoutTest/Jakefile +++ b/Tests/Manual/LayoutTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, SlevenBits Ltd. All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("LayoutTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "LayoutTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "LayoutTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("LayoutTest"); task.setIdentifier("com.yourcompany.LayoutTest"); @@ -26,7 +26,7 @@ app ("LayoutTest", function(task) task.setAuthor("SlevenBits Ltd."); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("LayoutTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "LayoutTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "LayoutTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "LayoutTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "LayoutTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "LayoutTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "LayoutTest"), FILE.join("Build", "Deployment", "LayoutTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "LayoutTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "LayoutTest"), path.join("Build", "Deployment", "LayoutTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "LayoutTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "LayoutTest"), FILE.join("Build", "Desktop", "LayoutTest", "LayoutTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "LayoutTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "LayoutTest"), path.join("Build", "Desktop", "LayoutTest", "LayoutTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "LayoutTest", "LayoutTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "LayoutTest", "LayoutTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "LayoutTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "LayoutTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/LoadDynamicFrameworksTest/Jakefile b/Tests/Manual/LoadDynamicFrameworksTest/Jakefile index 1545f0d50..7f86af87b 100644 --- a/Tests/Manual/LoadDynamicFrameworksTest/Jakefile +++ b/Tests/Manual/LoadDynamicFrameworksTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2013, SGL Studio, BBDO Toronto All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("LoadDynamicFrameworksTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "LoadDynamicFrameworksTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "LoadDynamicFrameworksTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("LoadDynamicFrameworksTest"); task.setIdentifier("com.yourcompany.LoadDynamicFrameworksTest"); @@ -26,7 +26,7 @@ app ("LoadDynamicFrameworksTest", function(task) task.setAuthor("SGL Studio, BBDO Toronto"); task.setEmail("Blair.Duncan@BBDO.com"); task.setSummary("LoadDynamicFrameworksTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "LoadDynamicFrameworksTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "LoadDynamicFrameworksTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "LoadDynamicFrameworksTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "LoadDynamicFrameworksTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "LoadDynamicFrameworksTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "LoadDynamicFrameworksTest"), FILE.join("Build", "Deployment", "LoadDynamicFrameworksTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "LoadDynamicFrameworksTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "LoadDynamicFrameworksTest"), path.join("Build", "Deployment", "LoadDynamicFrameworksTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "LoadDynamicFrameworksTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "LoadDynamicFrameworksTest"), FILE.join("Build", "Desktop", "LoadDynamicFrameworksTest", "LoadDynamicFrameworksTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "LoadDynamicFrameworksTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "LoadDynamicFrameworksTest"), path.join("Build", "Desktop", "LoadDynamicFrameworksTest", "LoadDynamicFrameworksTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "LoadDynamicFrameworksTest", "LoadDynamicFrameworksTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "LoadDynamicFrameworksTest", "LoadDynamicFrameworksTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "LoadDynamicFrameworksTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "LoadDynamicFrameworksTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/LoadTimeTest/Jakefile b/Tests/Manual/LoadTimeTest/Jakefile index bcb3924ee..1b8ace188 100644 --- a/Tests/Manual/LoadTimeTest/Jakefile +++ b/Tests/Manual/LoadTimeTest/Jakefile @@ -6,17 +6,17 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), task = require("jake").task, FileList = require("jake").FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("LoadTimeTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "LoadTimeTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "LoadTimeTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("LoadTimeTest"); task.setIdentifier("com.yourcompany.LoadTimeTest"); diff --git a/Tests/Manual/LongBindingsTest/Jakefile b/Tests/Manual/LongBindingsTest/Jakefile index 1cb7cc121..90a9a9515 100644 --- a/Tests/Manual/LongBindingsTest/Jakefile +++ b/Tests/Manual/LongBindingsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("LongBindingsTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "LongBindingsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "LongBindingsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("bindings-bug"); task.setIdentifier("com.yourcompany.LongBindingsTest"); @@ -26,7 +26,7 @@ app ("LongBindingsTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("bindings-bug"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "LongBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "LongBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "LongBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "LongBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "LongBindingsTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "LongBindingsTest"), FILE.join("Build", "Deployment", "LongBindingsTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "LongBindingsTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "LongBindingsTest"), path.join("Build", "Deployment", "LongBindingsTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "LongBindingsTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "LongBindingsTest"), FILE.join("Build", "Desktop", "LongBindingsTest", "LongBindingsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "LongBindingsTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "LongBindingsTest"), path.join("Build", "Desktop", "LongBindingsTest", "LongBindingsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "LongBindingsTest", "LongBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "LongBindingsTest", "LongBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "LongBindingsTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "LongBindingsTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/MobileTest/Jakefile b/Tests/Manual/MobileTest/Jakefile index b40d57510..d6b6d188f 100644 --- a/Tests/Manual/MobileTest/Jakefile +++ b/Tests/Manual/MobileTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2016, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "MobileTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "MobileTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "MobileTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("MobileTest"); task.setIdentifier("com.yourcompany.MobileTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("MobileTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,33 +67,33 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -102,14 +102,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -117,17 +117,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -137,34 +137,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/MultipleValueBindingsTest/Jakefile b/Tests/Manual/MultipleValueBindingsTest/Jakefile index 76e07c02e..b20304dda 100644 --- a/Tests/Manual/MultipleValueBindingsTest/Jakefile +++ b/Tests/Manual/MultipleValueBindingsTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2013, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("MultipleValueBindingsTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "MultipleValueBindingsTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "MultipleValueBindingsTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("MultipleValueBindingsTest"); task.setIdentifier("com.yourcompany.MultipleValueBindingsTest"); @@ -26,7 +26,7 @@ app ("MultipleValueBindingsTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("MultipleValueBindingsTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "MultipleValueBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "MultipleValueBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "MultipleValueBindingsTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "MultipleValueBindingsTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "MultipleValueBindingsTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "MultipleValueBindingsTest"), FILE.join("Build", "Deployment", "MultipleValueBindingsTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "MultipleValueBindingsTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "MultipleValueBindingsTest"), path.join("Build", "Deployment", "MultipleValueBindingsTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "MultipleValueBindingsTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "MultipleValueBindingsTest"), FILE.join("Build", "Desktop", "MultipleValueBindingsTest", "MultipleValueBindingsTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "MultipleValueBindingsTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "MultipleValueBindingsTest"), path.join("Build", "Desktop", "MultipleValueBindingsTest", "MultipleValueBindingsTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "MultipleValueBindingsTest", "MultipleValueBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "MultipleValueBindingsTest", "MultipleValueBindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "MultipleValueBindingsTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "MultipleValueBindingsTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/NSBoxTest/Jakefile b/Tests/Manual/NSBoxTest/Jakefile index a776e282b..8af8084fe 100644 --- a/Tests/Manual/NSBoxTest/Jakefile +++ b/Tests/Manual/NSBoxTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, WireLoad, LLC All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("CPAlertTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "CPAlertTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "CPAlertTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("CPAlertTest"); task.setIdentifier("com.yourcompany.CPAlertTest"); @@ -26,7 +26,7 @@ app ("CPAlertTest", function(task) task.setAuthor("WireLoad, LLC"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("CPAlertTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "CPAlertTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "CPAlertTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "CPAlertTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "CPAlertTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "CPAlertTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "CPAlertTest"), FILE.join("Build", "Deployment", "CPAlertTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "CPAlertTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "CPAlertTest"), path.join("Build", "Deployment", "CPAlertTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "CPAlertTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPAlertTest"), FILE.join("Build", "Desktop", "CPAlertTest", "CPAlertTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "CPAlertTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "CPAlertTest"), path.join("Build", "Desktop", "CPAlertTest", "CPAlertTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "CPAlertTest", "CPAlertTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "CPAlertTest", "CPAlertTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPAlertTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "CPAlertTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/NSBrowserTest/Jakefile b/Tests/Manual/NSBrowserTest/Jakefile index 51c206462..577a0e5fd 100644 --- a/Tests/Manual/NSBrowserTest/Jakefile +++ b/Tests/Manual/NSBrowserTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2013, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("NSBrowserTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "NSBrowserTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "NSBrowserTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("NSBrowserTest"); task.setIdentifier("com.yourcompany.NSBrowserTest"); @@ -26,7 +26,7 @@ app ("NSBrowserTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("NSBrowserTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "NSBrowserTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "NSBrowserTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "NSBrowserTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "NSBrowserTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "NSBrowserTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "NSBrowserTest"), FILE.join("Build", "Deployment", "NSBrowserTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "NSBrowserTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "NSBrowserTest"), path.join("Build", "Deployment", "NSBrowserTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "NSBrowserTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "NSBrowserTest"), FILE.join("Build", "Desktop", "NSBrowserTest", "NSBrowserTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "NSBrowserTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "NSBrowserTest"), path.join("Build", "Desktop", "NSBrowserTest", "NSBrowserTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "NSBrowserTest", "NSBrowserTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "NSBrowserTest", "NSBrowserTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "NSBrowserTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "NSBrowserTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/NewTextFieldBezelTest/Jakefile b/Tests/Manual/NewTextFieldBezelTest/Jakefile index e085af3b6..fe321fcc6 100644 --- a/Tests/Manual/NewTextFieldBezelTest/Jakefile +++ b/Tests/Manual/NewTextFieldBezelTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("NewTextFieldBezelTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "NewTextFieldBezelTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "NewTextFieldBezelTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("NewTextFieldBezelTest"); task.setIdentifier("com.aparajita.NewTextFieldBezelTest"); @@ -26,7 +26,7 @@ app ("NewTextFieldBezelTest", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("NewTextFieldBezelTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "NewTextFieldBezelTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "NewTextFieldBezelTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "NewTextFieldBezelTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "NewTextFieldBezelTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "NewTextFieldBezelTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "NewTextFieldBezelTest"), FILE.join("Build", "Deployment", "NewTextFieldBezelTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "NewTextFieldBezelTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "NewTextFieldBezelTest"), path.join("Build", "Deployment", "NewTextFieldBezelTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "NewTextFieldBezelTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "NewTextFieldBezelTest"), FILE.join("Build", "Desktop", "NewTextFieldBezelTest", "NewTextFieldBezelTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "NewTextFieldBezelTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "NewTextFieldBezelTest"), path.join("Build", "Desktop", "NewTextFieldBezelTest", "NewTextFieldBezelTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "NewTextFieldBezelTest", "NewTextFieldBezelTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "NewTextFieldBezelTest", "NewTextFieldBezelTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "NewTextFieldBezelTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "NewTextFieldBezelTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/Nib2CibAlignmentTest/Jakefile b/Tests/Manual/Nib2CibAlignmentTest/Jakefile index d5047fc33..bf25c1366 100644 --- a/Tests/Manual/Nib2CibAlignmentTest/Jakefile +++ b/Tests/Manual/Nib2CibAlignmentTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("Nib2CibAlignmentTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "Nib2CibAlignmentTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "Nib2CibAlignmentTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("Nib2CibAlignmentTest"); task.setIdentifier("com.yourcompany.Nib2CibAlignmentTest"); @@ -26,7 +26,7 @@ app ("Nib2CibAlignmentTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("Nib2CibAlignmentTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "Nib2CibAlignmentTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "Nib2CibAlignmentTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "Nib2CibAlignmentTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "Nib2CibAlignmentTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "Nib2CibAlignmentTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "Nib2CibAlignmentTest"), FILE.join("Build", "Deployment", "Nib2CibAlignmentTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "Nib2CibAlignmentTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "Nib2CibAlignmentTest"), path.join("Build", "Deployment", "Nib2CibAlignmentTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "Nib2CibAlignmentTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "Nib2CibAlignmentTest"), FILE.join("Build", "Desktop", "Nib2CibAlignmentTest", "Nib2CibAlignmentTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "Nib2CibAlignmentTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "Nib2CibAlignmentTest"), path.join("Build", "Desktop", "Nib2CibAlignmentTest", "Nib2CibAlignmentTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "Nib2CibAlignmentTest", "Nib2CibAlignmentTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "Nib2CibAlignmentTest", "Nib2CibAlignmentTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "Nib2CibAlignmentTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "Nib2CibAlignmentTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/Nib2CibBaselineAlignementTest/Jakefile b/Tests/Manual/Nib2CibBaselineAlignementTest/Jakefile index 999950835..304ab0f12 100644 --- a/Tests/Manual/Nib2CibBaselineAlignementTest/Jakefile +++ b/Tests/Manual/Nib2CibBaselineAlignementTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("Nib2CibBaselineAlignementTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "Nib2CibBaselineAlignementTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "Nib2CibBaselineAlignementTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("Nib2CibBaselineAlignementTest"); task.setIdentifier("com.yourcompany.Nib2CibBaselineAlignementTest"); @@ -26,7 +26,7 @@ app ("Nib2CibBaselineAlignementTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("Nib2CibBaselineAlignementTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "Nib2CibBaselineAlignementTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "Nib2CibBaselineAlignementTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "Nib2CibBaselineAlignementTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "Nib2CibBaselineAlignementTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "Nib2CibBaselineAlignementTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "Nib2CibBaselineAlignementTest"), FILE.join("Build", "Deployment", "Nib2CibBaselineAlignementTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "Nib2CibBaselineAlignementTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "Nib2CibBaselineAlignementTest"), path.join("Build", "Deployment", "Nib2CibBaselineAlignementTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "Nib2CibBaselineAlignementTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "Nib2CibBaselineAlignementTest"), FILE.join("Build", "Desktop", "Nib2CibBaselineAlignementTest", "Nib2CibBaselineAlignementTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "Nib2CibBaselineAlignementTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "Nib2CibBaselineAlignementTest"), path.join("Build", "Desktop", "Nib2CibBaselineAlignementTest", "Nib2CibBaselineAlignementTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "Nib2CibBaselineAlignementTest", "Nib2CibBaselineAlignementTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "Nib2CibBaselineAlignementTest", "Nib2CibBaselineAlignementTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "Nib2CibBaselineAlignementTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "Nib2CibBaselineAlignementTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/Nib2CibSubviewsOrderTest/Jakefile b/Tests/Manual/Nib2CibSubviewsOrderTest/Jakefile index 9258affd9..1567c2afd 100644 --- a/Tests/Manual/Nib2CibSubviewsOrderTest/Jakefile +++ b/Tests/Manual/Nib2CibSubviewsOrderTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2020, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "Nib2CibSubviewsOrderTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "Nib2CibSubviewsOrderTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "Nib2CibSubviewsOrderTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("Nib2CibSubviewsOrderTest"); task.setIdentifier("com.yourcompany.Nib2CibSubviewsOrderTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("Nib2CibSubviewsOrderTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,33 +67,33 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -102,14 +102,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -117,17 +117,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -137,34 +137,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/NibAppRemixedTest/Jakefile b/Tests/Manual/NibAppRemixedTest/Jakefile index 6716cb58d..5e005df1a 100644 --- a/Tests/Manual/NibAppRemixedTest/Jakefile +++ b/Tests/Manual/NibAppRemixedTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, WireLoad All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("NibAppRemixedTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "NibAppRemixedTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "NibAppRemixedTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("NibApp.new"); task.setIdentifier("com.yourcompany.NibAppRemixedTest"); @@ -26,7 +26,7 @@ app ("NibAppRemixedTest", function(task) task.setAuthor("WireLoad"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("NibApp.new"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "NibAppRemixedTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "NibAppRemixedTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "NibAppRemixedTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "NibAppRemixedTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "NibAppRemixedTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "NibAppRemixedTest"), FILE.join("Build", "Deployment", "NibAppRemixedTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "NibAppRemixedTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "NibAppRemixedTest"), path.join("Build", "Deployment", "NibAppRemixedTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "NibAppRemixedTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "NibAppRemixedTest"), FILE.join("Build", "Desktop", "NibAppRemixedTest", "NibAppRemixedTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "NibAppRemixedTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "NibAppRemixedTest"), path.join("Build", "Desktop", "NibAppRemixedTest", "NibAppRemixedTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "NibAppRemixedTest", "NibAppRemixedTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "NibAppRemixedTest", "NibAppRemixedTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "NibAppRemixedTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "NibAppRemixedTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/PatternFillTest/Jakefile b/Tests/Manual/PatternFillTest/Jakefile index 34daaa6db..4739aa8f9 100644 --- a/Tests/Manual/PatternFillTest/Jakefile +++ b/Tests/Manual/PatternFillTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("test", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "test.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "test.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("test"); task.setIdentifier("com.aparajitaworld.test"); @@ -26,7 +26,7 @@ app ("test", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("test"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "test", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "test", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "test", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "test")); - OS.system(["press", "-f", FILE.join("Build", "Release", "test"), FILE.join("Build", "Deployment", "test")]); + fs.mkdirSync(path.join("Build", "Deployment", "test"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "test"), path.join("Build", "Deployment", "test")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "test")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "test"), FILE.join("Build", "Desktop", "test", "test.app")); + fs.mkdirSync(path.join("Build", "Desktop", "test"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "test"), path.join("Build", "Desktop", "test", "test.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "test", "test.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "test", "test.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "test")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "test")); + console.log("----------------------------"); } diff --git a/Tests/Manual/PopUpButtonEscTest/Jakefile b/Tests/Manual/PopUpButtonEscTest/Jakefile index 023520a95..f171d775d 100755 --- a/Tests/Manual/PopUpButtonEscTest/Jakefile +++ b/Tests/Manual/PopUpButtonEscTest/Jakefile @@ -6,24 +6,24 @@ * Copyright 2013, Austin-Soft.com All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("PopUpButtonTest", function(task) { ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "PopUpButtonTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "PopUpButtonTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("PopUpButtonTest"); task.setIdentifier("com.austin-soft.PopUpButtonTest"); @@ -31,7 +31,7 @@ app ("PopUpButtonTest", function(task) task.setAuthor("Austin-Soft.com"); task.setEmail("support@austin-soft.com"); task.setSummary("PopUpButtonTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -63,36 +63,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "PopUpButtonTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "PopUpButtonTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "PopUpButtonTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "PopUpButtonTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "PopUpButtonTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "PopUpButtonTest"), FILE.join("Build", "Deployment", "PopUpButtonTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "PopUpButtonTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "PopUpButtonTest"), path.join("Build", "Deployment", "PopUpButtonTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "PopUpButtonTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "PopUpButtonTest"), FILE.join("Build", "Desktop", "PopUpButtonTest", "PopUpButtonTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "PopUpButtonTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "PopUpButtonTest"), path.join("Build", "Desktop", "PopUpButtonTest", "PopUpButtonTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "PopUpButtonTest", "PopUpButtonTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "PopUpButtonTest", "PopUpButtonTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "PopUpButtonTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "PopUpButtonTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/PredicateWithFormatTest/Jakefile b/Tests/Manual/PredicateWithFormatTest/Jakefile index c234e069c..579baea16 100644 --- a/Tests/Manual/PredicateWithFormatTest/Jakefile +++ b/Tests/Manual/PredicateWithFormatTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("PredicateWithFormatTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "PredicateWithFormatTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "PredicateWithFormatTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("PredicateWithFormatTest"); task.setIdentifier("com.aparajita.PredicateWithFormatTest"); @@ -26,7 +26,7 @@ app ("PredicateWithFormatTest", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("PredicateWithFormatTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "PredicateWithFormatTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "PredicateWithFormatTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "PredicateWithFormatTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "PredicateWithFormatTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "PredicateWithFormatTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "PredicateWithFormatTest"), FILE.join("Build", "Deployment", "PredicateWithFormatTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "PredicateWithFormatTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "PredicateWithFormatTest"), path.join("Build", "Deployment", "PredicateWithFormatTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "PredicateWithFormatTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "PredicateWithFormatTest"), FILE.join("Build", "Desktop", "PredicateWithFormatTest", "PredicateWithFormatTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "PredicateWithFormatTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "PredicateWithFormatTest"), path.join("Build", "Desktop", "PredicateWithFormatTest", "PredicateWithFormatTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "PredicateWithFormatTest", "PredicateWithFormatTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "PredicateWithFormatTest", "PredicateWithFormatTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "PredicateWithFormatTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "PredicateWithFormatTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/ResignFirstResponderWithCPControlTextDidEndEditingTest/Jakefile b/Tests/Manual/ResignFirstResponderWithCPControlTextDidEndEditingTest/Jakefile index e1035b15d..a44a8fe6a 100644 --- a/Tests/Manual/ResignFirstResponderWithCPControlTextDidEndEditingTest/Jakefile +++ b/Tests/Manual/ResignFirstResponderWithCPControlTextDidEndEditingTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("resignFirstResponderCPControlTextDidEndEditing", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "resignFirstResponderCPControlTextDidEndEditing.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "resignFirstResponderCPControlTextDidEndEditing.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("ResignFirstResponderWithCPControlTextDidEndEditingTest"); task.setIdentifier("com.aparajita.resignFirstResponderCPControlTextDidEndEditing"); @@ -26,7 +26,7 @@ app ("resignFirstResponderCPControlTextDidEndEditing", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("ResignFirstResponderWithCPControlTextDidEndEditingTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "resignFirstResponderCPControlTextDidEndEditing", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "resignFirstResponderCPControlTextDidEndEditing", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "resignFirstResponderCPControlTextDidEndEditing", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "resignFirstResponderCPControlTextDidEndEditing", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "resignFirstResponderCPControlTextDidEndEditing")); - OS.system(["press", "-f", FILE.join("Build", "Release", "resignFirstResponderCPControlTextDidEndEditing"), FILE.join("Build", "Deployment", "resignFirstResponderCPControlTextDidEndEditing")]); + fs.mkdirSync(path.join("Build", "Deployment", "resignFirstResponderCPControlTextDidEndEditing"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "resignFirstResponderCPControlTextDidEndEditing"), path.join("Build", "Deployment", "resignFirstResponderCPControlTextDidEndEditing")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "resignFirstResponderCPControlTextDidEndEditing")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "resignFirstResponderCPControlTextDidEndEditing"), FILE.join("Build", "Desktop", "resignFirstResponderCPControlTextDidEndEditing", "resignFirstResponderCPControlTextDidEndEditing.app")); + fs.mkdirSync(path.join("Build", "Desktop", "resignFirstResponderCPControlTextDidEndEditing"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "resignFirstResponderCPControlTextDidEndEditing"), path.join("Build", "Desktop", "resignFirstResponderCPControlTextDidEndEditing", "resignFirstResponderCPControlTextDidEndEditing.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "resignFirstResponderCPControlTextDidEndEditing", "resignFirstResponderCPControlTextDidEndEditing.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "resignFirstResponderCPControlTextDidEndEditing", "resignFirstResponderCPControlTextDidEndEditing.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "resignFirstResponderCPControlTextDidEndEditing")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "resignFirstResponderCPControlTextDidEndEditing")); + console.log("----------------------------"); } diff --git a/Tests/Manual/Scaling2Test/Jakefile b/Tests/Manual/Scaling2Test/Jakefile index 603c4af2e..62821b04e 100644 --- a/Tests/Manual/Scaling2Test/Jakefile +++ b/Tests/Manual/Scaling2Test/Jakefile @@ -6,12 +6,12 @@ * Copyright 2021, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "Scaling2Test"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "Scaling2Test.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "Scaling2Test.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("Scaling2Test"); task.setIdentifier("com.yourcompany.Scaling2Test"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("Scaling2Test"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,33 +67,33 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -102,14 +102,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -117,17 +117,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -137,34 +137,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/ScalingTest/Jakefile b/Tests/Manual/ScalingTest/Jakefile index cc68e8e0a..589497ee7 100644 --- a/Tests/Manual/ScalingTest/Jakefile +++ b/Tests/Manual/ScalingTest/Jakefile @@ -6,24 +6,24 @@ * Copyright 2013, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("ScalingTest", function(task) { ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "ScalingTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "ScalingTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("ScalingTest"); task.setIdentifier("com.yourcompany.ScalingTest"); @@ -31,7 +31,7 @@ app ("ScalingTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("ScalingTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -63,36 +63,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "ScalingTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "ScalingTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "ScalingTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "ScalingTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "ScalingTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "ScalingTest"), FILE.join("Build", "Deployment", "ScalingTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "ScalingTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "ScalingTest"), path.join("Build", "Deployment", "ScalingTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "ScalingTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "ScalingTest"), FILE.join("Build", "Desktop", "ScalingTest", "ScalingTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "ScalingTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "ScalingTest"), path.join("Build", "Desktop", "ScalingTest", "ScalingTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "ScalingTest", "ScalingTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "ScalingTest", "ScalingTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "ScalingTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "ScalingTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/ScrollviewThemingTest/Jakefile b/Tests/Manual/ScrollviewThemingTest/Jakefile index 3226941ff..979a53183 100644 --- a/Tests/Manual/ScrollviewThemingTest/Jakefile +++ b/Tests/Manual/ScrollviewThemingTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("ScrollviewThemingTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "ScrollviewThemingTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "ScrollviewThemingTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("ScrollviewThemingTest"); task.setIdentifier("com.yourcompany.ScrollviewThemingTest"); @@ -26,7 +26,7 @@ app ("ScrollviewThemingTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("ScrollviewThemingTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "ScrollviewThemingTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "ScrollviewThemingTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "ScrollviewThemingTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "ScrollviewThemingTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "ScrollviewThemingTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "ScrollviewThemingTest"), FILE.join("Build", "Deployment", "ScrollviewThemingTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "ScrollviewThemingTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "ScrollviewThemingTest"), path.join("Build", "Deployment", "ScrollviewThemingTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "ScrollviewThemingTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "ScrollviewThemingTest"), FILE.join("Build", "Desktop", "ScrollviewThemingTest", "ScrollviewThemingTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "ScrollviewThemingTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "ScrollviewThemingTest"), path.join("Build", "Desktop", "ScrollviewThemingTest", "ScrollviewThemingTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "ScrollviewThemingTest", "ScrollviewThemingTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "ScrollviewThemingTest", "ScrollviewThemingTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "ScrollviewThemingTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "ScrollviewThemingTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/SizeToFitTest/Jakefile b/Tests/Manual/SizeToFitTest/Jakefile index 05470e445..3af54cbb2 100644 --- a/Tests/Manual/SizeToFitTest/Jakefile +++ b/Tests/Manual/SizeToFitTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("SizeToFitTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "SizeToFitTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "SizeToFitTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("SizeToFitTest"); task.setIdentifier("com.aparajitaworld.SizeToFitTest"); @@ -26,7 +26,7 @@ app ("SizeToFitTest", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("SizeToFitTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "SizeToFitTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "SizeToFitTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "SizeToFitTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "SizeToFitTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "SizeToFitTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "SizeToFitTest"), FILE.join("Build", "Deployment", "SizeToFitTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "SizeToFitTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "SizeToFitTest"), path.join("Build", "Deployment", "SizeToFitTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "SizeToFitTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "SizeToFitTest"), FILE.join("Build", "Desktop", "SizeToFitTest", "SizeToFitTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "SizeToFitTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "SizeToFitTest"), path.join("Build", "Desktop", "SizeToFitTest", "SizeToFitTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "SizeToFitTest", "SizeToFitTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "SizeToFitTest", "SizeToFitTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "SizeToFitTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "SizeToFitTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/SmartFoldersTest/Jakefile b/Tests/Manual/SmartFoldersTest/Jakefile index fc95d3783..80b5b8cf0 100644 --- a/Tests/Manual/SmartFoldersTest/Jakefile +++ b/Tests/Manual/SmartFoldersTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, Your Company All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("SmartFoldersTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "SmartFoldersTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "SmartFoldersTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("SmartFoldersTest"); task.setIdentifier("com.yourcompany."); @@ -26,7 +26,7 @@ app ("SmartFoldersTest", function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("SmartFoldersTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "SmartFoldersTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "SmartFoldersTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "SmartFoldersTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "SmartFoldersTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "SmartFoldersTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "SmartFoldersTest"), FILE.join("Build", "Deployment", "SmartFoldersTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "SmartFoldersTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "SmartFoldersTest"), path.join("Build", "Deployment", "SmartFoldersTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "SmartFoldersTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "SmartFoldersTest"), FILE.join("Build", "Desktop", "SmartFoldersTest", "SmartFoldersTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "SmartFoldersTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "SmartFoldersTest"), path.join("Build", "Desktop", "SmartFoldersTest", "SmartFoldersTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "SmartFoldersTest", "SmartFoldersTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "SmartFoldersTest", "SmartFoldersTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "SmartFoldersTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "SmartFoldersTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/ThemeKitchenSinkTest/Jakefile b/Tests/Manual/ThemeKitchenSinkTest/Jakefile index 61cd3419a..0f6b386d4 100644 --- a/Tests/Manual/ThemeKitchenSinkTest/Jakefile +++ b/Tests/Manual/ThemeKitchenSinkTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2014, SlevenBits, Ltd. All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "ThemeKitchenSinkTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "ThemeKitchenSinkTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "ThemeKitchenSinkTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("ThemeKitchenSinkTest"); task.setIdentifier("com.yourcompany.ThemeKitchenSinkTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("SlevenBits, Ltd."); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("ThemeKitchenSinkTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "ThemeKitchenSinkTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "ThemeKitchenSinkTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "ThemeKitchenSinkTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "ThemeKitchenSinkTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (ENV["CONFIGURATION"] === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); + addBundleFileSizes(path.join("Build", ENV["CONFIGURATION"], projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", ENV["CONFIGURATION"], projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/TrackingAreaTest/Jakefile b/Tests/Manual/TrackingAreaTest/Jakefile index 7f6cef0f2..43a73031a 100644 --- a/Tests/Manual/TrackingAreaTest/Jakefile +++ b/Tests/Manual/TrackingAreaTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2015, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "TrackingAreaTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "TrackingAreaTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "TrackingAreaTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("TrackingAreaTest"); task.setIdentifier("com.yourcompany.TrackingAreaTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("TrackingAreaTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,45 +67,45 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "TrackingAreaTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", projectName), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", projectName), path.join("Build", "Desktop", projectName, "TrackingAreaTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", projectName, "TrackingAreaTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", projectName, "TrackingAreaTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -114,14 +114,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -129,17 +129,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -149,34 +149,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/UndoRedoWithMenuUpdateTest/Jakefile b/Tests/Manual/UndoRedoWithMenuUpdateTest/Jakefile index 70e415eb9..abf3e1f58 100644 --- a/Tests/Manual/UndoRedoWithMenuUpdateTest/Jakefile +++ b/Tests/Manual/UndoRedoWithMenuUpdateTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2010, BBDO All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("UndoRedoWithMenuUpdateTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "UndoRedoWithMenuUpdateTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "UndoRedoWithMenuUpdateTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("UndoRedoWithMenuUpdateTest"); task.setIdentifier("com.yourcompany.UndoRedoWithMenuUpdateTest"); @@ -26,7 +26,7 @@ app ("UndoRedoWithMenuUpdateTest", function(task) task.setAuthor("BBDO"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("UndoRedoWithMenuUpdateTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -58,36 +58,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "UndoRedoWithMenuUpdateTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "UndoRedoWithMenuUpdateTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "UndoRedoWithMenuUpdateTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "UndoRedoWithMenuUpdateTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "UndoRedoWithMenuUpdateTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "UndoRedoWithMenuUpdateTest"), FILE.join("Build", "Deployment", "UndoRedoWithMenuUpdateTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "UndoRedoWithMenuUpdateTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "UndoRedoWithMenuUpdateTest"), path.join("Build", "Deployment", "UndoRedoWithMenuUpdateTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "UndoRedoWithMenuUpdateTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "UndoRedoWithMenuUpdateTest"), FILE.join("Build", "Desktop", "UndoRedoWithMenuUpdateTest", "UndoRedoWithMenuUpdateTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "UndoRedoWithMenuUpdateTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "UndoRedoWithMenuUpdateTest"), path.join("Build", "Desktop", "UndoRedoWithMenuUpdateTest", "UndoRedoWithMenuUpdateTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "UndoRedoWithMenuUpdateTest", "UndoRedoWithMenuUpdateTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "UndoRedoWithMenuUpdateTest", "UndoRedoWithMenuUpdateTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "UndoRedoWithMenuUpdateTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "UndoRedoWithMenuUpdateTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/UserlandNSTest/Jakefile b/Tests/Manual/UserlandNSTest/Jakefile index 8ad13a6fa..7fd27cf31 100644 --- a/Tests/Manual/UserlandNSTest/Jakefile +++ b/Tests/Manual/UserlandNSTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2012, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("UserlandNSTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "UserlandNSTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "UserlandNSTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("UserlandNSTest"); task.setIdentifier("com.aparajita.UserlandNSTest"); @@ -26,7 +26,7 @@ app ("UserlandNSTest", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("UserlandNSTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "UserlandNSTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "UserlandNSTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "UserlandNSTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "UserlandNSTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "UserlandNSTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "UserlandNSTest"), FILE.join("Build", "Deployment", "UserlandNSTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "UserlandNSTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "UserlandNSTest"), path.join("Build", "Deployment", "UserlandNSTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "UserlandNSTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "UserlandNSTest"), FILE.join("Build", "Desktop", "UserlandNSTest", "UserlandNSTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "UserlandNSTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "UserlandNSTest"), path.join("Build", "Desktop", "UserlandNSTest", "UserlandNSTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "UserlandNSTest", "UserlandNSTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "UserlandNSTest", "UserlandNSTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "UserlandNSTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "UserlandNSTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/WindowSheetOrderTest/Jakefile b/Tests/Manual/WindowSheetOrderTest/Jakefile index 74848265e..8ac806386 100644 --- a/Tests/Manual/WindowSheetOrderTest/Jakefile +++ b/Tests/Manual/WindowSheetOrderTest/Jakefile @@ -6,12 +6,12 @@ * Copyright 2018, Your Company All rights reserved. */ -var ENV = require("system").env, +var ENV = process.env, cp = require("child_process"), fs = require("fs"), path = require("path");, FILE = require("file"), JAKE = require("jake"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, + app = CAPPUCCINO.Jake.applicationtask.app, configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", OS = require("os"), projectName = "WindowSheetOrderTest"; @@ -21,10 +21,10 @@ app (projectName, function(task) ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; if (configuration === "Debug") - ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + ENV["OBJJ_INCLUDE_PATHS"] = path.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); - task.setBuildIntermediatesPath(FILE.join("Build", "WindowSheetOrderTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "WindowSheetOrderTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("WindowSheetOrderTest"); task.setIdentifier("com.yourcompany.WindowSheetOrderTest"); @@ -32,7 +32,7 @@ app (projectName, function(task) task.setAuthor("Your Company"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("WindowSheetOrderTest"); - task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setSources(new FileList("**/*.j").exclude(path.join("Build", "**")).exclude(path.join("Frameworks", "Source", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -67,33 +67,33 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); + cp.execSync(["open", path.join("Build", "Release", projectName, "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); - OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + fs.mkdirSync(path.join("Build", "Deployment", projectName), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", projectName), path.join("Build", "Deployment", projectName)].join(" "), { stdio: "inherit" }); printResults("Deployment") }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, projectName)); + console.log("----------------------------"); } function updateApplicationSize() { - print("Calculating application file sizes..."); + console.log("Calculating application file sizes..."); - var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + var contents = FILE.read(path.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), format = CFPropertyList.sniffedFormatOfString(contents), plist = CFPropertyList.propertyListFromString(contents), totalBytes = {executable:0, data:0, mhtml:0}; @@ -102,14 +102,14 @@ function updateApplicationSize() var frameworksDir = "Frameworks"; if (configuration === "Debug") - frameworksDir = FILE.join(frameworksDir, "Debug"); + frameworksDir = path.join(frameworksDir, "Debug"); var frameworks = FILE.list(frameworksDir); frameworks.forEach(function(framework) { if (framework !== "Source") - addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + addBundleFileSizes(path.join(frameworksDir, framework), totalBytes); }); // Read in the default theme name, and attempt to get its size @@ -117,17 +117,17 @@ function updateApplicationSize() themePath = nil; if (themeName === "Aristo" || themeName === "Aristo2") - themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + themePath = path.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); else - themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + themePath = path.join("Frameworks", "Resources", themeName + ".blend"); if (FILE.isDirectory(themePath)) addBundleFileSizes(themePath, totalBytes); // Add sizes for the app - addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + addBundleFileSizes(path.join("Build", configuration, projectName), totalBytes); - print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + console.log("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); var dict = new CFMutableDictionary(); @@ -137,34 +137,34 @@ function updateApplicationSize() plist.setValueForKey("CPApplicationSize", dict); - FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); + FILE.write(path.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); } function addBundleFileSizes(bundlePath, totalBytes) { var bundleName = FILE.basename(bundlePath), environment = bundleName === "Foundation" ? "Objj" : "Browser", - bundlePath = FILE.join(bundlePath, environment + ".environment"); + bundlePath = path.join(bundlePath, environment + ".environment"); if (FILE.isDirectory(bundlePath)) { var filename = bundleName + ".sj", - filePath = new FILE.Path(FILE.join(bundlePath, filename)); + filePath = new FILE.Path(path.join(bundlePath, filename)); if (filePath.exists()) totalBytes.executable += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + filePath = new FILE.Path(path.join(bundlePath, "dataURLs.txt")); if (filePath.exists()) totalBytes.data += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLData.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); - filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + filePath = new FILE.Path(path.join(bundlePath, "MHTMLPaths.txt")); if (filePath.exists()) totalBytes.mhtml += filePath.size(); diff --git a/Tests/Manual/layoutEphemeralSubviewTest/Jakefile b/Tests/Manual/layoutEphemeralSubviewTest/Jakefile index f53c644b1..8f7aff697 100644 --- a/Tests/Manual/layoutEphemeralSubviewTest/Jakefile +++ b/Tests/Manual/layoutEphemeralSubviewTest/Jakefile @@ -5,19 +5,19 @@ * Created by Aparajita Fishman on October 8, 2010. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("LayoutEphemeralSubviewTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "LayoutEphemeralSubviewTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "LayoutEphemeralSubviewTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("LayoutEphemeralSubviewTest"); task.setIdentifier("com.yourcompany.LayoutEphemeralSubviewTest"); @@ -25,7 +25,7 @@ app ("LayoutEphemeralSubviewTest", function(task) task.setAuthor("WireLoad, LLC"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("LayoutEphemeralSubviewTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -57,36 +57,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "LayoutEphemeralSubviewTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "LayoutEphemeralSubviewTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "LayoutEphemeralSubviewTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "LayoutEphemeralSubviewTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "LayoutEphemeralSubviewTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "LayoutEphemeralSubviewTest"), FILE.join("Build", "Deployment", "LayoutEphemeralSubviewTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "LayoutEphemeralSubviewTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "LayoutEphemeralSubviewTest"), path.join("Build", "Deployment", "LayoutEphemeralSubviewTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "LayoutEphemeralSubviewTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "LayoutEphemeralSubviewTest"), FILE.join("Build", "Desktop", "LayoutEphemeralSubviewTest", "LayoutEphemeralSubviewTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "LayoutEphemeralSubviewTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "LayoutEphemeralSubviewTest"), path.join("Build", "Desktop", "LayoutEphemeralSubviewTest", "LayoutEphemeralSubviewTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "LayoutEphemeralSubviewTest", "LayoutEphemeralSubviewTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "LayoutEphemeralSubviewTest", "LayoutEphemeralSubviewTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "LayoutEphemeralSubviewTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "LayoutEphemeralSubviewTest")); + console.log("----------------------------"); } diff --git a/Tests/Manual/performKeyEquivalentTest/Jakefile b/Tests/Manual/performKeyEquivalentTest/Jakefile index 2107ff75e..8569c198b 100644 --- a/Tests/Manual/performKeyEquivalentTest/Jakefile +++ b/Tests/Manual/performKeyEquivalentTest/Jakefile @@ -6,19 +6,19 @@ * Copyright 2011, Victory-Heart Productions All rights reserved. */ -var ENV = require("system").env, - FILE = require("file"), - JAKE = require("jake"), +var ENV = process.env, + cp = require("child_process"), + fs = require("fs"), + path = require("path"), task = JAKE.task, FileList = JAKE.FileList, - app = require("cappuccino/jake").app, - configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", - OS = require("os"); + app = CAPPUCCINO.Jake.applicationtask.app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug"; app ("performKeyEquivalentTest", function(task) { - task.setBuildIntermediatesPath(FILE.join("Build", "performKeyEquivalentTest.build", configuration)); - task.setBuildPath(FILE.join("Build", configuration)); + task.setBuildIntermediatesPath(path.join("Build", "performKeyEquivalentTest.build", configuration)); + task.setBuildPath(path.join("Build", configuration)); task.setProductName("performKeyEquivalentTest"); task.setIdentifier("com.aparajita.performKeyEquivalentTest"); @@ -26,7 +26,7 @@ app ("performKeyEquivalentTest", function(task) task.setAuthor("Victory-Heart Productions"); task.setEmail("feedback @nospam@ yourcompany.com"); task.setSummary("performKeyEquivalentTest"); - task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**"))); task.setResources(new FileList("Resources/**")); task.setIndexFilePath("index.html"); task.setInfoPlistPath("Info.plist"); @@ -59,36 +59,36 @@ task ("release", function() task ("run", ["debug"], function() { - OS.system(["open", FILE.join("Build", "Debug", "performKeyEquivalentTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Debug", "performKeyEquivalentTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("run-release", ["release"], function() { - OS.system(["open", FILE.join("Build", "Release", "performKeyEquivalentTest", "index.html")]); + cp.execSync(["open", path.join("Build", "Release", "performKeyEquivalentTest", "index.html")].join(" "), { stdio: "inherit" }); }); task ("deploy", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Deployment", "performKeyEquivalentTest")); - OS.system(["press", "-f", FILE.join("Build", "Release", "performKeyEquivalentTest"), FILE.join("Build", "Deployment", "performKeyEquivalentTest")]); + fs.mkdirSync(path.join("Build", "Deployment", "performKeyEquivalentTest"), { recursive: true }); + cp.execSync(["press", "-f", path.join("Build", "Release", "performKeyEquivalentTest"), path.join("Build", "Deployment", "performKeyEquivalentTest")].join(" "), { stdio: "inherit" }); printResults("Deployment") }); task ("desktop", ["release"], function() { - FILE.mkdirs(FILE.join("Build", "Desktop", "performKeyEquivalentTest")); - require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "performKeyEquivalentTest"), FILE.join("Build", "Desktop", "performKeyEquivalentTest", "performKeyEquivalentTest.app")); + fs.mkdirSync(path.join("Build", "Desktop", "performKeyEquivalentTest"), { recursive: true }); + require("@objj/nativehost").buildNativeHost(path.join("Build", "Release", "performKeyEquivalentTest"), path.join("Build", "Desktop", "performKeyEquivalentTest", "performKeyEquivalentTest.app")); printResults("Desktop") }); task ("run-desktop", ["desktop"], function() { - OS.system([FILE.join("Build", "Desktop", "performKeyEquivalentTest", "performKeyEquivalentTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); + cp.execSync([path.join("Build", "Desktop", "performKeyEquivalentTest", "performKeyEquivalentTest.app", "Contents", "MacOS", "NativeHost"), "-i"].join(" "), { stdio: "inherit" }); }); function printResults(configuration) { - print("----------------------------"); - print(configuration+" app built at path: "+FILE.join("Build", configuration, "performKeyEquivalentTest")); - print("----------------------------"); + console.log("----------------------------"); + console.log(configuration+" app built at path: "+path.join("Build", configuration, "performKeyEquivalentTest")); + console.log("----------------------------"); }