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/07/09 02:09:35 UTC

[1/2] git commit: CB-7083 Missing SDKReference support on Windows Phone

Repository: cordova-lib
Updated Branches:
  refs/heads/master 68a0b5b7a -> a4c780ac2


CB-7083 Missing SDKReference support on Windows Phone


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/f6054673
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/f6054673
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/f6054673

Branch: refs/heads/master
Commit: f6054673dde95d09fdb9ba5fcb3ba7342b1388a7
Parents: ab49973
Author: sgrebnov <v-...@microsoft.com>
Authored: Tue Jul 8 12:37:39 2014 +0400
Committer: sgrebnov <v-...@microsoft.com>
Committed: Tue Jul 8 12:37:39 2014 +0400

----------------------------------------------------------------------
 cordova-lib/src/plugman/platforms/wp8.js | 12 ++++++++----
 cordova-lib/src/util/windows/csproj.js   | 17 +++++++++++++++++
 2 files changed, 25 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f6054673/cordova-lib/src/plugman/platforms/wp8.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/wp8.js b/cordova-lib/src/plugman/platforms/wp8.js
index 2c6da4a..996a04d 100644
--- a/cordova-lib/src/plugman/platforms/wp8.js
+++ b/cordova-lib/src/plugman/platforms/wp8.js
@@ -107,11 +107,15 @@ module.exports = {
         }
     },
     'lib-file': {
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.install is not supported for wp8');
+        install:function(el, plugin_dir, project_dir, plugin_id, project_file) {
+            events.emit('verbose', 'wp8 lib-file install :: ' + plugin_id);
+            var inc  = el.attrib['Include'];
+            project_file.addSDKRef(inc);
         },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            events.emit('verbose', 'lib-file.uninstall is not supported for wp8');
+        uninstall:function(el, project_dir, plugin_id, project_file) {
+            events.emit('verbose', 'wp8 lib-file uninstall :: ' + plugin_id);
+            var inc = el.attrib['Include'];
+            project_file.removeSDKRef(inc);
         }
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f6054673/cordova-lib/src/util/windows/csproj.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/util/windows/csproj.js b/cordova-lib/src/util/windows/csproj.js
index 90f84da..3e73482 100644
--- a/cordova-lib/src/util/windows/csproj.js
+++ b/cordova-lib/src/util/windows/csproj.js
@@ -36,7 +36,24 @@ csproj.prototype = {
     write:function() {
         fs.writeFileSync(this.location, this.xml.write({indent:4}), 'utf-8');
     },
+    // add/remove the item group for SDKReference
+    // example :
+    // <ItemGroup><SDKReference Include="MSAdvertising, Version=6.1" /></ItemGroup>
+    addSDKRef:function(incText) {
+        var item_group = new et.Element('ItemGroup');
+        var elem = new et.Element('SDKReference');
+        elem.attrib.Include = incText;
+
+        item_group.append(elem);
+        this.xml.getroot().append(item_group);
+    },
 
+    removeSDKRef:function(incText) {
+        var item_group = this.xml.find('ItemGroup/SDKReference[@Include="' + incText + '"]/..');
+        if(item_group) {
+            this.xml.getroot().remove(0, item_group);
+        }
+    },
     addReference:function(relPath) {
         var item = new et.Element('ItemGroup');
         var extName = path.extname(relPath);


[2/2] git commit: Merge branch 'CB-7083' of https://github.com/MSOpenTech/cordova-lib

Posted by pu...@apache.org.
Merge branch 'CB-7083' of https://github.com/MSOpenTech/cordova-lib


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/a4c780ac
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/a4c780ac
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/a4c780ac

Branch: refs/heads/master
Commit: a4c780ac218eb506fa123d2d4572ca56729821a7
Parents: 68a0b5b f605467
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Jul 8 17:10:13 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Jul 8 17:10:13 2014 -0700

----------------------------------------------------------------------
 cordova-lib/src/plugman/platforms/wp8.js | 12 ++++++++----
 cordova-lib/src/util/windows/csproj.js   | 17 +++++++++++++++++
 2 files changed, 25 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/a4c780ac/cordova-lib/src/util/windows/csproj.js
----------------------------------------------------------------------