You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/05/18 01:47:18 UTC

[01/12] git commit: windows vetting: parsing xml is hard.

Updated Branches:
  refs/heads/master 0c5097ec1 -> 7b63c0ba6


windows vetting: parsing xml is hard.


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

Branch: refs/heads/master
Commit: ac953c92f120ee7df74a563084824f3303cef3d0
Parents: 79f4b76
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 16:20:05 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 16:46:01 2013 -0700

----------------------------------------------------------------------
 src/util/config-changes.js |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/ac953c92/src/util/config-changes.js
----------------------------------------------------------------------
diff --git a/src/util/config-changes.js b/src/util/config-changes.js
index a81e56d..89a1440 100644
--- a/src/util/config-changes.js
+++ b/src/util/config-changes.js
@@ -41,7 +41,7 @@ module.exports = {
     add_uninstalled_plugin_to_prepare_queue:function(plugins_dir, plugin, platform, is_top_level) {
         checkPlatform(platform);
 
-        var plugin_xml = new et.ElementTree(et.XML(fs.readFileSync(path.join(plugins_dir, plugin, 'plugin.xml'), 'utf-8')));
+        var plugin_xml = xml_helpers.parseElementtreeSync(path.join(plugins_dir, plugin, 'plugin.xml'));
         var config = module.exports.get_platform_json(plugins_dir, platform);
         config.prepare_queue.uninstalled.push({'plugin':plugin, 'id':plugin_xml._root.attrib['id'], 'topLevel':is_top_level});
         module.exports.save_platform_json(config, plugins_dir, platform);
@@ -80,7 +80,7 @@ module.exports = {
         }
 
         var munge = {};
-        var plugin_xml = new et.ElementTree(et.XML(fs.readFileSync(path.join(plugin_dir, 'plugin.xml'), 'utf-8')));
+        var plugin_xml = xml_helpers.parseElementtreeSync(path.join(plugin_dir, 'plugin.xml'));
 
         var platformTag = plugin_xml.find('platform[@name="' + platform + '"]');
         var changes = [];
@@ -180,7 +180,7 @@ module.exports = {
                                         if (fs.existsSync(filepath)) {
                                             if (path.extname(filepath) == '.xml') {
                                                 var xml_to_prune = [et.XML(xml_child)];
-                                                var doc = new et.ElementTree(et.XML(fs.readFileSync(filepath, 'utf-8')));
+                                                var doc = xml_helpers.parseElementtreeSync(filepath);
                                                 if (xml_helpers.pruneXML(doc, xml_to_prune, selector)) {
                                                     // were good, write out the file!
                                                     fs.writeFileSync(filepath, doc.write({indent: 4}), 'utf-8');
@@ -224,7 +224,7 @@ module.exports = {
         platform_config.prepare_queue.installed.forEach(function(u) {
             var plugin_dir = path.join(plugins_dir, u.plugin);
             var plugin_vars = u.vars;
-            var plugin_id = (new et.ElementTree(et.XML(fs.readFileSync(path.join(plugin_dir, 'plugin.xml'), 'utf-8'))))._root.attrib['id'];
+            var plugin_id = xml_helpers.parseElementtreeSync(path.join(plugin_dir, 'plugin.xml'), 'utf-8')._root.attrib['id'];
 
             // get config munge, aka how should this plugin change various config files
             var config_munge = module.exports.generate_plugin_config_munge(plugin_dir, platform, project_dir, plugin_vars);
@@ -270,7 +270,7 @@ module.exports = {
                                     // look at ext and do proper config change based on file type
                                     if (path.extname(filepath) == '.xml') {
                                         var xml_to_graft = [et.XML(xml_child)];
-                                        var doc = new et.ElementTree(et.XML(fs.readFileSync(filepath, 'utf-8')));
+                                        var doc = xml_helpers.parseElementtreeSync(filepath);
                                         if (xml_helpers.graftXML(doc, xml_to_graft, selector)) {
                                             // were good, write out the file!
                                             fs.writeFileSync(filepath, doc.write({indent: 4}), 'utf-8');


[05/12] git commit: added a csproj file parses module, incorporated into action stack, and first pass at wp7 platform handler

Posted by fi...@apache.org.
added a csproj file parses module, incorporated into action stack, and first pass at wp7 platform handler


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

Branch: refs/heads/master
Commit: b356f593b01745870af37c056723eb06fc3b9d75
Parents: d4d9c24
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 15:10:05 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 16:46:01 2013 -0700

----------------------------------------------------------------------
 src/platforms/wp7.js     |  120 +++++++----------------------------------
 src/util/action-stack.js |   16 ++++--
 src/util/csproj.js       |   41 ++++++++++++++
 3 files changed, 73 insertions(+), 104 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b356f593/src/platforms/wp7.js
----------------------------------------------------------------------
diff --git a/src/platforms/wp7.js b/src/platforms/wp7.js
index ce38882..01645f0 100644
--- a/src/platforms/wp7.js
+++ b/src/platforms/wp7.js
@@ -17,15 +17,13 @@
  *
 */
 
-var fs = require('fs'),
+var common = require('./common'),
     path = require('path'),
     glob = require('glob'),
-    shell = require('shelljs'),
-    et = require('elementtree'),
-    xml_helpers = require('../util/xml-helpers'),
-    getConfigChanges = require('../util/config-changes'),
-    assetsDir = 'www'; // relative path to project's web assets
+    csproj = require('../util/csproj');
+    xml_helpers = require('../util/xml-helpers');
 
+/*
 var unix_projPath,  //  for use with glob
     projectFilename,//  first csproj returned by glob unix_projPath
     projPath,       //  full path to the project file, including file name
@@ -48,27 +46,6 @@ function initPaths(project_dir, plugin_dir, plugin_et, variables) {
     projectChanges = platformTag.findall('./config-file[@target=".csproj"]');
     hosts = plugin_et.findall('./access');
 }
-
-function install(project_dir, plugin_dir, plugin_et, variables) {
-
-  // move asset files
-  assets && assets.forEach(function (asset) {
-      var srcPath = path.resolve(plugin_dir, asset.attrib['src']);
-      var targetPath = path.resolve(project_dir, assetsDir,  asset.attrib['target']);
-      copyFileSync(srcPath, targetPath);
-  });
-
-  // move source files
-  sourceFiles && sourceFiles.forEach(function (sourceFile) {
-      var srcFilePath = path.resolve(plugin_dir,  sourceFile.attrib['src']);
-      var destDir = path.resolve(project_dir, sourceFile.attrib['target-dir']);
-      var destFilePath = path.resolve(destDir, path.basename(sourceFile.attrib['src']));
-      copyFileSync(srcFilePath, destFilePath);
-  });
-
-  updateConfigXml("install", configFilePath, plugin_et);
-
-  et.register_namespace("csproj", "http://schemas.microsoft.com/developer/msbuild/2003");
   projectChanges && projectChanges.forEach(function (configNode) {
 
     var docStr = fs.readFileSync(projPath,"utf8");
@@ -90,71 +67,6 @@ function install(project_dir, plugin_dir, plugin_et, variables) {
     // save it, and get out
     fs.writeFileSync(projPath, newDocStr);
   });
-}
-
-function updateConfigXml(action, config_path, plugin_et) {
-
-    var hosts = plugin_et.findall('./access');
-    var platformTag = plugin_et.find('./platform[@name="wp7"]');
-    var configChanges = getConfigChanges(platformTag);   
-    var base_config_path = path.basename(config_path);
-        // add whitelist hosts
-    var root = et.Element("config-file");
-        root.attrib['parent'] = '.';
-      
-    hosts && hosts.forEach( function (tag) {
-      root.append(tag);
-    });
-
-    if (root.len()) {
-      var changeList = configChanges[path.basename(config_path)];
-      // if changeList then add to it, otherwise create it.
-      if(changeList) {
-        changeList.push(root);
-      }
-      else {
-        configChanges[path.basename(config_path)] = [root]
-      }
-    }  
-
-    if (configChanges[path.basename(config_path)]) {
-
-          // edit configuration files
-      var xmlDoc = xml_helpers.parseElementtreeSync(config_path)
-      configChanges[base_config_path].forEach( function (configNode) {
-            var selector = configNode.attrib["parent"],
-                children = configNode.findall('*');
-            if( action == 'install') {
-                if (!xml_helpers.graftXML(xmlDoc, children, selector)) {
-                    throw new Error('failed to add children to ' + selector + ' in ' + config_path);
-                }
-            } else {
-                if (!xml_helpers.pruneXML(xmlDoc, children, selector)) {
-                    throw new Error('failed to remove children from ' + selector + ' in ' + config_path);
-                }
-            }
-      });
-    }
-
-    fs.writeFileSync(config_path, xmlDoc.write({indent: 4}));
-}
-
-function uninstall(project_dir, plugin_dir, plugin_et, variables) {
-
-   assets && assets.forEach(function (asset) {
-      var targetPath = path.resolve(project_dir, assetsDir,  asset.attrib['target']);
-      shell.rm('-rf', targetPath);
-   });
-
-   sourceFiles && sourceFiles.forEach(function (sourceFile) {
-      var destDir = path.resolve(project_dir, sourceFile.attrib['target-dir']);
-      var destFilePath = path.resolve(destDir, path.basename(sourceFile.attrib['src']));
-      shell.rm('-rf', destFilePath);
-   });
-
-   updateConfigXml("uninstall", configFilePath, plugin_et);
-
-   et.register_namespace("csproj", "http://schemas.microsoft.com/developer/msbuild/2003");
 
    projectChanges && projectChanges.forEach(function (configNode) {
 
@@ -180,8 +92,7 @@ function uninstall(project_dir, plugin_dir, plugin_et, variables) {
       fs.writeFileSync(projPath, docStr);
     }
   });
-}
-
+*/
 module.exports = {
     www_dir:function(project_dir) {
         return path.join(project_dir, 'www');
@@ -189,16 +100,25 @@ module.exports = {
     package_name:function(project_dir) {
         return xml_helpers.parseElementtreeSync(path.join(project_dir, 'Properties', 'WMAppManifest.xml')).find('App').attrib.ProductID;
     },
+    parseWP7ProjectFile:function(project_dir) {
+        var project_files = glob.sync(path.join(project_dir, '*.csproj'));
+        if (project_files.length === 0) {
+            throw new Error('does not appear to be a Windows Phone project (no .csproj file)');
+        }
+        return new csproj(project_files[0]);
+    },
     "source-file":{
-        install:function(source_el, plugin_dir, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+        install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {
+            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
             common.copyFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
+            // add reference to this file to csproj.
+            project_file.addSourceFile(dest);
         },
-        uninstall:function(source_el, project_dir, plugin_id) {
-            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+        uninstall:function(source_el, project_dir, plugin_id, project_file) {
+            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
             common.removeFile(project_dir, dest);
+            // remove reference to this file from csproj.
+            project_file.removeSourceFile(dest);
         }
-    },
-    "lib-file":{
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b356f593/src/util/action-stack.js
----------------------------------------------------------------------
diff --git a/src/util/action-stack.js b/src/util/action-stack.js
index 886ff21..e3b63d8 100644
--- a/src/util/action-stack.js
+++ b/src/util/action-stack.js
@@ -1,4 +1,5 @@
 var ios = require('../platforms/ios'),
+    wp7 = require('../platforms/wp7'),
     fs = require('fs');
 
 function ActionStack() {
@@ -23,15 +24,19 @@ ActionStack.prototype = {
         this.stack.push(tx);
     },
     process:function(platform, project_dir, callback) {
+        var project_files;
+        // parse platform-specific project files once
         if (platform == 'ios') {
-            // parse xcode project files once
-            var project_files = ios.parseIOSProjectFiles(project_dir);
+            project_files = ios.parseIOSProjectFiles(project_dir);
         }
+        if (platform == 'wp7') {
+            project_files = wp7.parseWP7ProjectFile(project_dir);
+        } 
         while(this.stack.length) {
             var action = this.stack.shift();
             var handler = action.handler.run;
             var action_params = action.handler.params;
-            if (platform == 'ios') action_params.push(project_files);
+            if (platform == 'ios' || platform == 'wp7') action_params.push(project_files);
             try {
                 handler.apply(null, action_params);
             } catch(e) {
@@ -42,7 +47,7 @@ ActionStack.prototype = {
                     var undo = this.completed.shift();
                     var revert = undo.reverter.run;
                     var revert_params = undo.reverter.params;
-                    if (platform == 'ios') revert_params.push(project_files);
+                    if (platform == 'ios' || platform == 'wp7') revert_params.push(project_files);
                     try {
                         revert.apply(null, revert_params);
                     } catch(err) {
@@ -60,6 +65,9 @@ ActionStack.prototype = {
             // write out xcodeproj file
             fs.writeFileSync(project_files.pbx, project_files.xcode.writeSync());
         }
+        if (platform == 'wp7') {
+            project_files.write();
+        }
         if (callback) callback();
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b356f593/src/util/csproj.js
----------------------------------------------------------------------
diff --git a/src/util/csproj.js b/src/util/csproj.js
new file mode 100644
index 0000000..1fbe1b3
--- /dev/null
+++ b/src/util/csproj.js
@@ -0,0 +1,41 @@
+var xml_helpers = require('./xml_helpers'),
+    et = require('elementtree'),
+    fs = require('fs');
+
+function csproj(location) {
+    this.location = location;
+    this.xml = xml_helpers.parseElementtreeSync(location);
+    return this;
+}
+
+csproj.prototype = {
+    write:function() {
+        fs.writeFileSync(this.location, this.xml.write({indent:4}), 'utf-8');
+    },
+    addSourceFile:function(relative_path) {
+        relative_path = relative_path.join('/').join('\\');
+        var item = new et.Element('ItemGroup');
+        var compile = new et.Element('Compile');
+        compile.attrib.Include = relative_path;
+        item.append(compile);
+        this.xml.getroot().append(item);
+    },
+    removeSourceFile:function(relative_path) {
+        relative_path = relative_path.join('/').join('\\');
+        var groups = this.xml.findall('ItemGroup');
+        for (var i = 0, l = groups.length; i < l; i++) {
+            var group = groups[i];
+            var compiles = group.findall('Compile');
+            for (var j = 0, k = compiles.length; j < k; j++) {
+                var compile = compiles[j];
+                if (compile.attrib.Include == relative_path) {
+                    group.remove(0, compile);
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+};
+
+module.exports = csproj;


[07/12] git commit: fixed an issue in csproj and start of tests for it

Posted by fi...@apache.org.
fixed an issue in csproj and start of tests for it


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

Branch: refs/heads/master
Commit: d3ba3a51be78e49e852b7e53bb2bc934371baa5e
Parents: 05f52ab
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 15:47:11 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 16:46:01 2013 -0700

----------------------------------------------------------------------
 spec/projects/FriendSting-Info.plist    |   78 ----------
 spec/projects/wp7/CordovaAppProj.csproj |  205 ++++++++++++++++++++++++++
 spec/util/csproj.spec.js                |   24 +++
 src/util/csproj.js                      |    2 +-
 4 files changed, 230 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/d3ba3a51/spec/projects/FriendSting-Info.plist
----------------------------------------------------------------------
diff --git a/spec/projects/FriendSting-Info.plist b/spec/projects/FriendSting-Info.plist
deleted file mode 100644
index 6010b61..0000000
--- a/spec/projects/FriendSting-Info.plist
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<!--
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-# http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
--->
-<plist version="1.0">
-<dict>
-	<key>CFBundleIcons</key>
-	<dict>
-		<key>CFBundlePrimaryIcon</key>
-		<dict>
-			<key>CFBundleIconFiles</key>
-			<array>
-                <string>icon.png</string>
-                <string>icon@2x.png</string>
-                <string>icon-72.png</string>
-                <string>icon-72@2x.png</string>
-			</array>
-			<key>UIPrerenderedIcon</key>
-			<false/>
-		</dict>
-	</dict>
-	<key>UISupportedInterfaceOrientations~ipad</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationPortraitUpsideDown</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
-	</array>
-	<key>UISupportedInterfaceOrientations</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-	</array>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleDisplayName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string>icon.png</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.example.friendstring</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-	<key>LSRequiresIPhoneOS</key>
-	<true/>
-	<key>NSMainNibFile</key>
-	<string></string>
-	<key>NSMainNibFile~ipad</key>
-	<string></string>
-</dict>
-</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/d3ba3a51/spec/projects/wp7/CordovaAppProj.csproj
----------------------------------------------------------------------
diff --git a/spec/projects/wp7/CordovaAppProj.csproj b/spec/projects/wp7/CordovaAppProj.csproj
new file mode 100644
index 0000000..560c1d7
--- /dev/null
+++ b/spec/projects/wp7/CordovaAppProj.csproj
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License. 
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>10.0.20506</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}</ProjectGuid>
+    <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>$safeprojectname$</RootNamespace>
+    <AssemblyName>$safeprojectname$</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+    <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
+    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+    <SilverlightApplication>true</SilverlightApplication>
+    <SupportedCultures>
+    </SupportedCultures>
+    <XapOutputs>true</XapOutputs>
+    <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+    <XapFilename>$safeprojectname$.xap</XapFilename>
+    <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+    <SilverlightAppEntry>$safeprojectname$.App</SilverlightAppEntry>
+    <ValidateXaml>true</ValidateXaml>
+    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>Bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>Bin\Release</OutputPath>
+    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.Devices.Sensors" />
+    <Reference Include="Microsoft.Phone" />
+    <Reference Include="Microsoft.Phone.Interop" />
+    <Reference Include="Microsoft.Xna.Framework" />
+    <Reference Include="System.Device" />
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.Servicemodel.Web" />
+    <Reference Include="System.Windows" />
+    <Reference Include="system" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Net" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Xml.Linq" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="cordovalib\BrowserMouseHelper.cs" />
+    <Compile Include="cordovalib\CommandFactory.cs" />
+    <Compile Include="cordovalib\Commands\BaseCommand.cs" />
+    <Compile Include="cordovalib\ConfigHandler.cs" />
+    <Compile Include="cordovalib\CordovaCommandCall.cs" />
+    <Compile Include="cordovalib\CordovaView.xaml.cs">
+      <DependentUpon>CordovaView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="cordovalib\DOMStorageHelper.cs" />
+    <Compile Include="cordovalib\JSON\JsonHelper.cs" />
+    <Compile Include="cordovalib\NativeExecution.cs" />
+    <Compile Include="cordovalib\OrientationHelper.cs" />
+    <Compile Include="cordovalib\PluginResult.cs" />
+    <Compile Include="cordovalib\ScriptCallback.cs" />
+    <Compile Include="MainPage.xaml.cs">
+      <DependentUpon>MainPage.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </ApplicationDefinition>
+    <Page Include="cordovalib\CordovaView.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="MainPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Plugins\UI\AudioRecorder.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Plugins\UI\ImageCapture.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Plugins\UI\NotificationBox.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Plugins\UI\VideoRecorder.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="cordova\lib\build.js" />
+    <None Include="cordova\lib\clean.js" />
+    <None Include="cordova\lib\deploy.js" />
+    <None Include="cordova\lib\log.js" />
+    <None Include="cordova\lib\target-list.js" />
+    <Content Include="www\**" />
+    <Content Include="config.xml" />
+    <Content Include="Images\**" />
+    <Content Include="resources\notification-beep.wav" />
+    <None Include="cordova\build.bat" />
+    <None Include="cordova\clean.bat" />
+    <None Include="cordova\lib\install-device.bat" />
+    <None Include="cordova\lib\install-emulator.bat" />
+    <None Include="cordova\lib\list-devices.bat" />
+    <None Include="cordova\lib\list-emulator-images.bat" />
+    <None Include="cordova\lib\list-started-emulators.bat" />
+    <None Include="cordova\lib\start-emulator.bat" />
+    <None Include="cordova\log.bat" />
+    <None Include="cordova\run.bat" />
+    <None Include="cordova\version.bat" />
+    <None Include="VERSION" />
+    <Content Include="CordovaSourceDictionary.xml">
+      <SubType>Designer</SubType>
+    </Content>
+    <None Include="BuildManifestProcessor.js" />
+    <None Include="Properties\AppManifest.xml">
+      <SubType>Designer</SubType>
+    </None>
+    <None Include="Properties\WMAppManifest.xml">
+      <SubType>Designer</SubType>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="ApplicationIcon.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Background.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="SplashScreenImage.jpg" />
+  </ItemGroup>
+  <ItemGroup>
+    <WCFMetadata Include="Service References\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Plugins\*" />
+    <Compile Include="Plugins\UI\*.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <ProjectExtensions />
+  <PropertyGroup>
+    <PreBuildEvent>CScript "$(ProjectDir)/BuildManifestProcessor.js" "$(ProjectPath)"</PreBuildEvent>
+  </PropertyGroup>
+  <PropertyGroup>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/d3ba3a51/spec/util/csproj.spec.js
----------------------------------------------------------------------
diff --git a/spec/util/csproj.spec.js b/spec/util/csproj.spec.js
new file mode 100644
index 0000000..b1bdcb2
--- /dev/null
+++ b/spec/util/csproj.spec.js
@@ -0,0 +1,24 @@
+var csproj = require('../../src/util/csproj'),
+    path = require('path');
+
+var wp7_project = path.join(__dirname, '..', 'projects', 'wp7'),
+    example_csproj = path.join(wp7_project, 'CordovaAppProj.csproj');
+
+describe('csproj', function() {
+    it('should throw if passed in an invalid xml file path ref', function() {
+        expect(function() {
+            new csproj('blahblah');
+        }).toThrow();
+    });
+    it('should successfully parse a valid csproj file into an xml document', function() {
+        var doc;
+        expect(function() {
+            doc = new csproj(example_csproj);
+        }).not.toThrow();
+        expect(doc.xml.getroot()).toBeDefined();
+    });
+
+    describe('write method', function() {
+        
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/d3ba3a51/src/util/csproj.js
----------------------------------------------------------------------
diff --git a/src/util/csproj.js b/src/util/csproj.js
index 1fbe1b3..33ca3a7 100644
--- a/src/util/csproj.js
+++ b/src/util/csproj.js
@@ -1,4 +1,4 @@
-var xml_helpers = require('./xml_helpers'),
+var xml_helpers = require('./xml-helpers'),
     et = require('elementtree'),
     fs = require('fs');
 


[04/12] git commit: start of rework of windows phone support to adhere to new arch

Posted by fi...@apache.org.
start of rework of windows phone support to adhere to new arch


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

Branch: refs/heads/master
Commit: d4d9c24053c50c6647f92620fa7876dae52fadc4
Parents: 0c5097e
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 11:35:56 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 16:46:01 2013 -0700

----------------------------------------------------------------------
 src/platforms/wp7.js |   70 ++++++++++++--------------------------------
 1 files changed, 19 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/d4d9c240/src/platforms/wp7.js
----------------------------------------------------------------------
diff --git a/src/platforms/wp7.js b/src/platforms/wp7.js
index 5220395..ce38882 100644
--- a/src/platforms/wp7.js
+++ b/src/platforms/wp7.js
@@ -17,17 +17,6 @@
  *
 */
 
-/*
-node plugman --platform wp7 --project '/c//users/jesse/documents/visual studio 2012/Projects/TestPlugin7/' --plugin '.\test\plugins\ChildBrowser\'
-
-TODO:  ( Apr. 16, 2013 - jm )
-- Update WMAppManifest.xml with any new required capabilities 
-- add references for any new libraries required by plugin
-
-
-
-*/
-
 var fs = require('fs'),
     path = require('path'),
     glob = require('glob'),
@@ -47,31 +36,6 @@ var unix_projPath,  //  for use with glob
     hosts,          //  ./access inside root
     projectChanges; //  <config-file target=".csproj" parent=".">, inside platform
 
-
-
-function copyFileSync(srcPath, destPath) {
-
-  var stats = fs.statSync(srcPath);
-  if(stats.isDirectory()) {
-     shell.mkdir('-p', destPath);
-     // without the added slash at the end, we will get an extra folder inside destination
-     shell.cp('-r', srcPath + "/" , destPath);
-  }
-  else if(fs.existsSync(srcPath)) {
-    shell.cp(srcPath, destPath);
-  }
-  else {
-    console.log("File does not exist :: " + srcPath);
-    return;
-  }
-
-  var msg = shell.error();
-  if(msg) {
-    console.log("msg" + msg);
-    throw { name: "ShellError", message: msg};
-  }
-}    
-
 function initPaths(project_dir, plugin_dir, plugin_et, variables) {
 
     unix_projPath = project_dir.split("\\").join("/");
@@ -218,19 +182,23 @@ function uninstall(project_dir, plugin_dir, plugin_et, variables) {
   });
 }
 
-exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, variables) {
-    console.log("action = " + action);
-    switch(action) {
-        case 'install' :
-            initPaths(project_dir, plugin_dir, plugin_et, variables);
-            install(project_dir, plugin_dir, plugin_et, variables);
-            break;
-        case 'uninstall' :
-            initPaths(project_dir, plugin_dir, plugin_et, variables);
-            uninstall(project_dir, plugin_dir, plugin_et, variables);
-            break;
-        default :
-          throw 'error unknown action';
-          break;
+module.exports = {
+    www_dir:function(project_dir) {
+        return path.join(project_dir, 'www');
+    },
+    package_name:function(project_dir) {
+        return xml_helpers.parseElementtreeSync(path.join(project_dir, 'Properties', 'WMAppManifest.xml')).find('App').attrib.ProductID;
+    },
+    "source-file":{
+        install:function(source_el, plugin_dir, project_dir, plugin_id) {
+            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+            common.copyFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
+        },
+        uninstall:function(source_el, project_dir, plugin_id) {
+            var dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+            common.removeFile(project_dir, dest);
+        }
+    },
+    "lib-file":{
     }
-}
+};


[03/12] git commit: updating glob since it sucked on windows.

Posted by fi...@apache.org.
updating glob since it sucked on windows.


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

Branch: refs/heads/master
Commit: 208ef8c5d7f23856bf86a944e9997a09df9e1caa
Parents: afb532a
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 16:07:07 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 16:46:01 2013 -0700

----------------------------------------------------------------------
 package.json         |    2 +-
 src/platforms/wp7.js |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/208ef8c5/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 5a9e9b9..385e3e4 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,7 @@
   },
   "dependencies": {
     "nopt": "1.0.x",
-    "glob": "3.0.x",
+    "glob": "3.2.x",
     "elementtree": "0.1.x",
     "xcode": "0.6.x",
     "plist": "0.4.x",

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/208ef8c5/src/platforms/wp7.js
----------------------------------------------------------------------
diff --git a/src/platforms/wp7.js b/src/platforms/wp7.js
index 617297a..ac2a5c7 100644
--- a/src/platforms/wp7.js
+++ b/src/platforms/wp7.js
@@ -101,7 +101,9 @@ module.exports = {
         return xml_helpers.parseElementtreeSync(path.join(project_dir, 'Properties', 'WMAppManifest.xml')).find('App').attrib.ProductID;
     },
     parseWP7ProjectFile:function(project_dir) {
-        var project_files = glob.sync(project_dir.split('\\').join('/') + '/*.csproj');
+        var project_files = glob.sync('*.csproj', {
+            cwd:project_dir
+        });
         if (project_files.length === 0) {
             throw new Error('does not appear to be a Windows Phone project (no .csproj file)');
         }


[11/12] git commit: i wonder how many more commits i will need to make to fix this.

Posted by fi...@apache.org.
i wonder how many more commits i will need to make to fix this.


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

Branch: refs/heads/master
Commit: d6df914ba413328ba830239c7b9ede58797ca93d
Parents: 08834d5
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 16:11:32 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 16:46:01 2013 -0700

----------------------------------------------------------------------
 src/platforms/wp7.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/d6df914b/src/platforms/wp7.js
----------------------------------------------------------------------
diff --git a/src/platforms/wp7.js b/src/platforms/wp7.js
index 1fba4e4..4fe5ddf 100644
--- a/src/platforms/wp7.js
+++ b/src/platforms/wp7.js
@@ -107,7 +107,7 @@ module.exports = {
         if (project_files.length === 0) {
             throw new Error('does not appear to be a Windows Phone project (no .csproj file)');
         }
-        return new csproj(path.join(project_files[0]));
+        return new csproj(path.join(project_dir, project_files[0]));
     },
     "source-file":{
         install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {


[06/12] git commit: change of npm test script so it works on windows

Posted by fi...@apache.org.
change of npm test script so it works on windows


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

Branch: refs/heads/master
Commit: 05f52ab40e9928d44de3be4ca97eb01163f58eb2
Parents: b356f59
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 15:10:27 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 16:46:01 2013 -0700

----------------------------------------------------------------------
 package.json |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/05f52ab4/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 67edc8d..5a9e9b9 100644
--- a/package.json
+++ b/package.json
@@ -29,7 +29,7 @@
   },
   "bin" : { "plugman" : "./main.js" },
   "scripts": {
-    "test": "./node_modules/jasmine-node/bin/jasmine-node --color spec"
+    "test": "node node_modules/jasmine-node/bin/jasmine-node --color spec"
   },
   "contributors":[
     {


[09/12] git commit: unused target-dir should not blow the thing up.

Posted by fi...@apache.org.
unused target-dir should not blow the thing up.


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

Branch: refs/heads/master
Commit: b018cfbc69242081738f0df2d370fd01d3e2f797
Parents: d6df914
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 16:12:53 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 16:46:01 2013 -0700

----------------------------------------------------------------------
 src/platforms/wp7.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b018cfbc/src/platforms/wp7.js
----------------------------------------------------------------------
diff --git a/src/platforms/wp7.js b/src/platforms/wp7.js
index 4fe5ddf..4ede3f9 100644
--- a/src/platforms/wp7.js
+++ b/src/platforms/wp7.js
@@ -111,13 +111,13 @@ module.exports = {
     },
     "source-file":{
         install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {
-            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
             common.copyFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
             // add reference to this file to csproj.
             project_file.addSourceFile(dest);
         },
         uninstall:function(source_el, project_dir, plugin_id, project_file) {
-            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'], path.basename(source_el.attrib['src']));
+            var dest = path.join('Plugins', plugin_id, source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '', path.basename(source_el.attrib['src']));
             common.removeFile(project_dir, dest);
             // remove reference to this file from csproj.
             project_file.removeSourceFile(dest);


[12/12] git commit: 0.7.5. Support for Windows Phone 7

Posted by fi...@apache.org.
0.7.5. Support for Windows Phone 7


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

Branch: refs/heads/master
Commit: 7b63c0ba648d9b490e60a3c8f0da8a04c35140e4
Parents: ac953c9
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 16:47:08 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 16:47:08 2013 -0700

----------------------------------------------------------------------
 README.md    |    1 +
 package.json |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/7b63c0ba/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 4972316..cb89b7a 100644
--- a/README.md
+++ b/README.md
@@ -38,6 +38,7 @@ Other parameters:
 * iOS
 * Android
 * BlackBerry 10
+* Windows Phone 7
 
 ### Example Plugins
 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/7b63c0ba/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 385e3e4..fa2de8e 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
   "author": "Andrew Lunny <al...@gmail.com>",
   "name": "plugman",
   "description": "install/uninstall Cordova plugins",
-  "version": "0.7.4",
+  "version": "0.7.5",
   "repository": {
     "type": "git",
     "url": "git://git-wip-us.apache.org/repos/asf/cordova-plugman.git"


[08/12] git commit: small tweak :)

Posted by fi...@apache.org.
small tweak :)


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

Branch: refs/heads/master
Commit: 08834d54660d7233187fe693a69f78bdc4f53c07
Parents: 208ef8c
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 16:10:05 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 16:46:01 2013 -0700

----------------------------------------------------------------------
 src/platforms/wp7.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/08834d54/src/platforms/wp7.js
----------------------------------------------------------------------
diff --git a/src/platforms/wp7.js b/src/platforms/wp7.js
index ac2a5c7..1fba4e4 100644
--- a/src/platforms/wp7.js
+++ b/src/platforms/wp7.js
@@ -107,7 +107,7 @@ module.exports = {
         if (project_files.length === 0) {
             throw new Error('does not appear to be a Windows Phone project (no .csproj file)');
         }
-        return new csproj(project_files[0]);
+        return new csproj(path.join(project_files[0]));
     },
     "source-file":{
         install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {


[02/12] git commit: split hten join, not join then join

Posted by fi...@apache.org.
split hten join, not join then join


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

Branch: refs/heads/master
Commit: 79f4b767f13689e0cd22a6a60ced007811cfe184
Parents: b018cfb
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 16:14:08 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 16:46:01 2013 -0700

----------------------------------------------------------------------
 src/util/csproj.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/79f4b767/src/util/csproj.js
----------------------------------------------------------------------
diff --git a/src/util/csproj.js b/src/util/csproj.js
index 33ca3a7..12ed5db 100644
--- a/src/util/csproj.js
+++ b/src/util/csproj.js
@@ -13,7 +13,7 @@ csproj.prototype = {
         fs.writeFileSync(this.location, this.xml.write({indent:4}), 'utf-8');
     },
     addSourceFile:function(relative_path) {
-        relative_path = relative_path.join('/').join('\\');
+        relative_path = relative_path.split('/').join('\\');
         var item = new et.Element('ItemGroup');
         var compile = new et.Element('Compile');
         compile.attrib.Include = relative_path;
@@ -21,7 +21,7 @@ csproj.prototype = {
         this.xml.getroot().append(item);
     },
     removeSourceFile:function(relative_path) {
-        relative_path = relative_path.join('/').join('\\');
+        relative_path = relative_path.split('/').join('\\');
         var groups = this.xml.findall('ItemGroup');
         for (var i = 0, l = groups.length; i < l; i++) {
             var group = groups[i];


[10/12] git commit: fix for using glob since its dumb

Posted by fi...@apache.org.
fix for using glob since its dumb


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

Branch: refs/heads/master
Commit: afb532aa9d9c1a0e5afb99eff47b5de59dfa2666
Parents: d3ba3a5
Author: Fil Maj <ma...@gmail.com>
Authored: Fri May 17 15:56:17 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri May 17 16:46:01 2013 -0700

----------------------------------------------------------------------
 src/platforms/wp7.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/afb532aa/src/platforms/wp7.js
----------------------------------------------------------------------
diff --git a/src/platforms/wp7.js b/src/platforms/wp7.js
index 01645f0..617297a 100644
--- a/src/platforms/wp7.js
+++ b/src/platforms/wp7.js
@@ -101,7 +101,7 @@ module.exports = {
         return xml_helpers.parseElementtreeSync(path.join(project_dir, 'Properties', 'WMAppManifest.xml')).find('App').attrib.ProductID;
     },
     parseWP7ProjectFile:function(project_dir) {
-        var project_files = glob.sync(path.join(project_dir, '*.csproj'));
+        var project_files = glob.sync(project_dir.split('\\').join('/') + '/*.csproj');
         if (project_files.length === 0) {
             throw new Error('does not appear to be a Windows Phone project (no .csproj file)');
         }