Skip to content

Commit

Permalink
Made Mac *.command scripts runnable from Finder.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBanana committed Aug 26, 2023
1 parent aa03d3d commit 6b0ead9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
16 changes: 8 additions & 8 deletions BuildIOS.command
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
SOURCE_DIR="$(dirname $0)"
OUTPUT_DIR="$SOURCE_DIR/build_ios"
CLEAR_CACHE=0
ENABLE_EXAMPLES="OFF"
ENABLE_TESTS="ON"
ENABLE_EXAMPLES="ON"
ENABLE_TESTS="OFF"
#BUILD_TYPE="Release"
DEPLOYMENT_TARGET="11.0"
PROJECT_ONLY=0

# When this .command script is launched from Finder, we have to change to the source directory explicitly
cd $SOURCE_DIR

print_help()
{
echo "USAGE:"
Expand All @@ -19,8 +22,7 @@ print_help()
# echo " -d, --debug ............. Configure Debug build (default is Release)"
echo " -t, --target T .......... Sets deployment target to T (default is 11.0)"
echo " -p, --project-only ...... Build project solution only (no compilation)"
# echo " -no-examples ............ Exclude example projects"
echo " -no-tests ............... Exclude test projects"
echo " -no-examples ............ Exclude example projects"
echo "NOTES:"
echo " Default output directory is 'build_ios'"
}
Expand All @@ -44,10 +46,8 @@ for ARG in "$@"; do
READ_TARGET=1
elif [ $ARG = "-p" ] || [ $ARG = "--project-only" ]; then
PROJECT_ONLY=1
# elif [ $ARG = "-no-examples" ]; then
# ENABLE_EXAMPLES="OFF"
elif [ $ARG = "-no-tests" ]; then
ENABLE_TESTS="OFF"
elif [ $ARG = "-no-examples" ]; then
ENABLE_EXAMPLES="OFF"
else
OUTPUT_DIR=$ARG
fi
Expand Down
3 changes: 3 additions & 0 deletions BuildMacOS.command
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ ENABLE_TESTS="ON"
BUILD_TYPE="Release"
PROJECT_ONLY=0

# When this .command script is launched from Finder, we have to change to the source directory explicitly
cd $SOURCE_DIR

print_help()
{
echo "USAGE:"
Expand Down
3 changes: 3 additions & 0 deletions RunExamplesMacOS.command
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
SOURCE_DIR="$(dirname $0)"
BUILD_DIR="$SOURCE_DIR/build_macos/build"

# When this .command script is launched from Finder, we have to change to the source directory explicitly
cd $SOURCE_DIR

if [ "$#" -eq 1 ]; then
BUILD_DIR=$1
elif [ -d "$SOURCE_DIR/build_macos/build/Example_HelloTriangle.app" ]; then
Expand Down

0 comments on commit 6b0ead9

Please sign in to comment.