2022-08-12 00:54:12 +00:00
|
|
|
# Argument 1: Location of qb64pe (blank means current directory
|
|
|
|
# Argument 2: If not blank, qb64pe will not be started after compiltaion
|
2022-04-27 22:08:36 +00:00
|
|
|
|
|
|
|
cd "$(dirname "$1")"
|
|
|
|
dont_run="$2"
|
|
|
|
|
2015-08-02 12:12:44 +00:00
|
|
|
Pause()
|
|
|
|
{
|
|
|
|
OLDCONFIG=`stty -g`
|
|
|
|
stty -icanon -echo min 1 time 0
|
|
|
|
dd count=1 2>/dev/null
|
|
|
|
stty $OLDCONFIG
|
|
|
|
}
|
2022-08-12 00:54:12 +00:00
|
|
|
echo "QB64-PE Setup"
|
2015-08-02 12:12:44 +00:00
|
|
|
echo ""
|
|
|
|
|
|
|
|
find . -name "*.command" -exec chmod +x {} \;
|
2021-01-24 04:40:56 +00:00
|
|
|
|
2020-02-21 01:02:54 +00:00
|
|
|
if [ -z "$(which clang++)" ]; then
|
2020-02-20 23:52:30 +00:00
|
|
|
echo "Apple's C++ compiler not found."
|
2020-01-19 14:08:08 +00:00
|
|
|
echo "Attempting to install Apple's Command Line Tools for Xcode..."
|
|
|
|
echo "After installation is finished, run this setup script again."
|
|
|
|
xcode-select --install
|
2022-04-27 22:08:36 +00:00
|
|
|
[ -z "$dont_run" ] && Pause
|
2015-08-02 12:12:44 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-08-12 00:54:12 +00:00
|
|
|
echo "Building 'QB64-PE'"
|
2022-05-11 03:49:26 +00:00
|
|
|
make OS=osx clean
|
2022-05-18 05:25:04 +00:00
|
|
|
make OS=osx BUILD_QB64=y -j3
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
echo ""
|
2022-08-12 00:54:12 +00:00
|
|
|
if [ -f ./qb64pe ]; then
|
2022-04-27 22:08:36 +00:00
|
|
|
if [ -z "$dont_run" ]; then
|
2022-08-12 00:54:12 +00:00
|
|
|
echo "Launching 'QB64-PE'"
|
|
|
|
./qb64pe
|
2022-04-27 22:08:36 +00:00
|
|
|
fi
|
2015-08-02 12:12:44 +00:00
|
|
|
echo ""
|
2022-08-12 00:54:12 +00:00
|
|
|
echo "Note: 'qb64pe' is located in same folder as this setup program."
|
2015-08-02 12:12:44 +00:00
|
|
|
echo "Press any key to continue..."
|
2022-04-27 22:08:36 +00:00
|
|
|
[ -z "$dont_run" ] && Pause
|
|
|
|
exit 0
|
2015-08-02 12:12:44 +00:00
|
|
|
else
|
2022-08-12 00:54:12 +00:00
|
|
|
echo "Compilation of QB64-PE failed!"
|
2022-04-27 22:08:36 +00:00
|
|
|
[ -z "$dont_run" ] && Pause
|
2015-08-02 12:12:44 +00:00
|
|
|
exit 1
|
|
|
|
fi
|