chore: update for PL changes
This commit is contained in:
parent
11723827a6
commit
e1a2d941df
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,6 +3,8 @@
|
|||||||
.vs/
|
.vs/
|
||||||
.vscode/
|
.vscode/
|
||||||
.idea/
|
.idea/
|
||||||
|
out/
|
||||||
|
out-temp/
|
||||||
|
|
||||||
# python
|
# python
|
||||||
scripts/__pycache__/
|
scripts/__pycache__/
|
||||||
|
@ -7,8 +7,7 @@ binary template will be created.
|
|||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
As a first step, clone and build **Pilot Light**. Here we are assuming it is adjacent to this repo. If not, pass the
|
As a first step, clone and build **Pilot Light**. Here we are assuming it is adjacent to this repo.
|
||||||
correct relative location to **gen_build.py**.
|
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
@ -24,7 +23,7 @@ cd ..
|
|||||||
git clone https://git.pilotlight.tech/pilotlight/pl-template
|
git clone https://git.pilotlight.tech/pilotlight/pl-template
|
||||||
cd pl-template/scripts
|
cd pl-template/scripts
|
||||||
python setup.py
|
python setup.py
|
||||||
python gen_build.py ../../pilotlight
|
python gen_build.py
|
||||||
cd ../src
|
cd ../src
|
||||||
build.bat
|
build.bat
|
||||||
```
|
```
|
||||||
@ -44,7 +43,7 @@ cd ..
|
|||||||
git clone https://git.pilotlight.tech/pilotlight/pl-template
|
git clone https://git.pilotlight.tech/pilotlight/pl-template
|
||||||
cd pl-template/scripts
|
cd pl-template/scripts
|
||||||
python3 setup.py
|
python3 setup.py
|
||||||
python3 gen_build.py ../../pilotlight
|
python3 gen_build.py
|
||||||
cd ../src
|
cd ../src
|
||||||
chmod +x build.sh
|
chmod +x build.sh
|
||||||
./build.sh
|
./build.sh
|
||||||
@ -65,7 +64,7 @@ cd ..
|
|||||||
git clone https://git.pilotlight.tech/pilotlight/pl-template
|
git clone https://git.pilotlight.tech/pilotlight/pl-template
|
||||||
cd pl-template/scripts
|
cd pl-template/scripts
|
||||||
python3 setup.py
|
python3 setup.py
|
||||||
python3 gen_build.py ../../pilotlight
|
python3 gen_build.py
|
||||||
cd ../src
|
cd ../src
|
||||||
chmod +x build.sh
|
chmod +x build.sh
|
||||||
./build.sh
|
./build.sh
|
||||||
|
@ -11,12 +11,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import platform as plat
|
import platform as plat
|
||||||
|
|
||||||
pilotlight_location = "../../pilotlight"
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../../pilotlight")
|
||||||
|
|
||||||
if len(sys.argv) > 1:
|
|
||||||
pilotlight_location = sys.argv[1]
|
|
||||||
|
|
||||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/" + pilotlight_location)
|
|
||||||
|
|
||||||
import build.core as pl
|
import build.core as pl
|
||||||
import build.backend_win32 as win32
|
import build.backend_win32 as win32
|
||||||
@ -27,27 +22,24 @@ import build.backend_macos as apple
|
|||||||
# [SECTION] project
|
# [SECTION] project
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# where to output build scripts
|
# where to output build scripts
|
||||||
working_directory = os.path.dirname(os.path.abspath(__file__)) + "/../src"
|
working_directory = os.path.dirname(os.path.abspath(__file__)) + "/../src"
|
||||||
|
|
||||||
with pl.project("game"):
|
with pl.project("game"):
|
||||||
|
|
||||||
# used to decide hot reloading
|
# 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
|
# project wide settings
|
||||||
pl.set_output_directory(pilotlight_location + "/out")
|
pl.set_output_directory("../out")
|
||||||
pl.add_link_directories(pilotlight_location + "/out")
|
pl.add_link_directories("../out")
|
||||||
pl.add_include_directories(
|
pl.add_include_directories(
|
||||||
"../src",
|
"../src",
|
||||||
"../extensions",
|
"../extensions",
|
||||||
pilotlight_location + "/src",
|
"../../pilotlight/src",
|
||||||
pilotlight_location + "/libs",
|
"../../pilotlight/libs",
|
||||||
pilotlight_location + "/extensions",
|
"../../pilotlight/extensions",
|
||||||
pilotlight_location + "/dependencies/stb")
|
"../../pilotlight/dependencies/stb")
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# [SECTION] profiles
|
# [SECTION] profiles
|
||||||
|
@ -23,7 +23,7 @@ includes = [
|
|||||||
"${workspaceFolder}/**",
|
"${workspaceFolder}/**",
|
||||||
"${workspaceFolder}/src",
|
"${workspaceFolder}/src",
|
||||||
"${workspaceFolder}/extensions",
|
"${workspaceFolder}/extensions",
|
||||||
"${workspaceFolder}/../pilotlight/sandbox",
|
"${workspaceFolder}/../pilotlight/editor",
|
||||||
"${workspaceFolder}/../pilotlight/src",
|
"${workspaceFolder}/../pilotlight/src",
|
||||||
"${workspaceFolder}/../pilotlight/libs",
|
"${workspaceFolder}/../pilotlight/libs",
|
||||||
"${workspaceFolder}/../pilotlight/extensions",
|
"${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(' "program": "${workspaceFolder}/../pilotlight/out/pilot_light",')
|
||||||
|
|
||||||
lines.append(' "request": "launch",')
|
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(' "stopAtEntry": false,')
|
||||||
lines.append(' "cwd": "${workspaceFolder}/../pilotlight/out/",')
|
lines.append(' "cwd": "${workspaceFolder}/../pilotlight/out/",')
|
||||||
lines.append(' "environment": []')
|
lines.append(' "environment": []')
|
||||||
|
@ -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" &
|
// * second & third argument is the load/unload functions names (use NULL for the default of "pl_load_ext" &
|
||||||
// "pl_unload_ext")
|
// "pl_unload_ext")
|
||||||
// * fourth argument indicates if the extension is reloadable (should we check for changes and reload if changed)
|
// * 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_platform_ext", NULL, NULL, false); // provides the file API used by the drawing ext
|
||||||
ptExtensionRegistry->load("pl_example_ext", NULL, NULL, true);
|
ptExtensionRegistry->load("pl_example_ext", NULL, NULL, true);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user