incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [15/51] [abbrv] git commit: ManifestProcessor will correctly include linked files (shortcuts)
Date Thu, 12 Jan 2012 19:30:14 GMT
ManifestProcessor will correctly include linked files (shortcuts)


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/commit/2e137b3b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/tree/2e137b3b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/diff/2e137b3b

Branch: refs/heads/master
Commit: 2e137b3bfbe58188c0cf2173fac5bbad5b0539ce
Parents: e9c92a6
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Fri Dec 16 11:42:14 2011 -0800
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Fri Dec 16 11:42:14 2011 -0800

----------------------------------------------------------------------
 example/ManifestProcessor.js                   |   20 +++++++++++++++++++
 templates/custom/ManifestProcessor.js          |   20 +++++++++++++++++++
 templates/full/ManifestProcessor.js            |   20 +++++++++++++++++++
 tests/MobileSpecUnitTests/ManifestProcessor.js |   20 +++++++++++++++++++
 4 files changed, 80 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/2e137b3b/example/ManifestProcessor.js
----------------------------------------------------------------------
diff --git a/example/ManifestProcessor.js b/example/ManifestProcessor.js
index 0148fa2..7f02c34 100644
--- a/example/ManifestProcessor.js
+++ b/example/ManifestProcessor.js
@@ -36,5 +36,25 @@ function enumerateFolder(folder,parentPath)
 }
 enumerateFolder(folder,"www");
 
+// Next we need to get any Linked files from the project
+
+WScript.Echo("Adding Linked Files ...");
+if(projectFilePath != null)
+{
+    var projXml =  WScript.CreateObject("Microsoft.XMLDOM");
+    
+    projXml.async = false;
+    if(projXml.load(projectFilePath))
+    {
+        var nodes = projXml.selectNodes("Project/ItemGroup/Content/Link");
+    
+        for(var n = 0; n < nodes.length; n++)
+        {
+            WScript.Echo("adding linked file :: " + nodes[n].text);
+            outFile.WriteLine('    <FilePath Value="' + nodes[n].text + '"/>');
+        }
+    }
+}
+
 outFile.WriteLine('</GapSourceDictionary>');
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/2e137b3b/templates/custom/ManifestProcessor.js
----------------------------------------------------------------------
diff --git a/templates/custom/ManifestProcessor.js b/templates/custom/ManifestProcessor.js
index 0148fa2..7f02c34 100644
--- a/templates/custom/ManifestProcessor.js
+++ b/templates/custom/ManifestProcessor.js
@@ -36,5 +36,25 @@ function enumerateFolder(folder,parentPath)
 }
 enumerateFolder(folder,"www");
 
+// Next we need to get any Linked files from the project
+
+WScript.Echo("Adding Linked Files ...");
+if(projectFilePath != null)
+{
+    var projXml =  WScript.CreateObject("Microsoft.XMLDOM");
+    
+    projXml.async = false;
+    if(projXml.load(projectFilePath))
+    {
+        var nodes = projXml.selectNodes("Project/ItemGroup/Content/Link");
+    
+        for(var n = 0; n < nodes.length; n++)
+        {
+            WScript.Echo("adding linked file :: " + nodes[n].text);
+            outFile.WriteLine('    <FilePath Value="' + nodes[n].text + '"/>');
+        }
+    }
+}
+
 outFile.WriteLine('</GapSourceDictionary>');
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/2e137b3b/templates/full/ManifestProcessor.js
----------------------------------------------------------------------
diff --git a/templates/full/ManifestProcessor.js b/templates/full/ManifestProcessor.js
index 0148fa2..7f02c34 100644
--- a/templates/full/ManifestProcessor.js
+++ b/templates/full/ManifestProcessor.js
@@ -36,5 +36,25 @@ function enumerateFolder(folder,parentPath)
 }
 enumerateFolder(folder,"www");
 
+// Next we need to get any Linked files from the project
+
+WScript.Echo("Adding Linked Files ...");
+if(projectFilePath != null)
+{
+    var projXml =  WScript.CreateObject("Microsoft.XMLDOM");
+    
+    projXml.async = false;
+    if(projXml.load(projectFilePath))
+    {
+        var nodes = projXml.selectNodes("Project/ItemGroup/Content/Link");
+    
+        for(var n = 0; n < nodes.length; n++)
+        {
+            WScript.Echo("adding linked file :: " + nodes[n].text);
+            outFile.WriteLine('    <FilePath Value="' + nodes[n].text + '"/>');
+        }
+    }
+}
+
 outFile.WriteLine('</GapSourceDictionary>');
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/2e137b3b/tests/MobileSpecUnitTests/ManifestProcessor.js
----------------------------------------------------------------------
diff --git a/tests/MobileSpecUnitTests/ManifestProcessor.js b/tests/MobileSpecUnitTests/ManifestProcessor.js
index 0148fa2..7f02c34 100644
--- a/tests/MobileSpecUnitTests/ManifestProcessor.js
+++ b/tests/MobileSpecUnitTests/ManifestProcessor.js
@@ -36,5 +36,25 @@ function enumerateFolder(folder,parentPath)
 }
 enumerateFolder(folder,"www");
 
+// Next we need to get any Linked files from the project
+
+WScript.Echo("Adding Linked Files ...");
+if(projectFilePath != null)
+{
+    var projXml =  WScript.CreateObject("Microsoft.XMLDOM");
+    
+    projXml.async = false;
+    if(projXml.load(projectFilePath))
+    {
+        var nodes = projXml.selectNodes("Project/ItemGroup/Content/Link");
+    
+        for(var n = 0; n < nodes.length; n++)
+        {
+            WScript.Echo("adding linked file :: " + nodes[n].text);
+            outFile.WriteLine('    <FilePath Value="' + nodes[n].text + '"/>');
+        }
+    }
+}
+
 outFile.WriteLine('</GapSourceDictionary>');
 


Mime
View raw message