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/04/08 21:11:34 UTC
[1/3] moved cordova folder into /tooling and added log.js
Updated Branches:
refs/heads/master 2337afbd7 -> fd8acc35e
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/Program.cs
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/Program.cs b/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/Program.cs
new file mode 100644
index 0000000..ad35ee6
--- /dev/null
+++ b/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/Program.cs
@@ -0,0 +1,400 @@
+/*
+ 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.
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.IO;
+using System.Xml.XPath;
+using System.Xml;
+using System.Xml.Linq;
+using System.Globalization;
+// Windows Phone Emulator Libraries
+using Microsoft.SmartDevice.Connectivity;
+using Microsoft.SmartDevice.Connectivity.Interface;
+using Microsoft.SmartDevice.MultiTargeting.Connectivity;
+
+
+namespace CordovaDeploy
+{
+
+ class DeployTool
+ {
+
+ static void Usage()
+ {
+ Log("Usage: CordovaDeploy [ -devices BuildOutputPath -d:DeviceIndex ]");
+ Log(" -devices : lists the devices and exits");
+ Log(" BuildOutputPath : path to the built application, typically Bin/Debug/ or Bin/Release/");
+ Log(" -d : index of the device to deploy, default is 0 ");
+ Log("examples:");
+ Log(" CordovaDeploy -devices");
+ Log(" CordovaDeploy Bin/Debug");
+ Log(" CordovaDeploy Bin/Release -d:1");
+ }
+
+ static void ReadWait()
+ {
+ // This is used when running in Visual Studio, the Command Window is created at launch, and disappears at the
+ // end of the program run, this let's us see the output before the window is closed.
+
+ /*
+ Console.WriteLine("\nPress ENTER to continue...");
+ Console.Read();
+ */
+ }
+
+ static void Log(string msg)
+ {
+ Debug.WriteLine(msg);
+ Console.Error.WriteLine(msg);
+ }
+
+ static Guid ReadAppId(string root)
+ {
+ Guid appID = Guid.Empty;
+ string manifestFilePath = root + @"\Properties\WMAppManifest.xml";
+
+ if (File.Exists(manifestFilePath))
+ {
+ XDocument xdoc = XDocument.Load(manifestFilePath);
+ var appNode = xdoc.Root.Descendants("App").FirstOrDefault();
+ if (appNode != null)
+ {
+ string guidStr = appNode.Attribute("ProductID").Value;
+ appID = new Guid(guidStr);
+ }
+ else
+ {
+ Log(string.Format("Unable to find appID, expected to find an App.ProductID property defined in the file {0}", manifestFilePath));
+ }
+ }
+ else
+ {
+ Log(string.Format("Error: the file {0} does not exist", manifestFilePath));
+ }
+ return appID;
+ }
+
+ static void ListDevices()
+ {
+ MultiTargetingConnectivity mtConn = new MultiTargetingConnectivity(CultureInfo.CurrentUICulture.LCID);
+ Collection<ConnectableDevice> deviceList = mtConn.GetConnectableDevices();
+
+ for (int index = 0; index < deviceList.Count; index++)
+ {
+ ConnectableDevice d = deviceList[index];
+ string info = string.Format("{0} : {1} : {2}", index.ToString(), d.Id, d.Name);
+ Log(info);
+ }
+ }
+
+ static ConnectableDevice GetDeviceAtIndex(int index)
+ {
+ MultiTargetingConnectivity mtConn = new MultiTargetingConnectivity(CultureInfo.CurrentUICulture.LCID);
+ Collection<ConnectableDevice> deviceList = mtConn.GetConnectableDevices();
+ return deviceList[index];
+ }
+
+ static void Main(string[] args)
+ {
+ int deviceIndex = 0;
+
+ string iconFilePath = "";
+ string xapFilePath = "";
+ Guid appID = Guid.Empty;
+
+ string root = Directory.GetCurrentDirectory();
+
+ if (args.Length < 1)
+ {
+ Usage();
+ ReadWait();
+ return;
+ }
+ else if (args[0] == "-devices")
+ {
+ ListDevices();
+ ReadWait();
+ return;
+ }
+ else if (args.Length > 1 && args[1].StartsWith("-d:"))
+ {
+ deviceIndex = int.Parse(args[1].Substring(3));
+ }
+
+
+ if (Directory.Exists(args[0]))
+ {
+ DirectoryInfo info = new DirectoryInfo(args[0]);
+ root = info.FullName;
+ }
+
+ appID = ReadAppId(root);
+ if (appID == Guid.Empty)
+ {
+ return; // Logging of errors is done in ReadAppId
+ }
+
+ if (File.Exists(root + @"\ApplicationIcon.png"))
+ {
+ iconFilePath = root + @"\ApplicationIcon.png";
+ }
+ else
+ {
+ Log(string.Format("Error: could not find application icon at {0}", root + @"\ApplicationIcon.png"));
+ ReadWait();
+ return;
+ }
+
+ xapFilePath = Directory.GetFiles(root + @"\Bin\Debug", "*.xap").FirstOrDefault();
+ if (string.IsNullOrEmpty(xapFilePath))
+ {
+ Log(string.Format("Error: could not find application .xap in folder {0}", root));
+ ReadWait();
+ return;
+ }
+
+ ConnectableDevice deviceConn = GetDeviceAtIndex(deviceIndex);
+ Log("Connecting to device :: " + deviceConn.Id + " : " + deviceConn.Name);
+ try
+ {
+ IDevice device = deviceConn.Connect();
+ IRemoteApplication app = null;
+ if (device.IsApplicationInstalled(appID))
+ {
+ Log("Uninstalling XAP from " + deviceConn.Name);
+ app = device.GetApplication(appID);
+ app.Uninstall();
+ }
+
+ Log("Installing app on " + deviceConn.Name);
+ app = device.InstallApplication(appID, appID, "NormalApp", iconFilePath, xapFilePath);
+
+ Log("Launching app on " + deviceConn.Name);
+ app.Launch();
+
+ // To Stop :
+ //app.TerminateRunningInstances();
+
+ device.Disconnect();
+
+ ReadWait();
+
+ }
+ catch (Exception ex)
+ {
+ Log("Error :: " + ex.Message);
+ }
+ }
+
+ // To read and write ISO storage files!! :
+ /*
+ try
+ {
+ IRemoteIsolatedStorageFile isoStore = app.GetIsolatedStore();
+ remoteIsolatedStorageFile.ReceiveFile("sourcePath", "destPath", true);
+ }
+ catch (Exception ex) { }
+ */
+
+ }
+ class Program
+ {
+ static void Usage()
+ {
+ Log("Usage: CordovaDeploy [ -devices BuildOutputPath -d:DeviceIndex ]");
+ Log(" -devices : lists the devices and exits");
+ Log(" BuildOutputPath : path to the built application, typically Bin/Debug/ or Bin/Release/");
+ Log(" -d : index of the device to deploy, default is 0 ");
+ Log("examples:");
+ Log(" CordovaDeploy -devices");
+ Log(" CordovaDeploy Bin/Debug");
+ Log(" CordovaDeploy Bin/Release -d:1");
+ }
+
+ static void ReadWait()
+ {
+ // This is used when running in Visual Studio, the Command Window is created at launch, and disappears at the
+ // end of the program run, this let's us see the output before the window is closed.
+
+ /*
+ Console.WriteLine("\nPress ENTER to continue...");
+ Console.Read();
+ */
+ }
+
+ static void Log(string msg)
+ {
+ Debug.WriteLine(msg);
+ Console.Error.WriteLine(msg);
+ }
+
+ static Guid ReadAppId(string root)
+ {
+ Guid appID = Guid.Empty;
+ string manifestFilePath = root + @"\Properties\WMAppManifest.xml";
+
+ if (File.Exists(manifestFilePath))
+ {
+ XDocument xdoc = XDocument.Load(manifestFilePath);
+ var appNode = xdoc.Root.Descendants("App").FirstOrDefault();
+ if (appNode != null)
+ {
+ string guidStr = appNode.Attribute("ProductID").Value;
+ appID = new Guid(guidStr);
+ }
+ else
+ {
+ Log(string.Format("Unable to find appID, expected to find an App.ProductID property defined in the file {0}", manifestFilePath));
+ }
+ }
+ else
+ {
+ Log(string.Format("Error: the file {0} does not exist", manifestFilePath));
+ }
+ return appID;
+ }
+
+ static void ListDevices()
+ {
+ MultiTargetingConnectivity mtConn = new MultiTargetingConnectivity(CultureInfo.CurrentUICulture.LCID);
+ Collection<ConnectableDevice> deviceList = mtConn.GetConnectableDevices();
+
+ for (int index = 0; index < deviceList.Count; index++)
+ {
+ ConnectableDevice d = deviceList[index];
+ string info = string.Format("{0} : {1} : {2}", index.ToString(), d.Id, d.Name);
+ Log(info);
+ }
+ }
+
+ static ConnectableDevice GetDeviceAtIndex(int index)
+ {
+ MultiTargetingConnectivity mtConn = new MultiTargetingConnectivity(CultureInfo.CurrentUICulture.LCID);
+ Collection<ConnectableDevice> deviceList = mtConn.GetConnectableDevices();
+ return deviceList[index];
+ }
+
+ static void Main(string[] args)
+ {
+ int deviceIndex = 0;
+
+ string iconFilePath = "";
+ string xapFilePath = "";
+ Guid appID = Guid.Empty;
+
+ string root = Directory.GetCurrentDirectory();
+
+ if (args.Length < 1)
+ {
+ Usage();
+ ReadWait();
+ return;
+ }
+ else if (args[0] == "-devices")
+ {
+ ListDevices();
+ ReadWait();
+ return;
+ }
+ else if (args.Length > 1 && args[1].StartsWith("-d:"))
+ {
+ deviceIndex = int.Parse(args[1].Substring(3));
+ }
+
+
+ if (Directory.Exists(args[0]))
+ {
+ DirectoryInfo info = new DirectoryInfo(args[0]);
+ root = info.FullName;
+ }
+
+ appID = ReadAppId(root);
+ if (appID == Guid.Empty)
+ {
+ return; // Logging of errors is done in ReadAppId
+ }
+
+ if (File.Exists(root + @"\ApplicationIcon.png"))
+ {
+ iconFilePath = root + @"\ApplicationIcon.png";
+ }
+ else
+ {
+ Log(string.Format("Error: could not find application icon at {0}", root + @"\ApplicationIcon.png"));
+ ReadWait();
+ return;
+ }
+
+ xapFilePath = Directory.GetFiles(root + @"\Bin\Debug", "*.xap").FirstOrDefault();
+ if (string.IsNullOrEmpty(xapFilePath))
+ {
+ Log(string.Format("Error: could not find application .xap in folder {0}", root));
+ ReadWait();
+ return;
+ }
+
+ ConnectableDevice deviceConn = GetDeviceAtIndex(deviceIndex);
+ Log("Connecting to device :: " + deviceConn.Id + " : " + deviceConn.Name);
+ try
+ {
+ IDevice device = deviceConn.Connect();
+ IRemoteApplication app = null;
+ if (device.IsApplicationInstalled(appID))
+ {
+ Log("Uninstalling XAP from " + deviceConn.Name);
+ app = device.GetApplication(appID);
+ app.Uninstall();
+ }
+
+ Log("Installing app on " + deviceConn.Name);
+ app = device.InstallApplication(appID, appID, "NormalApp", iconFilePath, xapFilePath);
+
+ Log("Launching app on " + deviceConn.Name);
+ app.Launch();
+
+ // To Stop :
+ //app.TerminateRunningInstances();
+
+ device.Disconnect();
+
+ ReadWait();
+
+ }
+ catch (Exception ex)
+ {
+ Log("Error :: " + ex.Message);
+ }
+ }
+
+ // To read and write ISO storage files!! :
+ /*
+ try
+ {
+ IRemoteIsolatedStorageFile isoStore = app.GetIsolatedStore();
+ remoteIsolatedStorageFile.ReceiveFile("sourcePath", "destPath", true);
+ }
+ catch (Exception ex) { }
+ */
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/Properties/AssemblyInfo.cs b/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..3c26c87
--- /dev/null
+++ b/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("CordovaDeploy")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("CordovaDeploy")]
+[assembly: AssemblyCopyright("Copyright © 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("256b11aa-d4bb-48cf-8024-7c040421fa8d")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/app.config
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/app.config b/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/app.config
new file mode 100644
index 0000000..c5e1dae
--- /dev/null
+++ b/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/app.config
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/build.js b/tooling/cordova/lib/build.js
new file mode 100644
index 0000000..6cde55c
--- /dev/null
+++ b/tooling/cordova/lib/build.js
@@ -0,0 +1,185 @@
+/*
+ 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.
+*/
+
+
+var fso = WScript.CreateObject('Scripting.FileSystemObject');
+var wscript_shell = WScript.CreateObject("WScript.Shell");
+
+var args = WScript.Arguments;
+
+// working dir
+var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\build.js').join('');
+
+// help/usage function
+function Usage() {
+ Log("");
+ Log("Usage: build [ --debug | --release ]");
+ Log(" --help : Displays this dialog.");
+ Log(" --debug : Builds project in debug mode.");
+ Log(" --release : Builds project in release mode.");
+ Log("examples:");
+ Log(" build ");
+ Log(" build --debug");
+ Log(" build --release");
+ Log("");
+}
+
+// logs messaged to stdout and stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+// executes a commmand in the shell
+function exec_verbose(command) {
+ //Log("Command: " + command);
+ var oShell=wscript_shell.Exec(command);
+ while (oShell.Status == 0) {
+ //Wait a little bit so we're not super looping
+ WScript.sleep(100);
+ //Print any stdout output from the script
+ if (!oShell.StdOut.AtEndOfStream) {
+ var line = oShell.StdOut.ReadLine();
+ Log(line);
+ }
+ }
+ //Check to make sure our scripts did not encounter an error
+ if (!oShell.StdErr.AtEndOfStream) {
+ var line = oShell.StdErr.ReadAll();
+ Log(line, true);
+ WScript.Quit(1);
+ }
+}
+
+// checks to see if a .csproj file exists in the project root
+function is_cordova_project(path) {
+ if (fso.FolderExists(path)) {
+ var proj_folder = fso.GetFolder(path);
+ var proj_files = new Enumerator(proj_folder.Files);
+ for (;!proj_files.atEnd(); proj_files.moveNext()) {
+ if (fso.GetExtensionName(proj_files.item()) == 'csproj') {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+// builds the project and .xap in release mode
+function build_xap_release(path) {
+ Log("Building Cordova-WP8 Project:");
+ Log("\tConfiguration : Release");
+ Log("\tDirectory : " + path);
+
+ wscript_shell.CurrentDirectory = path;
+ exec_verbose('msbuild CordovaSolution.sln /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Release');
+
+ // check if file xap was created
+ if (fso.FolderExists(path + '\\Bin\\Release')) {
+ var out_folder = fso.GetFolder(path + '\\Bin\\Release');
+ var out_files = new Enumerator(out_folder.Files);
+ for (;!out_files.atEnd(); out_files.moveNext()) {
+ if (fso.GetExtensionName(out_files.item()) == 'xap') {
+ Log("BUILD SUCCESS.");
+ return;
+ }
+ }
+ }
+ Log('ERROR: MSBuild failed to create .xap when building cordova-wp8 for release.', true);
+ WScript.Quit(1);
+}
+
+// builds the project and .xap in debug mode
+function build_xap_debug(path) {
+ Log("Building Cordova-WP8 Project:");
+ Log("\tConfiguration : Debug");
+ Log("\tDirectory : " + path);
+
+ wscript_shell.CurrentDirectory = path;
+ exec_verbose('msbuild CordovaSolution.sln /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Debug');
+
+ // check if file xap was created
+ if (fso.FolderExists(path + '\\Bin\\Debug')) {
+ var out_folder = fso.GetFolder(path + '\\Bin\\Debug');
+ var out_files = new Enumerator(out_folder.Files);
+ for (;!out_files.atEnd(); out_files.moveNext()) {
+ if (fso.GetExtensionName(out_files.item()) == 'xap') {
+ Log("BUILD SUCCESS.");
+ return;
+ }
+ }
+ }
+ Log('ERROR: MSBuild failed to create .xap when building cordova-wp8 for debugging.', true);
+ WScript.Quit(1);
+}
+
+
+Log("");
+
+if (args.Count() > 0) {
+ // support help flags
+ if (args(0) == "--help" || args(0) == "/?" ||
+ args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
+ Usage();
+ WScript.Quit(1);
+ }
+ else if (args.Count() > 1) {
+ Log("Error: Too many arguments.", true);
+ Usage();
+ WScript.Quit(1);
+ }
+ else if (fso.FolderExists(ROOT)) {
+ if (!is_cordova_project(ROOT)) {
+ Log('Error: .csproj file not found in ' + ROOT, true);
+ Log('could not build project.', true);
+ WScript.Quit(1);
+ }
+
+ if (args(0) == "--debug" || args(0) == "-d") {
+ if (fso.FolderExists(ROOT + '\\Bin\\Debug')) {
+ exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\clean --debug');
+ }
+ build_xap_debug(ROOT);
+ }
+ else if (args(0) == "--release" || args(0) == "-r") {
+ if (fso.FolderExists(ROOT + '\\Bin\\Release')) {
+ exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\clean --release');
+ }
+ build_xap_release(ROOT);
+ }
+ else {
+ Log("Error: \"" + arg(0) + "\" is not recognized as a build option", true);
+ Usage();
+ WScript.Quit(1);
+ }
+ }
+ else {
+ Log("Error: Project directory not found,", true);
+ Usage();
+ WScript.Quit(1);
+ }
+}
+else {
+ Log("WARNING: [ --debug | --release ] not specified, defaulting to debug...");
+ build_xap_debug(ROOT);
+}
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/clean.js
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/clean.js b/tooling/cordova/lib/clean.js
new file mode 100644
index 0000000..a6ae740
--- /dev/null
+++ b/tooling/cordova/lib/clean.js
@@ -0,0 +1,125 @@
+/*
+ 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.
+*/
+
+
+var fso = WScript.CreateObject('Scripting.FileSystemObject');
+var wscript_shell = WScript.CreateObject("WScript.Shell");
+var args = WScript.Arguments;
+// working dir
+var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\clean.js').join('');
+
+
+// help function
+function Usage() {
+ Log("");
+ Log("Usage: clean [ --debug | --release ]");
+ Log(" --debug : Cleans generated debug files in project.");
+ Log(" --release : Cleans generated release files in project.");
+ Log("examples:");
+ Log(" clean --debug");
+ Log(" clean");
+ Log(" - deletes all generated files in project");
+ Log("");
+}
+
+// logs to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+// cleans any generated files in the cordova project
+function clean_project(path) {
+ if (fso.FolderExists(path + "\\obj")) {
+ fso.DeleteFolder(path + "\\obj");
+ }
+ if (fso.FolderExists(path + "\\Bin")) {
+ fso.DeleteFolder(path + "\\Bin");
+ }
+ //TODO: delete CordovaAppProj.csproj.user as well? Service References?
+}
+
+// cleans any files generated by build --debug
+function clean_debug(path) {
+ if (fso.FolderExists(path + "\\obj\\Debug")) {
+ fso.DeleteFolder(path + "\\obj\\Debug");
+ }
+ if (fso.FolderExists(path + "\\Bin\\Debug")) {
+ fso.DeleteFolder(path + "\\Bin\\Debug");
+ }
+}
+
+// cleans any files generated by build --release
+function clean_release(path) {
+ if (fso.FolderExists(path + "\\obj\\Release")) {
+ fso.DeleteFolder(path + "\\obj\\Release");
+ }
+ if (fso.FolderExists(path + "\\Bin\\Release")) {
+ fso.DeleteFolder(path + "\\Bin\\Release");
+ }
+}
+
+Log("");
+
+if (args.Count() > 0) {
+ // support help flags
+ if (args(0) == "--help" || args(0) == "/?" ||
+ args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
+ Usage();
+ WScript.Quit(1);
+ }
+ else if (args.Count() > 1) {
+ Log("Error: Too many arguments.", true);
+ Usage();
+ WScript.Quit(1);
+ }
+ else if (fso.FolderExists(ROOT)) {
+ if (args(0) == "--debug" || args(0) == "-d") {
+ clean_debug(ROOT);
+ }
+ else if (args(0) == "--release" || args(0) == "-r") {
+ clean_release(ROOT);
+ }
+ else {
+ Log("Error: \"" + arg(0) + "\" is not recognized as a build option", true);
+ Usage();
+ WScript.Quit(1);
+ }
+ }
+ else {
+ Log("Error: Project directory not found,", true);
+ Usage();
+ WScript.Quit(1);
+ }
+}
+else {
+ if (fso.FolderExists(ROOT)) {
+ Log("Cleaning cordova project...");
+ clean_project(ROOT);
+ }
+ else {
+ Log("Error: Project directory not found,", true);
+ Usage();
+ WScript.Quit(1);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/deploy-device.bat
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/deploy-device.bat b/tooling/cordova/lib/deploy-device.bat
new file mode 100644
index 0000000..90e39bf
--- /dev/null
+++ b/tooling/cordova/lib/deploy-device.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET full_path=%~dp0
+IF EXIST %full_path%deploy.js (
+ cscript "%full_path%deploy.js" %* --device //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'deploy.js' in cordova/lib, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/deploy-emulator.bat
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/deploy-emulator.bat b/tooling/cordova/lib/deploy-emulator.bat
new file mode 100644
index 0000000..b4a02d5
--- /dev/null
+++ b/tooling/cordova/lib/deploy-emulator.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET full_path=%~dp0
+IF EXIST %full_path%deploy.js (
+ cscript "%full_path%deploy.js" %* --emulator //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'deploy.js' in cordova/lib, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/deploy.js
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/deploy.js b/tooling/cordova/lib/deploy.js
new file mode 100644
index 0000000..fcb011e
--- /dev/null
+++ b/tooling/cordova/lib/deploy.js
@@ -0,0 +1,276 @@
+/*
+ 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.
+*/
+
+
+var fso = WScript.CreateObject('Scripting.FileSystemObject');
+var wscript_shell = WScript.CreateObject("WScript.Shell");
+
+var args = WScript.Arguments;
+// working dir
+var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\deploy.js').join('');
+ // path to CordovaDeploy.exe
+var CORDOVA_DEPLOY_EXE = '\\cordova\\lib\\CordovaDeploy\\CordovaDeploy\\bin\\Debug\\CordovaDeploy.exe';
+ // path to CordovaDeploy
+var CORDOVA_DEPLOY = '\\cordova\\lib\\CordovaDeploy';
+var BUILD_RELEASE = false;
+
+
+// help function
+function Usage() {
+ Log("");
+ Log("Usage: run [ --device | --emulator | --target=<id> ]");
+ Log(" --device : Deploys and runs the project on the connected device.");
+ Log(" --emulator : Deploys and runs the project on an emulator.");
+ Log(" --target=<id> : Deploys and runs the project on the specified target.")
+ Log("examples:");
+ Log(" run");
+ Log(" run --emulator");
+ Log(" run --device");
+ Log(" run --target=7988B8C3-3ADE-488d-BA3E-D052AC9DC710");
+ Log("");
+}
+
+// log to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+var ForReading = 1, ForWriting = 2, ForAppending = 8;
+var TristateUseDefault = 2, TristateTrue = 1, TristateFalse = 0;
+
+
+// executes a commmand in the shell
+function exec(command) {
+ var oShell=wscript_shell.Exec(command);
+ while (oShell.Status == 0) {
+ WScript.sleep(100);
+ }
+}
+
+// executes a commmand in the shell
+function exec_verbose(command) {
+ //Log("Command: " + command);
+ var oShell=wscript_shell.Exec(command);
+ while (oShell.Status == 0) {
+ //Wait a little bit so we're not super looping
+ WScript.sleep(100);
+ //Print any stdout output from the script
+ if (!oShell.StdOut.AtEndOfStream) {
+ var line = oShell.StdOut.ReadAll();
+ Log(line);
+ }
+ }
+ //Check to make sure our scripts did not encounter an error
+ if (!oShell.StdErr.AtEndOfStream) {
+ var line = oShell.StdErr.ReadAll();
+ Log(line, true);
+ WScript.Quit(1);
+ }
+}
+
+// returns the contents of a file
+function read(filename) {
+ if (fso.FileExists(filename)) {
+ var f=fso.OpenTextFile(filename, 1,2);
+ var s=f.ReadAll();
+ f.Close();
+ return s;
+ }
+ else {
+ Log('Cannot read non-existant file : ' + filename, true);
+ WScript.Quit(1);
+ }
+ return null;
+}
+
+// builds the CordovaDeploy.exe if it does not already exist
+function cordovaDeploy(path) {
+ if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
+ return;
+ }
+
+ Log('CordovaDeploy.exe not found, attempting to build CordovaDeploy.exe...');
+
+ // build CordovaDeploy.exe
+ if (fso.FolderExists(path + '\\cordova') && fso.FolderExists(path + CORDOVA_DEPLOY) &&
+ fso.FileExists(path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln')) {
+ // delete any previously generated files
+ if (fso.FolderExists(path + CORDOVA_DEPLOY + '\\CordovaDeploy\\obj')) {
+ fso.DeleteFolder(path + CORDOVA_DEPLOY + '\\CordovaDeploy\\obj');
+ }
+ if (fso.FolderExists(path + CORDOVA_DEPLOY + '\\CordovaDeploy\\Bin')) {
+ fso.DeleteFolder(path + CORDOVA_DEPLOY + '\\CordovaDeploy\\Bin');
+ }
+ exec_verbose('msbuild ' + path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln');
+
+ if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
+ Log('CordovaDeploy.exe compiled, SUCCESS.');
+ }
+ else {
+ Log('ERROR: MSBUILD FAILED TO COMPILE CordovaDeploy.exe', true);
+ WScript.Quit(1);
+ }
+ }
+ else {
+ Log('ERROR: CordovaDeploy.sln not found, unable to compile CordovaDeploy tool.', true);
+ WScript.Quit(1);
+ }
+}
+
+// builds and launches project on device
+function device(path)
+{
+ cordovaDeploy(path);
+ if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
+ Log('Deploying to device ...');
+ exec_verbose('%comspec% /c ' + path + CORDOVA_DEPLOY_EXE + ' ' + path + ' -d:0');
+ }
+ else
+ {
+ Log('Error: Failed to find CordovaDeploy.exe in ' + path, true);
+ Log('DEPLOY FAILED.', true);
+ WScript.Quit(1);
+ }
+}
+
+// builds and launches project on emulator
+function emulator(path)
+{
+ cordovaDeploy(path);
+ if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
+ Log('Deploying to emulator ...');
+ exec_verbose('%comspec% /c ' + path + CORDOVA_DEPLOY_EXE + ' ' + path + ' -d:1');
+ }
+ else
+ {
+ Log('Error: Failed to find CordovaDeploy.exe in ' + path, true);
+ Log('DEPLOY FAILED.', true);
+ WScript.Quit(1);
+ }
+}
+
+// builds and launches the project on the specified target
+function target(path, device_id) {
+ cordovaDeploy(path);
+ if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
+ Log('Deploying to ' + device_id + ' ...');
+ var out = wscript_shell.Exec('cscript ' + path + '\\cordova\\lib\\target-list.js //nologo');
+ while(out.Status == 0) {
+ WScript.Sleep(100);
+ }
+ //Check to make sure our script did not encounter an error
+ if (!out.StdErr.AtEndOfStream) {
+ var line = out.StdErr.ReadAll();
+ Log('Error getting availible targets : ', true);
+ Log(line, true);
+ WScript.Quit(1);
+ }
+ else {
+ if (!out.StdOut.AtEndOfStream) {
+ var line = out.StdOut.ReadAll();
+ var targets = line.split('\r\n');
+ var check_id = new RegExp(device_id);
+ for (target in targets) {
+ if (targets[target].match(check_id)) {
+ //TODO: this only gets single digit index, account for device index of 10+?
+ var index = targets[target].substr(0,1);
+ exec_verbose(path + CORDOVA_DEPLOY_EXE + ' ' + path + ' -d:' + index);
+ return;
+ }
+ }
+ Log('Error : target ' + device_id + ' was not found.', true);
+ Log('DEPLOY FAILED.', true);
+ WScript.Quit(1);
+ }
+ else {
+ Log('Error : target-list.js Failed to find any devices', true);
+ Log('DEPLOY FAILED.', true);
+ WScript.Quit(1);
+ }
+
+ }
+
+ }
+ else {
+ Log('Error: Failed to find CordovaDeploy.exe in ' + path, true);
+ Log('DEPLOY FAILED.', true);
+ WScript.Quit(1);
+ }
+}
+
+function build(path) {
+ if (!BUILD_RELEASE) {
+ exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\build --debug');
+ }
+ else {
+ exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\build --release');
+ }
+}
+
+
+
+Log("");
+
+if (args.Count() > 0) {
+ // support help flags
+ if (args(0) == "--help" || args(0) == "/?" ||
+ args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
+ Usage();
+ WScript.Quit(1);
+ }
+ else if (args.Count() > 1) {
+ Log('Error: Too many arguments.', true);
+ Usage();
+ WScript.Quit(1);
+ }
+ else if (fso.FolderExists(ROOT)) {
+ if (args(0) == "--emulator" || args(0) == "-e") {
+ build(ROOT);
+ emulator(ROOT);
+ }
+ else if (args(0) == "--device" || args(0) == "-d") {
+ build(ROOT);
+ device(ROOT);
+ }
+ else if (args(0).substr(0,9) == "--target=") {
+ build(ROOT);
+ var device_id = args(0).split('--target=').join('');
+ target(ROOT, device_id);
+ }
+ else {
+ Log('Error: \"' + arg(0) + '\" is not recognized as a deploy option', true);
+ Usage();
+ WScript.Quit(1);
+ }
+ }
+ else {
+ Log('Error: Project directory not found,', true);
+ Usage();
+ WScript.Quit(1);
+ }
+}
+else {
+ Log('WARNING: [ --device | --emulator | --target=<id> ] not specified, defaulting to emulator...');
+ emulator(ROOT);
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/list-devices.bat
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/list-devices.bat b/tooling/cordova/lib/list-devices.bat
new file mode 100644
index 0000000..bf4492b
--- /dev/null
+++ b/tooling/cordova/lib/list-devices.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET full_path=%~dp0
+IF EXIST %full_path%target-list.js (
+ cscript "%full_path%target-list.js" %* --devices //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/list-emulator-images.bat
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/list-emulator-images.bat b/tooling/cordova/lib/list-emulator-images.bat
new file mode 100644
index 0000000..3f571c7
--- /dev/null
+++ b/tooling/cordova/lib/list-emulator-images.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET full_path=%~dp0
+IF EXIST %full_path%target-list.js (
+ cscript "%full_path%target-list.js" %* --emulators //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/list-started-emulators.bat
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/list-started-emulators.bat b/tooling/cordova/lib/list-started-emulators.bat
new file mode 100644
index 0000000..93e5c5f
--- /dev/null
+++ b/tooling/cordova/lib/list-started-emulators.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET full_path=%~dp0
+IF EXIST %full_path%target-list.js (
+ cscript "%full_path%target-list.js" %* --started_emulators //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/log.js
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/log.js b/tooling/cordova/lib/log.js
new file mode 100644
index 0000000..acd3399
--- /dev/null
+++ b/tooling/cordova/lib/log.js
@@ -0,0 +1,78 @@
+/*
+ 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.
+*/
+
+
+var fso = WScript.CreateObject('Scripting.FileSystemObject');
+var wscript_shell = WScript.CreateObject("WScript.Shell");
+var args = WScript.Arguments;
+// working dir
+var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\log.js').join('');
+
+
+// help function
+function Usage() {
+ Log("");
+ Log("Usage: log");
+ Log("examples:");
+ Log(" log");
+ Log(" - logs output from running application *NOT IMPLIMENTED*");
+ Log("");
+}
+
+// logs to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+// log output from running projects *NOT IMPLEMENTED*
+function log_output(path) {
+ Log("ERROR: Logging is not supported on Windows Phone", true);
+ WScript.Quit(1);
+}
+
+Log("");
+
+if (args.Count() > 0) {
+ // support help flags
+ if (args(0) == "--help" || args(0) == "/?" ||
+ args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
+ Usage();
+ WScript.Quit(1);
+ }
+ else {
+ Log("Error: \"" + arg(0) + "\" is not recognized as a log option.", true);
+ Usage();
+ WScript.Quit(1);
+ }
+}
+else {
+ if (fso.FolderExists(ROOT)) {
+ log_output(ROOT);
+ }
+ else {
+ Log("Error: Project directory not found,", true);
+ Usage();
+ WScript.Quit(1);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/run.js
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/run.js b/tooling/cordova/lib/run.js
new file mode 100644
index 0000000..7ad3ba6
--- /dev/null
+++ b/tooling/cordova/lib/run.js
@@ -0,0 +1,122 @@
+/*
+ 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.
+*/
+
+
+var fso = WScript.CreateObject('Scripting.FileSystemObject');
+var wscript_shell = WScript.CreateObject("WScript.Shell");
+
+var args = WScript.Arguments;
+// working dir
+var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\run.js').join('');
+
+
+// help function
+function Usage() {
+ Log("");
+ Log("Usage: run [ --target=<ID> ]");
+ Log("examples:");
+ Log(" run");
+ Log(" run target=7988B8C3-3ADE-488d-BA3E-D052AC9DC710")
+ Log("");
+ Log("Flow for run command :");
+ Log("\t0. Are there any actual devices available? (use list-devices to determine this). If so, target the first one. If no, continue.");
+ Log("\t1. Are there any actual emulators available, i.e. started/running? (use list-started-emulators to determine this). If so, target the first one. If no, continue.");
+ Log("\t2. Are there any emulator images available to start? (use list-emulator-images to determine this). If so, call start-emulator <id> of the first available image, wait for it to become ready, then target it. If no, continue.");
+ Log("\t3. Fail horribly.");
+}
+
+// executes a commmand in the shell
+function exec_verbose(command) {
+ //Log("Command: " + command);
+ var oShell=wscript_shell.Exec(command);
+ while (oShell.Status == 0) {
+ //Wait a little bit so we're not super looping
+ WScript.sleep(100);
+ //Print any stdout output from the script
+ if (!oShell.StdOut.AtEndOfStream) {
+ var line = oShell.StdOut.ReadLine();
+ Log(line);
+ }
+ }
+ //Check to make sure our scripts did not encounter an error
+ if (!oShell.StdErr.AtEndOfStream) {
+ var line = oShell.StdErr.ReadAll();
+ Log(line, true);
+ WScript.Quit(1);
+ }
+}
+
+// log to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+// deploy to specified target
+function target(path, target) {
+ var cmd = 'cscript ' + path + '\\cordova\\lib\\deploy.js --target=' + target + ' //nologo';
+ exec_verbose(cmd);
+}
+
+// deploy to availible device, if no device is availible, deploy to emulator.
+// TODO: implement list-devices (currenly not possible) and list-started-emulators and use device first then started emulator
+function deploy(path) {
+ var cmd = 'cscript ' + path + '\\cordova\\lib\\deploy.js --emulator //nologo';
+ exec_verbose(cmd);
+}
+
+
+Log("");
+
+if (args.Count() > 0) {
+ // support help flags
+ if (args(0) == "--help" || args(0) == "/?" ||
+ args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
+ Usage();
+ WScript.Quit(1);
+ }
+ else if (args.Count() > 1) {
+ Log("Error: Too many arguments.", true);
+ Usage();
+ WScript.Quit(1);
+ }
+ else if (fso.FolderExists(ROOT)) {
+ if (args(0).substr(0,9) == "--target=") {
+ target(ROOT, args(0));
+ }
+ else {
+ Log("Error: \"" + arg(0) + "\" is not recognized as a run option", true);
+ Usage();
+ WScript.Quit(1);
+ }
+ }
+ else {
+ Log("Error: Project directory not found,", true);
+ Usage();
+ WScript.Quit(1);
+ }
+}
+else {
+ Log("WARNING: [ --target=<ID> ] not specified, using defaults...");
+ deploy(ROOT);
+}
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/start-emulator.bat
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/start-emulator.bat b/tooling/cordova/lib/start-emulator.bat
new file mode 100644
index 0000000..bf38d0c
--- /dev/null
+++ b/tooling/cordova/lib/start-emulator.bat
@@ -0,0 +1,3 @@
+@ECHO OFF
+ECHO Sorry, start-emulator is not availible yet for Windows Phone.>&2
+EXIT /B 1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/target-list.js
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/target-list.js b/tooling/cordova/lib/target-list.js
new file mode 100644
index 0000000..b53670d
--- /dev/null
+++ b/tooling/cordova/lib/target-list.js
@@ -0,0 +1,235 @@
+/*
+ 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.
+*/
+
+
+var fso = WScript.CreateObject('Scripting.FileSystemObject');
+var wscript_shell = WScript.CreateObject("WScript.Shell");
+
+var args = WScript.Arguments;
+// working dir
+var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\target-list.js').join('');
+ // path to CordovaDeploy.exe
+var CORDOVA_DEPLOY_EXE = '\\cordova\\lib\\CordovaDeploy\\CordovaDeploy\\bin\\Debug\\CordovaDeploy.exe';
+ // path to CordovaDeploy
+var CORDOVA_DEPLOY = '\\cordova\\lib\\CordovaDeploy';
+
+// help/usage function
+function Usage() {
+ Log("");
+ Log("Usage: cscript target-list.js [ --emulators | --devices | --started_emulators | --all ]");
+ Log(" --emulators : List the possible target emulators availible.");
+ Log(" --devices : List the possible target devices availible. *NOT IMPLEMENTED YET*");
+ Log(" --started_emulators : List any started emulators availible. *NOT IMPLEMENTED YET*");
+ Log(" --all : List all devices returned by CordovaDeploy.exe -devices ");
+ Log("examples:");
+ Log(" cscript target-list.js --emulators");
+ Log(" cscript target-list.js --devices");
+ Log(" cscript target-list.js --started_emulators");
+ Log(" cscript target-list.js --all");
+ Log("");
+}
+
+// logs messaged to stdout and stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+// executes a commmand in the shell
+function exec(command) {
+ var oShell=wscript_shell.Exec(command);
+ while (oShell.Status == 0) {
+ //Wait a little bit so we're not super looping
+ WScript.sleep(100);
+ //Print output? Naa.....
+ if (!oShell.StdOut.AtEndOfStream) {
+ var line = oShell.StdOut.ReadAll();
+ //Log(line);
+ }
+ }
+ //Check to make sure our scripts did not encounter an error
+ if (!oShell.StdErr.AtEndOfStream) {
+ var line = oShell.StdErr.ReadAll();
+ Log(line, true);
+ WScript.Quit(1);
+ }
+}
+
+// returns all possible targets generated by the CordovaDeploy tool
+function get_targets(path) {
+ if (!fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
+ cordovaDeploy(path);
+ }
+ wscript_shell.CurrentDirectory = path + CORDOVA_DEPLOY + '\\CordovaDeploy\\bin\\Debug';
+ var cmd = 'CordovaDeploy -devices';
+ var out = wscript_shell.Exec(cmd);
+ while(out.Status == 0) {
+ WScript.Sleep(100);
+ }
+ //Check to make sure our script did not encounter an error
+ if (!out.StdErr.AtEndOfStream) {
+ var line = out.StdErr.ReadAll();
+ if (line.substring(0, 1) == '0') {
+ var targets = line.split('\r\n');
+ return targets;
+ }
+ else {
+ Log("Error calling CordovaDeploy : ", true);
+ Log(line, true);
+ WScript.Quit(1);
+ }
+ }
+ else {
+ if (!out.StdOut.AtEndOfStream) {
+ var line = out.StdErr.ReadAll();
+ var targets = line.split('\r\n');
+ return targets;
+ }
+ else {
+ Log('Error : CordovaDeploy Failed to find any devices', true);
+ WScript.Quit(1);
+ }
+ }
+}
+
+function list_targets(path) {
+ var targets = get_targets(path);
+ for (i in targets) {
+ Log(targets[i]);
+ }
+}
+
+// lists the Device returned by CordovaDeploy (NOTE: this does not indicate that a device is connected)
+function list_devices(path) {
+ var targets = get_targets(path);
+ var device_found = false;
+ for (i in targets) {
+ if (targets[i].match(/Device/)) {
+ Log(targets[i]);
+ device_found = true;
+ }
+ }
+ if (device_found) {
+ Log('');
+ Log('WARNING : This does not mean that a device is connected, make');
+ Log(' sure your device is connected before deploying to it.');
+ }
+}
+
+// lists the emulators availible to CordovaDeploy
+function list_emulator_images(path) {
+ var targets = get_targets(path);
+ for (i in targets) {
+ if (targets[i].match(/Emulator/)) {
+ Log(targets[i]);
+ }
+ }
+}
+
+// lists any started emulators *NOT IMPLEMENTED*
+function list_started_emulators(path) {
+ Log('ERROR : list-started-emulators is not supported on Windows Phone.', true);
+ WScript.Quit(1);
+}
+
+// builds the CordovaDeploy.exe if it does not already exist
+function cordovaDeploy(path) {
+ if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
+ return;
+ }
+
+ // build CordovaDeploy.exe
+ if (fso.FolderExists(path + '\\cordova') && fso.FolderExists(path + CORDOVA_DEPLOY) &&
+ fso.FileExists(path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln')) {
+ // delete any previously generated files
+ if (fso.FolderExists(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\obj")) {
+ fso.DeleteFolder(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\obj");
+ }
+ if (fso.FolderExists(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\Bin")) {
+ fso.DeleteFolder(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\Bin");
+ }
+ exec('msbuild ' + path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln');
+
+ if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
+ return;
+ }
+ else {
+ Log("ERROR: MSBUILD FAILED TO COMPILE CordovaDeploy.exe", true);
+ WScript.Quit(1);
+ }
+ }
+ else {
+ Log("ERROR: CordovaDeploy.sln not found, unable to compile CordovaDeploy tool.", true);
+ WScript.Quit(1);
+ }
+}
+
+Log("");
+
+if (args.Count() > 0) {
+ // support help flags
+ if (args(0) == "--help" || args(0) == "/?" ||
+ args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
+ Usage();
+ WScript.Quit(1);
+ }
+ else if (args.Count() > 1) {
+ Log("Error: Too many arguments.", true);
+ Usage();
+ WScript.Quit(1);
+ }
+ else if (fso.FolderExists(ROOT)) {
+ if (!fso.FolderExists(ROOT + '\\cordova')) {
+ Log("Error: cordova tooling folder not found in project directory,", true);
+ Log("could not lsit targets.", true);
+ WScript.Quit(1);
+ }
+
+ if (args(0) == "--emulators" || args(0) == "-e") {
+ list_emulator_images(ROOT);
+ }
+ else if (args(0) == "--devices" || args(0) == "-d") {
+ list_devices(ROOT);
+ }
+ else if (args(0) == "--started_emulators" || args(0) == "-s") {
+ list_started_emulators(ROOT);
+ }
+ else if (args(0) == "--all" || args(0) == "-a") {
+ list_targets(ROOT);
+ }
+ else {
+ Log("Error: \"" + arg(0) + "\" is not recognized as a target-list option", true);
+ Usage();
+ WScript.Quit(1);
+ }
+ }
+ else {
+ Log("Error: Project directory not found,", true);
+ Usage();
+ WScript.Quit(1);
+ }
+}
+else {
+ Log("WARNING: target list not specified, showing all targets...");
+ list_targets(ROOT);
+}
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/log.bat
----------------------------------------------------------------------
diff --git a/tooling/cordova/log.bat b/tooling/cordova/log.bat
new file mode 100644
index 0000000..a491724
--- /dev/null
+++ b/tooling/cordova/log.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET full_path=%~dp0
+IF EXIST %full_path%lib\log.js (
+ cscript "%full_path%lib\log.js" %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'log.js' in cordova/lib, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/run.bat
----------------------------------------------------------------------
diff --git a/tooling/cordova/run.bat b/tooling/cordova/run.bat
new file mode 100644
index 0000000..daf077b
--- /dev/null
+++ b/tooling/cordova/run.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET full_path=%~dp0
+IF EXIST %full_path%lib\deploy.js (
+ cscript "%full_path%lib\run.js" %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'run.js' in cordova/lib, aborting...>&2
+ EXIT /B 1
+)
[3/3] git commit: Merge pull request #19 from bennmapes/tooling
Posted by pu...@apache.org.
Merge pull request #19 from bennmapes/tooling
moved cordova folder into /tooling and added log.js
Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/fd8acc35
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/fd8acc35
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/fd8acc35
Branch: refs/heads/master
Commit: fd8acc35e3ef337f3198e8126bf9d7de53e34fd7
Parents: 2337afb 1443cc1
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Apr 8 11:28:10 2013 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Apr 8 11:28:10 2013 -0700
----------------------------------------------------------------------
bin/check_reqs.js | 95 ++--
bin/create.js | 35 +-
framework/cordova/build.bat | 9 -
framework/cordova/clean.bat | 9 -
.../cordova/lib/CordovaDeploy/CordovaDeploy.sln | 20 -
.../CordovaDeploy/CordovaDeploy.csproj | 96 ----
.../lib/CordovaDeploy/CordovaDeploy/Program.cs | 400 ---------------
.../CordovaDeploy/Properties/AssemblyInfo.cs | 36 --
.../lib/CordovaDeploy/CordovaDeploy/app.config | 3 -
framework/cordova/lib/build.js | 181 -------
framework/cordova/lib/clean.js | 84 ---
framework/cordova/lib/deploy-device.bat | 9 -
framework/cordova/lib/deploy-emulator.bat | 9 -
framework/cordova/lib/deploy.js | 269 ----------
framework/cordova/lib/list-devices.bat | 9 -
framework/cordova/lib/list-emulator-images.bat | 9 -
framework/cordova/lib/list-started-emulators.bat | 9 -
framework/cordova/lib/run.js | 122 -----
framework/cordova/lib/start-emulator.bat | 3 -
framework/cordova/lib/target-list.js | 206 --------
framework/cordova/log.bat | 9 -
framework/cordova/run.bat | 9 -
tooling/cordova/build.bat | 9 +
tooling/cordova/clean.bat | 9 +
.../cordova/lib/CordovaDeploy/CordovaDeploy.sln | 20 +
.../CordovaDeploy/CordovaDeploy.csproj | 96 ++++
.../lib/CordovaDeploy/CordovaDeploy/Program.cs | 400 +++++++++++++++
.../CordovaDeploy/Properties/AssemblyInfo.cs | 36 ++
.../lib/CordovaDeploy/CordovaDeploy/app.config | 3 +
tooling/cordova/lib/build.js | 185 +++++++
tooling/cordova/lib/clean.js | 125 +++++
tooling/cordova/lib/deploy-device.bat | 9 +
tooling/cordova/lib/deploy-emulator.bat | 9 +
tooling/cordova/lib/deploy.js | 276 ++++++++++
tooling/cordova/lib/list-devices.bat | 9 +
tooling/cordova/lib/list-emulator-images.bat | 9 +
tooling/cordova/lib/list-started-emulators.bat | 9 +
tooling/cordova/lib/log.js | 78 +++
tooling/cordova/lib/run.js | 122 +++++
tooling/cordova/lib/start-emulator.bat | 3 +
tooling/cordova/lib/target-list.js | 235 +++++++++
tooling/cordova/log.bat | 9 +
tooling/cordova/run.bat | 9 +
43 files changed, 1718 insertions(+), 1573 deletions(-)
----------------------------------------------------------------------
[2/3] git commit: moved cordova folder into /tooling and added log.js
Posted by pu...@apache.org.
moved cordova folder into /tooling and added log.js
Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/1443cc11
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/1443cc11
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/1443cc11
Branch: refs/heads/master
Commit: 1443cc11cf776a26937824730c155abf4be73db0
Parents: 2337afb
Author: Benn Mapes <be...@gmail.com>
Authored: Fri Apr 5 01:17:09 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Sat Apr 6 00:24:47 2013 -0700
----------------------------------------------------------------------
bin/check_reqs.js | 95 ++--
bin/create.js | 35 +-
framework/cordova/build.bat | 9 -
framework/cordova/clean.bat | 9 -
.../cordova/lib/CordovaDeploy/CordovaDeploy.sln | 20 -
.../CordovaDeploy/CordovaDeploy.csproj | 96 ----
.../lib/CordovaDeploy/CordovaDeploy/Program.cs | 400 ---------------
.../CordovaDeploy/Properties/AssemblyInfo.cs | 36 --
.../lib/CordovaDeploy/CordovaDeploy/app.config | 3 -
framework/cordova/lib/build.js | 181 -------
framework/cordova/lib/clean.js | 84 ---
framework/cordova/lib/deploy-device.bat | 9 -
framework/cordova/lib/deploy-emulator.bat | 9 -
framework/cordova/lib/deploy.js | 269 ----------
framework/cordova/lib/list-devices.bat | 9 -
framework/cordova/lib/list-emulator-images.bat | 9 -
framework/cordova/lib/list-started-emulators.bat | 9 -
framework/cordova/lib/run.js | 122 -----
framework/cordova/lib/start-emulator.bat | 3 -
framework/cordova/lib/target-list.js | 206 --------
framework/cordova/log.bat | 9 -
framework/cordova/run.bat | 9 -
tooling/cordova/build.bat | 9 +
tooling/cordova/clean.bat | 9 +
.../cordova/lib/CordovaDeploy/CordovaDeploy.sln | 20 +
.../CordovaDeploy/CordovaDeploy.csproj | 96 ++++
.../lib/CordovaDeploy/CordovaDeploy/Program.cs | 400 +++++++++++++++
.../CordovaDeploy/Properties/AssemblyInfo.cs | 36 ++
.../lib/CordovaDeploy/CordovaDeploy/app.config | 3 +
tooling/cordova/lib/build.js | 185 +++++++
tooling/cordova/lib/clean.js | 125 +++++
tooling/cordova/lib/deploy-device.bat | 9 +
tooling/cordova/lib/deploy-emulator.bat | 9 +
tooling/cordova/lib/deploy.js | 276 ++++++++++
tooling/cordova/lib/list-devices.bat | 9 +
tooling/cordova/lib/list-emulator-images.bat | 9 +
tooling/cordova/lib/list-started-emulators.bat | 9 +
tooling/cordova/lib/log.js | 78 +++
tooling/cordova/lib/run.js | 122 +++++
tooling/cordova/lib/start-emulator.bat | 3 +
tooling/cordova/lib/target-list.js | 235 +++++++++
tooling/cordova/log.bat | 9 +
tooling/cordova/run.bat | 9 +
43 files changed, 1718 insertions(+), 1573 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/bin/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/check_reqs.js b/bin/check_reqs.js
index 5ace9d2..a81826f 100644
--- a/bin/check_reqs.js
+++ b/bin/check_reqs.js
@@ -1,6 +1,8 @@
var args = WScript.Arguments;
var wscript_shell = WScript.CreateObject("WScript.Shell");
+var REQUIRE_GIT = false;
+
function Usage() {
Log("Usage: [ check_reqs | cscript check_reqs.js ]");
Log("examples:");
@@ -11,94 +13,79 @@ function Usage() {
// log to stdout or stderr
function Log(msg, error) {
- if(error) {
+ if (error) {
WScript.StdErr.WriteLine(msg);
}
- else{
+ else {
WScript.StdOut.WriteLine(msg);
}
}
-/* The tooling for cordova windows phone requires these commands
- * in the environment PATH variable.
- * - msbuild (C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319)
- */
-function SystemRequiermentsMet() {
- var cmd = 'msbuild -version'
+// gets the output from a command, failing with the given error message
+function check_command(cmd, fail_msg) {
var out = wscript_shell.Exec(cmd);
- while(out.Status == 0)
- {
+ while (out.Status == 0) {
WScript.Sleep(100);
}
//Check that command executed
if (!out.StdErr.AtEndOfStream) {
- var line = out.StdOut.ReadLine();
- Log('The command `msbuild` failed. Make sure you have the latest Windows Phone SDKs installed, and the `msbuild.exe` command (inside C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319) is added to your path.', true);
- Log('Output: ' + output, true);
+ var line = out.StdErr.ReadLine();
+ Log(fail_msg, true);
+ Log('Output : ' + line, true);
WScript.Quit(1);
}
- //Get output
- var line;
if (!out.StdOut.AtEndOfStream) {
- line = oShell.StdErr.ReadAll();
+ var line = out.StdOut.ReadAll();
+ return line;
}
else {
- Log('Unable to get output from command "msbuild", check that you have it in your PATH');
+ Log('Unable to get output from command "' + cmd + '"', true);
+ WScript.Quit(1);
}
+}
+
+/* The tooling for cordova windows phone requires these commands
+ * in the environment PATH variable.
+ * - msbuild (C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319)
+ * - git? (for dynamic cli loading of projects?)
+ */
+function SystemRequiermentsMet() {
+ var cmd = 'msbuild -version'
+ var fail_msg = 'The command `msbuild` failed. Make sure you have the latest Windows Phone SDKs installed, and the `msbuild.exe` command (inside C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319) is added to your path.'
+ var output = check_command(cmd, fail_msg);
var msversion = output.match(/\.NET\sFramework\,\sversion\s4\.0/);
if (!msversion) {
Log('Please install the .NET Framwork v4.0.30319 (in the latest windows phone SDK\'s).', true);
Log('Make sure the "msbuild" command in your path is pointing to v4.0.30319 of msbuild as well (inside C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319).', true);
WScript.Quit(1);
}
- //TODO: Check git for other tooling?
+
+ if(REQUIRE_GIT) {
+ cmd = 'git --version';
+ fail_msg = 'The command `git` failed. Make sure you have git installed as well ad in your PATH environment so the tool can use it';
+ output = check_command(cmd, fail_msg);
+ var gitVersion = output.match(/git\sversion\s1\./);
+ if (!gitVersion) {
+ Log('Please ensure you have at least git v1 installed and added to you PATH so this tool can use it to get the latest codova.');
+ }
+ }
}
-if(args.Count() > 0)
-{
+if (args.Count() > 0) {
// support help flags
- if(args(0) == "--help" || args(0) == "/?" ||
- args(0) == "help" || args(0) == "-help" || args(0) == "/help" || args(0) == "-h")
- {
+ if (args(0) == "--help" || args(0) == "/?" ||
+ args(0) == "help" || args(0) == "-help" || args(0) == "/help" || args(0) == "-h") {
Usage();
WScript.Quit(1);
}
- else
- {
+ else {
Log('Error : Did not recognize argument ' + args(0), true)
Usage();
WScript.Quit(1);
}
+}
- PROJECT_PATH = args(0);
- if(fso.FolderExists(PROJECT_PATH))
- {
- Log("Project directory already exists:");
- Log("\t" + PROJECT_PATH);
- Log("CREATE FAILED.");
- WScript.Quit(1);
- }
-
- if(args.Count() > 1)
- {
- PACKAGE = args(1);
- }
- else
- {
- PACKAGE = "Cordova.Example";
- }
-
- if(args.Count() > 2)
- {
- NAME = args(2);
- }
- else
- {
- NAME = "CordovaAppProj";
- }
-
- create(PROJECT_PATH, PACKAGE, NAME);
-}
\ No newline at end of file
+SystemRequiermentsMet();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/bin/create.js
----------------------------------------------------------------------
diff --git a/bin/create.js b/bin/create.js
index bbcc94f..dcbf520 100644
--- a/bin/create.js
+++ b/bin/create.js
@@ -34,6 +34,7 @@ var ROOT = WScript.ScriptFullName.split('\\bin\\create.js').join('');
var args = WScript.Arguments,
FRAMEWORK_PATH = '\\framework',
+ TOOLING_PATH = '\\tooling',
TEMPLATES_PATH = '\\templates',
// sub folder for standalone project
STANDALONE_PATH = TEMPLATES_PATH + '\\standalone',
@@ -129,26 +130,26 @@ function genGuid() {
}
// builds the new cordova dll from the framework
-function build_dll() {
- Log("Building dll...");
- if (fso.FolderExists(ROOT + FRAMEWORK_PATH + '\\Bin')) {
- fso.DeleteFolder(ROOT + FRAMEWORK_PATH + '\\Bin');
+function build_dll(path) {
+ if (fso.FolderExists(path + FRAMEWORK_PATH + '\\Bin')) {
+ fso.DeleteFolder(path + FRAMEWORK_PATH + '\\Bin');
}
- if (fso.FolderExists(ROOT + FRAMEWORK_PATH + '\\obj')) {
- fso.DeleteFolder(ROOT + FRAMEWORK_PATH + '\\obj');
+ if (fso.FolderExists(path + FRAMEWORK_PATH + '\\obj')) {
+ fso.DeleteFolder(path + FRAMEWORK_PATH + '\\obj');
}
// move to framework directory
- wscript_shell.CurrentDirectory = ROOT + FRAMEWORK_PATH;
+ wscript_shell.CurrentDirectory = path + FRAMEWORK_PATH;
// build .dll in Release
- exec_verbose('msbuild /p:Configuration=Release;VersionNumber=' + VERSION + ';BaseVersionNumber=' + BASE_VERSION);
+ exec_verbose('msbuild /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Release;VersionNumber=' + VERSION + ';BaseVersionNumber=' + BASE_VERSION);
//Check if file dll was created
- if (!fso.FileExists(ROOT + FRAMEWORK_PATH + '\\Bin\\Release\\WPCordovaClassLib.dll')) {
+ if (!fso.FileExists(path + FRAMEWORK_PATH + '\\Bin\\Release\\WPCordovaClassLib.dll')) {
Log('ERROR: MSBuild failed to create .dll when building WPCordovaClassLib.dll', true);
WScript.Quit(1);
}
Log("SUCCESS BUILDING DLL");
}
+// creates new project in path, with the given package and app name
function create(path, namespace, name) {
Log("Creating Cordova-WP7 Project:");
Log("\tApp Name : " + name);
@@ -156,9 +157,6 @@ function create(path, namespace, name) {
Log("\tPath : " + path);
// Copy the template source files to the new destination
-
- //var fso=WScript.CreateObject("Scripting.FileSystemObject");
- //WScript.Echo("src = " + ROOT + "\\templates\\standalone");
fso.CopyFolder(ROOT + CREATE_TEMPLATE, path);
var newProjGuid = genGuid();
@@ -177,6 +175,7 @@ function create(path, namespace, name) {
replaceInFile(path + "\\CordovaAppProj.csproj",/\$safeprojectname\$/g,namespace);
//set up debug + emulate paths
+ // TODO : Remove (replaced by cordova scripts build/run/log/clean etc...)
replaceInFile(path + "\\cordova\\debug.bat",/__PATH_TO_TOOLING_SCRIPTS__/g, ROOT + '\\tooling\\scripts');
replaceInFile(path + "\\cordova\\emulate.bat",/__PATH_TO_TOOLING_SCRIPTS__/g, ROOT + '\\tooling\\scripts');
replaceInFile(path + "\\cordova\\debug.bat",/__PATH_TO_PROJ__/g, path);
@@ -186,11 +185,12 @@ function create(path, namespace, name) {
if (CREATE_TEMPLATE == FULL_PATH || CREATE_TEMPLATE == CUSTOM_PATH) {
var dllPath = ROOT + FRAMEWORK_PATH + '\\Bin\\Release\\WPCordovaClassLib.dll';
if (fso.FileExists(dllPath)) {
- WScript.Echo(".dll File Exists");
+ Log("WPCordovaClassLib.dll Found, creating project");
}
else {
- WScript.Echo("Warning: Missing Library! Could not find the file: " + dllPath);
- build_dll();
+ Log("WPCordovaClassLib.dll was not Found in " + dllPath);
+ Log('BUILDING: WPCordovaClassLib.dll');
+ build_dll(ROOT);
}
if (!fso.FolderExists(path + '\\CordovaLib')) {
@@ -206,11 +206,11 @@ function create(path, namespace, name) {
}
}
- //TODO: remove cordova folder transfer once reorg of repo is finished
+ //TODO: remove cordova folder transfer once reorg of repo is finished and this is put into the template
if (fso.FolderExists(path + '\\cordova')) {
fso.DeleteFolder(path + '\\cordova');
}
- fso.CopyFolder(ROOT + FRAMEWORK_PATH + '\\cordova', path + '\\cordova');
+ fso.CopyFolder(ROOT + TOOLING_PATH + '\\cordova', path + '\\cordova');
Log("CREATE SUCCESS : " + path);
@@ -220,7 +220,6 @@ function create(path, namespace, name) {
// index.html title set to project name ?
}
-
if (args.Count() > 0) {
// support help flags
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/build.bat
----------------------------------------------------------------------
diff --git a/framework/cordova/build.bat b/framework/cordova/build.bat
deleted file mode 100644
index b48598a..0000000
--- a/framework/cordova/build.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%lib\build.js (
- cscript "%full_path%lib\build.js" %* //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'build.js' in cordova/lib, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/clean.bat
----------------------------------------------------------------------
diff --git a/framework/cordova/clean.bat b/framework/cordova/clean.bat
deleted file mode 100644
index 1bafe1b..0000000
--- a/framework/cordova/clean.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%lib\clean.js (
- cscript "%full_path%lib\clean.js" %* //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'clean.js' in cordova/lib, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/CordovaDeploy/CordovaDeploy.sln
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/CordovaDeploy/CordovaDeploy.sln b/framework/cordova/lib/CordovaDeploy/CordovaDeploy.sln
deleted file mode 100644
index 3305276..0000000
--- a/framework/cordova/lib/CordovaDeploy/CordovaDeploy.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CordovaDeploy", "CordovaDeploy\CordovaDeploy.csproj", "{E752165B-AF59-4FF0-8601-A2A69FE09E0E}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|x86 = Debug|x86
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E752165B-AF59-4FF0-8601-A2A69FE09E0E}.Debug|x86.ActiveCfg = Debug|x86
- {E752165B-AF59-4FF0-8601-A2A69FE09E0E}.Debug|x86.Build.0 = Debug|x86
- {E752165B-AF59-4FF0-8601-A2A69FE09E0E}.Release|x86.ActiveCfg = Release|x86
- {E752165B-AF59-4FF0-8601-A2A69FE09E0E}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/CordovaDeploy/CordovaDeploy/CordovaDeploy.csproj
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/CordovaDeploy/CordovaDeploy/CordovaDeploy.csproj b/framework/cordova/lib/CordovaDeploy/CordovaDeploy/CordovaDeploy.csproj
deleted file mode 100644
index a52b532..0000000
--- a/framework/cordova/lib/CordovaDeploy/CordovaDeploy/CordovaDeploy.csproj
+++ /dev/null
@@ -1,96 +0,0 @@
-<?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)' == '' ">x86</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{E752165B-AF59-4FF0-8601-A2A69FE09E0E}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>CordovaDeploy</RootNamespace>
- <AssemblyName>CordovaDeploy</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <TargetFrameworkProfile>
- </TargetFrameworkProfile>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
- <PlatformTarget>x86</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
- <PlatformTarget>x86</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup>
- <StartupObject>CordovaDeploy.DeployTool</StartupObject>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Microsoft.Smartdevice.Connectivity, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SmartDevice.Connectivity\v4.0_11.0.0.0__b03f5f7f11d50a3a\Microsoft.Smartdevice.Connectivity.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Smartdevice.Connectivity.Interface, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SmartDevice.Connectivity.Interface\v4.0_11.0.0.0__b03f5f7f11d50a3a\Microsoft.Smartdevice.Connectivity.Interface.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Smartdevice.MultiTargeting.Connectivity, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SmartDevice.MultiTargeting.Connectivity\v4.0_11.0.0.0__b03f5f7f11d50a3a\Microsoft.Smartdevice.MultiTargeting.Connectivity.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="app.config" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.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>
- -->
-</Project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/CordovaDeploy/CordovaDeploy/Program.cs
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/CordovaDeploy/CordovaDeploy/Program.cs b/framework/cordova/lib/CordovaDeploy/CordovaDeploy/Program.cs
deleted file mode 100644
index ad35ee6..0000000
--- a/framework/cordova/lib/CordovaDeploy/CordovaDeploy/Program.cs
+++ /dev/null
@@ -1,400 +0,0 @@
-/*
- 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.
-*/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Collections.ObjectModel;
-using System.Diagnostics;
-using System.IO;
-using System.Xml.XPath;
-using System.Xml;
-using System.Xml.Linq;
-using System.Globalization;
-// Windows Phone Emulator Libraries
-using Microsoft.SmartDevice.Connectivity;
-using Microsoft.SmartDevice.Connectivity.Interface;
-using Microsoft.SmartDevice.MultiTargeting.Connectivity;
-
-
-namespace CordovaDeploy
-{
-
- class DeployTool
- {
-
- static void Usage()
- {
- Log("Usage: CordovaDeploy [ -devices BuildOutputPath -d:DeviceIndex ]");
- Log(" -devices : lists the devices and exits");
- Log(" BuildOutputPath : path to the built application, typically Bin/Debug/ or Bin/Release/");
- Log(" -d : index of the device to deploy, default is 0 ");
- Log("examples:");
- Log(" CordovaDeploy -devices");
- Log(" CordovaDeploy Bin/Debug");
- Log(" CordovaDeploy Bin/Release -d:1");
- }
-
- static void ReadWait()
- {
- // This is used when running in Visual Studio, the Command Window is created at launch, and disappears at the
- // end of the program run, this let's us see the output before the window is closed.
-
- /*
- Console.WriteLine("\nPress ENTER to continue...");
- Console.Read();
- */
- }
-
- static void Log(string msg)
- {
- Debug.WriteLine(msg);
- Console.Error.WriteLine(msg);
- }
-
- static Guid ReadAppId(string root)
- {
- Guid appID = Guid.Empty;
- string manifestFilePath = root + @"\Properties\WMAppManifest.xml";
-
- if (File.Exists(manifestFilePath))
- {
- XDocument xdoc = XDocument.Load(manifestFilePath);
- var appNode = xdoc.Root.Descendants("App").FirstOrDefault();
- if (appNode != null)
- {
- string guidStr = appNode.Attribute("ProductID").Value;
- appID = new Guid(guidStr);
- }
- else
- {
- Log(string.Format("Unable to find appID, expected to find an App.ProductID property defined in the file {0}", manifestFilePath));
- }
- }
- else
- {
- Log(string.Format("Error: the file {0} does not exist", manifestFilePath));
- }
- return appID;
- }
-
- static void ListDevices()
- {
- MultiTargetingConnectivity mtConn = new MultiTargetingConnectivity(CultureInfo.CurrentUICulture.LCID);
- Collection<ConnectableDevice> deviceList = mtConn.GetConnectableDevices();
-
- for (int index = 0; index < deviceList.Count; index++)
- {
- ConnectableDevice d = deviceList[index];
- string info = string.Format("{0} : {1} : {2}", index.ToString(), d.Id, d.Name);
- Log(info);
- }
- }
-
- static ConnectableDevice GetDeviceAtIndex(int index)
- {
- MultiTargetingConnectivity mtConn = new MultiTargetingConnectivity(CultureInfo.CurrentUICulture.LCID);
- Collection<ConnectableDevice> deviceList = mtConn.GetConnectableDevices();
- return deviceList[index];
- }
-
- static void Main(string[] args)
- {
- int deviceIndex = 0;
-
- string iconFilePath = "";
- string xapFilePath = "";
- Guid appID = Guid.Empty;
-
- string root = Directory.GetCurrentDirectory();
-
- if (args.Length < 1)
- {
- Usage();
- ReadWait();
- return;
- }
- else if (args[0] == "-devices")
- {
- ListDevices();
- ReadWait();
- return;
- }
- else if (args.Length > 1 && args[1].StartsWith("-d:"))
- {
- deviceIndex = int.Parse(args[1].Substring(3));
- }
-
-
- if (Directory.Exists(args[0]))
- {
- DirectoryInfo info = new DirectoryInfo(args[0]);
- root = info.FullName;
- }
-
- appID = ReadAppId(root);
- if (appID == Guid.Empty)
- {
- return; // Logging of errors is done in ReadAppId
- }
-
- if (File.Exists(root + @"\ApplicationIcon.png"))
- {
- iconFilePath = root + @"\ApplicationIcon.png";
- }
- else
- {
- Log(string.Format("Error: could not find application icon at {0}", root + @"\ApplicationIcon.png"));
- ReadWait();
- return;
- }
-
- xapFilePath = Directory.GetFiles(root + @"\Bin\Debug", "*.xap").FirstOrDefault();
- if (string.IsNullOrEmpty(xapFilePath))
- {
- Log(string.Format("Error: could not find application .xap in folder {0}", root));
- ReadWait();
- return;
- }
-
- ConnectableDevice deviceConn = GetDeviceAtIndex(deviceIndex);
- Log("Connecting to device :: " + deviceConn.Id + " : " + deviceConn.Name);
- try
- {
- IDevice device = deviceConn.Connect();
- IRemoteApplication app = null;
- if (device.IsApplicationInstalled(appID))
- {
- Log("Uninstalling XAP from " + deviceConn.Name);
- app = device.GetApplication(appID);
- app.Uninstall();
- }
-
- Log("Installing app on " + deviceConn.Name);
- app = device.InstallApplication(appID, appID, "NormalApp", iconFilePath, xapFilePath);
-
- Log("Launching app on " + deviceConn.Name);
- app.Launch();
-
- // To Stop :
- //app.TerminateRunningInstances();
-
- device.Disconnect();
-
- ReadWait();
-
- }
- catch (Exception ex)
- {
- Log("Error :: " + ex.Message);
- }
- }
-
- // To read and write ISO storage files!! :
- /*
- try
- {
- IRemoteIsolatedStorageFile isoStore = app.GetIsolatedStore();
- remoteIsolatedStorageFile.ReceiveFile("sourcePath", "destPath", true);
- }
- catch (Exception ex) { }
- */
-
- }
- class Program
- {
- static void Usage()
- {
- Log("Usage: CordovaDeploy [ -devices BuildOutputPath -d:DeviceIndex ]");
- Log(" -devices : lists the devices and exits");
- Log(" BuildOutputPath : path to the built application, typically Bin/Debug/ or Bin/Release/");
- Log(" -d : index of the device to deploy, default is 0 ");
- Log("examples:");
- Log(" CordovaDeploy -devices");
- Log(" CordovaDeploy Bin/Debug");
- Log(" CordovaDeploy Bin/Release -d:1");
- }
-
- static void ReadWait()
- {
- // This is used when running in Visual Studio, the Command Window is created at launch, and disappears at the
- // end of the program run, this let's us see the output before the window is closed.
-
- /*
- Console.WriteLine("\nPress ENTER to continue...");
- Console.Read();
- */
- }
-
- static void Log(string msg)
- {
- Debug.WriteLine(msg);
- Console.Error.WriteLine(msg);
- }
-
- static Guid ReadAppId(string root)
- {
- Guid appID = Guid.Empty;
- string manifestFilePath = root + @"\Properties\WMAppManifest.xml";
-
- if (File.Exists(manifestFilePath))
- {
- XDocument xdoc = XDocument.Load(manifestFilePath);
- var appNode = xdoc.Root.Descendants("App").FirstOrDefault();
- if (appNode != null)
- {
- string guidStr = appNode.Attribute("ProductID").Value;
- appID = new Guid(guidStr);
- }
- else
- {
- Log(string.Format("Unable to find appID, expected to find an App.ProductID property defined in the file {0}", manifestFilePath));
- }
- }
- else
- {
- Log(string.Format("Error: the file {0} does not exist", manifestFilePath));
- }
- return appID;
- }
-
- static void ListDevices()
- {
- MultiTargetingConnectivity mtConn = new MultiTargetingConnectivity(CultureInfo.CurrentUICulture.LCID);
- Collection<ConnectableDevice> deviceList = mtConn.GetConnectableDevices();
-
- for (int index = 0; index < deviceList.Count; index++)
- {
- ConnectableDevice d = deviceList[index];
- string info = string.Format("{0} : {1} : {2}", index.ToString(), d.Id, d.Name);
- Log(info);
- }
- }
-
- static ConnectableDevice GetDeviceAtIndex(int index)
- {
- MultiTargetingConnectivity mtConn = new MultiTargetingConnectivity(CultureInfo.CurrentUICulture.LCID);
- Collection<ConnectableDevice> deviceList = mtConn.GetConnectableDevices();
- return deviceList[index];
- }
-
- static void Main(string[] args)
- {
- int deviceIndex = 0;
-
- string iconFilePath = "";
- string xapFilePath = "";
- Guid appID = Guid.Empty;
-
- string root = Directory.GetCurrentDirectory();
-
- if (args.Length < 1)
- {
- Usage();
- ReadWait();
- return;
- }
- else if (args[0] == "-devices")
- {
- ListDevices();
- ReadWait();
- return;
- }
- else if (args.Length > 1 && args[1].StartsWith("-d:"))
- {
- deviceIndex = int.Parse(args[1].Substring(3));
- }
-
-
- if (Directory.Exists(args[0]))
- {
- DirectoryInfo info = new DirectoryInfo(args[0]);
- root = info.FullName;
- }
-
- appID = ReadAppId(root);
- if (appID == Guid.Empty)
- {
- return; // Logging of errors is done in ReadAppId
- }
-
- if (File.Exists(root + @"\ApplicationIcon.png"))
- {
- iconFilePath = root + @"\ApplicationIcon.png";
- }
- else
- {
- Log(string.Format("Error: could not find application icon at {0}", root + @"\ApplicationIcon.png"));
- ReadWait();
- return;
- }
-
- xapFilePath = Directory.GetFiles(root + @"\Bin\Debug", "*.xap").FirstOrDefault();
- if (string.IsNullOrEmpty(xapFilePath))
- {
- Log(string.Format("Error: could not find application .xap in folder {0}", root));
- ReadWait();
- return;
- }
-
- ConnectableDevice deviceConn = GetDeviceAtIndex(deviceIndex);
- Log("Connecting to device :: " + deviceConn.Id + " : " + deviceConn.Name);
- try
- {
- IDevice device = deviceConn.Connect();
- IRemoteApplication app = null;
- if (device.IsApplicationInstalled(appID))
- {
- Log("Uninstalling XAP from " + deviceConn.Name);
- app = device.GetApplication(appID);
- app.Uninstall();
- }
-
- Log("Installing app on " + deviceConn.Name);
- app = device.InstallApplication(appID, appID, "NormalApp", iconFilePath, xapFilePath);
-
- Log("Launching app on " + deviceConn.Name);
- app.Launch();
-
- // To Stop :
- //app.TerminateRunningInstances();
-
- device.Disconnect();
-
- ReadWait();
-
- }
- catch (Exception ex)
- {
- Log("Error :: " + ex.Message);
- }
- }
-
- // To read and write ISO storage files!! :
- /*
- try
- {
- IRemoteIsolatedStorageFile isoStore = app.GetIsolatedStore();
- remoteIsolatedStorageFile.ReceiveFile("sourcePath", "destPath", true);
- }
- catch (Exception ex) { }
- */
- }
-}
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/CordovaDeploy/CordovaDeploy/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/CordovaDeploy/CordovaDeploy/Properties/AssemblyInfo.cs b/framework/cordova/lib/CordovaDeploy/CordovaDeploy/Properties/AssemblyInfo.cs
deleted file mode 100644
index 3c26c87..0000000
--- a/framework/cordova/lib/CordovaDeploy/CordovaDeploy/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("CordovaDeploy")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("CordovaDeploy")]
-[assembly: AssemblyCopyright("Copyright © 2012")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("256b11aa-d4bb-48cf-8024-7c040421fa8d")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/CordovaDeploy/CordovaDeploy/app.config
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/CordovaDeploy/CordovaDeploy/app.config b/framework/cordova/lib/CordovaDeploy/CordovaDeploy/app.config
deleted file mode 100644
index c5e1dae..0000000
--- a/framework/cordova/lib/CordovaDeploy/CordovaDeploy/app.config
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0"?>
-<configuration>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/build.js b/framework/cordova/lib/build.js
deleted file mode 100644
index 596c4fb..0000000
--- a/framework/cordova/lib/build.js
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- 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.
-*/
-
-
-var fso = WScript.CreateObject('Scripting.FileSystemObject');
-var wscript_shell = WScript.CreateObject("WScript.Shell");
-
-var args = WScript.Arguments;
-
-// working dir
-var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\build.js').join('');
-
-// help/usage function
-function Usage() {
- Log("");
- Log("Usage: build [ --debug | --release ]");
- Log(" --help : Displays this dialog.");
- Log(" --debug : Builds project in debug mode.");
- Log(" --release : Builds project in release mode.");
- Log("examples:");
- Log(" build ");
- Log(" build --debug");
- Log(" build --release");
- Log("");
-}
-
-// logs messaged to stdout and stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-// executes a commmand in the shell
-function exec_verbose(command) {
- //Log("Command: " + command);
- var oShell=wscript_shell.Exec(command);
- while (oShell.Status == 0) {
- //Wait a little bit so we're not super looping
- WScript.sleep(100);
- //Print any stdout output from the script
- if (!oShell.StdOut.AtEndOfStream) {
- var line = oShell.StdOut.ReadLine();
- Log(line);
- }
- }
- //Check to make sure our scripts did not encounter an error
- if (!oShell.StdErr.AtEndOfStream) {
- var line = oShell.StdErr.ReadAll();
- Log(line, true);
- WScript.Quit(1);
- }
-}
-
-// checks to see if a .csproj file exists in the project root
-function is_cordova_project(path) {
- if (fso.FolderExists(path)) {
- var proj_folder = fso.GetFolder(path);
- var proj_files = new Enumerator(proj_folder.Files);
- for (;!proj_files.atEnd(); proj_files.moveNext()) {
- if (fso.GetExtensionName(proj_files.item()) == 'csproj') {
- return true;
- }
- }
- }
- return false;
-}
-
-// builds the project and .xap in release mode
-function build_xap_release(path) {
- Log("Building Cordova-WP8 Project:");
- Log("\tConfiguration : Release");
- Log("\tDirectory : " + path);
-
- wscript_shell.CurrentDirectory = path;
- exec_verbose('msbuild /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Release');
-
- // check if file xap was created
- if (fso.FolderExists(path + '\\Bin\\Release')) {
- var out_folder = fso.GetFolder(path + '\\Bin\\Release');
- var out_files = new Enumerator(out_folder.Files);
- for (;!out_files.atEnd(); out_files.moveNext()) {
- if (fso.GetExtensionName(out_files.item()) == 'xap') {
- Log("BUILD SUCCESS.");
- return;
- }
- }
- }
- Log('ERROR: MSBuild failed to create .xap when building cordova-wp8.', true);
- WScript.Quit(1);
-}
-
-// builds the project and .xap in debug mode
-function build_xap_debug(path) {
- Log("Building Cordova-WP8 Project:");
- Log("\tConfiguration : Debug");
- Log("\tDirectory : " + path);
-
- wscript_shell.CurrentDirectory = path;
- exec_verbose('msbuild CordovaSolution.sln /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Debug');
-
- // check if file xap was created
- if (fso.FolderExists(path + '\\Bin\\Debug')) {
- var out_folder = fso.GetFolder(path + '\\Bin\\Debug');
- var out_files = new Enumerator(out_folder.Files);
- for (;!out_files.atEnd(); out_files.moveNext()) {
- if (fso.GetExtensionName(out_files.item()) == 'xap') {
- Log("BUILD SUCCESS.");
- return;
- }
- }
- }
- Log('ERROR: MSBuild failed to create .xap when building cordova-wp8.', true);
- WScript.Quit(1);
-}
-
-
-Log("");
-
-if (args.Count() > 0) {
- // support help flags
- if (args(0) == "--help" || args(0) == "/?" ||
- args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
- Usage();
- WScript.Quit(1);
- }
- else if (args.Count() > 1) {
- Log("Error: Too many arguments.", true);
- Usage();
- WScript.Quit(1);
- }
- else if (fso.FolderExists(ROOT)) {
- if (!is_cordova_project(ROOT)) {
- Log('Error: .csproj file not found in ' + ROOT, true);
- Log('could not build project.', true);
- WScript.Quit(1);
- }
-
- if (args(0) == "--debug" || args(0) == "-d") {
- exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\clean');
- build_xap_debug(ROOT);
- }
- else if (args(0) == "--release" || args(0) == "-r") {
- exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\clean');
- build_xap_release(ROOT);
- }
- else {
- Log("Error: \"" + arg(0) + "\" is not recognized as a build option", true);
- Usage();
- WScript.Quit(1);
- }
- }
- else {
- Log("Error: Project directory not found,", true);
- Usage();
- WScript.Quit(1);
- }
-}
-else {
- Log("WARNING: [ --debug | --release ] not specified, defaulting to debug...");
- build_xap_debug(ROOT);
-}
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/clean.js
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/clean.js b/framework/cordova/lib/clean.js
deleted file mode 100644
index 78704a8..0000000
--- a/framework/cordova/lib/clean.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- 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.
-*/
-
-
-var fso = WScript.CreateObject('Scripting.FileSystemObject');
-var wscript_shell = WScript.CreateObject("WScript.Shell");
-var args = WScript.Arguments;
-// working dir
-var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\clean.js').join('');
-
-
-// help function
-function Usage() {
- Log("");
- Log("Usage: clean");
- Log("examples:");
- Log(" clean");
- Log(" - deletes all generated files in project");
- Log("");
-}
-
-// logs to stdout or stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-// cleans any generated files in the cordova project
-function clean_project(path) {
- if (fso.FolderExists(path + "\\obj")) {
- fso.DeleteFolder(path + "\\obj");
- }
- if (fso.FolderExists(path + "\\Bin")) {
- fso.DeleteFolder(path + "\\Bin");
- }
- //TODO: delete CordovaAppProj.csproj.user as well? Service References?
-}
-
-Log("");
-
-if (args.Count() > 0) {
- // support help flags
- if (args(0) == "--help" || args(0) == "/?" ||
- args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
- Usage();
- WScript.Quit(1);
- }
- else {
- Log("Error: \"" + arg(0) + "\" is not recognized as a clean option.", true);
- Usage();
- WScript.Quit(1);
- }
-}
-else {
- if (fso.FolderExists(ROOT)) {
- Log("Cleaning cordova project...");
- clean_project(ROOT);
- }
- else {
- Log("Error: Project directory not found,", true);
- Usage();
- WScript.Quit(1);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/deploy-device.bat
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/deploy-device.bat b/framework/cordova/lib/deploy-device.bat
deleted file mode 100644
index 90e39bf..0000000
--- a/framework/cordova/lib/deploy-device.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%deploy.js (
- cscript "%full_path%deploy.js" %* --device //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'deploy.js' in cordova/lib, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/deploy-emulator.bat
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/deploy-emulator.bat b/framework/cordova/lib/deploy-emulator.bat
deleted file mode 100644
index b4a02d5..0000000
--- a/framework/cordova/lib/deploy-emulator.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%deploy.js (
- cscript "%full_path%deploy.js" %* --emulator //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'deploy.js' in cordova/lib, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/deploy.js
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/deploy.js b/framework/cordova/lib/deploy.js
deleted file mode 100644
index 705e54f..0000000
--- a/framework/cordova/lib/deploy.js
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- 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.
-*/
-
-
-var fso = WScript.CreateObject('Scripting.FileSystemObject');
-var wscript_shell = WScript.CreateObject("WScript.Shell");
-
-var args = WScript.Arguments;
-// working dir
-var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\deploy.js').join('');
- // path to CordovaDeploy.exe
-var CORDOVA_DEPLOY_EXE = '\\cordova\\lib\\CordovaDeploy\\CordovaDeploy\\bin\\Debug\\CordovaDeploy.exe';
- // path to CordovaDeploy
-var CORDOVA_DEPLOY = '\\cordova\\lib\\CordovaDeploy';
-
-
-// help function
-function Usage() {
- Log("");
- Log("Usage: run [ --device | --emulator | --target=<id> ]");
- Log(" --device : Deploys and runs the project on the connected device.");
- Log(" --emulator : Deploys and runs the project on an emulator.");
- Log(" --target=<id> : Deploys and runs the project on the specified target.")
- Log("examples:");
- Log(" run");
- Log(" run --emulator");
- Log(" run --device");
- Log(" run --target=7988B8C3-3ADE-488d-BA3E-D052AC9DC710");
- Log("");
-}
-
-// log to stdout or stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-var ForReading = 1, ForWriting = 2, ForAppending = 8;
-var TristateUseDefault = 2, TristateTrue = 1, TristateFalse = 0;
-
-
-// executes a commmand in the shell
-function exec(command) {
- var oShell=wscript_shell.Exec(command);
- while (oShell.Status == 0) {
- WScript.sleep(100);
- }
-}
-
-// executes a commmand in the shell
-function exec_verbose(command) {
- //Log("Command: " + command);
- var oShell=wscript_shell.Exec(command);
- while (oShell.Status == 0) {
- //Wait a little bit so we're not super looping
- WScript.sleep(100);
- //Print any stdout output from the script
- if (!oShell.StdOut.AtEndOfStream) {
- var line = oShell.StdOut.ReadAll();
- Log(line);
- }
- }
- //Check to make sure our scripts did not encounter an error
- if (!oShell.StdErr.AtEndOfStream) {
- var line = oShell.StdErr.ReadAll();
- Log(line, true);
- WScript.Quit(1);
- }
-}
-
-// returns the contents of a file
-function read(filename) {
- if (fso.FileExists(filename)) {
- var f=fso.OpenTextFile(filename, 1,2);
- var s=f.ReadAll();
- f.Close();
- return s;
- }
- else {
- Log('Cannot read non-existant file : ' + filename, true);
- WScript.Quit(1);
- }
- return null;
-}
-
-// builds the CordovaDeploy.exe if it does not already exist
-function cordovaDeploy(path) {
- if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
- return;
- }
-
- Log('CordovaDeploy.exe not found, attempting to build CordovaDeploy.exe...');
-
- // build CordovaDeploy.exe
- if (fso.FolderExists(path + '\\cordova') && fso.FolderExists(path + CORDOVA_DEPLOY) &&
- fso.FileExists(path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln')) {
- // delete any previously generated files
- if (fso.FolderExists(path + CORDOVA_DEPLOY + '\\CordovaDeploy\\obj')) {
- fso.DeleteFolder(path + CORDOVA_DEPLOY + '\\CordovaDeploy\\obj');
- }
- if (fso.FolderExists(path + CORDOVA_DEPLOY + '\\CordovaDeploy\\Bin')) {
- fso.DeleteFolder(path + CORDOVA_DEPLOY + '\\CordovaDeploy\\Bin');
- }
- exec_verbose('msbuild ' + path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln');
-
- if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
- Log('CordovaDeploy.exe compiled, SUCCESS.');
- }
- else {
- Log('ERROR: MSBUILD FAILED TO COMPILE CordovaDeploy.exe', true);
- WScript.Quit(1);
- }
- }
- else {
- Log('ERROR: CordovaDeploy.sln not found, unable to compile CordovaDeploy tool.', true);
- WScript.Quit(1);
- }
-}
-
-//TODO: Output errors from CordovaDeploy so user can troubleshoot problems
-
-// builds and launches project on device
-function device(path)
-{
- cordovaDeploy(path);
- if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
- Log('Building project...');
- exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\build --debug');
- Log('Deploying to device ...');
- exec_verbose('%comspec% /c ' + path + CORDOVA_DEPLOY_EXE + ' ' + path + ' -d:0');
- }
- else
- {
- Log('Error: Failed to find CordovaDeploy.exe in ' + path, true);
- Log('DEPLOY FAILED.', true);
- WScript.Quit(1);
- }
-}
-
-// builds and launches project on emulator
-function emulator(path)
-{
- cordovaDeploy(path);
- if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
- Log('Building project...');
- exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\build --debug');
- Log('Deploying to emulator ...');
- exec_verbose('%comspec% /c ' + path + CORDOVA_DEPLOY_EXE + ' ' + path + ' -d:1');
- }
- else
- {
- Log('Error: Failed to find CordovaDeploy.exe in ' + path, true);
- Log('DEPLOY FAILED.', true);
- WScript.Quit(1);
- }
-}
-
-// builds and launches the project on the specified target
-function target(path, device_id) {
- cordovaDeploy(path);
- if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
- Log('Building project...');
- exec_verbose('%comspec% /c ' + ROOT + '\\cordova\\build --debug');
- Log('Deploying to ' + device_id + ' ...');
- var out = wscript_shell.Exec('cscript ' + path + '\\cordova\\lib\\target-list.js //nologo');
- while(out.Status == 0) {
- WScript.Sleep(100);
- }
- //Check to make sure our script did not encounter an error
- if (!out.StdErr.AtEndOfStream) {
- var line = out.StdErr.ReadAll();
- Log(line, true);
- WScript.Quit(1);
- }
- else {
- if (!out.StdOut.AtEndOfStream) {
- var line = out.StdErr.ReadAll();
- var targets = line.split('\r\n');
- Log(targets);
- for (target in targets) {
- if (targets[target].match('/' + device_id + '/')) {
- //TODO: this only gets single digit index, account for device index of 10+?
- var index = targets[target].substring(0,1);
- exec_verbose(path + CORDOVA_DEPLOY_EXE + ' ' + path + ' -d:' + index);
- return;
- }
- }
- Log('Error : target ' + device_id + ' was not found.', true);
- Log('DEPLOY FAILED.', true);
- WScript.Quit(1);
- }
- else {
- Log('Error : target-list.js Failed to find any devices', true);
- Log('DEPLOY FAILED.', true);
- WScript.Quit(1);
- }
-
- }
-
- }
- else {
- Log('Error: Failed to find CordovaDeploy.exe in ' + path, true);
- Log('DEPLOY FAILED.', true);
- WScript.Quit(1);
- }
-}
-
-
-
-Log("");
-
-if (args.Count() > 0) {
- // support help flags
- if (args(0) == "--help" || args(0) == "/?" ||
- args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
- Usage();
- WScript.Quit(1);
- }
- else if (args.Count() > 1) {
- Log('Error: Too many arguments.', true);
- Usage();
- WScript.Quit(1);
- }
- else if (fso.FolderExists(ROOT)) {
- if (args(0) == "--emulator" || args(0) == "-e") {
- emulator(ROOT);
- }
- else if (args(0) == "--device" || args(0) == "-d") {
- device(ROOT);
- }
- else if (args(0).substring(0,9) == "--target=") {
- target(ROOT, args(0).substring(9, args(0).length));
- }
- else {
- Log('Error: \"' + arg(0) + '\" is not recognized as a deploy option', true);
- Usage();
- WScript.Quit(1);
- }
- }
- else {
- Log('Error: Project directory not found,', true);
- Usage();
- WScript.Quit(1);
- }
-}
-else {
- Log('WARNING: [ --device | --emulator | --target=<id> ] not specified, defaulting to emulator...');
- emulator(ROOT);
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/list-devices.bat
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/list-devices.bat b/framework/cordova/lib/list-devices.bat
deleted file mode 100644
index bf4492b..0000000
--- a/framework/cordova/lib/list-devices.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%target-list.js (
- cscript "%full_path%target-list.js" %* --devices //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/list-emulator-images.bat
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/list-emulator-images.bat b/framework/cordova/lib/list-emulator-images.bat
deleted file mode 100644
index 3f571c7..0000000
--- a/framework/cordova/lib/list-emulator-images.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%target-list.js (
- cscript "%full_path%target-list.js" %* --emulators //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/list-started-emulators.bat
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/list-started-emulators.bat b/framework/cordova/lib/list-started-emulators.bat
deleted file mode 100644
index 93e5c5f..0000000
--- a/framework/cordova/lib/list-started-emulators.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%target-list.js (
- cscript "%full_path%target-list.js" %* --started_emulators //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'target-list.js' in cordova/lib, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/run.js
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/run.js b/framework/cordova/lib/run.js
deleted file mode 100644
index e9ed02e..0000000
--- a/framework/cordova/lib/run.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- 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.
-*/
-
-
-var fso = WScript.CreateObject('Scripting.FileSystemObject');
-var wscript_shell = WScript.CreateObject("WScript.Shell");
-
-var args = WScript.Arguments;
-// working dir
-var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\run.js').join('');
-
-
-// help function
-function Usage() {
- Log("");
- Log("Usage: run [ --target=<ID> ]");
- Log("examples:");
- Log(" run");
- Log(" run target=7988B8C3-3ADE-488d-BA3E-D052AC9DC710")
- Log("");
- Log("Flow for run command :");
- Log("0. Are there any actual devices available? (use list-devices to determine this). If so, target the first one. If no, continue.");
- Log("1. Are there any actual emulators available, i.e. started/running? (use list-started-emulators to determine this). If so, target the first one. If no, continue.");
- Log("2. Are there any emulator images available to start? (use list-emulator-images to determine this). If so, call start-emulator <id> of the first available image, wait for it to become ready, then target it. If no, continue.");
- Log("3. Fail horribly.");
-}
-
-// executes a commmand in the shell
-function exec_verbose(command) {
- //Log("Command: " + command);
- var oShell=wscript_shell.Exec(command);
- while (oShell.Status == 0) {
- //Wait a little bit so we're not super looping
- WScript.sleep(100);
- //Print any stdout output from the script
- if (!oShell.StdOut.AtEndOfStream) {
- var line = oShell.StdOut.ReadLine();
- Log(line);
- }
- }
- //Check to make sure our scripts did not encounter an error
- if (!oShell.StdErr.AtEndOfStream) {
- var line = oShell.StdErr.ReadAll();
- Log(line, true);
- WScript.Quit(1);
- }
-}
-
-// log to stdout or stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-// deploy to specified target
-function target(path, target) {
- var cmd = 'cscript ' + path + '\\cordova\\lib\\deploy.js --target=' + target;
- exec_verbose(cmd);
-}
-
-// deploy to availible device, if no device is availible, deploy to emulator.
-// TODO: implement list-devices (currenly not possible) and list-started-emulators and use device first then started emulator
-function deploy(path) {
- var cmd = 'cscript ' + path + '\\cordova\\lib\\deploy.js --emulator';
- exec_verbose(cmd);
-}
-
-
-Log("");
-
-if (args.Count() > 0) {
- // support help flags
- if (args(0) == "--help" || args(0) == "/?" ||
- args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
- Usage();
- WScript.Quit(1);
- }
- else if (args.Count() > 1) {
- Log("Error: Too many arguments.", true);
- Usage();
- WScript.Quit(1);
- }
- else if (fso.FolderExists(ROOT)) {
- if (args(0).substring(0,9) == "--target=") {
- target(ROOT, args(0));
- }
- else {
- Log("Error: \"" + arg(0) + "\" is not recognized as a run option", true);
- Usage();
- WScript.Quit(1);
- }
- }
- else {
- Log("Error: Project directory not found,", true);
- Usage();
- WScript.Quit(1);
- }
-}
-else {
- Log("WARNING: [ --target=<ID> ] not specified, using defaults...");
- deploy(ROOT);
-}
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/start-emulator.bat
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/start-emulator.bat b/framework/cordova/lib/start-emulator.bat
deleted file mode 100644
index bf38d0c..0000000
--- a/framework/cordova/lib/start-emulator.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@ECHO OFF
-ECHO Sorry, start-emulator is not availible yet for Windows Phone.>&2
-EXIT /B 1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/lib/target-list.js
----------------------------------------------------------------------
diff --git a/framework/cordova/lib/target-list.js b/framework/cordova/lib/target-list.js
deleted file mode 100644
index 6ac4379..0000000
--- a/framework/cordova/lib/target-list.js
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- 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.
-*/
-
-
-var fso = WScript.CreateObject('Scripting.FileSystemObject');
-var wscript_shell = WScript.CreateObject("WScript.Shell");
-
-var args = WScript.Arguments;
-// working dir
-var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\target-list.js').join('');
- // path to CordovaDeploy.exe
-var CORDOVA_DEPLOY_EXE = '\\cordova\\lib\\CordovaDeploy\\CordovaDeploy\\bin\\Debug\\CordovaDeploy.exe';
- // path to CordovaDeploy
-var CORDOVA_DEPLOY = '\\cordova\\lib\\CordovaDeploy';
-
-// help/usage function
-function Usage() {
- Log("");
- Log("Usage: cscript target-list.js [ --emulators | --devices | --started_emulators | --all ]");
- Log(" --emulators : List the possible target emulators availible.");
- Log(" --devices : List the possible target devices availible. *NOT IMPLEMENTED YET*");
- Log(" --started_emulators : List any started emulators availible. *NOT IMPLEMENTED YET*");
- Log(" --all : List all devices returned by CordovaDeploy.exe -devices ");
- Log("examples:");
- Log(" cscript target-list.js --emulators");
- Log(" cscript target-list.js --devices");
- Log(" cscript target-list.js --started_emulators");
- Log(" cscript target-list.js --all");
- Log("");
-}
-
-// logs messaged to stdout and stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-// executes a commmand in the shell
-function exec(command) {
- var oShell=wscript_shell.Exec(command);
- while (oShell.Status == 0) {
- //Wait a little bit so we're not super looping
- WScript.sleep(100);
- //Print output? Naa.....
- if (!oShell.StdOut.AtEndOfStream) {
- var line = oShell.StdOut.ReadAll();
- //Log(line);
- }
- }
- //Check to make sure our scripts did not encounter an error
- if (!oShell.StdErr.AtEndOfStream) {
- var line = oShell.StdErr.ReadAll();
- Log(line, true);
- WScript.Quit(1);
- }
-}
-
-// returns all possible targets generated by the CordovaDeploy tool
-function get_targets(path) {
- if (!fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
- cordovaDeploy(path);
- }
- wscript_shell.CurrentDirectory = path + CORDOVA_DEPLOY + '\\CordovaDeploy\\bin\\Debug';
- var cmd = 'CordovaDeploy -devices';
- var out = wscript_shell.Exec(cmd);
- while(out.Status == 0) {
- WScript.Sleep(100);
- }
- //Check to make sure our script did not encounter an error
- if (!out.StdErr.AtEndOfStream) {
- var line = out.StdErr.ReadAll();
- Log(line, true);
- WScript.Quit(1);
- }
- else {
- if (!out.StdOut.AtEndOfStream) {
- var line = out.StdErr.ReadAll();
- var targets = line.split('\r\n');
- Log(targets);
- }
- else {
- Log('Error : CordovaDeploy Failed to find any devices', true);
- WScript.Quit(1);
- }
- }
-}
-
-// builds the project and .xap in release mode
-function list_devices(path) {
- //get_targets(path);
- Log('ERROR : list-devices is not supported on Windows Phone.', true);
- WScript.Quit(1);
-}
-
-function list_started_emulators(path) {
- Log('ERROR : list-started-emulators is not supported on Windows Phone.', true);
- WScript.Quit(1);
-}
-
-// builds the project and .xap in release mode
-function list_emulator_images(path) {
- Log('ERROR : list-emulator-images is not supported on Windows Phone.', true);
- WScript.Quit(1);
-}
-
-// builds the CordovaDeploy.exe if it does not already exist
-function cordovaDeploy(path) {
- if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
- return;
- }
-
- // build CordovaDeploy.exe
- if (fso.FolderExists(path + '\\cordova') && fso.FolderExists(path + CORDOVA_DEPLOY) &&
- fso.FileExists(path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln')) {
- // delete any previously generated files
- if (fso.FolderExists(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\obj")) {
- fso.DeleteFolder(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\obj");
- }
- if (fso.FolderExists(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\Bin")) {
- fso.DeleteFolder(path + CORDOVA_DEPLOY + "\\CordovaDeploy\\Bin");
- }
- exec('msbuild ' + path + CORDOVA_DEPLOY + '\\CordovaDeploy.sln');
-
- if (fso.FileExists(path + CORDOVA_DEPLOY_EXE)) {
- return;
- }
- else {
- Log("ERROR: MSBUILD FAILED TO COMPILE CordovaDeploy.exe", true);
- WScript.Quit(1);
- }
- }
- else {
- Log("ERROR: CordovaDeploy.sln not found, unable to compile CordovaDeploy tool.", true);
- WScript.Quit(1);
- }
-}
-
-Log("");
-
-if (args.Count() > 0) {
- // support help flags
- if (args(0) == "--help" || args(0) == "/?" ||
- args(0) == "help" || args(0) == "-help" || args(0) == "/help") {
- Usage();
- WScript.Quit(1);
- }
- else if (args.Count() > 1) {
- Log("Error: Too many arguments.", true);
- Usage();
- WScript.Quit(1);
- }
- else if (fso.FolderExists(ROOT)) {
- if (!fso.FolderExists(ROOT + '\\cordova')) {
- Log("Error: cordova tooling folder not found in project directory,", true);
- Log("could not lsit targets.", true);
- WScript.Quit(1);
- }
-
- if (args(0) == "--emulators" || args(0) == "-e") {
- list_emulator_images(ROOT);
- }
- else if (args(0) == "--devices" || args(0) == "-d") {
- list_devices(ROOT);
- }
- else if (args(0) == "--started_emulators" || args(0) == "-s") {
- list_started_emulators(ROOT);
- }
- else if (args(0) == "--started_emulators" || args(0) == "-s") {
- get_targets(ROOT);
- }
- else {
- Log("Error: \"" + arg(1) + "\" is not recognized as a target-list option", true);
- Usage();
- WScript.Quit(1);
- }
- }
- else {
- Log("Error: Project directory not found,", true);
- Usage();
- WScript.Quit(1);
- }
-}
-else {
- Log("WARNING: target list not specified, showing all targets...");
- get_targets(args(0));
-}
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/log.bat
----------------------------------------------------------------------
diff --git a/framework/cordova/log.bat b/framework/cordova/log.bat
deleted file mode 100644
index a491724..0000000
--- a/framework/cordova/log.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%lib\log.js (
- cscript "%full_path%lib\log.js" %* //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'log.js' in cordova/lib, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/framework/cordova/run.bat
----------------------------------------------------------------------
diff --git a/framework/cordova/run.bat b/framework/cordova/run.bat
deleted file mode 100644
index daf077b..0000000
--- a/framework/cordova/run.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%lib\deploy.js (
- cscript "%full_path%lib\run.js" %* //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'run.js' in cordova/lib, aborting...>&2
- EXIT /B 1
-)
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/build.bat
----------------------------------------------------------------------
diff --git a/tooling/cordova/build.bat b/tooling/cordova/build.bat
new file mode 100644
index 0000000..b48598a
--- /dev/null
+++ b/tooling/cordova/build.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET full_path=%~dp0
+IF EXIST %full_path%lib\build.js (
+ cscript "%full_path%lib\build.js" %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'build.js' in cordova/lib, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/clean.bat
----------------------------------------------------------------------
diff --git a/tooling/cordova/clean.bat b/tooling/cordova/clean.bat
new file mode 100644
index 0000000..1bafe1b
--- /dev/null
+++ b/tooling/cordova/clean.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET full_path=%~dp0
+IF EXIST %full_path%lib\clean.js (
+ cscript "%full_path%lib\clean.js" %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'clean.js' in cordova/lib, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/CordovaDeploy/CordovaDeploy.sln
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/CordovaDeploy/CordovaDeploy.sln b/tooling/cordova/lib/CordovaDeploy/CordovaDeploy.sln
new file mode 100644
index 0000000..3305276
--- /dev/null
+++ b/tooling/cordova/lib/CordovaDeploy/CordovaDeploy.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CordovaDeploy", "CordovaDeploy\CordovaDeploy.csproj", "{E752165B-AF59-4FF0-8601-A2A69FE09E0E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x86 = Debug|x86
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E752165B-AF59-4FF0-8601-A2A69FE09E0E}.Debug|x86.ActiveCfg = Debug|x86
+ {E752165B-AF59-4FF0-8601-A2A69FE09E0E}.Debug|x86.Build.0 = Debug|x86
+ {E752165B-AF59-4FF0-8601-A2A69FE09E0E}.Release|x86.ActiveCfg = Release|x86
+ {E752165B-AF59-4FF0-8601-A2A69FE09E0E}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1443cc11/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/CordovaDeploy.csproj
----------------------------------------------------------------------
diff --git a/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/CordovaDeploy.csproj b/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/CordovaDeploy.csproj
new file mode 100644
index 0000000..a52b532
--- /dev/null
+++ b/tooling/cordova/lib/CordovaDeploy/CordovaDeploy/CordovaDeploy.csproj
@@ -0,0 +1,96 @@
+<?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)' == '' ">x86</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{E752165B-AF59-4FF0-8601-A2A69FE09E0E}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>CordovaDeploy</RootNamespace>
+ <AssemblyName>CordovaDeploy</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <TargetFrameworkProfile>
+ </TargetFrameworkProfile>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup>
+ <StartupObject>CordovaDeploy.DeployTool</StartupObject>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.Smartdevice.Connectivity, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SmartDevice.Connectivity\v4.0_11.0.0.0__b03f5f7f11d50a3a\Microsoft.Smartdevice.Connectivity.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Smartdevice.Connectivity.Interface, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SmartDevice.Connectivity.Interface\v4.0_11.0.0.0__b03f5f7f11d50a3a\Microsoft.Smartdevice.Connectivity.Interface.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Smartdevice.MultiTargeting.Connectivity, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SmartDevice.MultiTargeting.Connectivity\v4.0_11.0.0.0__b03f5f7f11d50a3a\Microsoft.Smartdevice.MultiTargeting.Connectivity.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.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>
+ -->
+</Project>
\ No newline at end of file