chore: update for PL changes

This commit is contained in:
Jonathan Hoffstadt 2025-04-29 22:34:14 -05:00
parent 11723827a6
commit e1a2d941df
5 changed files with 18 additions and 24 deletions

2
.gitignore vendored
View File

@ -3,6 +3,8 @@
.vs/
.vscode/
.idea/
out/
out-temp/
# python
scripts/__pycache__/

View File

@ -7,8 +7,7 @@ binary template will be created.
## Build
As a first step, clone and build **Pilot Light**. Here we are assuming it is adjacent to this repo. If not, pass the
correct relative location to **gen_build.py**.
As a first step, clone and build **Pilot Light**. Here we are assuming it is adjacent to this repo.
### Windows
@ -24,7 +23,7 @@ cd ..
git clone https://git.pilotlight.tech/pilotlight/pl-template
cd pl-template/scripts
python setup.py
python gen_build.py ../../pilotlight
python gen_build.py
cd ../src
build.bat
```
@ -44,7 +43,7 @@ cd ..
git clone https://git.pilotlight.tech/pilotlight/pl-template
cd pl-template/scripts
python3 setup.py
python3 gen_build.py ../../pilotlight
python3 gen_build.py
cd ../src
chmod +x build.sh
./build.sh
@ -65,7 +64,7 @@ cd ..
git clone https://git.pilotlight.tech/pilotlight/pl-template
cd pl-template/scripts
python3 setup.py
python3 gen_build.py ../../pilotlight
python3 gen_build.py
cd ../src
chmod +x build.sh
./build.sh

View File

@ -11,12 +11,7 @@ import os
import sys
import platform as plat
pilotlight_location = "../../pilotlight"
if len(sys.argv) > 1:
pilotlight_location = sys.argv[1]
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/" + pilotlight_location)
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../../pilotlight")
import build.core as pl
import build.backend_win32 as win32
@ -27,27 +22,24 @@ import build.backend_macos as apple
# [SECTION] project
#-----------------------------------------------------------------------------
# where to output build scripts
working_directory = os.path.dirname(os.path.abspath(__file__)) + "/../src"
with pl.project("game"):
# used to decide hot reloading
pl.set_hot_reload_target(pilotlight_location + "/out/pilot_light")
pl.set_hot_reload_target("../../pilotlight/out/pilot_light")
# project wide settings
pl.set_output_directory(pilotlight_location + "/out")
pl.add_link_directories(pilotlight_location + "/out")
pl.set_output_directory("../out")
pl.add_link_directories("../out")
pl.add_include_directories(
"../src",
"../extensions",
pilotlight_location + "/src",
pilotlight_location + "/libs",
pilotlight_location + "/extensions",
pilotlight_location + "/dependencies/stb")
"../../pilotlight/src",
"../../pilotlight/libs",
"../../pilotlight/extensions",
"../../pilotlight/dependencies/stb")
#-----------------------------------------------------------------------------
# [SECTION] profiles

View File

@ -23,7 +23,7 @@ includes = [
"${workspaceFolder}/**",
"${workspaceFolder}/src",
"${workspaceFolder}/extensions",
"${workspaceFolder}/../pilotlight/sandbox",
"${workspaceFolder}/../pilotlight/editor",
"${workspaceFolder}/../pilotlight/src",
"${workspaceFolder}/../pilotlight/libs",
"${workspaceFolder}/../pilotlight/extensions",
@ -65,7 +65,7 @@ with open('../.vscode/launch.json', 'w') as file:
lines.append(' "program": "${workspaceFolder}/../pilotlight/out/pilot_light",')
lines.append(' "request": "launch",')
lines.append(' "args": ["-a", "template_app"],')
lines.append(' "args": ["-a", "../../pl-template/out/template_app"],')
lines.append(' "stopAtEntry": false,')
lines.append(' "cwd": "${workspaceFolder}/../pilotlight/out/",')
lines.append(' "environment": []')

View File

@ -163,7 +163,8 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
// * second & third argument is the load/unload functions names (use NULL for the default of "pl_load_ext" &
// "pl_unload_ext")
// * fourth argument indicates if the extension is reloadable (should we check for changes and reload if changed)
ptExtensionRegistry->load("pl_unity_ext", NULL, NULL, true);
ptExtensionRegistry->add_path("../../pl-template/out");
ptExtensionRegistry->load("pl_unity_ext", NULL, NULL, false);
ptExtensionRegistry->load("pl_platform_ext", NULL, NULL, false); // provides the file API used by the drawing ext
ptExtensionRegistry->load("pl_example_ext", NULL, NULL, true);