Skip to content

Commit e6d00c4

Browse files
committed
[Linux/Mac] Updated RunExamplesLinux.sh/Mac.command scripts to include new file pattern for examples.
New examples should use their project name for their main source file. All existing Example.cpp files will eventually be renamed to their respective project names. This change includes this new pattern in the RunExamplesLinux.sh and RunExamplesMac.command scripts to automatically find all available example projects to run.
1 parent 9636793 commit e6d00c4

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

RunExamplesLinux.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,15 @@ fi
4242

4343
list_examples()
4444
{
45-
EXCLUDED=(MultiRenderer MultiThreading PBR ComputeShader)
45+
EXCLUDED=(MultiRenderer) # List any examples that are specifically excluded on Linux
4646
EXAMPLE_DIRS=($(ls examples/Cpp))
4747
for DIR in "${EXAMPLE_DIRS[@]}"; do
4848
if ! echo "${EXCLUDED[@]}}" | grep -qw "$DIR"; then
4949
# Include example if its source and binary files exist
50-
if [ -f "examples/Cpp/$DIR/Example.cpp" ] && [ -f "$BUILD_DIR/Example_$DIR" -o -f "$BUILD_DIR/Example_${DIR}D" ]; then
51-
echo "$DIR"
50+
if [ -f "examples/Cpp/$DIR/Example.cpp" ] || [ -f "examples/Cpp/$DIR/$DIR.cpp" ]; then
51+
if [ -f "$BUILD_DIR/Example_$DIR" ] || [ -f "$BUILD_DIR/Example_${DIR}D" ]; then
52+
echo "$DIR"
53+
fi
5254
fi
5355
fi
5456
done

RunExamplesMacOS.command

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ list_examples()
4141
for DIR in "${EXAMPLE_DIRS[@]}"; do
4242
if ! echo "${EXCLUDED[@]}}" | grep -qw "$DIR"; then
4343
# Include example if its source and binary files exist
44-
if [ -f "examples/Cpp/$DIR/Example.cpp" ] && [ -f "$BUILD_DIR/Example_${DIR}.app/Contents/MacOS/Example_${DIR}" ]; then
45-
echo "$DIR"
44+
if [ -f "examples/Cpp/$DIR/Example.cpp" ] || [ -f "examples/Cpp/$DIR/$DIR.cpp" ]; then
45+
if [ -f "$BUILD_DIR/Example_${DIR}.app/Contents/MacOS/Example_${DIR}" ]; then
46+
echo "$DIR"
47+
fi
4648
fi
4749
fi
4850
done

0 commit comments

Comments
 (0)