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:33 UTC
[2/3] git commit: CB-4872 - added os version and edition check
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();