forked from NoahGWood/OpenEFT
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build_windows.sh
executable file
·42 lines (33 loc) · 1.18 KB
/
build_windows.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
#!/usr/bin/bash
mkdir build
echo "Setting Up NBIS"
sudo rm -rf ./nbis #Remove any old copies
git clone https://github.com/Robbbbbbbbb/nbis ./nbis
cd nbis
./setup.sh ${PWD}/../build --64
echo "Configuring NBIS"
make config
echo "Making NBIS"
make it
echo "Installing NBIS"
sudo make install LIBNBIS=no
echo "Checking NBIS binaries paths"
case :$PATH:
in *:$HOME/OpenEFT/nbis/nfseg/bin:*) ;; # do nothing, it's there
*) echo 'export PATH="$HOME/OpenEFT/nbis/nfseg/bin:$PATH"' >> ~/.bashrc #it's missing, add to PATH
esac
case :$PATH:
in *:$HOME/OpenEFT/nbis/nfiq/bin:*) ;; # do nothing, it's there
*) echo 'export PATH="$HOME/OpenEFT/nbis/nfiq/bin:$PATH"' >> ~/.bashrc #it's missing, add to PATH
esac
#source ~/.bashrc doesn't work in .sh in Ubuntu since scripts run in their own session. Need to run post build
echo "Installing LibOpenJP2-Tools"
sudo apt-get install libopenjp2-tools -y
sudo apt-get install libgl1-mesa-glx -y
echo "Installing Pip Requirements"
cd ~/OpenEFT
pip3 install -r requirements.txt
python3 manage.py migrate
echo "OpenEFT build complete. Update your PATH by typing 'source ~/.bashrc' and run the app by typing 'python3 openeft.py'"
cd ~/OpenEFT
source ~/.bashrc