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 2013/02/27 03:34:57 UTC
[1/7] wp7 commit: [CB-2403] Added scripts for distribution build.
[CB-2403] Added scripts for distribution build.
Project: http://git-wip-us.apache.org/repos/asf/cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp7/commit/d037ab8e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp7/tree/d037ab8e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp7/diff/d037ab8e
Branch: refs/heads/master
Commit: d037ab8ecbbbd781768640ba565a607717c3d173
Parents: b3c7b81
Author: Benn Mapes <be...@gmail.com>
Authored: Mon Feb 18 14:59:09 2013 -0800
Committer: Benn Mapes <be...@gmail.com>
Committed: Tue Feb 19 15:30:01 2013 -0800
----------------------------------------------------------------------
.gitignore | 2 +
framework/Properties/AssemblyInfo.cs | 2 +-
framework/WPCordovaClassLib.csproj | 13 +-
templates/full/App.xaml | 2 +-
templates/full/CordovaAppProj.csproj | 8 +-
templates/full/VERSION | 1 -
templates/full/__PreviewImage.jpg | Bin 0 -> 25875 bytes
templates/full/__TemplateIcon.png | Bin 0 -> 6546 bytes
templates/standalone/App.xaml | 2 +-
templates/standalone/App.xaml.cs | 2 +-
templates/standalone/CordovaAppProj.csproj | 8 +-
templates/standalone/MainPage.xaml | 2 +-
templates/standalone/MainPage.xaml.cs | 2 +-
templates/standalone/VERSION | 1 -
templates/standalone/__PreviewImage.jpg | Bin 0 -> 25875 bytes
templates/standalone/__TemplateIcon.png | Bin 0 -> 6546 bytes
templates/vs/MyTemplateFull.vstemplate | 58 +++
templates/vs/MyTemplateStandAlone.vstemplate | 120 ++++++
tooling/scripts/dist.bat | 18 +
tooling/scripts/dist.js | 410 +++++++++++++++++++++
tooling/scripts/win-zip.js | 33 ++
21 files changed, 666 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index fe4978c..f7cd341 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,6 +41,8 @@ httpd.parse.errors
test/MobileSpecUnitTests/CordovaSourceDictionary.xml
example/CordovaSourceDictionary.xml
templates/standalone/CordovaSourceDictionary.xml
+templates/standalone/VERSION
+templates/full/VERSION
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/framework/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/framework/Properties/AssemblyInfo.cs b/framework/Properties/AssemblyInfo.cs
index f649641..4cee93e 100644
--- a/framework/Properties/AssemblyInfo.cs
+++ b/framework/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("2.4.0")]
+[assembly: AssemblyVersion("2.4.0.0")]
[assembly: AssemblyFileVersion("2.4.0")]
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/framework/WPCordovaClassLib.csproj
----------------------------------------------------------------------
diff --git a/framework/WPCordovaClassLib.csproj b/framework/WPCordovaClassLib.csproj
index 27cc0b1..85ec759 100644
--- a/framework/WPCordovaClassLib.csproj
+++ b/framework/WPCordovaClassLib.csproj
@@ -29,6 +29,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WPCordovaClassLib</RootNamespace>
<AssemblyName>WPCordovaClassLib</AssemblyName>
+ <AssemblyVersion>$(BaseVersionNumber)</AssemblyVersion>
+ <AssemblyFileVersion>$(VersionNumber)</AssemblyFileVersion>
+ <AssemblyDescription>$(VersionNumber)</AssemblyDescription>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
@@ -283,8 +286,14 @@
<!-- 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">
+ <AssemblyInfo
+ AssemblyVersion=" "
+ AssemblyFileVersion="$(VersionNumber)"
+ AssemblyDescription="$(VersionNumber)"
+ >
+ </AssemblyInfo>
</Target>
<Target Name="AfterBuild">
- </Target>
- -->
+ </Target>-->
+
</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/full/App.xaml
----------------------------------------------------------------------
diff --git a/templates/full/App.xaml b/templates/full/App.xaml
index d37fafa..18072fe 100644
--- a/templates/full/App.xaml
+++ b/templates/full/App.xaml
@@ -17,7 +17,7 @@
under the License.
-->
<Application
- x:Class="GapExample.App"
+ x:Class="$safeprojectname$.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/full/CordovaAppProj.csproj
----------------------------------------------------------------------
diff --git a/templates/full/CordovaAppProj.csproj b/templates/full/CordovaAppProj.csproj
index b0ced5c..a6444ce 100644
--- a/templates/full/CordovaAppProj.csproj
+++ b/templates/full/CordovaAppProj.csproj
@@ -27,8 +27,8 @@
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>GapExample</RootNamespace>
- <AssemblyName>GapExample</AssemblyName>
+ <RootNamespace>$safeprojectname$</RootNamespace>
+ <AssemblyName>$safeprojectname$</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
@@ -38,9 +38,9 @@
</SupportedCultures>
<XapOutputs>true</XapOutputs>
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>GapExample.xap</XapFilename>
+ <XapFilename>$safeprojectname$.xap</XapFilename>
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>GapExample.App</SilverlightAppEntry>
+ <SilverlightAppEntry>$safeprojectname$.App</SilverlightAppEntry>
<ValidateXaml>true</ValidateXaml>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
</PropertyGroup>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/full/VERSION
----------------------------------------------------------------------
diff --git a/templates/full/VERSION b/templates/full/VERSION
deleted file mode 100644
index 9183195..0000000
--- a/templates/full/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-2.4.0
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/full/__PreviewImage.jpg
----------------------------------------------------------------------
diff --git a/templates/full/__PreviewImage.jpg b/templates/full/__PreviewImage.jpg
new file mode 100644
index 0000000..1d72941
Binary files /dev/null and b/templates/full/__PreviewImage.jpg differ
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/full/__TemplateIcon.png
----------------------------------------------------------------------
diff --git a/templates/full/__TemplateIcon.png b/templates/full/__TemplateIcon.png
new file mode 100644
index 0000000..75c17c7
Binary files /dev/null and b/templates/full/__TemplateIcon.png differ
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/standalone/App.xaml
----------------------------------------------------------------------
diff --git a/templates/standalone/App.xaml b/templates/standalone/App.xaml
index c342215..18072fe 100644
--- a/templates/standalone/App.xaml
+++ b/templates/standalone/App.xaml
@@ -17,7 +17,7 @@
under the License.
-->
<Application
- x:Class="CordovaApp.App"
+ x:Class="$safeprojectname$.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/standalone/App.xaml.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/App.xaml.cs b/templates/standalone/App.xaml.cs
index f874e98..2b7306d 100644
--- a/templates/standalone/App.xaml.cs
+++ b/templates/standalone/App.xaml.cs
@@ -32,7 +32,7 @@ using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
-namespace CordovaApp
+namespace $safeprojectname$
{
public partial class App : Application
{
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/standalone/CordovaAppProj.csproj
----------------------------------------------------------------------
diff --git a/templates/standalone/CordovaAppProj.csproj b/templates/standalone/CordovaAppProj.csproj
index 70fb4e7..d04ba6b 100644
--- a/templates/standalone/CordovaAppProj.csproj
+++ b/templates/standalone/CordovaAppProj.csproj
@@ -27,8 +27,8 @@
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>CordovaApp</RootNamespace>
- <AssemblyName>CordovaApp</AssemblyName>
+ <RootNamespace>$safeprojectname$</RootNamespace>
+ <AssemblyName>$safeprojectname$</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
@@ -38,9 +38,9 @@
</SupportedCultures>
<XapOutputs>true</XapOutputs>
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>CordovaApp.xap</XapFilename>
+ <XapFilename>$safeprojectname$.xap</XapFilename>
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>CordovaApp.App</SilverlightAppEntry>
+ <SilverlightAppEntry>$safeprojectname$.App</SilverlightAppEntry>
<ValidateXaml>true</ValidateXaml>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
</PropertyGroup>
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/standalone/MainPage.xaml
----------------------------------------------------------------------
diff --git a/templates/standalone/MainPage.xaml b/templates/standalone/MainPage.xaml
index 975176b..7e2b2cd 100644
--- a/templates/standalone/MainPage.xaml
+++ b/templates/standalone/MainPage.xaml
@@ -1,6 +1,6 @@
<phone:PhoneApplicationPage
- x:Class="CordovaApp.MainPage"
+ x:Class="$safeprojectname$.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/standalone/MainPage.xaml.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/MainPage.xaml.cs b/templates/standalone/MainPage.xaml.cs
index 6cddb49..eb6828f 100644
--- a/templates/standalone/MainPage.xaml.cs
+++ b/templates/standalone/MainPage.xaml.cs
@@ -35,7 +35,7 @@ using System.Windows.Resources;
-namespace CordovaApp
+namespace $safeprojectname$
{
public partial class MainPage : PhoneApplicationPage
{
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/standalone/VERSION
----------------------------------------------------------------------
diff --git a/templates/standalone/VERSION b/templates/standalone/VERSION
deleted file mode 100644
index 9183195..0000000
--- a/templates/standalone/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-2.4.0
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/standalone/__PreviewImage.jpg
----------------------------------------------------------------------
diff --git a/templates/standalone/__PreviewImage.jpg b/templates/standalone/__PreviewImage.jpg
new file mode 100644
index 0000000..1d72941
Binary files /dev/null and b/templates/standalone/__PreviewImage.jpg differ
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/standalone/__TemplateIcon.png
----------------------------------------------------------------------
diff --git a/templates/standalone/__TemplateIcon.png b/templates/standalone/__TemplateIcon.png
new file mode 100644
index 0000000..75c17c7
Binary files /dev/null and b/templates/standalone/__TemplateIcon.png differ
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/vs/MyTemplateFull.vstemplate
----------------------------------------------------------------------
diff --git a/templates/vs/MyTemplateFull.vstemplate b/templates/vs/MyTemplateFull.vstemplate
new file mode 100644
index 0000000..11fc2e1
--- /dev/null
+++ b/templates/vs/MyTemplateFull.vstemplate
@@ -0,0 +1,58 @@
+<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
+ <TemplateData>
+ <Name>CordovaWP7_2_4_0_Full</Name>
+ <Description>Cordova 2.4.0 for Windows Phone 7.5 using Cordova from a library DLL</Description>
+ <ProjectType>CSharp</ProjectType>
+ <ProjectSubType>
+ </ProjectSubType>
+ <SortOrder>1000</SortOrder>
+ <CreateNewFolder>true</CreateNewFolder>
+ <DefaultName>CordovaWP7_2_4_0_Full</DefaultName>
+ <ProvideDefaultName>true</ProvideDefaultName>
+ <LocationField>Enabled</LocationField>
+ <EnableLocationBrowseButton>true</EnableLocationBrowseButton>
+ <Icon>__TemplateIcon.png</Icon>
+ <PreviewImage>__PreviewImage.jpg</PreviewImage>
+ </TemplateData>
+ <TemplateContent>
+ <Project TargetFileName="CordovaAppProj.csproj" File="CordovaAppProj.csproj" ReplaceParameters="true">
+ <ProjectItem ReplaceParameters="true" TargetFileName="App.xaml">App.xaml</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="App.xaml.cs">App.xaml.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="false" TargetFileName="ApplicationIcon.png">ApplicationIcon.png</ProjectItem>
+ <ProjectItem ReplaceParameters="false" TargetFileName="Background.png">Background.png</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="BuildManifestProcessor.js">BuildManifestProcessor.js</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="config.xml">config.xml</ProjectItem>
+ <Folder Name="cordova" TargetFolderName="cordova">
+ <ProjectItem ReplaceParameters="false" TargetFileName="debug.bat">debug.bat</ProjectItem>
+ <ProjectItem ReplaceParameters="false" TargetFileName="emulate.bat">emulate.bat</ProjectItem>
+ </Folder>
+ <Folder Name="CordovaLib" TargetFolderName="CordovaLib">
+ <ProjectItem ReplaceParameters="false" TargetFileName="WPCordovaClassLib.dll">WPCordovaClassLib.dll</ProjectItem>
+ </Folder>
+ <ProjectItem ReplaceParameters="true" TargetFileName="CordovaSourceDictionary.xml">CordovaSourceDictionary.xml</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="MainPage.xaml">MainPage.xaml</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="MainPage.xaml.cs">MainPage.xaml.cs</ProjectItem>
+ <Folder Name="Plugins" TargetFolderName="Plugins" />
+ <Folder Name="Properties" TargetFolderName="Properties">
+ <ProjectItem ReplaceParameters="true" TargetFileName="AppManifest.xml">AppManifest.xml</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="WMAppManifest.xml">WMAppManifest.xml</ProjectItem>
+ </Folder>
+ <Folder Name="Service References" TargetFolderName="Service References" />
+ <ProjectItem ReplaceParameters="false" TargetFileName="SplashScreenImage.jpg">SplashScreenImage.jpg</ProjectItem>
+ <Folder Name="www" TargetFolderName="www">
+ <ProjectItem ReplaceParameters="true" TargetFileName="cordova-2.4.0.js">cordova-2.4.0.js</ProjectItem>
+ <Folder Name="css" TargetFolderName="css">
+ <ProjectItem ReplaceParameters="true" TargetFileName="index.css">index.css</ProjectItem>
+ </Folder>
+ <Folder Name="img" TargetFolderName="img">
+ <ProjectItem ReplaceParameters="false" TargetFileName="logo.png">logo.png</ProjectItem>
+ </Folder>
+ <ProjectItem ReplaceParameters="true" TargetFileName="index.html">index.html</ProjectItem>
+ <Folder Name="js" TargetFolderName="js">
+ <ProjectItem ReplaceParameters="true" TargetFileName="index.js">index.js</ProjectItem>
+ </Folder>
+ </Folder>
+ </Project>
+ </TemplateContent>
+</VSTemplate>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/templates/vs/MyTemplateStandAlone.vstemplate
----------------------------------------------------------------------
diff --git a/templates/vs/MyTemplateStandAlone.vstemplate b/templates/vs/MyTemplateStandAlone.vstemplate
new file mode 100644
index 0000000..ff8f04c
--- /dev/null
+++ b/templates/vs/MyTemplateStandAlone.vstemplate
@@ -0,0 +1,120 @@
+<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
+ <TemplateData>
+ <Name>CordovaWP7_2_4_0_StandAlone</Name>
+ <Description>Cordova 2.4.0 for Windows Phone 7.5 using the Cordova source code directly.</Description>
+ <ProjectType>CSharp</ProjectType>
+ <ProjectSubType>
+ </ProjectSubType>
+ <SortOrder>1000</SortOrder>
+ <CreateNewFolder>true</CreateNewFolder>
+ <DefaultName>CordovaWP7_2_4_0_StandAlone</DefaultName>
+ <ProvideDefaultName>true</ProvideDefaultName>
+ <LocationField>Enabled</LocationField>
+ <EnableLocationBrowseButton>true</EnableLocationBrowseButton>
+ <Icon>__TemplateIcon.png</Icon>
+ <PreviewImage>__PreviewImage.jpg</PreviewImage>
+ </TemplateData>
+ <TemplateContent>
+ <Project TargetFileName="CordovaAppProj.csproj" File="CordovaAppProj.csproj" ReplaceParameters="true">
+ <ProjectItem ReplaceParameters="true" TargetFileName="App.xaml">App.xaml</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="App.xaml.cs">App.xaml.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="false" TargetFileName="ApplicationIcon.png">ApplicationIcon.png</ProjectItem>
+ <ProjectItem ReplaceParameters="false" TargetFileName="Background.png">Background.png</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="BuildManifestProcessor.js">BuildManifestProcessor.js</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="config.xml">config.xml</ProjectItem>
+ <Folder Name="cordova" TargetFolderName="cordova">
+ <ProjectItem ReplaceParameters="false" TargetFileName="debug.bat">debug.bat</ProjectItem>
+ <ProjectItem ReplaceParameters="false" TargetFileName="emulate.bat">emulate.bat</ProjectItem>
+ </Folder>
+ <Folder Name="cordovalib" TargetFolderName="cordovalib">
+ <ProjectItem ReplaceParameters="true" TargetFileName="BrowserMouseHelper.cs">BrowserMouseHelper.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="CommandFactory.cs">CommandFactory.cs</ProjectItem>
+ <Folder Name="Commands" TargetFolderName="Commands">
+ <ProjectItem ReplaceParameters="true" TargetFileName="Accelerometer.cs">Accelerometer.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="AudioFormatsHelper.cs">AudioFormatsHelper.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="AudioPlayer.cs">AudioPlayer.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="BaseCommand.cs">BaseCommand.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="Battery.cs">Battery.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="Camera.cs">Camera.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="Capture.cs">Capture.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="Compass.cs">Compass.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="Contacts.cs">Contacts.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="DebugConsole.cs">DebugConsole.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="Device.cs">Device.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="File.cs">File.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="FileTransfer.cs">FileTransfer.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="GeoLocation.cs">GeoLocation.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="ImageExifHelper.cs">ImageExifHelper.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="InAppBrowser.cs">InAppBrowser.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="Media.cs">Media.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="MimeTypeMapper.cs">MimeTypeMapper.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="NetworkStatus.cs">NetworkStatus.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="Notification.cs">Notification.cs</ProjectItem>
+ </Folder>
+ <ProjectItem ReplaceParameters="true" TargetFileName="ConfigHandler.cs">ConfigHandler.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="CordovaCommandCall.cs">CordovaCommandCall.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="CordovaView.xaml">CordovaView.xaml</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="CordovaView.xaml.cs">CordovaView.xaml.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="DOMStorageHelper.cs">DOMStorageHelper.cs</ProjectItem>
+ <Folder Name="Images" TargetFolderName="Images">
+ <ProjectItem ReplaceParameters="false" TargetFileName="appbar.back.rest.png">appbar.back.rest.png</ProjectItem>
+ <ProjectItem ReplaceParameters="false" TargetFileName="appbar.close.rest.png">appbar.close.rest.png</ProjectItem>
+ <ProjectItem ReplaceParameters="false" TargetFileName="appbar.feature.video.rest.png">appbar.feature.video.rest.png</ProjectItem>
+ <ProjectItem ReplaceParameters="false" TargetFileName="appbar.next.rest.png">appbar.next.rest.png</ProjectItem>
+ <ProjectItem ReplaceParameters="false" TargetFileName="appbar.save.rest.png">appbar.save.rest.png</ProjectItem>
+ <ProjectItem ReplaceParameters="false" TargetFileName="appbar.stop.rest.png">appbar.stop.rest.png</ProjectItem>
+ </Folder>
+ <Folder Name="JSON" TargetFolderName="JSON">
+ <ProjectItem ReplaceParameters="true" TargetFileName="JsonHelper.cs">JsonHelper.cs</ProjectItem>
+ </Folder>
+ <ProjectItem ReplaceParameters="true" TargetFileName="NativeExecution.cs">NativeExecution.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="OrientationHelper.cs">OrientationHelper.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="PluginResult.cs">PluginResult.cs</ProjectItem>
+ <Folder Name="resources" TargetFolderName="resources">
+ <ProjectItem ReplaceParameters="false" TargetFileName="notification-beep.wav">notification-beep.wav</ProjectItem>
+ </Folder>
+ <ProjectItem ReplaceParameters="true" TargetFileName="ScriptCallback.cs">ScriptCallback.cs</ProjectItem>
+ <Folder Name="UI" TargetFolderName="UI">
+ <ProjectItem ReplaceParameters="true" TargetFileName="AudioCaptureTask.cs">AudioCaptureTask.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="AudioRecorder.xaml">AudioRecorder.xaml</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="AudioRecorder.xaml.cs">AudioRecorder.xaml.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="ImageCapture.xaml">ImageCapture.xaml</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="ImageCapture.xaml.cs">ImageCapture.xaml.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="NotificationBox.xaml">NotificationBox.xaml</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="NotificationBox.xaml.cs">NotificationBox.xaml.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="VideoCaptureTask.cs">VideoCaptureTask.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="VideoRecorder.xaml">VideoRecorder.xaml</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="VideoRecorder.xaml.cs">VideoRecorder.xaml.cs</ProjectItem>
+ </Folder>
+ </Folder>
+ <ProjectItem ReplaceParameters="true" TargetFileName="CordovaSourceDictionary.xml">CordovaSourceDictionary.xml</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="MainPage.xaml">MainPage.xaml</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="MainPage.xaml.cs">MainPage.xaml.cs</ProjectItem>
+ <Folder Name="Plugins" TargetFolderName="Plugins" />
+ <Folder Name="Properties" TargetFolderName="Properties">
+ <ProjectItem ReplaceParameters="true" TargetFileName="AppManifest.xml">AppManifest.xml</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem>
+ <ProjectItem ReplaceParameters="true" TargetFileName="WMAppManifest.xml">WMAppManifest.xml</ProjectItem>
+ </Folder>
+ <Folder Name="resources" TargetFolderName="resources">
+ <ProjectItem ReplaceParameters="false" TargetFileName="notification-beep.wav">notification-beep.wav</ProjectItem>
+ </Folder>
+ <Folder Name="Service References" TargetFolderName="Service References" />
+ <ProjectItem ReplaceParameters="false" TargetFileName="SplashScreenImage.jpg">SplashScreenImage.jpg</ProjectItem>
+ <ProjectItem ReplaceParameters="false" TargetFileName="VERSION">VERSION</ProjectItem>
+ <Folder Name="www" TargetFolderName="www">
+ <ProjectItem ReplaceParameters="true" TargetFileName="cordova-2.4.0.js">cordova-2.4.0.js</ProjectItem>
+ <Folder Name="css" TargetFolderName="css">
+ <ProjectItem ReplaceParameters="true" TargetFileName="index.css">index.css</ProjectItem>
+ </Folder>
+ <Folder Name="img" TargetFolderName="img">
+ <ProjectItem ReplaceParameters="false" TargetFileName="logo.png">logo.png</ProjectItem>
+ </Folder>
+ <ProjectItem ReplaceParameters="true" TargetFileName="index.html">index.html</ProjectItem>
+ <Folder Name="js" TargetFolderName="js">
+ <ProjectItem ReplaceParameters="true" TargetFileName="index.js">index.js</ProjectItem>
+ </Folder>
+ </Folder>
+ </Project>
+ </TemplateContent>
+</VSTemplate>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/tooling/scripts/dist.bat
----------------------------------------------------------------------
diff --git a/tooling/scripts/dist.bat b/tooling/scripts/dist.bat
new file mode 100644
index 0000000..c4a8917
--- /dev/null
+++ b/tooling/scripts/dist.bat
@@ -0,0 +1,18 @@
+:: 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.
+
+cscript "%~dp0\dist.js" %*
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/tooling/scripts/dist.js
----------------------------------------------------------------------
diff --git a/tooling/scripts/dist.js b/tooling/scripts/dist.js
new file mode 100644
index 0000000..d6654e4
--- /dev/null
+++ b/tooling/scripts/dist.js
@@ -0,0 +1,410 @@
+/*
+ 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.
+*/
+
+/* What does this script do?
+ * - creates a cordova-wp7 directory in the specified path with updated tags according to whats in the VERSION file at the root.
+ * - clones and builds a new cordova.js for the windows platform
+ * - packages the .dll for the full template
+ * - injects both the full and standalone templates into the Visual Studio templates directory (if found).
+ *
+ * USAGE (command line)
+ * -> dist <path_to_new_build_dir>
+ */
+
+ /*TODO's
+ - Find the path to the users visual studio template directory (currently assumes install directory for VS2012)
+ - Load mobile-spec into test version for testing
+ - For example project (and full?), get WP app files from standalone (to keep them updated)
+ * Replace safeprojectname and guid with values
+ -
+ */
+
+/*************************************************/
+/**************** REQUIREMENTS *****************/
+/*************************************************/
+/*
+Paths:
+ - path to git.exe -> C:\msysgit\bin
+ - path to msbuild -> C:\Windows\Microsoft.NET\Framework\v4.0.30319
+Famework
+ - .NET 4.0
+ - Windows phone SDKs
+
+
+/************ Globals ********/
+
+var fso = WScript.CreateObject('Scripting.FileSystemObject'),
+ shell = WScript.CreateObject("shell.application"),
+ wscript_shell = WScript.CreateObject("WScript.Shell");
+
+//Replace root directory or create new directory?
+var REPLACE = false;
+//Get new version from git or build off this version?
+var GET_NEW = false;
+//Add templates to visual studio?
+var ADD_TO_VS = true;
+
+//Set up directory structure of current release
+ //arguments passed in
+var args = WScript.Arguments,
+ //Root folder of cordova-wp7 (i.e C:\Cordova\cordova-wp7)
+ ROOT = WScript.ScriptFullName.split('\\tooling\\', 1),
+ //Sub folder containing templates
+ TEMPLATES_PATH = '\\templates',
+ //Sub folder for standalone project
+ STANDALONE_PATH = TEMPLATES_PATH + '\\standalone',
+ //Sub folder for full project
+ FULL_PATH = TEMPLATES_PATH + '\\full'
+ //Sub folder containing framework
+ FRAMEWORK_PATH = '\\framework',
+ //Subfolder containing example project
+ EXAMPLE_PATH = '\\example',
+ //Path to cordovalib folder, containing source for .dll
+ CORDOVA_LIB = STANDALONE_PATH + '\\cordovalib',
+ //Get version number
+ VERSION=read(ROOT+'\\VERSION').replace(/\r\n/,'').replace(/\n/,'');
+ BASE_VERSION = VERSION.split('rc', 1) + ".0";
+ //Git Repositories
+ CORDOVA_JS = "git://github.com/apache/cordova-js.git"
+
+//Destination to build to
+var BUILD_DESTINATION;
+
+
+/*************************************************/
+/**************** FUNCTIONS ********************/
+/*************************************************/
+
+
+// help function
+function Usage()
+{
+ WScript.Echo("");
+ WScript.Echo("This is a command line tool for building new releases.")
+ WScript.Echo("Usage: dist <NEW_PATH_FOR_BUILD>");
+ WScript.Echo("Creates a new cordova/wp7 project with the version taken");
+ WScript.Echo("from the VERSION file in the root directory");
+ WScript.Echo("");
+}
+
+// generate unique project GUID - Not needed unless building an actual project (example?)
+function genGuid()
+{
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
+ var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
+ return v.toString(16);
+ });
+}
+
+var ForReading = 1, ForWriting = 2, ForAppending = 8;
+var TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0;
+
+//Returns the contents of a file
+function read(filename) {
+ //WScript.Echo('Reading in ' + filename);
+ var f=fso.OpenTextFile(filename, 1,2);
+ var s=f.ReadAll();
+ f.Close();
+ return s;
+}
+
+//writes the contents to the specified file
+function write(filename, contents) {
+ var f=fso.OpenTextFile(filename, ForWriting, TristateTrue);
+ f.Write(contents);
+ f.Close();
+}
+
+//Replaces the matches of regexp with replacement
+function replaceInFile(filename, regexp, replacement) {
+ //WScript.Echo("Replaceing with "+replacement+ " in:");
+ var text = read(filename).replace(regexp,replacement);
+ //WScript.Echo(text);
+ write(filename,text);
+}
+
+// exicutes a commmand in the shell
+function exec(command) {
+ var oShell=wscript_shell.Exec(command);
+ while (oShell.Status == 0) {
+ if(!oShell.StdOut.AtEndOfStream) {
+ var line = oShell.StdOut.ReadLine();
+ // XXX: Change to verbose mode
+ // WScript.StdOut.WriteLine(line);
+ }
+ WScript.sleep(100);
+ }
+}
+
+function cleanUp() {
+ WScript.Echo("Cleanup...")
+ if(fso.FolderExists(BUILD_DESTINATION + '\\temp'))
+ {
+ //exec('rd /s ' + BUILD_DESTINATION + '\\temp');
+ fso.DeleteFolder(BUILD_DESTINATION + '\\temp', true);
+ }
+ if(fso.FileExists(BUILD_DESTINATION + FULL_PATH + '\\MyTemplate.vstemplate')) {
+ fso.DeleteFile(BUILD_DESTINATION + FULL_PATH + '\\MyTemplate.vstemplate');
+ }
+ if(fso.FileExists(BUILD_DESTINATION + STANDALONE_PATH + '\\MyTemplate.vstemplate')) {
+ fso.DeleteFile(BUILD_DESTINATION + STANDALONE_PATH + '\\MyTemplate.vstemplate');
+ }
+
+ //Add any other cleanup here
+
+ WScript.Echo("DONE!");
+}
+
+
+/*************************************************/
+/************** MAIN SCRIPT ********************/
+/*************************************************/
+
+if(REPLACE)
+{
+ BUILD_DESTINATION = ROOT;
+}
+else if(args.Count() > 0)
+{
+ BUILD_DESTINATION = args(0);
+ //Support help flags
+ if(BUILD_DESTINATION.indexOf("--help") > -1 ||
+ BUILD_DESTINATION.indexOf("/?") > -1 )
+ {
+ Usage();
+ WScript.Quit(1);
+ }
+
+}
+else
+{
+ Usage();
+ WScript.Quit(1);
+}
+
+
+//WScript.Echo("Root Folder : " + ROOT);
+//WScript.Echo("CordovaLib Folder : " + CORDOVA_LIB);
+//WScript.Echo("VERSION : " + VERSION);
+//WScript.Echo("BASE_VERSION : " + BASE_VERSION);
+//WScript.Echo("Generated GUID : " + newProjGuid);
+
+
+
+/*************************************************/
+/****************** Step 1 *********************/
+/*************************************************/
+/****** Copy source code to new directory ********/
+/*************************************************/
+
+
+if(!REPLACE)
+{
+ if(!GET_NEW) {
+
+ if(fso.FolderExists(BUILD_DESTINATION))
+ {
+ WScript.Echo("Build directory already exists!");
+ WScript.Quit(1);
+ }
+
+ //Set up file structure
+ //exec('%comspec% /c mkdir ' + BUILD_DESTINATION);
+ fso.CreateFolder(BUILD_DESTINATION);
+
+ //Copy everything over to BUILD_DESTINATION
+ var dest = shell.NameSpace(BUILD_DESTINATION);
+
+ WScript.Echo("Copying files to build directory...");
+ //Should we copy everything in the directory or just what we need? (ROOT may have other generated files in it)
+ /** FOR EVERYTHING **
+ var sourceItems = shell.NameSpace(ROOT).items();
+ dest.CopyHere(sourceItems); */
+
+ /** FOR JUST WHAT WE NEED - should copy by file instead? **/
+ dest.CopyHere(ROOT + "\\bin");
+ dest.CopyHere(ROOT + EXAMPLE_PATH); //Should mostly be copied from standalone
+ dest.CopyHere(ROOT + FRAMEWORK_PATH);
+ dest.CopyHere(ROOT + TEMPLATES_PATH);
+ dest.CopyHere(ROOT + "\\tests");
+ dest.CopyHere(ROOT + "\\tooling");
+ dest.CopyHere(ROOT + "\\.gitignore");
+ dest.CopyHere(ROOT + "\\LICENSE");
+ dest.CopyHere(ROOT + "\\NOTICE");
+ dest.CopyHere(ROOT + "\\README.md");
+ dest.CopyHere(ROOT + "\\VERSION");
+ }
+ else {
+ var CORDOVA_WP7 = 'git://github.com/apache/cordova-wp7.git';
+ //var CORDOVA_WP7 = 'https://github.com/bennmapes/cordova-wp7.git';
+
+ wscript_shell.CurrentDirectory = BUILD_DESTINATION + '\\..';
+ BUILD_DESTINATION = wscript_shell.CurrentDirectory + '\\cordova-wp7';
+
+ WScript.Echo('Cloning cordova-wp7 from git, build destination now ' + BUILD_DESTINATION);
+ exec('git clone ' + CORDOVA_WP7); //git fetch --tags && git checkout?
+ //exec('git checkout CB-2403');
+
+ }
+}
+
+
+/*************************************************/
+/****************** Step 2 *********************/
+/*************************************************/
+/*** Retag everything with new version numbers ***/
+/*************************************************/
+WScript.Echo("Updating version numbers....");
+// Replace assembaly versions in framework
+var framework_regex = /\(\"(\d+)[.](\d+)[.](\d+)(rc\d)?\"\)\]/g; //Will match ("x.x.x[rcx]")]
+replaceInFile(BUILD_DESTINATION + FRAMEWORK_PATH + "\\Properties\\AssemblyInfo.cs", framework_regex, "(\"" + VERSION + "\")]");
+framework_regex = /\(\"(\d+)[.](\d+)[.](\d+)[.](\d+)"\)\]/;
+replaceInFile(BUILD_DESTINATION + FRAMEWORK_PATH + "\\Properties\\AssemblyInfo.cs", framework_regex, "(\"" + BASE_VERSION + "\")]");
+
+// update standalone project
+var cordova_regex = /cordova-(\d+)[.](\d+)[.](\d+)(rc\d)?/g; //Matches *first* cordova-x.x.x[rcx] (just ad g at end to make global)
+replaceInFile(BUILD_DESTINATION + STANDALONE_PATH + '\\CordovaAppProj.csproj', cordova_regex, "cordova-" + VERSION);
+replaceInFile(BUILD_DESTINATION + STANDALONE_PATH + '\\CordovaSourceDictionary.xml', cordova_regex, "cordova-" + VERSION);
+replaceInFile(BUILD_DESTINATION + STANDALONE_PATH + '\\www\\index.html', cordova_regex, "cordova-" + VERSION);
+var version_regex = /return\s*\"(\d+)[.](\d+)[.](\d+)(rc\d)?/; //Matches return "x.x.x[rcx]
+replaceInFile(BUILD_DESTINATION + CORDOVA_LIB + '\\Commands\\Device.cs', version_regex, "return \"" + VERSION);
+
+//Update full project
+dest = shell.NameSpace(BUILD_DESTINATION + FULL_PATH);
+dest.CopyHere(BUILD_DESTINATION + "\\VERSION", 20);
+replaceInFile(BUILD_DESTINATION + FULL_PATH + '\\CordovaAppProj.csproj', cordova_regex, "cordova-" + VERSION);
+replaceInFile(BUILD_DESTINATION + FULL_PATH + '\\CordovaSourceDictionary.xml', cordova_regex, "cordova-" + VERSION);
+replaceInFile(BUILD_DESTINATION + FULL_PATH + '\\www\\index.html', cordova_regex, "cordova-" + VERSION);
+version_regex = /\"WPCordovaClassLib\,\s*Version\=(\d+)[.](\d+)[.](\d+)[.](\d+)/; //Matches "WPCordovaClassLib, Version=x.x.x.x
+replaceInFile(BUILD_DESTINATION + FULL_PATH + '\\CordovaAppProj.csproj', version_regex, "\"WPCordovaClassLib, Version=" + BASE_VERSION);
+
+//Update example proj
+replaceInFile(BUILD_DESTINATION + EXAMPLE_PATH + '\\CordovaExample.csproj', cordova_regex, "cordova-" + VERSION);
+replaceInFile(BUILD_DESTINATION + EXAMPLE_PATH + '\\CordovaSourceDictionary.xml', cordova_regex, "cordova-" + VERSION);
+version_regex = /VERSION\s*\=\s*\'(\d+)[.](\d+)[.](\d+)(rc\d)?/; //Matches VERSION = x.x.x[rcx]
+replaceInFile(BUILD_DESTINATION + EXAMPLE_PATH + '\\www\\cordova-current.js', version_regex, "VERSION = \'" + VERSION);
+
+//Update template discription
+version_regex = /version\:\s*(\d+)[.](\d+)[.](\d+)(rc\d)?/; //Matches version: x.x.x[rcx]
+replaceInFile(BUILD_DESTINATION + TEMPLATES_PATH + '\\description.txt', version_regex, "version: " + VERSION);
+
+//update .vstemplate files for the template zips.
+var name_regex = /CordovaWP7[_](\d+)[_](\d+)[_](\d+)(rc\d)?/g
+var discript_regex = /Cordova\s*(\d+)[.](\d+)[.](\d+)(rc\d)?/
+replaceInFile(BUILD_DESTINATION + TEMPLATES_PATH + '\\vs\\MyTemplateFull.vstemplate', name_regex, 'CordovaWP7_' + VERSION.replace(/\./g, '_'));
+replaceInFile(BUILD_DESTINATION + TEMPLATES_PATH + '\\vs\\MyTemplateFull.vstemplate', discript_regex, "Cordova " + VERSION);
+replaceInFile(BUILD_DESTINATION + TEMPLATES_PATH + '\\vs\\MyTemplateFull.vstemplate', cordova_regex, "cordova-" + VERSION);
+
+replaceInFile(BUILD_DESTINATION + TEMPLATES_PATH + '\\vs\\MyTemplateStandAlone.vstemplate', name_regex, 'CordovaWP7_' + VERSION.replace(/\./g, '_'));
+replaceInFile(BUILD_DESTINATION + TEMPLATES_PATH + '\\vs\\MyTemplateStandAlone.vstemplate', discript_regex, "Cordova " + VERSION);
+replaceInFile(BUILD_DESTINATION + TEMPLATES_PATH + '\\vs\\MyTemplateStandAlone.vstemplate', cordova_regex, "cordova-" + VERSION);
+
+/*************************************************/
+/****************** Step 3 *********************/
+/*************************************************/
+/*** Download and build cordova.js for windows ***/
+/*************************************************/
+
+WScript.Echo("Creating cordova.js...");
+if(fso.FolderExists(BUILD_DESTINATION + '\\temp'))
+{
+ fso.DeleteFolder(BUILD_DESTINATION + '\\temp', true);
+}
+//exec('mkdir ' + BUILD_DESTINATION + '\\temp');
+fso.CreateFolder(BUILD_DESTINATION + '\\temp');
+wscript_shell.CurrentDirectory = BUILD_DESTINATION + '\\temp';
+
+WScript.Echo('\tCloning js tagged with ' + VERSION + '...');
+//Grab the js taged with the specified VERSION
+exec('%comspec% /c git clone ' + CORDOVA_JS + ' && cd cordova-js && git fetch --tags && git checkout ' + VERSION );
+//WScript.sleep(5000);
+// build and copy over cordova.js
+WScript.Echo("\tBuilding Cordova.js...");
+wscript_shell.CurrentDirectory = BUILD_DESTINATION + '\\temp\\cordova-js';
+exec('%comspec% /c jake build');
+wscript_shell.CurrentDirectory = BUILD_DESTINATION + '\\temp\\cordova-js\\pkg';
+exec('%comspec% /c copy cordova.windowsphone.js ' + BUILD_DESTINATION + STANDALONE_PATH + '\\www\\cordova-' + VERSION + '.js');
+exec('%comspec% /c copy cordova.windowsphone.js ' + BUILD_DESTINATION + FULL_PATH + '\\www\\cordova-' + VERSION + '.js');
+exec('%comspec% /c copy cordova.windowsphone.js ' + BUILD_DESTINATION + EXAMPLE_PATH + '\\www\\cordova-' + VERSION + '.js');
+
+
+/*************************************************/
+/****************** Step 4 *********************/
+/*************************************************/
+/** Package framework & core plugins into .dll **/
+/*************************************************/
+
+WScript.Echo("Packaging .dll ...");
+//move to framework directory
+wscript_shell.CurrentDirectory = BUILD_DESTINATION + FRAMEWORK_PATH;
+//Build .dll in Release
+exec('msbuild /p:Configuration=Release;VersionNumber=' + VERSION + ';BaseVersionNumber=' + BASE_VERSION);
+if(!fso.FolderExists(BUILD_DESTINATION + FULL_PATH + '\\CordovaLib'))
+{
+ fso.CreateFolder(BUILD_DESTINATION + FULL_PATH + '\\CordovaLib');
+}
+exec('%comspec% /c copy Bin\\Release\\WPCordovaClassLib.dll ' + BUILD_DESTINATION + FULL_PATH + '\\CordovaLib');
+
+
+/*************************************************/
+/****************** Step 5 *********************/
+/*************************************************/
+/** Zip templates and inject into Visual Studio **/
+/*************************************************/
+
+WScript.Echo("Creating template .zip files ...");
+
+var standalone_zip = BUILD_DESTINATION + '\\CordovaWP7_' + VERSION.replace(/\./g, '_') + '_StandAlone.zip';
+var full_zip = BUILD_DESTINATION + '\\CordovaWP7_' + VERSION.replace(/\./g, '_') + '_Full.zip';
+if(fso.FileExists(standalone_zip))
+{
+ fso.DeleteFile(standalone_zip);
+}
+if(fso.FileExists(full_zip))
+{
+ fso.DeleteFile(full_zip);
+}
+
+exec('%comspec% /c copy ' + BUILD_DESTINATION + TEMPLATES_PATH + '\\vs\\MyTemplateFull.vstemplate ' + BUILD_DESTINATION + FULL_PATH + '\\MyTemplate.vstemplate');
+exec('%comspec% /c copy ' + BUILD_DESTINATION + '\\VERSION ' + BUILD_DESTINATION + FULL_PATH);
+exec('%comspec% /c copy Bin\\Release\\WPCordovaClassLib.dll ' + BUILD_DESTINATION + FULL_PATH + '\\CordovaLib');
+
+exec('%comspec% /c copy ' + BUILD_DESTINATION + TEMPLATES_PATH + '\\vs\\MyTemplateStandAlone.vstemplate ' + BUILD_DESTINATION + STANDALONE_PATH + '\\MyTemplate.vstemplate');
+exec('%comspec% /c copy ' + BUILD_DESTINATION + '\\VERSION ' + BUILD_DESTINATION + STANDALONE_PATH);
+
+exec('cscript ' + BUILD_DESTINATION + '\\tooling\\scripts\\win-zip.js ' + full_zip + ' ' + BUILD_DESTINATION + FULL_PATH + '\\');
+exec('cscript ' + BUILD_DESTINATION + '\\tooling\\scripts\\win-zip.js ' + standalone_zip + ' ' + BUILD_DESTINATION + STANDALONE_PATH + '\\');
+
+
+if(ADD_TO_VS)
+{
+ var template_dir = wscript_shell.ExpandEnvironmentStrings("%USERPROFILE%") + '\\Documents\\Visual Studio 2012\\Templates\\ProjectTemplates';
+ if(fso.FolderExists(template_dir ))
+ {
+ dest = shell.NameSpace(template_dir);
+ dest.CopyHere(standalone_zip, 20);
+ dest.CopyHere(full_zip, 20);
+ }
+ else
+ {
+ WScript.Echo("Could not find template directory in Visual Studio,\n you can manually copy over the template .zip files.")
+ }
+}
+
+cleanUp();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d037ab8e/tooling/scripts/win-zip.js
----------------------------------------------------------------------
diff --git a/tooling/scripts/win-zip.js b/tooling/scripts/win-zip.js
new file mode 100644
index 0000000..0661ebb
--- /dev/null
+++ b/tooling/scripts/win-zip.js
@@ -0,0 +1,33 @@
+/*
+ * Script for zipping the contents of a directory.
+ */
+
+//Get commman line arguments
+var objArgs = WScript.Arguments;
+var zipPath = objArgs(0);
+var sourcePath = objArgs(1);
+
+
+//Create empty ZIP file and open for adding
+var fso = new ActiveXObject("Scripting.FileSystemObject");
+var file = fso.CreateTextFile(zipPath, true);
+
+// Create twenty-two byte "fingerprint" for .zip
+file.write("PK");
+file.write(String.fromCharCode(5));
+file.write(String.fromCharCode(6));
+file.write('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0');
+file.Close();
+
+//Open .zip foder and copy contents of sourcePath
+var objShell = new ActiveXObject("shell.application");
+var zipFolder = objShell.NameSpace(zipPath);
+var sourceItems = objShell.NameSpace(sourcePath).items();
+if (zipFolder != null)
+{
+ zipFolder.CopyHere(sourceItems);
+ WScript.Sleep(1000);
+}
+else {
+ WScript.Echo("Failed to create .zip file.");
+}
\ No newline at end of file