File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -19,20 +19,22 @@ jobs:
1919 - name : Install dependencies
2020 run : |
2121 python -m pip install --upgrade pip
22- pip install pywin32
22+ pip install pefile
2323
2424 - name : Extract EOS SDK version from DLL
2525 id : extract_version
2626 run : |
27- import win32api
28- import sys
29- import json
30-
27+ import pefile
3128 dll_path = 'Assets/Plugins/Windows/x64/EOSSDK-Win64-Shipping.dll'
32- info = win32api.GetFileVersionInfo(dll_path, '\\')
33- ms = info['FileVersionMS']
34- ls = info['FileVersionLS']
35- version = f"{(ms >> 16) & 0xffff}.{ms & 0xffff}.{(ls >> 16) & 0xffff}.{ls & 0xffff}"
29+ pe = pefile.PE(dll_path)
30+ file_info = None
31+
32+ for entry in pe.FileInfo:
33+ if entry.Key == b'StringFileInfo':
34+ file_info = entry.StringTable[0].entries
35+ break
36+
37+ version = file_info.get(b'ProductVersion', b'Unknown').decode('utf-8')
3638 print(f"::set-output name=eos_version::{version}")
3739
3840 - name : Debug new package.json description
You can’t perform that action at this time.
0 commit comments