forked from oscarpilote/Ortho4XP
-
Notifications
You must be signed in to change notification settings - Fork 3
/
install_mac.sh
executable file
·44 lines (35 loc) · 928 Bytes
/
install_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
39
40
41
42
43
44
#! /bin/bash
if [ ! -f "Ortho4XP.py" ]; then
echo " "
echo "Error!"
echo " "
echo "install_mac.sh must be located in the main Ortho4XP directory."
echo " "
exit 1
fi
if ! [ -x "$(command -v brew)" ]; then
echo " "
echo "Error!"
echo "Homebrew must be installed first: https://brew.sh"
echo " "
exit 1
fi
echo " "
echo "Setting up Ortho4XP...."
echo " "
# Install software dependencies from brew
brew install python python-tk spatialindex p7zip proj gdal
# Create a Python virtual environment
python3 -m venv venv
# Activate the Python virtual environment
source venv/bin/activate
# Install Python dependencies
pip install -r requirements.txt
# Allow macOS to run required tools
xattr -dr com.apple.quarantine ./Utils/mac/*
# Make start_mac.sh file executable
chmod 755 start_mac.sh
echo " "
echo "Ortho4XP setup complete!"
echo "Use ./start_mac.sh to run Ortho4XP"
echo " "