Skip to content

Commit 5c4ecaa

Browse files
committed
WIP
1 parent 29a3a06 commit 5c4ecaa

103 files changed

Lines changed: 1809 additions & 54365 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -70,32 +70,6 @@ jobs:
7070
run: |
7171
rmdir /s /q out
7272
73-
- name: Build Pilot Light (DEBUG EXPERIMENTAL)
74-
shell: cmd
75-
run: |
76-
set VULKAN_SDK=D:/a/VulkanSDK
77-
cd src
78-
call build.bat -c debug_experimental
79-
if %ERRORLEVEL% NEQ 0 exit 1
80-
81-
- name: Prep 3
82-
shell: cmd
83-
run: |
84-
rmdir /s /q out
85-
86-
- name: Build Pilot Light (RELEASE EXPERIMENTAL)
87-
shell: cmd
88-
run: |
89-
set VULKAN_SDK=D:/a/VulkanSDK
90-
cd src
91-
call build.bat -c release_experimental
92-
if %ERRORLEVEL% NEQ 0 exit 1
93-
94-
- name: Prep 4
95-
shell: cmd
96-
run: |
97-
rmdir /s /q out
98-
9973
- name: Build Pilot Light (RELEASE)
10074
shell: cmd
10175
run: |
@@ -205,30 +179,6 @@ jobs:
205179
cd $GITHUB_WORKSPACE
206180
rm -r out
207181
208-
- name: Build Pilot Light (DEBUG EXPERIMENTAL)
209-
run: |
210-
cd $GITHUB_WORKSPACE
211-
cd src
212-
chmod +x build.sh
213-
./build.sh -c debug_experimental || exit 1
214-
215-
- name: Prep 3
216-
run: |
217-
cd $GITHUB_WORKSPACE
218-
rm -r out
219-
220-
- name: Build Pilot Light (RELEASE EXPERIMENTAL)
221-
run: |
222-
cd $GITHUB_WORKSPACE
223-
cd src
224-
chmod +x build.sh
225-
./build.sh -c release_experimental || exit 1
226-
227-
- name: Prep 4
228-
run: |
229-
cd $GITHUB_WORKSPACE
230-
rm -r out
231-
232182
- name: Build Pilot Light (RELEASE)
233183
run: |
234184
cd $GITHUB_WORKSPACE
@@ -338,35 +288,11 @@ jobs:
338288
chmod +x build.sh
339289
./build.sh -c debug || exit 1
340290
341-
- name: Prep 2
342-
run: |
343-
cd $GITHUB_WORKSPACE
344-
rm -r out
345-
346-
- name: Build Pilot Light (DEBUG EXPERIMENTAL)
347-
run: |
348-
cd $GITHUB_WORKSPACE
349-
cd src
350-
chmod +x build.sh
351-
./build.sh -c debug_experimental || exit 1
352-
353291
- name: Prep 3
354292
run: |
355293
cd $GITHUB_WORKSPACE
356294
rm -r out
357295
358-
- name: Build Pilot Light (RELEASE EXPERIMENTAL)
359-
run: |
360-
cd $GITHUB_WORKSPACE
361-
cd src
362-
chmod +x build.sh
363-
./build.sh -c release_experimental || exit 1
364-
365-
- name: Prep 4
366-
run: |
367-
cd $GITHUB_WORKSPACE
368-
rm -r out
369-
370296
- name: Build Pilot Light (RELEASE)
371297
run: |
372298
cd $GITHUB_WORKSPACE

examples/build_linux.sh

Lines changed: 40 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ else
100100
rm -f ../out/example_gfx_5_*.so
101101
rm -f ../out/example_gfx_6.so
102102
rm -f ../out/example_gfx_6_*.so
103+
rm -f ../out/example_basic_6.so
104+
rm -f ../out/example_basic_6_*.so
103105

104106

105107
fi
@@ -545,6 +547,40 @@ fi
545547
echo ${CYAN}Results: ${NC} ${PL_RESULT}
546548
echo ${CYAN}~~~~~~~~~~~~~~~~~~~~~~${NC}
547549

550+
#~~~~~~~~~~~~~~~~~~~~~~~~~~~ example_basic_6 | debug ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
551+
552+
PL_RESULT=${BOLD}${GREEN}Successful.${NC}
553+
PL_DEFINES="-D_USE_MATH_DEFINES -DPL_PROFILING_ON -DPL_ALLOW_HOT_RELOAD -DPL_ENABLE_VALIDATION_LAYERS -DPL_CONFIG_DEBUG "
554+
PL_INCLUDE_DIRECTORIES="-I../examples -I../internal/sandbox -I../src -I../shaders -I../libs -I../extensions -I../out -I../internal/demo -I../thirdparty/stb -I../thirdparty/imgui "
555+
PL_LINK_DIRECTORIES="-L../out -Wl,-rpath,../out -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/usr/lib/x86_64-linux-gnu "
556+
PL_COMPILER_FLAGS="-std=c++14 -fPIC --debug -g "
557+
PL_LINKER_FLAGS="-ldl -lm "
558+
PL_STATIC_LINK_LIBRARIES="-ldearimguid "
559+
PL_DYNAMIC_LINK_LIBRARIES=""
560+
PL_SOURCES="example_basic_6.cpp "
561+
562+
# run compiler (and linker)
563+
echo
564+
echo ${YELLOW}Step: example_basic_6${NC}
565+
echo ${YELLOW}~~~~~~~~~~~~~~~~~~~${NC}
566+
echo ${CYAN}Compiling and Linking...${NC}
567+
gcc -shared $PL_SOURCES $PL_INCLUDE_DIRECTORIES $PL_DEFINES $PL_COMPILER_FLAGS $PL_INCLUDE_DIRECTORIES $PL_LINK_DIRECTORIES $PL_STATIC_LINK_LIBRARIES $PL_DYNAMIC_LINK_LIBRARIES $PL_LINKER_FLAGS -o "./../out/libexample_basic_6.so"
568+
569+
# check build status
570+
if [ $? -ne 0 ]
571+
then
572+
PL_RESULT=${BOLD}${RED}Failed.${NC}
573+
PL_BUILD_STATUS=1
574+
echo ${CYAN}Results: ${NC} ${PL_RESULT}
575+
echo ${CYAN}~~~~~~~~~~~~~~~~~~~~~~${NC}
576+
popd >/dev/null
577+
exit 1
578+
fi
579+
580+
# print results
581+
echo ${CYAN}Results: ${NC} ${PL_RESULT}
582+
echo ${CYAN}~~~~~~~~~~~~~~~~~~~~~~${NC}
583+
548584
# delete lock file(s)
549585
rm -f ../out/lock.tmp
550586

@@ -605,6 +641,8 @@ else
605641
rm -f ../out/example_gfx_5_*.so
606642
rm -f ../out/example_gfx_6.so
607643
rm -f ../out/example_gfx_6_*.so
644+
rm -f ../out/example_basic_6.so
645+
rm -f ../out/example_basic_6_*.so
608646

609647

610648
fi
@@ -1050,119 +1088,7 @@ fi
10501088
echo ${CYAN}Results: ${NC} ${PL_RESULT}
10511089
echo ${CYAN}~~~~~~~~~~~~~~~~~~~~~~${NC}
10521090

1053-
# delete lock file(s)
1054-
rm -f ../out/lock.tmp
1055-
1056-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1057-
# end of release
1058-
fi
1059-
1060-
# ################################################################################
1061-
# # configuration | debug_experimental #
1062-
# ################################################################################
1063-
1064-
if [[ "$PL_CONFIG" == "debug_experimental" ]]; then
1065-
1066-
# create output directory(s)
1067-
mkdir -p "../out"
1068-
1069-
# create lock file(s)
1070-
echo LOCKING > "../out/lock.tmp"
1071-
1072-
PL_BUILD_STATUS=0
1073-
1074-
# check if this is a reload
1075-
PL_HOT_RELOAD_STATUS=0
1076-
1077-
# # let user know if hot reloading
1078-
if pidof -x "pilot_light" -o $$ >/dev/null;then
1079-
PL_HOT_RELOAD_STATUS=1
1080-
echo
1081-
echo ${BOLD}${WHITE}${RED_BG}--------${GREEN_BG} HOT RELOADING ${RED_BG}--------${NC}
1082-
echo
1083-
else
1084-
# cleanup binaries if not hot reloading
1085-
PL_HOT_RELOAD_STATUS=0
1086-
rm -r -f ../out-temp
1087-
rm -f ../out/example_basic_6.so
1088-
rm -f ../out/example_basic_6_*.so
1089-
1090-
1091-
fi
1092-
#~~~~~~~~~~~~~~~~~~~~~ example_basic_6 | debug_experimental ~~~~~~~~~~~~~~~~~~~~~
1093-
1094-
PL_RESULT=${BOLD}${GREEN}Successful.${NC}
1095-
PL_DEFINES="-D_USE_MATH_DEFINES -DPL_PROFILING_ON -DPL_ALLOW_HOT_RELOAD -DPL_ENABLE_VALIDATION_LAYERS -DPL_CONFIG_DEBUG "
1096-
PL_INCLUDE_DIRECTORIES="-I../examples -I../internal/sandbox -I../src -I../shaders -I../libs -I../extensions -I../out -I../internal/demo -I../thirdparty/stb -I../thirdparty/imgui "
1097-
PL_LINK_DIRECTORIES="-L../out -Wl,-rpath,../out -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/usr/lib/x86_64-linux-gnu "
1098-
PL_COMPILER_FLAGS="-std=c++14 -fPIC --debug -g "
1099-
PL_LINKER_FLAGS="-ldl -lm "
1100-
PL_STATIC_LINK_LIBRARIES="-ldearimguid "
1101-
PL_DYNAMIC_LINK_LIBRARIES=""
1102-
PL_SOURCES="example_basic_6.cpp "
1103-
1104-
# run compiler (and linker)
1105-
echo
1106-
echo ${YELLOW}Step: example_basic_6${NC}
1107-
echo ${YELLOW}~~~~~~~~~~~~~~~~~~~${NC}
1108-
echo ${CYAN}Compiling and Linking...${NC}
1109-
gcc -shared $PL_SOURCES $PL_INCLUDE_DIRECTORIES $PL_DEFINES $PL_COMPILER_FLAGS $PL_INCLUDE_DIRECTORIES $PL_LINK_DIRECTORIES $PL_STATIC_LINK_LIBRARIES $PL_DYNAMIC_LINK_LIBRARIES $PL_LINKER_FLAGS -o "./../out/libexample_basic_6.so"
1110-
1111-
# check build status
1112-
if [ $? -ne 0 ]
1113-
then
1114-
PL_RESULT=${BOLD}${RED}Failed.${NC}
1115-
PL_BUILD_STATUS=1
1116-
echo ${CYAN}Results: ${NC} ${PL_RESULT}
1117-
echo ${CYAN}~~~~~~~~~~~~~~~~~~~~~~${NC}
1118-
popd >/dev/null
1119-
exit 1
1120-
fi
1121-
1122-
# print results
1123-
echo ${CYAN}Results: ${NC} ${PL_RESULT}
1124-
echo ${CYAN}~~~~~~~~~~~~~~~~~~~~~~${NC}
1125-
1126-
# delete lock file(s)
1127-
rm -f ../out/lock.tmp
1128-
1129-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1130-
# end of debug_experimental
1131-
fi
1132-
1133-
# ################################################################################
1134-
# # configuration | release_experimental #
1135-
# ################################################################################
1136-
1137-
if [[ "$PL_CONFIG" == "release_experimental" ]]; then
1138-
1139-
# create output directory(s)
1140-
mkdir -p "../out"
1141-
1142-
# create lock file(s)
1143-
echo LOCKING > "../out/lock.tmp"
1144-
1145-
PL_BUILD_STATUS=0
1146-
1147-
# check if this is a reload
1148-
PL_HOT_RELOAD_STATUS=0
1149-
1150-
# # let user know if hot reloading
1151-
if pidof -x "pilot_light" -o $$ >/dev/null;then
1152-
PL_HOT_RELOAD_STATUS=1
1153-
echo
1154-
echo ${BOLD}${WHITE}${RED_BG}--------${GREEN_BG} HOT RELOADING ${RED_BG}--------${NC}
1155-
echo
1156-
else
1157-
# cleanup binaries if not hot reloading
1158-
PL_HOT_RELOAD_STATUS=0
1159-
rm -r -f ../out-temp
1160-
rm -f ../out/example_basic_6.so
1161-
rm -f ../out/example_basic_6_*.so
1162-
1163-
1164-
fi
1165-
#~~~~~~~~~~~~~~~~~~~~ example_basic_6 | release_experimental ~~~~~~~~~~~~~~~~~~~~
1091+
#~~~~~~~~~~~~~~~~~~~~~~~~~~ example_basic_6 | release ~~~~~~~~~~~~~~~~~~~~~~~~~~~
11661092

11671093
PL_RESULT=${BOLD}${GREEN}Successful.${NC}
11681094
PL_DEFINES="-D_USE_MATH_DEFINES -DPL_PROFILING_ON -DPL_ALLOW_HOT_RELOAD -DPL_ENABLE_VALIDATION_LAYERS -DPL_CONFIG_DEBUG "
@@ -1200,7 +1126,7 @@ echo ${CYAN}~~~~~~~~~~~~~~~~~~~~~~${NC}
12001126
rm -f ../out/lock.tmp
12011127

12021128
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1203-
# end of release_experimental
1129+
# end of release
12041130
fi
12051131

12061132

0 commit comments

Comments
 (0)