Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Adds support for chip architectures to run command
  • Loading branch information
Vladimir Kotikov committed Jun 19, 2014
1 parent 0c5f0e3 commit 91811549d82c035d924838da860d05f3abc5903d
Showing 3 changed files with 180 additions and 116 deletions.
@@ -131,8 +131,8 @@ static void Main(string[] args)
string iconFilePath = "";
string xapFilePath = "";
Guid appID = Guid.Empty;
bool uninstallFirst = false;
bool awaitAppClose = false;
bool uninstallFirst = args.Contains("-uninstall");
bool awaitAppClose = args.Contains("-wait");

string root = Directory.GetCurrentDirectory();

@@ -153,20 +153,37 @@ static void Main(string[] args)
deviceIndex = int.Parse(args[1].Substring(3));
}

if (args.Contains("-uninstall"))
if (Directory.Exists(args[0]))
{
uninstallFirst = true;
}
var info = new DirectoryInfo(args[0]);
root = info.FullName;

if (args.Contains("-wait"))
{
awaitAppClose = true;
try
{
xapFilePath = Directory.GetFiles(root + @"\Bin\Debug", "*.xap").FirstOrDefault();
}
catch (DirectoryNotFoundException)
{
try
{
xapFilePath = Directory.GetFiles(root + @"\Bin\Release", "*.xap").FirstOrDefault();
}
catch (DirectoryNotFoundException)
{
Log(string.Format("Error: could not find project build directoy in {0}", root), true);
Log("make sure your app has been successfully built before deploying.", true);
}
}
}

if (Directory.Exists(args[0]))
if (File.Exists(args[0]))
{
DirectoryInfo info = new DirectoryInfo(args[0]);
root = info.FullName;
var info = new FileInfo(args[0]);
if (info.Extension == ".xap")
{
root = info.DirectoryName;
xapFilePath = info.FullName;
}
}

appID = ReadAppId(root);
@@ -186,23 +203,6 @@ static void Main(string[] args)
return;
}

try
{
xapFilePath = Directory.GetFiles(root + @"\Bin\Debug", "*.xap").FirstOrDefault();
}
catch (DirectoryNotFoundException)
{
try
{
xapFilePath = Directory.GetFiles(root + @"\Bin\Release", "*.xap").FirstOrDefault();
}
catch (DirectoryNotFoundException)
{
Log(string.Format("Error: could not find project build directoy in {0}", root), true);
Log("make sure your app has been successfully built before deploying.", true);
}
}

if (string.IsNullOrEmpty(xapFilePath))
{
Log(string.Format("Error: could not find application .xap in folder {0}", root), true);
@@ -173,7 +173,10 @@ function build_xap(path, buildtype, buildarchs) {
Log("\tMSBuildToolsPath: " + MSBuildToolsPath);

for (var i = 0; i < buildarchs.length; i++) {
var buildarch = buildarchs[i];

var buildarch = buildarchs[i].toLowerCase();
// support for "any cpu" specified with or without space
buildarch = buildarch !== "anycpu" ? buildarch : "any cpu";

Log("Building Cordova-WP8 Project:");
Log("\tConfiguration : " + buildtype);

0 comments on commit 9181154

Please sign in to comment.