Skip to content

Commit aaa23ad

Browse files
Notexe2kpr
andcommitted
Linux support for collision generation
Co-authored-by: 2kpr <96332338+2kpr@users.noreply.github.com>
1 parent cbf84a8 commit aaa23ad

File tree

6 files changed

+13
-5
lines changed

6 files changed

+13
-5
lines changed

file_aloc/format.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
import sys
44
import ctypes
5-
5+
import platform
66

77
class PhysicsDataType(enum.IntEnum):
88
NONE = 0
@@ -79,10 +79,18 @@ def __init__(self):
7979
+ os.pathsep
8080
+ os.environ["PATH"]
8181
)
82-
self.lib = ctypes.CDLL(
83-
os.path.abspath(os.path.join(os.path.dirname(__file__), "alocgen.dll")),
84-
winmode=0,
85-
)
82+
if platform.system() == "Linux":
83+
self.lib = ctypes.CDLL(
84+
os.path.abspath(os.path.join(os.path.dirname(__file__), "libalocgen.so")),
85+
winmode=0,
86+
)
87+
elif platform.system() == "Windows":
88+
self.lib = ctypes.CDLL(
89+
os.path.abspath(os.path.join(os.path.dirname(__file__), "alocgen.dll")),
90+
winmode=0,
91+
)
92+
else:
93+
print(f"\n\n\n\nError: {platform.system()} is unsupported\n\n\n\n")
8694
self.lib.AddConvexMesh.argtypes = (
8795
ctypes.c_uint32,
8896
ctypes.POINTER(ctypes.c_float),

file_aloc/libPhysX3Common_x64.so

2.29 MB
Binary file not shown.

file_aloc/libPhysX3Cooking_x64.so

563 KB
Binary file not shown.

file_aloc/libPhysX3_x64.so

4.27 MB
Binary file not shown.

file_aloc/libPxFoundation_x64.so

157 KB
Binary file not shown.

file_aloc/libalocgen.so

83.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)