Revision: 7248
http://languagetool.svn.sourceforge.net/languagetool/?rev=7248&view=rev
Author: milek_pl
Date: 2012-06-05 20:14:36 +0000 (Tue, 05 Jun 2012)
Log Message:
-----------
full version of the script
Modified Paths:
--------------
trunk/JLanguageTool/src/dev/tools/VersionInfo.js
Modified: trunk/JLanguageTool/src/dev/tools/VersionInfo.js
===================================================================
--- trunk/JLanguageTool/src/dev/tools/VersionInfo.js 2012-06-05 19:14:52 UTC
(rev 7247)
+++ trunk/JLanguageTool/src/dev/tools/VersionInfo.js 2012-06-05 20:14:36 UTC
(rev 7248)
@@ -23,16 +23,46 @@
* Windows ANT test...
*/
+/* this function does not work... the attribute numbers differ in various
+ * Windows versions
+
+function getProductVersion (filePath, program) {
+if (fso.FileExists(filePath + "/" + program)) {
+ var objShell = WScript.CreateObject("shell.application");
+ var objFolder = new Object;
+
+ objFolder = objShell.NameSpace(filePath);
+ if (objFolder == null) {
+ WScript.Echo(filePath);
+ }
+ var objFolderItem = new Object;
+ objFolderItem = objFolder.ParseName(program);
+ for (var i = 0; i < 300; i++) {
+ var arrHeaders = objFolder.GetDetailsOf(objFolderItem, i);
+ WScript.Echo(i + "- " + arrHeaders + ": " +
objFolder.GetDetailsOf(objFolderItem, i));
+ if (arrHeaders.toLowerCase() == "product version") {
+ return objFolder.GetDetailsOf(objFolderItem, i);
+ }
+ }
+ }
+ }
+*/
+
var fso = WScript.CreateObject("Scripting.FileSystemObject");
var version1 =
fso.GetFileVersion("../../../libs/native-lib/hunspell-win-x86-64.dll");
var version2 =
fso.GetFileVersion("../../../libs/native-lib/hunspell-win-x86-32.dll");
-//TODO: check for minimal version number (1.3.1.0?)
-
if (version1 != version2) {
WScript.Echo("Error: Hunspell Windows DLLs have different version
numbers! \r\n 64-bit library has number: " + version1 + " 32-bit library has
number: " + version2);
WScript.Quit(-1);
}
+var versionNumber = version1.replace(/\./g, "");
+
+if (versionNumber < 1310) {
+ WScript.Echo("Error: minimum version number is 1.3.1.0. This DLL has
version: " + version1);
+ WScript.Quit(-1);
+}
+
WScript.Quit();
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Languagetool-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs