You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ti...@apache.org on 2013/10/28 23:54:32 UTC
[1/3] git commit: CB-4872 changed version script file location to
right spot and modified sdk version output
Updated Branches:
refs/heads/master 7c88c66ad -> 5db89fb6c
CB-4872 changed version script file location to right spot and modified sdk version output
Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/5db89fb6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/5db89fb6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/5db89fb6
Branch: refs/heads/master
Commit: 5db89fb6cefff56c95b90b328f78affba24d8e51
Parents: b90d1d4
Author: timkim <ti...@adobe.com>
Authored: Mon Oct 28 15:37:28 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Mon Oct 28 15:54:17 2013 -0700
----------------------------------------------------------------------
wp7/bin/win_os_edition.bat | 9 ---
wp7/bin/win_os_edition.js | 36 -----------
wp7/bin/win_os_version.bat | 9 ---
wp7/bin/win_os_version.js | 36 -----------
wp7/bin/win_sdk_version.bat | 9 ---
wp7/bin/win_sdk_version.js | 79 ------------------------
wp7/template/cordova/lib/win_os_version.js | 36 +++++++++++
wp7/template/cordova/lib/win_sdk_version.js | 79 ++++++++++++++++++++++++
wp7/template/cordova/win_os_version.bat | 9 +++
wp7/template/cordova/win_sdk_version.bat | 9 +++
wp8/bin/win_os_edition.bat | 9 ---
wp8/bin/win_os_edition.js | 36 -----------
wp8/bin/win_os_version.bat | 9 ---
wp8/bin/win_os_version.js | 36 -----------
wp8/bin/win_sdk_version.bat | 9 ---
wp8/bin/win_sdk_version.js | 79 ------------------------
wp8/template/cordova/lib/win_os_version.js | 36 +++++++++++
wp8/template/cordova/lib/win_sdk_version.js | 79 ++++++++++++++++++++++++
wp8/template/cordova/win_os_version.bat | 9 +++
wp8/template/cordova/win_sdk_version.bat | 9 +++
20 files changed, 266 insertions(+), 356 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp7/bin/win_os_edition.bat
----------------------------------------------------------------------
diff --git a/wp7/bin/win_os_edition.bat b/wp7/bin/win_os_edition.bat
deleted file mode 100644
index 006fb63..0000000
--- a/wp7/bin/win_os_edition.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET script_path="%~dp0win_os_edition.js"
-IF EXIST %script_path% (
- cscript %script_path% %* //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'win_os_edition.js' in 'bin' folder, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp7/bin/win_os_edition.js
----------------------------------------------------------------------
diff --git a/wp7/bin/win_os_edition.js b/wp7/bin/win_os_edition.js
deleted file mode 100644
index f9c52a8..0000000
--- a/wp7/bin/win_os_edition.js
+++ /dev/null
@@ -1,36 +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 wscript_shell = WScript.CreateObject("WScript.Shell");
-
-// log to stdout or stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-function getWindowsVersion() {
- var version = wscript_shell.RegRead("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\EditionID");
- Log(version);
-}
-getWindowsVersion();
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp7/bin/win_os_version.bat
----------------------------------------------------------------------
diff --git a/wp7/bin/win_os_version.bat b/wp7/bin/win_os_version.bat
deleted file mode 100644
index 3a9e545..0000000
--- a/wp7/bin/win_os_version.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET script_path="%~dp0win_os_version.js"
-IF EXIST %script_path% (
- cscript %script_path% %* //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'win_os_version.js' in 'bin' folder, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp7/bin/win_os_version.js
----------------------------------------------------------------------
diff --git a/wp7/bin/win_os_version.js b/wp7/bin/win_os_version.js
deleted file mode 100644
index 4137dae..0000000
--- a/wp7/bin/win_os_version.js
+++ /dev/null
@@ -1,36 +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 wscript_shell = WScript.CreateObject("WScript.Shell");
-
-// log to stdout or stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-function getWindowsVersion() {
- var version = wscript_shell.RegRead("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\CurrentVersion");
- Log(version);
-}
-getWindowsVersion();
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp7/bin/win_sdk_version.bat
----------------------------------------------------------------------
diff --git a/wp7/bin/win_sdk_version.bat b/wp7/bin/win_sdk_version.bat
deleted file mode 100644
index 1b132b0..0000000
--- a/wp7/bin/win_sdk_version.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET script_path="%~dp0win_sdk_version.js"
-IF EXIST %script_path% (
- cscript %script_path% %* //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'win_sdk_version.js' in 'bin' folder, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp7/bin/win_sdk_version.js
----------------------------------------------------------------------
diff --git a/wp7/bin/win_sdk_version.js b/wp7/bin/win_sdk_version.js
deleted file mode 100644
index 5aea627..0000000
--- a/wp7/bin/win_sdk_version.js
+++ /dev/null
@@ -1,79 +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 wscript_shell = WScript.CreateObject("WScript.Shell");
-
-// log to stdout or stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-// gets the output from a command, failing with the given error message
-function check_command(cmd, fail_msg) {
- try {
- var out = wscript_shell.Exec(cmd);
- } catch(exception) {
- Log(fail_msg, true);
- WScript.Quit(1);
- }
- while (out.Status == 0) {
- WScript.Sleep(100);
- }
-
- //Check that command executed
- if (!out.StdErr.AtEndOfStream) {
- var line = out.StdErr.ReadLine();
- Log(fail_msg, true);
- Log('Output : ' + line, true);
- WScript.Quit(1);
- }
-
- if (!out.StdOut.AtEndOfStream) {
- var line = out.StdOut.ReadAll();
- return line;
- }
- else {
- Log('Unable to get output from command "' + cmd + '"', true);
- WScript.Quit(1);
- }
-}
-
-// Returns the sdk version of the .Net Framework
-function getSdkVersion() {
- var cmd = 'msbuild -version'
- var fail_msg = 'The command `msbuild` failed. Make sure you have the latest Windows Phone SDKs installed, AND have the latest .NET framework added to your path (i.e C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319).'
- var output = check_command(cmd, fail_msg);
- var msversion = '';
- var msversion_reg = /\.NET\sFramework\,\sversion\s\d+\.\d+\.\d+\.\d+/g;
- if(msversion_reg.test(output)){
- msversion = output.match(msversion_reg)[0].match(/\d+\.\d+\.\d+\.\d+/g);
- Log(msversion);
- }else {
- Log('Unable to get the .NET Framework version.',true);
- Log('Make sure the "msbuild" command is in your path', true);
- WScript.Quit(1);
- }
-}
-
-getSdkVersion();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp7/template/cordova/lib/win_os_version.js
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/lib/win_os_version.js b/wp7/template/cordova/lib/win_os_version.js
new file mode 100644
index 0000000..4137dae
--- /dev/null
+++ b/wp7/template/cordova/lib/win_os_version.js
@@ -0,0 +1,36 @@
+/*
+ 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 wscript_shell = WScript.CreateObject("WScript.Shell");
+
+// log to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+function getWindowsVersion() {
+ var version = wscript_shell.RegRead("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\CurrentVersion");
+ Log(version);
+}
+getWindowsVersion();
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp7/template/cordova/lib/win_sdk_version.js
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/lib/win_sdk_version.js b/wp7/template/cordova/lib/win_sdk_version.js
new file mode 100644
index 0000000..734ba4e
--- /dev/null
+++ b/wp7/template/cordova/lib/win_sdk_version.js
@@ -0,0 +1,79 @@
+/*
+ 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 wscript_shell = WScript.CreateObject("WScript.Shell");
+
+// log to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+// gets the output from a command, failing with the given error message
+function check_command(cmd, fail_msg) {
+ try {
+ var out = wscript_shell.Exec(cmd);
+ } catch(exception) {
+ Log(fail_msg, true);
+ WScript.Quit(1);
+ }
+ while (out.Status == 0) {
+ WScript.Sleep(100);
+ }
+
+ //Check that command executed
+ if (!out.StdErr.AtEndOfStream) {
+ var line = out.StdErr.ReadLine();
+ Log(fail_msg, true);
+ Log('Output : ' + line, true);
+ WScript.Quit(1);
+ }
+
+ if (!out.StdOut.AtEndOfStream) {
+ var line = out.StdOut.ReadAll();
+ return line;
+ }
+ else {
+ Log('Unable to get output from command "' + cmd + '"', true);
+ WScript.Quit(1);
+ }
+}
+
+// Returns the sdk version of the .Net Framework
+function getSdkVersion() {
+ var cmd = 'msbuild -version'
+ var fail_msg = 'The command `msbuild` failed. Make sure you have the latest Windows Phone SDKs installed, AND have the latest .NET framework added to your path (i.e C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319).'
+ var output = check_command(cmd, fail_msg);
+ var msversion = '';
+ var msversion_reg = /\.NET\sFramework\,\sversion\s\d+\.\d+\.\d+/g;
+ if(msversion_reg.test(output)){
+ msversion = output.match(msversion_reg)[0].match(/\d+\.\d+\.\d+/g);
+ Log(msversion);
+ }else {
+ Log('Unable to get the .NET Framework version.',true);
+ Log('Make sure the "msbuild" command is in your path', true);
+ WScript.Quit(1);
+ }
+}
+
+getSdkVersion();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp7/template/cordova/win_os_version.bat
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/win_os_version.bat b/wp7/template/cordova/win_os_version.bat
new file mode 100644
index 0000000..ebd5ca8
--- /dev/null
+++ b/wp7/template/cordova/win_os_version.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET script_path="%~dp0lib\win_os_version.js"
+IF EXIST %script_path% (
+ cscript %script_path% %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'win_os_version.js' in 'bin' folder, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp7/template/cordova/win_sdk_version.bat
----------------------------------------------------------------------
diff --git a/wp7/template/cordova/win_sdk_version.bat b/wp7/template/cordova/win_sdk_version.bat
new file mode 100644
index 0000000..02c7f0e
--- /dev/null
+++ b/wp7/template/cordova/win_sdk_version.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET script_path="%~dp0lib\win_sdk_version.js"
+IF EXIST %script_path% (
+ cscript %script_path% %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'win_sdk_version.js' in 'bin' folder, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp8/bin/win_os_edition.bat
----------------------------------------------------------------------
diff --git a/wp8/bin/win_os_edition.bat b/wp8/bin/win_os_edition.bat
deleted file mode 100644
index 006fb63..0000000
--- a/wp8/bin/win_os_edition.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET script_path="%~dp0win_os_edition.js"
-IF EXIST %script_path% (
- cscript %script_path% %* //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'win_os_edition.js' in 'bin' folder, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp8/bin/win_os_edition.js
----------------------------------------------------------------------
diff --git a/wp8/bin/win_os_edition.js b/wp8/bin/win_os_edition.js
deleted file mode 100644
index f9c52a8..0000000
--- a/wp8/bin/win_os_edition.js
+++ /dev/null
@@ -1,36 +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 wscript_shell = WScript.CreateObject("WScript.Shell");
-
-// log to stdout or stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-function getWindowsVersion() {
- var version = wscript_shell.RegRead("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\EditionID");
- Log(version);
-}
-getWindowsVersion();
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp8/bin/win_os_version.bat
----------------------------------------------------------------------
diff --git a/wp8/bin/win_os_version.bat b/wp8/bin/win_os_version.bat
deleted file mode 100644
index 3a9e545..0000000
--- a/wp8/bin/win_os_version.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET script_path="%~dp0win_os_version.js"
-IF EXIST %script_path% (
- cscript %script_path% %* //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'win_os_version.js' in 'bin' folder, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp8/bin/win_os_version.js
----------------------------------------------------------------------
diff --git a/wp8/bin/win_os_version.js b/wp8/bin/win_os_version.js
deleted file mode 100644
index 4137dae..0000000
--- a/wp8/bin/win_os_version.js
+++ /dev/null
@@ -1,36 +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 wscript_shell = WScript.CreateObject("WScript.Shell");
-
-// log to stdout or stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-function getWindowsVersion() {
- var version = wscript_shell.RegRead("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\CurrentVersion");
- Log(version);
-}
-getWindowsVersion();
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp8/bin/win_sdk_version.bat
----------------------------------------------------------------------
diff --git a/wp8/bin/win_sdk_version.bat b/wp8/bin/win_sdk_version.bat
deleted file mode 100644
index 1b132b0..0000000
--- a/wp8/bin/win_sdk_version.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET script_path="%~dp0win_sdk_version.js"
-IF EXIST %script_path% (
- cscript %script_path% %* //nologo
-) ELSE (
- ECHO.
- ECHO ERROR: Could not find 'win_sdk_version.js' in 'bin' folder, aborting...>&2
- EXIT /B 1
-)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp8/bin/win_sdk_version.js
----------------------------------------------------------------------
diff --git a/wp8/bin/win_sdk_version.js b/wp8/bin/win_sdk_version.js
deleted file mode 100644
index 5aea627..0000000
--- a/wp8/bin/win_sdk_version.js
+++ /dev/null
@@ -1,79 +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 wscript_shell = WScript.CreateObject("WScript.Shell");
-
-// log to stdout or stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-// gets the output from a command, failing with the given error message
-function check_command(cmd, fail_msg) {
- try {
- var out = wscript_shell.Exec(cmd);
- } catch(exception) {
- Log(fail_msg, true);
- WScript.Quit(1);
- }
- while (out.Status == 0) {
- WScript.Sleep(100);
- }
-
- //Check that command executed
- if (!out.StdErr.AtEndOfStream) {
- var line = out.StdErr.ReadLine();
- Log(fail_msg, true);
- Log('Output : ' + line, true);
- WScript.Quit(1);
- }
-
- if (!out.StdOut.AtEndOfStream) {
- var line = out.StdOut.ReadAll();
- return line;
- }
- else {
- Log('Unable to get output from command "' + cmd + '"', true);
- WScript.Quit(1);
- }
-}
-
-// Returns the sdk version of the .Net Framework
-function getSdkVersion() {
- var cmd = 'msbuild -version'
- var fail_msg = 'The command `msbuild` failed. Make sure you have the latest Windows Phone SDKs installed, AND have the latest .NET framework added to your path (i.e C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319).'
- var output = check_command(cmd, fail_msg);
- var msversion = '';
- var msversion_reg = /\.NET\sFramework\,\sversion\s\d+\.\d+\.\d+\.\d+/g;
- if(msversion_reg.test(output)){
- msversion = output.match(msversion_reg)[0].match(/\d+\.\d+\.\d+\.\d+/g);
- Log(msversion);
- }else {
- Log('Unable to get the .NET Framework version.',true);
- Log('Make sure the "msbuild" command is in your path', true);
- WScript.Quit(1);
- }
-}
-
-getSdkVersion();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp8/template/cordova/lib/win_os_version.js
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/lib/win_os_version.js b/wp8/template/cordova/lib/win_os_version.js
new file mode 100644
index 0000000..4137dae
--- /dev/null
+++ b/wp8/template/cordova/lib/win_os_version.js
@@ -0,0 +1,36 @@
+/*
+ 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 wscript_shell = WScript.CreateObject("WScript.Shell");
+
+// log to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+function getWindowsVersion() {
+ var version = wscript_shell.RegRead("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\CurrentVersion");
+ Log(version);
+}
+getWindowsVersion();
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp8/template/cordova/lib/win_sdk_version.js
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/lib/win_sdk_version.js b/wp8/template/cordova/lib/win_sdk_version.js
new file mode 100644
index 0000000..734ba4e
--- /dev/null
+++ b/wp8/template/cordova/lib/win_sdk_version.js
@@ -0,0 +1,79 @@
+/*
+ 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 wscript_shell = WScript.CreateObject("WScript.Shell");
+
+// log to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+// gets the output from a command, failing with the given error message
+function check_command(cmd, fail_msg) {
+ try {
+ var out = wscript_shell.Exec(cmd);
+ } catch(exception) {
+ Log(fail_msg, true);
+ WScript.Quit(1);
+ }
+ while (out.Status == 0) {
+ WScript.Sleep(100);
+ }
+
+ //Check that command executed
+ if (!out.StdErr.AtEndOfStream) {
+ var line = out.StdErr.ReadLine();
+ Log(fail_msg, true);
+ Log('Output : ' + line, true);
+ WScript.Quit(1);
+ }
+
+ if (!out.StdOut.AtEndOfStream) {
+ var line = out.StdOut.ReadAll();
+ return line;
+ }
+ else {
+ Log('Unable to get output from command "' + cmd + '"', true);
+ WScript.Quit(1);
+ }
+}
+
+// Returns the sdk version of the .Net Framework
+function getSdkVersion() {
+ var cmd = 'msbuild -version'
+ var fail_msg = 'The command `msbuild` failed. Make sure you have the latest Windows Phone SDKs installed, AND have the latest .NET framework added to your path (i.e C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319).'
+ var output = check_command(cmd, fail_msg);
+ var msversion = '';
+ var msversion_reg = /\.NET\sFramework\,\sversion\s\d+\.\d+\.\d+/g;
+ if(msversion_reg.test(output)){
+ msversion = output.match(msversion_reg)[0].match(/\d+\.\d+\.\d+/g);
+ Log(msversion);
+ }else {
+ Log('Unable to get the .NET Framework version.',true);
+ Log('Make sure the "msbuild" command is in your path', true);
+ WScript.Quit(1);
+ }
+}
+
+getSdkVersion();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp8/template/cordova/win_os_version.bat
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/win_os_version.bat b/wp8/template/cordova/win_os_version.bat
new file mode 100644
index 0000000..ebd5ca8
--- /dev/null
+++ b/wp8/template/cordova/win_os_version.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET script_path="%~dp0lib\win_os_version.js"
+IF EXIST %script_path% (
+ cscript %script_path% %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'win_os_version.js' in 'bin' folder, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5db89fb6/wp8/template/cordova/win_sdk_version.bat
----------------------------------------------------------------------
diff --git a/wp8/template/cordova/win_sdk_version.bat b/wp8/template/cordova/win_sdk_version.bat
new file mode 100644
index 0000000..02c7f0e
--- /dev/null
+++ b/wp8/template/cordova/win_sdk_version.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET script_path="%~dp0lib\win_sdk_version.js"
+IF EXIST %script_path% (
+ cscript %script_path% %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'win_sdk_version.js' in 'bin' folder, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
[3/3] git commit: CB-4872: Added wp7 and wp8 sdk version
Posted by ti...@apache.org.
CB-4872: Added wp7 and wp8 sdk version
Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/5a27b243
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/5a27b243
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/5a27b243
Branch: refs/heads/master
Commit: 5a27b243867ed2c4bc17a19da795f1a1f46b206a
Parents: 7c88c66
Author: timkim <ti...@adobe.com>
Authored: Fri Oct 4 16:09:20 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Mon Oct 28 15:54:17 2013 -0700
----------------------------------------------------------------------
wp7/bin/win_sdk_version.bat | 9 +++++
wp7/bin/win_sdk_version.js | 79 ++++++++++++++++++++++++++++++++++++++++
wp8/bin/win_sdk_version.bat | 9 +++++
wp8/bin/win_sdk_version.js | 79 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 176 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5a27b243/wp7/bin/win_sdk_version.bat
----------------------------------------------------------------------
diff --git a/wp7/bin/win_sdk_version.bat b/wp7/bin/win_sdk_version.bat
new file mode 100644
index 0000000..1b132b0
--- /dev/null
+++ b/wp7/bin/win_sdk_version.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET script_path="%~dp0win_sdk_version.js"
+IF EXIST %script_path% (
+ cscript %script_path% %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'win_sdk_version.js' in 'bin' folder, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5a27b243/wp7/bin/win_sdk_version.js
----------------------------------------------------------------------
diff --git a/wp7/bin/win_sdk_version.js b/wp7/bin/win_sdk_version.js
new file mode 100644
index 0000000..5aea627
--- /dev/null
+++ b/wp7/bin/win_sdk_version.js
@@ -0,0 +1,79 @@
+/*
+ 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 wscript_shell = WScript.CreateObject("WScript.Shell");
+
+// log to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+// gets the output from a command, failing with the given error message
+function check_command(cmd, fail_msg) {
+ try {
+ var out = wscript_shell.Exec(cmd);
+ } catch(exception) {
+ Log(fail_msg, true);
+ WScript.Quit(1);
+ }
+ while (out.Status == 0) {
+ WScript.Sleep(100);
+ }
+
+ //Check that command executed
+ if (!out.StdErr.AtEndOfStream) {
+ var line = out.StdErr.ReadLine();
+ Log(fail_msg, true);
+ Log('Output : ' + line, true);
+ WScript.Quit(1);
+ }
+
+ if (!out.StdOut.AtEndOfStream) {
+ var line = out.StdOut.ReadAll();
+ return line;
+ }
+ else {
+ Log('Unable to get output from command "' + cmd + '"', true);
+ WScript.Quit(1);
+ }
+}
+
+// Returns the sdk version of the .Net Framework
+function getSdkVersion() {
+ var cmd = 'msbuild -version'
+ var fail_msg = 'The command `msbuild` failed. Make sure you have the latest Windows Phone SDKs installed, AND have the latest .NET framework added to your path (i.e C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319).'
+ var output = check_command(cmd, fail_msg);
+ var msversion = '';
+ var msversion_reg = /\.NET\sFramework\,\sversion\s\d+\.\d+\.\d+\.\d+/g;
+ if(msversion_reg.test(output)){
+ msversion = output.match(msversion_reg)[0].match(/\d+\.\d+\.\d+\.\d+/g);
+ Log(msversion);
+ }else {
+ Log('Unable to get the .NET Framework version.',true);
+ Log('Make sure the "msbuild" command is in your path', true);
+ WScript.Quit(1);
+ }
+}
+
+getSdkVersion();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5a27b243/wp8/bin/win_sdk_version.bat
----------------------------------------------------------------------
diff --git a/wp8/bin/win_sdk_version.bat b/wp8/bin/win_sdk_version.bat
new file mode 100644
index 0000000..1b132b0
--- /dev/null
+++ b/wp8/bin/win_sdk_version.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET script_path="%~dp0win_sdk_version.js"
+IF EXIST %script_path% (
+ cscript %script_path% %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'win_sdk_version.js' in 'bin' folder, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/5a27b243/wp8/bin/win_sdk_version.js
----------------------------------------------------------------------
diff --git a/wp8/bin/win_sdk_version.js b/wp8/bin/win_sdk_version.js
new file mode 100644
index 0000000..5aea627
--- /dev/null
+++ b/wp8/bin/win_sdk_version.js
@@ -0,0 +1,79 @@
+/*
+ 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 wscript_shell = WScript.CreateObject("WScript.Shell");
+
+// log to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+// gets the output from a command, failing with the given error message
+function check_command(cmd, fail_msg) {
+ try {
+ var out = wscript_shell.Exec(cmd);
+ } catch(exception) {
+ Log(fail_msg, true);
+ WScript.Quit(1);
+ }
+ while (out.Status == 0) {
+ WScript.Sleep(100);
+ }
+
+ //Check that command executed
+ if (!out.StdErr.AtEndOfStream) {
+ var line = out.StdErr.ReadLine();
+ Log(fail_msg, true);
+ Log('Output : ' + line, true);
+ WScript.Quit(1);
+ }
+
+ if (!out.StdOut.AtEndOfStream) {
+ var line = out.StdOut.ReadAll();
+ return line;
+ }
+ else {
+ Log('Unable to get output from command "' + cmd + '"', true);
+ WScript.Quit(1);
+ }
+}
+
+// Returns the sdk version of the .Net Framework
+function getSdkVersion() {
+ var cmd = 'msbuild -version'
+ var fail_msg = 'The command `msbuild` failed. Make sure you have the latest Windows Phone SDKs installed, AND have the latest .NET framework added to your path (i.e C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319).'
+ var output = check_command(cmd, fail_msg);
+ var msversion = '';
+ var msversion_reg = /\.NET\sFramework\,\sversion\s\d+\.\d+\.\d+\.\d+/g;
+ if(msversion_reg.test(output)){
+ msversion = output.match(msversion_reg)[0].match(/\d+\.\d+\.\d+\.\d+/g);
+ Log(msversion);
+ }else {
+ Log('Unable to get the .NET Framework version.',true);
+ Log('Make sure the "msbuild" command is in your path', true);
+ WScript.Quit(1);
+ }
+}
+
+getSdkVersion();
\ No newline at end of file
[2/3] git commit: CB-4872 - added os version and edition check
Posted by ti...@apache.org.
CB-4872 - added os version and edition check
Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/b90d1d49
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/b90d1d49
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/b90d1d49
Branch: refs/heads/master
Commit: b90d1d49aac32e430e3c14b548a264188e6254f4
Parents: 5a27b24
Author: timkim <ti...@adobe.com>
Authored: Thu Oct 10 13:58:32 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Mon Oct 28 15:54:17 2013 -0700
----------------------------------------------------------------------
wp7/bin/win_os_edition.bat | 9 +++++++++
wp7/bin/win_os_edition.js | 36 ++++++++++++++++++++++++++++++++++++
wp7/bin/win_os_version.bat | 9 +++++++++
wp7/bin/win_os_version.js | 36 ++++++++++++++++++++++++++++++++++++
wp8/bin/win_os_edition.bat | 9 +++++++++
wp8/bin/win_os_edition.js | 36 ++++++++++++++++++++++++++++++++++++
wp8/bin/win_os_version.bat | 9 +++++++++
wp8/bin/win_os_version.js | 36 ++++++++++++++++++++++++++++++++++++
8 files changed, 180 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/b90d1d49/wp7/bin/win_os_edition.bat
----------------------------------------------------------------------
diff --git a/wp7/bin/win_os_edition.bat b/wp7/bin/win_os_edition.bat
new file mode 100644
index 0000000..006fb63
--- /dev/null
+++ b/wp7/bin/win_os_edition.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET script_path="%~dp0win_os_edition.js"
+IF EXIST %script_path% (
+ cscript %script_path% %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'win_os_edition.js' in 'bin' folder, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/b90d1d49/wp7/bin/win_os_edition.js
----------------------------------------------------------------------
diff --git a/wp7/bin/win_os_edition.js b/wp7/bin/win_os_edition.js
new file mode 100644
index 0000000..f9c52a8
--- /dev/null
+++ b/wp7/bin/win_os_edition.js
@@ -0,0 +1,36 @@
+/*
+ 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 wscript_shell = WScript.CreateObject("WScript.Shell");
+
+// log to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+function getWindowsVersion() {
+ var version = wscript_shell.RegRead("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\EditionID");
+ Log(version);
+}
+getWindowsVersion();
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/b90d1d49/wp7/bin/win_os_version.bat
----------------------------------------------------------------------
diff --git a/wp7/bin/win_os_version.bat b/wp7/bin/win_os_version.bat
new file mode 100644
index 0000000..3a9e545
--- /dev/null
+++ b/wp7/bin/win_os_version.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET script_path="%~dp0win_os_version.js"
+IF EXIST %script_path% (
+ cscript %script_path% %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'win_os_version.js' in 'bin' folder, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/b90d1d49/wp7/bin/win_os_version.js
----------------------------------------------------------------------
diff --git a/wp7/bin/win_os_version.js b/wp7/bin/win_os_version.js
new file mode 100644
index 0000000..4137dae
--- /dev/null
+++ b/wp7/bin/win_os_version.js
@@ -0,0 +1,36 @@
+/*
+ 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 wscript_shell = WScript.CreateObject("WScript.Shell");
+
+// log to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+function getWindowsVersion() {
+ var version = wscript_shell.RegRead("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\CurrentVersion");
+ Log(version);
+}
+getWindowsVersion();
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/b90d1d49/wp8/bin/win_os_edition.bat
----------------------------------------------------------------------
diff --git a/wp8/bin/win_os_edition.bat b/wp8/bin/win_os_edition.bat
new file mode 100644
index 0000000..006fb63
--- /dev/null
+++ b/wp8/bin/win_os_edition.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET script_path="%~dp0win_os_edition.js"
+IF EXIST %script_path% (
+ cscript %script_path% %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'win_os_edition.js' in 'bin' folder, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/b90d1d49/wp8/bin/win_os_edition.js
----------------------------------------------------------------------
diff --git a/wp8/bin/win_os_edition.js b/wp8/bin/win_os_edition.js
new file mode 100644
index 0000000..f9c52a8
--- /dev/null
+++ b/wp8/bin/win_os_edition.js
@@ -0,0 +1,36 @@
+/*
+ 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 wscript_shell = WScript.CreateObject("WScript.Shell");
+
+// log to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+function getWindowsVersion() {
+ var version = wscript_shell.RegRead("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\EditionID");
+ Log(version);
+}
+getWindowsVersion();
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/b90d1d49/wp8/bin/win_os_version.bat
----------------------------------------------------------------------
diff --git a/wp8/bin/win_os_version.bat b/wp8/bin/win_os_version.bat
new file mode 100644
index 0000000..3a9e545
--- /dev/null
+++ b/wp8/bin/win_os_version.bat
@@ -0,0 +1,9 @@
+@ECHO OFF
+SET script_path="%~dp0win_os_version.js"
+IF EXIST %script_path% (
+ cscript %script_path% %* //nologo
+) ELSE (
+ ECHO.
+ ECHO ERROR: Could not find 'win_os_version.js' in 'bin' folder, aborting...>&2
+ EXIT /B 1
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/b90d1d49/wp8/bin/win_os_version.js
----------------------------------------------------------------------
diff --git a/wp8/bin/win_os_version.js b/wp8/bin/win_os_version.js
new file mode 100644
index 0000000..4137dae
--- /dev/null
+++ b/wp8/bin/win_os_version.js
@@ -0,0 +1,36 @@
+/*
+ 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 wscript_shell = WScript.CreateObject("WScript.Shell");
+
+// log to stdout or stderr
+function Log(msg, error) {
+ if (error) {
+ WScript.StdErr.WriteLine(msg);
+ }
+ else {
+ WScript.StdOut.WriteLine(msg);
+ }
+}
+
+function getWindowsVersion() {
+ var version = wscript_shell.RegRead("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\CurrentVersion");
+ Log(version);
+}
+getWindowsVersion();