Changeset 3
- Timestamp:
- Sat Sep 3 11:48:18 2005
- Files:
-
- trunk/versionInfo.py (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
trunk/versionInfo.py
r2 r3 34 34 ## WORD wValueLength; // Specifies the length of the Value member 35 35 ## WORD wType; // 1 means text, 0 means binary 36 ## WCHAR szKey[]; // Contains the Unicode string VS_VERSION_INFO.36 ## WCHAR szKey[]; // Contains the Unicode string "VS_VERSION_INFO". 36 36 ## WORD Padding1[]; 37 ## VS_FIXEDFILEINFO Value; 37 ## VS_FIXEDFILEINFO Value; 37 37 ## WORD Padding2[]; 38 ## WORD Children[]; // Specifies a list of zero or more StringFileInfo or VarFileInfo structures (or both) that are children of the current version structure. 39 ##}; 38 ## WORD Children[]; // Specifies a list of zero or more StringFileInfo or VarFileInfo structures (or both) that are children of the current version structure. 39 ##}; 40 40 def decode(pathnm): 41 41 h = win32api.LoadLibraryEx(pathnm, 0, LOAD_LIBRARY_AS_DATAFILE) 42 42 nm = win32api.EnumResourceNames(h, RT_VERSION)[0] 43 data = win32api.LoadResource(h, RT_VERSION, nm) 43 data = win32api.LoadResource(h, RT_VERSION, nm) 43 43 vs = VSVersionInfo() 44 44 j = vs.fromRaw(data) … … 168 168 ##VS_FIXEDFILEINFO { // vsffi 169 169 ## DWORD dwSignature; //Contains the value 0xFEEFO4BD 170 ## DWORD dwStrucVersion; //Specifies the binary version number of this structure. The high-order word of this member contains the major version number, and the low-order word contains the minor version number. 171 ## DWORD dwFileVersionMS; // Specifies the most significant 32 bits of the files binary version number 170 ## DWORD dwStrucVersion; //Specifies the binary version number of this structure. The high-order word of this member contains the major version number, and the low-order word contains the minor version number. 171 ## DWORD dwFileVersionMS; // Specifies the most significant 32 bits of the file's binary version number 172 172 ## DWORD dwFileVersionLS; // 173 173 ## DWORD dwProductVersionMS; // Specifies the most significant 32 bits of the binary version number of the product with which this file was distributed 174 174 ## DWORD dwProductVersionLS; // 175 ## DWORD dwFileFlagsMask; // Contains a bitmask that specifies the valid bits in dwFileFlags. A bit is valid only if it was defined when the file was created. 175 ## DWORD dwFileFlagsMask; // Contains a bitmask that specifies the valid bits in dwFileFlags. A bit is valid only if it was defined when the file was created. 175 175 ## DWORD dwFileFlags; // VS_FF_DEBUG, VS_FF_PATCHED etc. 176 176 ## DWORD dwFileOS; // VOS_NT, VOS_WINDOWS32 etc. 177 177 ## DWORD dwFileType; // VFT_APP etc. 178 178 ## DWORD dwFileSubtype; // 0 unless VFT_DRV or VFT_FONT or VFT_VXD 179 ## DWORD dwFileDateMS; 179 ## DWORD dwFileDateMS; 179 179 ## DWORD dwFileDateLS; 180 ##}; 180 ##}; 180 180 181 181 class FixedFileInfo: … … 247 247 ## WORD wValueLength; // Specifies the length of the Value member in the current VS_VERSION_INFO structure 248 248 ## WORD wType; // 1 means text, 0 means binary 249 ## WCHAR szKey[]; // Contains the Unicode string StringFileInfo. 250 ## WORD Padding[]; 249 ## WCHAR szKey[]; // Contains the Unicode string "StringFileInfo". 250 ## WORD Padding[]; 251 251 ## StringTable Children[]; // Specifies a list of zero or more String structures 252 ##}; 252 ##}; 252 252 253 253 class StringFileInfo: … … 304 304 tmp = string.join(tmp, ', \n') 305 305 return "%sStringFileInfo(\n%s[\n%s\n%s])" % (indent, newindent, tmp, newindent) 306 306 306 306 ##StringTable { 307 307 ## WORD wLength; 308 308 ## WORD wValueLength; 309 ## WORD wType; 309 ## WORD wType; 309 309 ## WCHAR szKey[]; 310 ## String Children[]; // Specifies a list of zero or more String structures. 310 ## String Children[]; // Specifies a list of zero or more String structures. 310 310 ##}; 311 311 … … 360 360 tmp = string.join(tmp, ',\n%s' % newindent) 361 361 return "%sStringTable(\n%s'%s', \n%s[%s])" % (indent, newindent, str(self.name), newindent, tmp) 362 362 362 362 ##String { 363 363 ## WORD wLength; 364 364 ## WORD wValueLength; 365 ## WORD wType; 365 ## WORD wType; 365 365 ## WCHAR szKey[]; 366 366 ## WORD Padding[]; … … 413 413 ## WORD wValueLength; // Specifies the length of the Value member in the current VS_VERSION_INFO structure 414 414 ## WORD wType; // 1 means text, 0 means binary 415 ## WCHAR szKey[]; // Contains the Unicode string VarFileInfo.415 ## WCHAR szKey[]; // Contains the Unicode string "VarFileInfo". 415 415 ## WORD Padding[]; 416 416 ## Var Children[]; // Specifies a list of zero or more Var structures 417 ##}; 417 ##}; 417 417 418 418 class VarFileInfo: … … 461 461 ## WORD wValueLength; // Specifies the length of the Value member in the current VS_VERSION_INFO structure 462 462 ## WORD wType; // 1 means text, 0 means binary 463 ## WCHAR szKey[]; // Contains the Unicode string Translationor a user-defined key string value463 ## WCHAR szKey[]; // Contains the Unicode string "Translation" or a user-defined key string value 463 463 ## WORD Padding[]; // 464 464 ## WORD Value[]; // Specifies a list of one or more values that are language and code-page identifiers
