-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-project.sh
executable file
·59 lines (47 loc) · 1.54 KB
/
setup-project.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# push dir where script is located, output of command is silenced
pushd $(dirname "$0") > /dev/null
test ! -d "vendor/" && mkdir vendor/
if [ ! -d "vendor/raylib/" ]; then
cd vendor
echo "===== Raylib: downloading raylib binaries and headers"
# -L1 option is required for https
curl -o raylib.tar.gz -L1 https://github.com/raysan5/raylib/releases/download/5.0/raylib-5.0_macos.tar.gz
echo "===== Raylib: extracting"
# --directory is not required
tar -xf raylib.tar.gz --directory .
echo "===== Raylib: renaming and cleaning up"
mv raylib-5.0_macos raylib
rm raylib.tar.gz
echo "===== Raylib: downloading additional headers"
echo " raygui.h"
cd raylib/include
curl -o raygui.h -L1 https://github.com/raysan5/raygui/raw/4.0/src/raygui.h
cd ../..
cd ..
else
echo "Raylib already exists in ./vendor/"
fi
exit
// TODO: box2d
if not exist vendor\box2d\ (
echo ===== Box2d: cloning repo
git clone https://github.com/erincatto/box2d.git vendor\box2d
pushd vendor\box2d
echo ===== Box2d: cmake building
mkdir build && cd build
cmake ..
cmake --build . --config Release
echo =====Box2d: moving lib
cd ..
mkdir lib
move build\bin\Release\box2d.lib lib\
echo =====Box2d: cleaning up cmake build
del /s /q build
rmdir /s /q build
popd
) else (
echo Box2d already exists in .\vendor\
)
echo Script completed
popd > /dev/null