-
Notifications
You must be signed in to change notification settings - Fork 27
/
setup_osx.command
executable file
·48 lines (40 loc) · 1.05 KB
/
setup_osx.command
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Argument 1: If not blank, qb64pe will not be started after compiltaion
# Change to the directory where the script is located
cd "$(dirname "$0")"
dont_run="$1"
Pause() {
OLDCONFIG=`stty -g`
stty -icanon -echo min 1 time 0
dd count=1 2>/dev/null
stty $OLDCONFIG
}
echo "QB64-PE 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-PE'"
make OS=osx clean
make OS=osx BUILD_QB64=y -j3
echo ""
if [ -f ./qb64pe ]; then
if [ -z "$dont_run" ]; then
echo "Launching 'QB64-PE'"
./qb64pe
fi
echo ""
echo "Note: 'qb64pe' 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-PE failed!"
[ -z "$dont_run" ] && Pause
exit 1
fi