cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [1/2] git commit: rename project and solution on create
Date Tue, 16 Apr 2013 23:55:18 GMT
Updated Branches:
  refs/heads/master e9e450c62 -> a04e8bf9e


rename project and solution on create


Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/34ae6218
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/34ae6218
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/34ae6218

Branch: refs/heads/master
Commit: 34ae62184ef27ea8982f77f61e1e924a0669a24e
Parents: e9e450c
Author: Benn Mapes <benn.mapes@gmail.com>
Authored: Tue Apr 16 12:08:00 2013 -0700
Committer: Benn Mapes <benn.mapes@gmail.com>
Committed: Tue Apr 16 16:05:45 2013 -0700

----------------------------------------------------------------------
 bin/create.js                             |   12 ++++++++----
 templates/standalone/cordova/lib/build.js |    4 ++--
 2 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/34ae6218/bin/create.js
----------------------------------------------------------------------
diff --git a/bin/create.js b/bin/create.js
index 9da4756..a7694cf 100644
--- a/bin/create.js
+++ b/bin/create.js
@@ -38,11 +38,9 @@ var args = WScript.Arguments,
     TEMPLATES_PATH = '\\templates',
     // sub folder for standalone project
     STANDALONE_PATH = TEMPLATES_PATH + '\\standalone',
-    // sub folder for full project
-    FULL_PATH = TEMPLATES_PATH + '\\full',
-    CUSTOM_PATH = TEMPLATES_PATH + '\\custom',
     // default template to use when creating the project
     CREATE_TEMPLATE = STANDALONE_PATH,
+    USE_DLL = false,
     PROJECT_PATH, 
     PACKAGE, 
     NAME;
@@ -173,9 +171,15 @@ function create(path, namespace, name) {
     replaceInFile(path + "\\MainPage.xaml",/\$safeprojectname\$/g,namespace);
     replaceInFile(path + "\\MainPage.xaml.cs",/\$safeprojectname\$/g,namespace);
     replaceInFile(path + "\\CordovaAppProj.csproj",/\$safeprojectname\$/g,namespace);
+    if (NAME != "CordovaAppProj") {
+        replaceInFile(path + "\\CordovaSolution.sln",/CordovaAppProj/g,NAME);
+        // rename project and solution
+        exec('%comspec% /c ren ' + path + "\\CordovaSolution.sln " + NAME + '.sln');
+        exec('%comspec% /c ren ' + path + "\\CordovaAppProj.csproj " + NAME + '.csproj');
+    }
 
     //copy .dll if necessary
-    if (CREATE_TEMPLATE == FULL_PATH || CREATE_TEMPLATE == CUSTOM_PATH) {
+    if (USE_DLL) {
         var dllPath = ROOT + FRAMEWORK_PATH + '\\Bin\\Release\\WPCordovaClassLib.dll';
         if (fso.FileExists(dllPath)) {
             Log("WPCordovaClassLib.dll Found,  creating project");

http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/34ae6218/templates/standalone/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/templates/standalone/cordova/lib/build.js b/templates/standalone/cordova/lib/build.js
index 948fca7..9986a7e 100644
--- a/templates/standalone/cordova/lib/build.js
+++ b/templates/standalone/cordova/lib/build.js
@@ -92,7 +92,7 @@ function build_xap_release(path) {
     Log("\tDirectory : " + path);
     
     wscript_shell.CurrentDirectory = path;
-    exec_verbose('msbuild CordovaSolution.sln /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Release');
+    exec_verbose('msbuild /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
/p:Configuration=Release');
     
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Release')) {
@@ -116,7 +116,7 @@ function build_xap_debug(path) {
     Log("\tDirectory : " + path);
     
     wscript_shell.CurrentDirectory = path;
-    exec_verbose('msbuild CordovaSolution.sln /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal
/nologo /p:Configuration=Debug');
+    exec_verbose('msbuild /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
/p:Configuration=Debug');
     
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Debug')) {


Mime
View raw message