Skip to content

Commit 5dbae96

Browse files
committed
WIP
1 parent b3623c0 commit 5dbae96

File tree

5 files changed

+26
-3
lines changed

5 files changed

+26
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ jobs:
129129
cd ..
130130
git clone https://github.com/PilotLightTech/pilotlight
131131
cd pilotlight-python
132+
python -m pip install pl-build
132133
133134
- name: Build Package
134135
run: |

pilotlight/pilotlight.so

-4.88 MB
Binary file not shown.

scripts/gen_build.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,14 @@
257257
pl.add_compiler_flags("-Zc:preprocessor", "-nologo", "-std:c11", "-W4", "-WX", "-wd4201",
258258
"-wd4100", "-wd4996", "-wd4505", "-wd4189", "-wd5105", "-wd4115",
259259
"-permissive-", "-Od", "-MDd", "-Zi")
260-
pl.set_post_target_build_step('@copy "%VULKAN_SDK%\\bin\\spirv-cross-c-shared.dll" "..\\pilotlight\\" >nul\n')
260+
pl.set_post_target_build_step(
261+
'@copy "%VULKAN_SDK%\\bin\\spirv-cross-c-shared.dll" "..\\pilotlight\\" >nul\n'
262+
'@copy "..\\dependencies\\cpython\\PCbuild\\amd64\\python314_d.dll" "..\\out\\" >nul\n'
263+
'@copy "..\\dependencies\\cpython\\PCbuild\\amd64\\python314.dll" "..\\out\\" >nul\n'
264+
'@copy "..\\dependencies\\cpython\\PCbuild\\amd64\\python3.dll" "..\\out\\" >nul\n'
265+
'@copy "..\\dependencies\\cpython\\PCbuild\\amd64\\python3_d.dll" "..\\out\\" >nul\n'
266+
)
267+
261268

262269
with pl.platform("Linux"):
263270
with pl.compiler("gcc"):
@@ -297,6 +304,17 @@
297304
"-permissive-", "-Od", "-MD", "-Zi")
298305
pl.set_post_target_build_step('@copy "%VULKAN_SDK%\\bin\\spirv-cross-c-shared.dll" "..\\pilotlight\\" >nul\n')
299306

307+
with pl.platform("Linux"):
308+
with pl.compiler("gcc"):
309+
pl.add_definitions("PL_VULKAN_BACKEND")
310+
pl.add_include_directories('$VULKAN_SDK/include', '/usr/include/vulkan')
311+
pl.set_output_binary_extension(".so")
312+
pl.add_compiler_flags("-fPIC")
313+
pl.add_compiler_flags("--debug -g")
314+
pl.add_linker_flags("-ldl -lm")
315+
pl.add_dynamic_link_libraries("shaderc_shared", "spirv-cross-c-shared", "vulkan")
316+
pl.add_static_link_libraries("glfwd", "pl_platform_ext")
317+
pl.add_link_directories("../dependencies/cpython/build/debug/", '$VULKAN_SDK/lib')
300318

301319
#-----------------------------------------------------------------------------
302320
# [SECTION] generate scripts

src/build_linux.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ PL_RESULT=${BOLD}${GREEN}Successful.${NC}
269269
PL_DEFINES="-D_USE_MATH_DEFINES -DPy_PYTHON_H "
270270
PL_INCLUDE_DIRECTORIES="-I../src -I../../pilotlight/libs -I../../pilotlight/extensions -I../../pilotlight/dependencies/stb -I../../pilotlight/src "
271271
PL_LINK_DIRECTORIES="-L../out -Wl,-rpath,../out -L../../pilotlight/out -Wl,-rpath,../../pilotlight/out "
272-
PL_COMPILER_FLAGS=""
273-
PL_LINKER_FLAGS=""
272+
PL_COMPILER_FLAGS="-fPIC "
273+
PL_LINKER_FLAGS="-ldl -lm "
274274
PL_STATIC_LINK_LIBRARIES=""
275275
PL_DYNAMIC_LINK_LIBRARIES="-lpthread "
276276
# # run compiler only

src/build_win32.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ cl %PL_INCLUDE_DIRECTORIES% %PL_DEFINES% %PL_COMPILER_FLAGS% %PL_SOURCES% -Fe"..
221221
@echo ~~~~~~~~~~~~~~~~~~~~~~
222222

223223
@copy "%VULKAN_SDK%\bin\spirv-cross-c-shared.dll" "..\pilotlight\" >nul
224+
@copy "..\dependencies\cpython\PCbuild\amd64\python314_d.dll" "..\out\" >nul
225+
@copy "..\dependencies\cpython\PCbuild\amd64\python314.dll" "..\out\" >nul
226+
@copy "..\dependencies\cpython\PCbuild\amd64\python3.dll" "..\out\" >nul
227+
@copy "..\dependencies\cpython\PCbuild\amd64\python3_d.dll" "..\out\" >nul
224228

225229

226230
:Exit_pilotlight

0 commit comments

Comments
 (0)