We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cfc2e9 commit a9cb4feCopy full SHA for a9cb4fe
src/ITS/PropLibTemplate/proplib_loader.py
@@ -43,6 +43,7 @@
43
"""
44
45
import platform
46
+import struct
47
from ctypes import *
48
from pathlib import Path
49
@@ -71,7 +72,15 @@ def get_lib_name(lib_name: str) -> str:
71
72
73
# Load the compiled library
74
if platform.uname()[0] == "Windows":
- lib_name += ".dll"
75
+ arch = struct.calcsize("P") * 8 # 32 or 64
76
+ if arch == 64:
77
+ lib_name += "-x64.dll"
78
+ elif arch == 32:
79
+ lib_name += "-x86.dll"
80
+ else:
81
+ raise RuntimeError(
82
+ "Failed to determine system architecture for DLL loading"
83
+ )
84
elif platform.uname()[0] == "Linux":
85
lib_name += ".so"
86
elif platform.uname()[0] == "Darwin":
0 commit comments