You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2014/01/29 01:40:42 UTC
[1/3] git commit: update cordova-js and VERSION
Updated Branches:
refs/heads/3.4.x [created] 78736e018
Updated Tags: refs/tags/3.4.0-rc1 [created] 78736e018
update cordova-js and VERSION
Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/d02e7c62
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/d02e7c62
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/d02e7c62
Branch: refs/heads/3.4.x
Commit: d02e7c629d87c43a2b8ad10a673a53e65807d926
Parents: ef4bbec
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Jan 28 15:54:20 2014 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Jan 28 15:54:20 2014 -0800
----------------------------------------------------------------------
windows8/VERSION | 2 +-
windows8/cordova.js | 81 ++++++++++++++++++++---------------
windows8/template/VERSION | 2 +-
windows8/template/www/cordova.js | 81 ++++++++++++++++++++---------------
4 files changed, 94 insertions(+), 72 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d02e7c62/windows8/VERSION
----------------------------------------------------------------------
diff --git a/windows8/VERSION b/windows8/VERSION
index 49d2ba3..f3c1778 100644
--- a/windows8/VERSION
+++ b/windows8/VERSION
@@ -1 +1 @@
-3.3.0-dev
\ No newline at end of file
+3.4.0-rc1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d02e7c62/windows8/cordova.js
----------------------------------------------------------------------
diff --git a/windows8/cordova.js b/windows8/cordova.js
index 8e5a255..bc9f2df 100644
--- a/windows8/cordova.js
+++ b/windows8/cordova.js
@@ -1,5 +1,5 @@
// Platform: windows8
-// 3.4.0-dev-c13f84f
+// 3.4.0-rc1
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -19,8 +19,8 @@
under the License.
*/
;(function() {
-var CORDOVA_JS_BUILD_LABEL = '3.4.0-dev-c13f84f';
-// file: lib/scripts/require.js
+var CORDOVA_JS_BUILD_LABEL = '3.4.0-rc1';
+// file: src/scripts/require.js
/*jshint -W079 */
/*jshint -W020 */
@@ -34,7 +34,7 @@ var require,
requireStack = [],
// Map of module ID -> index into requireStack of modules currently being built.
inProgressModules = {},
- SEPERATOR = ".";
+ SEPARATOR = ".";
@@ -44,7 +44,7 @@ var require,
var resultantId = id;
//Its a relative path, so lop off the last portion and add the id (minus "./")
if (id.charAt(0) === ".") {
- resultantId = module.id.slice(0, module.id.lastIndexOf(SEPERATOR)) + SEPERATOR + id.slice(2);
+ resultantId = module.id.slice(0, module.id.lastIndexOf(SEPARATOR)) + SEPARATOR + id.slice(2);
}
return require(resultantId);
};
@@ -98,7 +98,7 @@ if (typeof module === "object" && typeof require === "function") {
module.exports.define = define;
}
-// file: lib/cordova.js
+// file: src/cordova.js
define("cordova", function(require, exports, module) {
@@ -316,7 +316,7 @@ module.exports = cordova;
});
-// file: lib/common/argscheck.js
+// file: src/common/argscheck.js
define("cordova/argscheck", function(require, exports, module) {
var exec = require('cordova/exec');
@@ -382,7 +382,7 @@ moduleExports.enableChecks = true;
});
-// file: lib/common/base64.js
+// file: src/common/base64.js
define("cordova/base64", function(require, exports, module) {
var base64 = exports;
@@ -438,7 +438,7 @@ function uint8ToBase64(rawData) {
});
-// file: lib/common/builder.js
+// file: src/common/builder.js
define("cordova/builder", function(require, exports, module) {
var utils = require('cordova/utils');
@@ -551,7 +551,7 @@ exports.replaceHookForTesting = function() {};
});
-// file: lib/common/channel.js
+// file: src/common/channel.js
define("cordova/channel", function(require, exports, module) {
var utils = require('cordova/utils'),
@@ -792,7 +792,7 @@ module.exports = channel;
});
-// file: lib/windows8/exec.js
+// file: src/windows8/exec.js
define("cordova/exec", function(require, exports, module) {
/*jslint sloppy:true, plusplus:true*/
@@ -829,18 +829,25 @@ module.exports = function (success, fail, service, action, args) {
cordova.callbacks[callbackId] = {success: success, fail: fail};
}
try {
- onSuccess = function (result) {
- cordova.callbackSuccess(callbackId,
- {
- status: cordova.callbackStatus.OK,
- message: result
+ // callbackOptions param represents additional optional parameters command could pass back, like keepCallback or
+ // custom callbackId, for example {callbackId: id, keepCallback: true, status: cordova.callbackStatus.JSON_EXCEPTION }
+ // CB-5806 [Windows8] Add keepCallback support to proxy
+ onSuccess = function (result, callbackOptions) {
+ callbackOptions = callbackOptions || {};
+ cordova.callbackSuccess(callbackOptions.callbackId || callbackId,
+ {
+ status: callbackOptions.status || cordova.callbackStatus.OK,
+ message: result,
+ keepCallback: callbackOptions.keepCallback || false
});
};
- onError = function (err) {
- cordova.callbackError(callbackId,
- {
- status: cordova.callbackStatus.ERROR,
- message: err
+ onError = function (err, callbackOptions) {
+ callbackOptions = callbackOptions || {};
+ cordova.callbackError(callbackOptions.callbackId || callbackId,
+ {
+ status: callbackOptions.status || cordova.callbackStatus.ERROR,
+ message: err,
+ keepCallback: callbackOptions.keepCallback || false
});
};
proxy(onSuccess, onError, args);
@@ -857,7 +864,7 @@ module.exports = function (success, fail, service, action, args) {
});
-// file: lib/common/exec/proxy.js
+// file: src/common/exec/proxy.js
define("cordova/exec/proxy", function(require, exports, module) {
@@ -887,7 +894,7 @@ module.exports = {
};
});
-// file: lib/common/init.js
+// file: src/common/init.js
define("cordova/init", function(require, exports, module) {
var channel = require('cordova/channel');
@@ -1001,7 +1008,7 @@ channel.join(function() {
});
-// file: lib/common/modulemapper.js
+// file: src/common/modulemapper.js
define("cordova/modulemapper", function(require, exports, module) {
var builder = require('cordova/builder'),
@@ -1102,7 +1109,7 @@ exports.reset();
});
-// file: lib/windows8/platform.js
+// file: src/windows8/platform.js
define("cordova/platform", function(require, exports, module) {
module.exports = {
@@ -1149,10 +1156,11 @@ module.exports = {
});
-// file: lib/common/pluginloader.js
+// file: src/common/pluginloader.js
define("cordova/pluginloader", function(require, exports, module) {
var modulemapper = require('cordova/modulemapper');
+var urlutil = require('cordova/urlutil');
// Helper function to inject a <script> tag.
function injectScript(url, onload, onerror) {
@@ -1221,11 +1229,14 @@ function handlePluginsObject(path, moduleList, finishPluginLoading) {
}
function injectPluginScript(pathPrefix, finishPluginLoading) {
- injectScript(pathPrefix + 'cordova_plugins.js', function(){
+ var pluginPath = pathPrefix + 'cordova_plugins.js';
+
+ injectScript(pluginPath, function() {
try {
var moduleList = require("cordova/plugin_list");
handlePluginsObject(pathPrefix, moduleList, finishPluginLoading);
- } catch (e) {
+ }
+ catch (e) {
// Error loading cordova_plugins.js, file not found or something
// this is an acceptable error, pre-3.0.0, so we just move on.
finishPluginLoading();
@@ -1262,24 +1273,24 @@ exports.load = function(callback) {
});
-// file: lib/common/urlutil.js
+// file: src/common/urlutil.js
define("cordova/urlutil", function(require, exports, module) {
-var urlutil = exports;
-var anchorEl = document.createElement('a');
/**
* For already absolute URLs, returns what is passed in.
* For relative URLs, converts them to absolute ones.
*/
-urlutil.makeAbsolute = function(url) {
+exports.makeAbsolute = function makeAbsolute(url) {
+ var anchorEl = document.createElement('a');
anchorEl.href = url;
return anchorEl.href;
};
+
});
-// file: lib/common/utils.js
+// file: src/common/utils.js
define("cordova/utils", function(require, exports, module) {
var utils = exports;
@@ -1449,7 +1460,7 @@ function UUIDcreatePart(length) {
});
-// file: lib/windows8/windows8/commandProxy.js
+// file: src/windows8/windows8/commandProxy.js
define("cordova/windows8/commandProxy", function(require, exports, module) {
console.log('WARNING: please require cordova/exec/proxy instead');
@@ -1458,7 +1469,7 @@ module.exports = require('cordova/exec/proxy');
});
window.cordova = require('cordova');
-// file: lib/scripts/bootstrap.js
+// file: src/scripts/bootstrap.js
require('cordova/init');
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d02e7c62/windows8/template/VERSION
----------------------------------------------------------------------
diff --git a/windows8/template/VERSION b/windows8/template/VERSION
index 49d2ba3..f3c1778 100644
--- a/windows8/template/VERSION
+++ b/windows8/template/VERSION
@@ -1 +1 @@
-3.3.0-dev
\ No newline at end of file
+3.4.0-rc1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/d02e7c62/windows8/template/www/cordova.js
----------------------------------------------------------------------
diff --git a/windows8/template/www/cordova.js b/windows8/template/www/cordova.js
index 8e5a255..bc9f2df 100644
--- a/windows8/template/www/cordova.js
+++ b/windows8/template/www/cordova.js
@@ -1,5 +1,5 @@
// Platform: windows8
-// 3.4.0-dev-c13f84f
+// 3.4.0-rc1
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -19,8 +19,8 @@
under the License.
*/
;(function() {
-var CORDOVA_JS_BUILD_LABEL = '3.4.0-dev-c13f84f';
-// file: lib/scripts/require.js
+var CORDOVA_JS_BUILD_LABEL = '3.4.0-rc1';
+// file: src/scripts/require.js
/*jshint -W079 */
/*jshint -W020 */
@@ -34,7 +34,7 @@ var require,
requireStack = [],
// Map of module ID -> index into requireStack of modules currently being built.
inProgressModules = {},
- SEPERATOR = ".";
+ SEPARATOR = ".";
@@ -44,7 +44,7 @@ var require,
var resultantId = id;
//Its a relative path, so lop off the last portion and add the id (minus "./")
if (id.charAt(0) === ".") {
- resultantId = module.id.slice(0, module.id.lastIndexOf(SEPERATOR)) + SEPERATOR + id.slice(2);
+ resultantId = module.id.slice(0, module.id.lastIndexOf(SEPARATOR)) + SEPARATOR + id.slice(2);
}
return require(resultantId);
};
@@ -98,7 +98,7 @@ if (typeof module === "object" && typeof require === "function") {
module.exports.define = define;
}
-// file: lib/cordova.js
+// file: src/cordova.js
define("cordova", function(require, exports, module) {
@@ -316,7 +316,7 @@ module.exports = cordova;
});
-// file: lib/common/argscheck.js
+// file: src/common/argscheck.js
define("cordova/argscheck", function(require, exports, module) {
var exec = require('cordova/exec');
@@ -382,7 +382,7 @@ moduleExports.enableChecks = true;
});
-// file: lib/common/base64.js
+// file: src/common/base64.js
define("cordova/base64", function(require, exports, module) {
var base64 = exports;
@@ -438,7 +438,7 @@ function uint8ToBase64(rawData) {
});
-// file: lib/common/builder.js
+// file: src/common/builder.js
define("cordova/builder", function(require, exports, module) {
var utils = require('cordova/utils');
@@ -551,7 +551,7 @@ exports.replaceHookForTesting = function() {};
});
-// file: lib/common/channel.js
+// file: src/common/channel.js
define("cordova/channel", function(require, exports, module) {
var utils = require('cordova/utils'),
@@ -792,7 +792,7 @@ module.exports = channel;
});
-// file: lib/windows8/exec.js
+// file: src/windows8/exec.js
define("cordova/exec", function(require, exports, module) {
/*jslint sloppy:true, plusplus:true*/
@@ -829,18 +829,25 @@ module.exports = function (success, fail, service, action, args) {
cordova.callbacks[callbackId] = {success: success, fail: fail};
}
try {
- onSuccess = function (result) {
- cordova.callbackSuccess(callbackId,
- {
- status: cordova.callbackStatus.OK,
- message: result
+ // callbackOptions param represents additional optional parameters command could pass back, like keepCallback or
+ // custom callbackId, for example {callbackId: id, keepCallback: true, status: cordova.callbackStatus.JSON_EXCEPTION }
+ // CB-5806 [Windows8] Add keepCallback support to proxy
+ onSuccess = function (result, callbackOptions) {
+ callbackOptions = callbackOptions || {};
+ cordova.callbackSuccess(callbackOptions.callbackId || callbackId,
+ {
+ status: callbackOptions.status || cordova.callbackStatus.OK,
+ message: result,
+ keepCallback: callbackOptions.keepCallback || false
});
};
- onError = function (err) {
- cordova.callbackError(callbackId,
- {
- status: cordova.callbackStatus.ERROR,
- message: err
+ onError = function (err, callbackOptions) {
+ callbackOptions = callbackOptions || {};
+ cordova.callbackError(callbackOptions.callbackId || callbackId,
+ {
+ status: callbackOptions.status || cordova.callbackStatus.ERROR,
+ message: err,
+ keepCallback: callbackOptions.keepCallback || false
});
};
proxy(onSuccess, onError, args);
@@ -857,7 +864,7 @@ module.exports = function (success, fail, service, action, args) {
});
-// file: lib/common/exec/proxy.js
+// file: src/common/exec/proxy.js
define("cordova/exec/proxy", function(require, exports, module) {
@@ -887,7 +894,7 @@ module.exports = {
};
});
-// file: lib/common/init.js
+// file: src/common/init.js
define("cordova/init", function(require, exports, module) {
var channel = require('cordova/channel');
@@ -1001,7 +1008,7 @@ channel.join(function() {
});
-// file: lib/common/modulemapper.js
+// file: src/common/modulemapper.js
define("cordova/modulemapper", function(require, exports, module) {
var builder = require('cordova/builder'),
@@ -1102,7 +1109,7 @@ exports.reset();
});
-// file: lib/windows8/platform.js
+// file: src/windows8/platform.js
define("cordova/platform", function(require, exports, module) {
module.exports = {
@@ -1149,10 +1156,11 @@ module.exports = {
});
-// file: lib/common/pluginloader.js
+// file: src/common/pluginloader.js
define("cordova/pluginloader", function(require, exports, module) {
var modulemapper = require('cordova/modulemapper');
+var urlutil = require('cordova/urlutil');
// Helper function to inject a <script> tag.
function injectScript(url, onload, onerror) {
@@ -1221,11 +1229,14 @@ function handlePluginsObject(path, moduleList, finishPluginLoading) {
}
function injectPluginScript(pathPrefix, finishPluginLoading) {
- injectScript(pathPrefix + 'cordova_plugins.js', function(){
+ var pluginPath = pathPrefix + 'cordova_plugins.js';
+
+ injectScript(pluginPath, function() {
try {
var moduleList = require("cordova/plugin_list");
handlePluginsObject(pathPrefix, moduleList, finishPluginLoading);
- } catch (e) {
+ }
+ catch (e) {
// Error loading cordova_plugins.js, file not found or something
// this is an acceptable error, pre-3.0.0, so we just move on.
finishPluginLoading();
@@ -1262,24 +1273,24 @@ exports.load = function(callback) {
});
-// file: lib/common/urlutil.js
+// file: src/common/urlutil.js
define("cordova/urlutil", function(require, exports, module) {
-var urlutil = exports;
-var anchorEl = document.createElement('a');
/**
* For already absolute URLs, returns what is passed in.
* For relative URLs, converts them to absolute ones.
*/
-urlutil.makeAbsolute = function(url) {
+exports.makeAbsolute = function makeAbsolute(url) {
+ var anchorEl = document.createElement('a');
anchorEl.href = url;
return anchorEl.href;
};
+
});
-// file: lib/common/utils.js
+// file: src/common/utils.js
define("cordova/utils", function(require, exports, module) {
var utils = exports;
@@ -1449,7 +1460,7 @@ function UUIDcreatePart(length) {
});
-// file: lib/windows8/windows8/commandProxy.js
+// file: src/windows8/windows8/commandProxy.js
define("cordova/windows8/commandProxy", function(require, exports, module) {
console.log('WARNING: please require cordova/exec/proxy instead');
@@ -1458,7 +1469,7 @@ module.exports = require('cordova/exec/proxy');
});
window.cordova = require('cordova');
-// file: lib/scripts/bootstrap.js
+// file: src/scripts/bootstrap.js
require('cordova/init');
[2/3] git commit: CB-4533 return error code 2 on fail,
CB-5359 get tools version from the registry
Posted by pu...@apache.org.
CB-4533 return error code 2 on fail, CB-5359 get tools version from the registry
Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/fbdaab76
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/fbdaab76
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/fbdaab76
Branch: refs/heads/3.4.x
Commit: fbdaab76be93165b77c9205f2e4579a5de88f77b
Parents: d02e7c6
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Jan 28 16:32:26 2014 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Jan 28 16:34:27 2014 -0800
----------------------------------------------------------------------
windows8/bin/check_reqs.js | 53 ++++++++++++++++-------------------------
1 file changed, 21 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/fbdaab76/windows8/bin/check_reqs.js
----------------------------------------------------------------------
diff --git a/windows8/bin/check_reqs.js b/windows8/bin/check_reqs.js
index 33e575b..fd0fd8c 100644
--- a/windows8/bin/check_reqs.js
+++ b/windows8/bin/check_reqs.js
@@ -21,12 +21,10 @@
var args = WScript.Arguments;
var wscript_shell = WScript.CreateObject("WScript.Shell");
-var REQUIRE_GIT = false;
-
function Usage() {
Log("Usage: [ check_reqs | cscript check_reqs.js ]");
Log("examples:");
- Log(" cscript C:\\Users\\anonymous\\cordova-wp8\\bin\\check_reqs.js");
+ Log(" cscript C:\\Users\\anonymous\\cordova-windows\\windows8\\bin\\check_reqs.js");
Log(" CordovaWindowsPhone\\bin\\check_reqs");
}
@@ -67,34 +65,6 @@ function check_command(cmd, fail_msg) {
}
}
-/* The tooling for cordova windows requires these commands
- * in the environment PATH variable.
- * - msbuild (C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319)
- * - git? (for dynamic cli loading of projects?)
- * TODO: Check for SDK and whatnot.
- */
-function CheckSystem() {
- var cmd = 'msbuild -version'
- var fail_msg = 'The command `msbuild` failed. Make sure you have the latest Windows 8 SDKs installed, and the `msbuild.exe` command (inside C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319) is added to your path.'
- var output = check_command(cmd, fail_msg);
- var msversion = output.match(/Microsoft\s\(R\)\s+Build\sEngine,?\s[a-z]+\s4\.0/i);
- if (!msversion) {
- Log('Please install the .NET Framwork v4.0.30319 (in the latest windows 8 SDK\'s).', true);
- Log('Make sure the "msbuild" command in your path is pointing to v4.0.30319 of msbuild as well (inside C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319).', true);
- WScript.Quit(1);
- }
-
- if(REQUIRE_GIT) {
- cmd = 'git --version';
- fail_msg = 'The command `git` failed. Make sure you have git installed as well ad in your PATH environment so the tool can use it';
- output = check_command(cmd, fail_msg);
- var gitVersion = output.match(/git\sversion\s1\./);
- if (!gitVersion) {
- Log('Please ensure you have at least git v1 installed and added to you PATH so this tool can use it to get the latest codova.');
- }
- }
-}
-
if (args.Count() > 0) {
Usage();
@@ -102,6 +72,25 @@ if (args.Count() > 0) {
}
else
{
- CheckSystem();
+/* The tooling for cordova windows phone requires these commands
+ * in the environment PATH variable.
+ * - msbuild (ex. C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319)
+ */
+ var version;
+
+ try {
+ version = wscript_shell.RegRead("HKLM\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\4.0\\MSBuildRuntimeVersion");
+ if(version != null && version.indexOf("4.0") == 0) {
+ // All good!
+ Log(version);
+ }
+ else {
+ throw(new Error("version not 4.0"));
+ }
+ }
+ catch(err) {
+ Log('Please install the .NET Framework v4.0 (part of the latest windows phone SDK\'s).', true);
+ WScript.Quit(2);
+ }
}
[3/3] git commit: Remove template file after create by name
Posted by pu...@apache.org.
Remove template file after create by name
Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/78736e01
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/78736e01
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/78736e01
Branch: refs/heads/3.4.x
Commit: 78736e0181d35b33f8902873e2912853af406f7c
Parents: fbdaab7
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Jan 28 16:38:49 2014 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Jan 28 16:40:10 2014 -0800
----------------------------------------------------------------------
windows8/bin/create.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/78736e01/windows8/bin/create.js
----------------------------------------------------------------------
diff --git a/windows8/bin/create.js b/windows8/bin/create.js
index 6a4128a..c8e2c79 100644
--- a/windows8/bin/create.js
+++ b/windows8/bin/create.js
@@ -164,7 +164,7 @@ function create(destPath, namespace, name, guid) {
delete_if_exists(destPath + "\\bin");
delete_if_exists(destPath + "\\*.user");
delete_if_exists(destPath + "\\*.suo");
- delete_if_exists(destPath + "\\*.vstemplate");
+ delete_if_exists(destPath + "\\MyTemplate.vstemplate");
// TODO: Name the project according to the arguments
// update the solution to include the new project by name