cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bennma...@apache.org
Subject [16/21] wp7 commit: Fixed ambiguous build error
Date Sat, 25 May 2013 00:15:38 GMT
Fixed ambiguous build error


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

Branch: refs/heads/3.0.0
Commit: 8d0ae979360f89b8fdc60d2b50b8d24993ed0f9f
Parents: 03eb9b7
Author: Benn Mapes <benn.mapes@gmail.com>
Authored: Fri May 24 16:04:03 2013 -0700
Committer: Benn Mapes <benn.mapes@gmail.com>
Committed: Fri May 24 16:06:51 2013 -0700

----------------------------------------------------------------------
 templates/standalone/cordova/lib/build.js |   25 ++++++++++++++++++-----
 1 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/8d0ae979/templates/standalone/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/templates/standalone/cordova/lib/build.js b/templates/standalone/cordova/lib/build.js
index 9986a7e..1375c54 100644
--- a/templates/standalone/cordova/lib/build.js
+++ b/templates/standalone/cordova/lib/build.js
@@ -85,14 +85,27 @@ function is_cordova_project(path) {
     return false;
 }
 
+function get_solution_name(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()) == 'sln') {
+                return proj_files.item();
+            }
+        }
+    }
+    return null;
+}
+
 // builds the project and .xap in release mode
 function build_xap_release(path) {
-    Log("Building Cordova-WP8 Project:");
+    Log("Building Cordova-WP7 Project:");
     Log("\tConfiguration : Release");
     Log("\tDirectory : " + path);
     
     wscript_shell.CurrentDirectory = path;
-    exec_verbose('msbuild /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
/p:Configuration=Release');
+    exec_verbose('msbuild ' + get_solution_name(path) + ' /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Release');
     
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Release')) {
@@ -105,18 +118,18 @@ function build_xap_release(path) {
             }
         }
     }
-    Log('ERROR: MSBuild failed to create .xap when building cordova-wp8 for release.', true);
+    Log('ERROR: MSBuild failed to create .xap when building cordova-wp7 for release.', true);
     WScript.Quit(2);
 }
 
 // builds the project and .xap in debug mode
 function build_xap_debug(path) {
-    Log("Building Cordova-WP8 Project:");
+    Log("Building Cordova-WP7 Project:");
     Log("\tConfiguration : Debug");
     Log("\tDirectory : " + path);
     
     wscript_shell.CurrentDirectory = path;
-    exec_verbose('msbuild /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
/p:Configuration=Debug');
+    exec_verbose('msbuild ' + get_solution_name(path) + ' /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Debug');
     
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Debug')) {
@@ -129,7 +142,7 @@ function build_xap_debug(path) {
             }
         }
     }
-    Log('ERROR: MSBuild failed to create .xap when building cordova-wp8 for debugging.',
true);
+    Log('ERROR: MSBuild failed to create .xap when building cordova-wp7 for debugging.',
true);
     WScript.Quit(2);
 }
 


Mime
View raw message