Skip to content

Commit

Permalink
feat: add unity ext to package.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffstadt committed Nov 18, 2024
1 parent a9db2f1 commit 1605a47
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ jobs:
if not exist ../out/pl_unity_ext.dll exit 1
if not exist ../out/pl_script_camera.dll exit 1
- name: Prep 3
shell: cmd
run: |
rmdir /s /q out
- name: Build Pilot Light Deployment (RELEASE)
shell: cmd
run: |
Expand Down Expand Up @@ -225,11 +220,6 @@ jobs:
test -f ./out/pl_unity_ext.dylib || exit 1
test -f ./out/pl_script_camera.dylib || exit 1
- name: Prep 3
run: |
cd $GITHUB_WORKSPACE
rm -r out
- name: Build Pilot Light Deployment (RELEASE)
run: |
cd $GITHUB_WORKSPACE
Expand Down Expand Up @@ -365,11 +355,6 @@ jobs:
test -f ./out/pl_unity_ext.so || exit 1
test -f ./out/pl_script_camera.so || exit 1
- name: Prep 3
run: |
cd $GITHUB_WORKSPACE
rm -r out
- name: Build Pilot Light Deployment (RELEASE)
run: |
cd $GITHUB_WORKSPACE
Expand Down
23 changes: 14 additions & 9 deletions scripts/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
debug_package = False

if len(sys.argv) > 1:
if sys.argv[1] == "debug":
debug_package = True
for i in range(1, len(sys.argv)):
if sys.argv[i] == "debug":
debug_package = True

if not os.path.isdir("../out"):
print("ERROR: Pilot Light not built", file=sys.stderr)
Expand All @@ -19,7 +20,12 @@

target_directory = "../out/pilotlight"

# extensions
# scripts
scripts = [
"pl_script_camera"
]

# extension headers
extension_headers = [
"pl_atomics_ext.h",
"pl_debug_ext.h",
Expand All @@ -46,6 +52,7 @@
"pl_window_ext.h"
]

# extension binaries
extensions = [
"pl_debug_ext",
"pl_draw_backend_ext",
Expand All @@ -62,18 +69,15 @@
"pl_shader_ext",
"pl_stats_ext",
"pl_string_intern_ext",
"pl_ui_ext"
"pl_ui_ext",
"pl_unity_ext",
"app",
]

if debug_package:
for i in range(len(extensions)):
extensions[i] = extensions[i] + "d"

# scripts
scripts = [
"pl_script_camera"
]

if os.path.isdir(target_directory):
shutil.rmtree(target_directory)

Expand Down Expand Up @@ -113,6 +117,7 @@
shutil.copy("../libs/pl_json.h", target_directory + "/include/pl_json.h")
shutil.copy("../libs/pl_stl.h", target_directory + "/include/pl_stl.h")
shutil.copy("../libs/pl_string.h", target_directory + "/include/pl_string.h")
shutil.copy("../libs/pl_test.h", target_directory + "/include/pl_test.h")

# copy stb libs
shutil.copy("../dependencies/stb/stb_sprintf.h", target_directory + "/include/stb_sprintf.h")
Expand Down

0 comments on commit 1605a47

Please sign in to comment.