1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-26 17:10:38 +00:00
QB64-PE/setup_osx.command
Matthew Kilgore 2d919768ac Add C++ compiler settings dialog
The new dialogs includes 5 settings:

1. Flag to turn on Optimization (off by default)
2. Flag to strip symbols (On by default)
3. String for extra compiler flags
4. String for extra linker flags
5. Setting for max compiler processes (default of 3)

Fixes: #65
Fixes: #40
2022-05-30 23:15:04 -04:00

48 lines
1 KiB
Bash
Executable file

# Argument 1: Location of qb64 (blank means current directory
# Argument 2: If not blank, qb64 will not be started after compiltaion
cd "$(dirname "$1")"
dont_run="$2"
Pause()
{
OLDCONFIG=`stty -g`
stty -icanon -echo min 1 time 0
dd count=1 2>/dev/null
stty $OLDCONFIG
}
echo "QB64 Setup"
echo ""
find . -name "*.command" -exec chmod +x {} \;
if [ -z "$(which clang++)" ]; then
echo "Apple's C++ compiler not found."
echo "Attempting to install Apple's Command Line Tools for Xcode..."
echo "After installation is finished, run this setup script again."
xcode-select --install
[ -z "$dont_run" ] && Pause
exit 1
fi
echo "Building 'QB64'"
make OS=osx clean
make OS=osx BUILD_QB64=y -j3
echo ""
if [ -f ./qb64 ]; then
if [ -z "$dont_run" ]; then
echo "Launching 'QB64'"
./qb64
fi
echo ""
echo "Note: 'qb64' is located in same folder as this setup program."
echo "Press any key to continue..."
[ -z "$dont_run" ] && Pause
exit 0
else
echo "Compilation of QB64 failed!"
[ -z "$dont_run" ] && Pause
exit 1
fi