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/06/07 00:27:00 UTC
[03/19] git commit: adding back the temp key, nothing works without it,
requires more research
adding back the temp key, nothing works without it, requires more research
Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/25ec0281
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/25ec0281
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/25ec0281
Branch: refs/heads/master
Commit: 25ec02816cfbaf586ee94368fd84b2c30263d027
Parents: 0bb8933
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri May 31 16:01:24 2013 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Fri May 31 16:01:24 2013 -0700
----------------------------------------------------------------------
windows8/bin/create.js | 12 +++++++++---
windows8/template/CordovaApp_TemporaryKey.pfx | Bin 0 -> 2504 bytes
2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/25ec0281/windows8/bin/create.js
----------------------------------------------------------------------
diff --git a/windows8/bin/create.js b/windows8/bin/create.js
index 5c7d8c5..4604ed0 100644
--- a/windows8/bin/create.js
+++ b/windows8/bin/create.js
@@ -138,6 +138,8 @@ function create(destPath, namespace, name, guid) {
Log("\tNamespace : " + namespace);
Log("\tPath : " + destPath);
+ var safeProjectName = name.replace(/(\.\s|\s\.|\s+|\.+)/g, '_');
+
var srcPath = ROOT + CREATE_TEMPLATE;
// Copy the template source files to the new destination
@@ -145,11 +147,13 @@ function create(destPath, namespace, name, guid) {
var newProjGuid = guid || genGuid();
// replace the guid in the AppManifest
- //replaceInFile(srcPath + "\\Properties\\WMAppManifest.xml","$guid1$",newProjGuid);
+ replaceInFile(destPath + "\\package.appxmanifest","$guid1$",newProjGuid);
// replace safe-project-name in AppManifest
- //replaceInFile(srcPath + "\\Properties\\WMAppManifest.xml",/\$safeprojectname\$/g,name);
- //replaceInFile(srcPath + "\\Properties\\WMAppManifest.xml",/\$projectname\$/g,name);
+ replaceInFile(destPath + "\\package.appxmanifest",/\$safeprojectname\$/g,safeProjectName);
+ replaceInFile(destPath + "\\package.appxmanifest",/\$projectname\$/g,name);
+
+ replaceInFile(destPath + "\\cordova\\lib\\deploy.js","$guid1$",newProjGuid);
// replaceInFile(srcPath + "\\App.xaml",/\$safeprojectname\$/g,namespace);
// replaceInFile(srcPath + "\\App.xaml.cs",/\$safeprojectname\$/g,namespace);
@@ -173,12 +177,14 @@ function create(destPath, namespace, name, guid) {
delete_if_exists(destPath + "\\bin");
delete_if_exists(destPath + "\\*.user");
delete_if_exists(destPath + "\\*.suo");
+ delete_if_exists(destPath + "\\*.vstemplate");
// TODO: Name the project according to the arguments
// update the solution to include the new project by name
// version BS
// index.html title set to project name ?
+ Log("Project created");
}
if (args.Count() > 0) {
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/25ec0281/windows8/template/CordovaApp_TemporaryKey.pfx
----------------------------------------------------------------------
diff --git a/windows8/template/CordovaApp_TemporaryKey.pfx b/windows8/template/CordovaApp_TemporaryKey.pfx
new file mode 100644
index 0000000..4df1e37
Binary files /dev/null and b/windows8/template/CordovaApp_TemporaryKey.pfx differ