2013-01-11 17:44:40 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2022-01-25 01:40:08 +09:00
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
|
cd $SCRIPT_DIR
|
|
|
|
|
|
2013-03-12 13:37:19 -07:00
|
|
|
for category in $( find ../../examples -maxdepth 1 -type d )
|
2013-01-11 17:44:40 -05:00
|
|
|
do
|
2025-03-07 13:31:25 -05:00
|
|
|
if [ "$category" = "../../examples/android" -o "$category" = "../../examples/templates" -o "$category" = "../../examples/tvOS" -o "$category" = "../../examples/ios" -o "$category" = "../../examples/gles" -o "$category" = "../../examples" ]; then
|
2013-03-12 13:37:19 -07:00
|
|
|
continue
|
|
|
|
|
fi
|
|
|
|
|
echo "-----------------------------------------------------------------"
|
|
|
|
|
echo building ALL examples in $category
|
|
|
|
|
|
|
|
|
|
for example in $( find $category -maxdepth 1 -type d )
|
|
|
|
|
do
|
|
|
|
|
if [ "$example" = "$category" ]; then
|
|
|
|
|
continue
|
|
|
|
|
fi
|
|
|
|
|
|
2013-03-13 14:57:28 -07:00
|
|
|
if [ ! -e "$example"/$(basename $example).xcodeproj ]; then
|
|
|
|
|
echo "-----------------------------------------------------------------"
|
|
|
|
|
echo no xcode project for $example
|
|
|
|
|
continue
|
2013-03-12 13:37:19 -07:00
|
|
|
fi
|
|
|
|
|
|
2013-03-12 13:43:14 -07:00
|
|
|
echo "-----------------------------------------------------------------"
|
|
|
|
|
echo building $example Debug
|
2013-03-13 14:57:28 -07:00
|
|
|
xcodebuild -configuration Debug -target $(basename $example) -project $example/$(basename $example).xcodeproj
|
2013-03-12 13:43:14 -07:00
|
|
|
ret=$?
|
|
|
|
|
if [ $ret -ne 0 ]; then
|
2013-03-12 13:37:19 -07:00
|
|
|
echo failed building $example Debug
|
|
|
|
|
exit
|
2013-03-12 13:43:14 -07:00
|
|
|
fi
|
2013-03-12 13:37:19 -07:00
|
|
|
|
2013-03-12 13:43:14 -07:00
|
|
|
echo "-----------------------------------------------------------------"
|
2013-03-12 13:37:19 -07:00
|
|
|
echo building $example Release
|
2013-03-13 14:57:28 -07:00
|
|
|
xcodebuild -configuration Release -target $(basename $example) -project $example/$(basename $example).xcodeproj
|
2013-03-12 13:37:19 -07:00
|
|
|
ret=$?
|
|
|
|
|
if [ $ret -ne 0 ]; then
|
|
|
|
|
echo failed building $example Release
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
echo "-----------------------------------------------------------------"
|
|
|
|
|
echo ""
|
|
|
|
|
done
|
2013-01-11 17:44:40 -05:00
|
|
|
done
|