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/03/06 01:13:30 UTC
[03/13] git commit: manual merge
manual merge
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/fe56a5de
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/fe56a5de
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/fe56a5de
Branch: refs/heads/master
Commit: fe56a5de3836076021f40a047671931f44f8d351
Parents: 2159522 85f7ed9
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Feb 27 11:49:37 2014 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu Feb 27 11:49:37 2014 -0800
----------------------------------------------------------------------
README.md | 28 +-
RELEASENOTES.md | 16 +
doc/base.js | 5 +
doc/help.txt | 31 +
doc/platforms/android/android.xml | 12 +
doc/platforms/android/base.java | 32 +
doc/platforms/ios/base.m | 28 +
doc/platforms/ios/ios.xml | 9 +
main.js | 4 +-
package.json | 5 +-
plugman.js | 44 +-
spec/add_platform.spec.js | 64 ++
spec/create.spec.js | 62 ++
spec/install.spec.js | 9 +-
spec/platform.spec.js | 26 +
spec/platforms/android.spec.js | 6 +-
spec/platforms/common.spec.js | 56 +-
spec/platforms/ios.spec.js | 18 +-
spec/prepare.spec.js | 13 +-
spec/util/config-changes.spec.js | 126 ++--
spec/util/csproj.spec.js | 9 -
spec/wrappers.spec.js | 2 +-
src/create.js | 81 +++
src/fetch.js | 43 +-
src/install.js | 122 ++--
src/platform.js | 119 ++++
src/platform_operation.js | 5 +
src/platforms/amazon-fireos.js | 24 +-
src/platforms/android.js | 30 +-
src/platforms/blackberry10.js | 29 +-
src/platforms/common.js | 11 +-
src/platforms/firefoxos.js | 50 +-
src/platforms/ios.js | 44 +-
src/platforms/ubuntu.js | 16 +
src/platforms/windows8.js | 62 +-
src/platforms/wp7.js | 36 +-
src/platforms/wp8.js | 62 +-
src/prepare.js | 43 +-
src/registry/manifest.js | 8 +-
src/registry/registry.js | 115 ++--
src/uninstall.js | 7 +-
src/util/action-stack.js | 2 +-
src/util/config-changes.js | 1030 +++++++++++++++++++-------------
src/util/csproj.js | 102 ++--
src/util/plugins.js | 15 -
src/util/w8jsproj.js | 74 ++-
46 files changed, 1942 insertions(+), 793 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/fe56a5de/src/platforms/windows8.js
----------------------------------------------------------------------
diff --cc src/platforms/windows8.js
index 65a1445,908dc95..151dfee
--- a/src/platforms/windows8.js
+++ b/src/platforms/windows8.js
@@@ -20,10 -20,9 +20,10 @@@
var common = require('./common'),
path = require('path'),
glob = require('glob'),
+ shell = require('shelljs'),
- fs = require('fs');
- var w8jsproj = require('../util/w8jsproj');
- var xml_helpers = require('../util/xml-helpers');
+ fs = require('fs'),
+ w8jsproj = require('../util/w8jsproj'),
+ xml_helpers = require('../util/xml-helpers');
module.exports = {
@@@ -60,55 -61,59 +62,103 @@@
project_file.removeSourceFile(dest);
}
},
+ "header-file": {
+ install:function(source_el, plugin_dir, project_dir, plugin_id) {
+ require('../../plugman').emit('verbose', 'header-fileinstall is not supported for Windows 8');
+ },
+ uninstall:function(source_el, project_dir, plugin_id) {
+ require('../../plugman').emit('verbose', 'header-file.uninstall is not supported for Windows 8');
+ }
+ },
"resource-file":{
- install:function(el, plugin_dir, project_dir) {
+ install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
require('../../plugman').emit('verbose', 'resource-file is not supported for Windows 8');
},
- uninstall:function(el, project_dir) {
+ uninstall:function(el, project_dir, plugin_id, project_file) {
+ }
+ },
+ "lib-file": {
+ install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
+ var inc = el.attrib['Include'];
+ project_file.addSDKRef(inc);
+ },
+ uninstall:function(el, project_dir, plugin_id, project_file) {
+ require('../../plugman').emit('verbose', 'windows8 lib-file uninstall :: ' + plugin_id);
+ var inc = el.attrib['Include'];
+ project_file.removeSDKRef(inc);
+ }
+ },
+ "framework": {
+ install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
+ require('../../plugman').emit('verbose', 'windows8 framework install :: ' + plugin_id);
+
+ var src = el.attrib['src'];
+ var dest = src; // if !isCustom, we will just add a reference to the file in place
+ var isCustom = el.attrib.custom == "true";
+ if(isCustom) {
+ dest = path.join('plugins', plugin_id, path.basename(src));
+ common.copyFile(plugin_dir, src, project_dir, dest);
+ }
+
+ project_file.addReference(dest,src);
+
+ },
+ uninstall:function(el, project_dir, plugin_id, project_file) {
+ require('../../plugman').emit('verbose', 'windows8 framework uninstall :: ' + plugin_id );
+
+ var src = el.attrib['src'];
+ var isCustom = el.attrib.custom == "true";
+
+ if(isCustom) {
+ var dest = path.join('plugins', plugin_id);//, path.basename(src));
+ common.removeFile(project_dir, dest);
+ }
+
+ project_file.removeReference(src);
}
+ },
+ "framework":{ // CB-5238 custom frameworks only
+ install:function(framework_el, plugin_dir, project_dir, plugin_id, project) {
+ // console.log("framework install called with framework_el:: " + framework_el);
+ // console.log("framework install called with plugin_dir:: " + plugin_dir );
+ // console.log("framework install called with project_dir:: " + project_dir);
+ // console.log("framework install called with plugin_id:: " + plugin_id);
+ // console.log("framework install called with project::" + project);
+
+ // console.log("project.plugins_dir " + project.plugins_dir);
+
+ // framework_el attributes : src, custom
+ var src = framework_el.attrib['src'];
+ console.log("src = " + src);
+
+ var custom = framework_el.attrib['custom'];
+
+ var srcFile = path.resolve(plugin_dir, src);
+
+ console.log("path.basename(src) = " + path.basename(src));
+
+ console.log("srcFile = " + srcFile);
+
+ var targetDir = path.resolve(project.plugins_dir, plugin_id, path.basename(src));
+
+ if (!custom) throw new Error('cannot add non custom frameworks.');
+ if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <framework>');
+ if (fs.existsSync(targetDir)) throw new Error('target destination "' + targetDir + '" already exists');
+ shell.mkdir('-p', path.dirname(targetDir));
+ shell.cp('-R', srcFile, path.dirname(targetDir)); // frameworks are directories
+ var project_relative = path.relative(project_dir, targetDir);
+
+ console.log("project_relative = " + project_relative);
+ project.addProjectReference(project_relative);
+ //project.xcode.addFramework(project_relative, {customFramework: true});
+ },
+ uninstall:function(framework_el, project_dir, plugin_id, project) {
+ var src = framework_el.attrib['src'],
+ baseDir = path.resolve(project.plugins_dir, plugin_id),
+ targetDir = path.resolve(baseDir, path.basename(src));
+ project.removeProjectReference(targetDir);
+ shell.rm('-rf', baseDir);
+
+ }
}
};
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/fe56a5de/src/util/w8jsproj.js
----------------------------------------------------------------------
diff --cc src/util/w8jsproj.js
index cea3425,ab874e7..bd4e6ed
--- a/src/util/w8jsproj.js
+++ b/src/util/w8jsproj.js
@@@ -6,14 -6,8 +6,15 @@@
var xml_helpers = require('./xml-helpers'),
et = require('elementtree'),
fs = require('fs'),
+ shell = require('shelljs'),
path = require('path');
+var WindowsStoreProjectTypeGUID = "{BC8A1FFA-BEE3-4634-8014-F334798102B3}";
+var WinCSharpProjectTypeGUID = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}";
+var WinVBnetProjectTypeGUID = "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}";
+var WinCplusplusProjectTypeGUID = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}";
+
++
function jsproj(location) {
require('../../plugman').emit('verbose','creating jsproj from project at : ' + location);
this.location = location;