Skip to content

Commit efc1198

Browse files
committed
fix: Update workflow.
1 parent 1548143 commit efc1198

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/update-package-description.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)