forked from Banderi/Ozymandias
-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
update-workspace-mac.sh
executable file
·38 lines (34 loc) · 1.27 KB
/
update-workspace-mac.sh
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
#!/bin/zsh
mkdir -p ~/Library/Frameworks
mkdir build
cd build
mkdir tmp
FILENAME=SDL2-2.28.0.dmg
if [ ! -f "tmp/$FILENAME" ]
then
curl "https://libsdl.org/release/$FILENAME" --output "tmp/$FILENAME"
VOLUME=$(hdiutil attach "tmp/$FILENAME" | grep -o '/Volumes/.*')
echo "Installing framework: /Volumes/SDL2/*.framework"
cp -rp "$VOLUME"/*.framework ~/Library/Frameworks
hdiutil detach "$VOLUME"
fi
FILENAME_MIXER=SDL2_mixer-2.0.4.dmg
if [ ! -f "tmp/$FILENAME_MIXER" ]
then
curl "https://libsdl.org/projects/SDL_mixer/release/$FILENAME_MIXER" --output "tmp/$FILENAME_MIXER"
VOLUME=$(hdiutil attach "tmp/$FILENAME_MIXER" | grep -o '/Volumes/.*')
echo "Installing framework:" "/Volumes/SDL2_mixer"/*.framework
cp -rp "$VOLUME"/*.framework ~/Library/Frameworks
hdiutil detach "$VOLUME"
fi
FILENAME_IMAGE=SDL2_image-2.6.3.dmg
if [ ! -f "tmp/$FILENAME_IMAGE" ]
then
curl "https://libsdl.org/projects/SDL_image/release/$FILENAME_IMAGE" --output "tmp/$FILENAME_IMAGE"
VOLUME=$(hdiutil attach "tmp/$FILENAME_IMAGE" | grep -o '/Volumes/.*')
echo "Installing framework:" "/Volumes/SDL2_image"/*.framework
cp -rp "$VOLUME"/*.framework ~/Library/Frameworks
hdiutil detach "$VOLUME"
fi
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release .. -G "Unix Makefiles"
cd ..