-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.bash
55 lines (50 loc) · 1.58 KB
/
setup.bash
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
#!/usr/bin/env bash
install_linux_dependencies() {
echo "Linux detected - Installing dependencies"
sudo apt update
sudo apt install -y cmake make pkg-config libglfw3-dev libglm-dev libglew-dev libgl-dev libassimp-dev
# Python
sudo apt install -y python3 python3-pip python3-venv
python3 -m venv env
source env/bin/activate
pip3 install numpy pandas scipy
}
install_mac_dependencies() {
echo "Mac detected - Installing dependencies"
if ! [ -x "$(command -v brew)" ]; then
echo "Error: brew is not installed. Would you like to install it? (y/n)"
read -r response
if [[ "$response" =~ ^([yY])$ ]]; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Add Homebrew to the PATH if necessary
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
else
echo "Exiting"
exit 1
fi
fi
brew install glfw glm glew assimp
# Python
brew install python3
python3 -m venv env
source env/bin/activate
pip3 install numpy pandas scipy
}
# Determine OS and install accordingly
OS_TYPE=$(uname -s)
case "$OS_TYPE" in
Linux*)
install_linux_dependencies
;;
Darwin*)
install_mac_dependencies
;;
MINGW64_NT*|MSYS_NT*|CYGWIN_NT*)
echo "Windows detected - You need to install GLFW, GLM, GLEW, and ASSIMP manually"
;;
*)
echo "Unknown OS detected - Exiting"
exit 1
;;
esac