-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall_Ubuntu-18.04_xbox-one.sh
146 lines (134 loc) · 4.27 KB
/
install_Ubuntu-18.04_xbox-one.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#!/usr/bin/env bash
set -e
LIBFREENECT2_RELEASE=0.2.0
GRASS_RELEASE=8.2.0
PCL_RELEASE=1.11.0
TANGIBLE_RELEASE=1.2.1
RINKINECT_RELEASE=1.2.0
NCORES=2
CDIR=`pwd`
# package dependencies
sudo apt-get update && sudo apt-get install -y \
build-essential cmake pkg-config git wget\
libusb-1.0-0-dev libturbojpeg0-dev libglfw3-dev \
libboost-all-dev libeigen3-dev libflann-dev libopencv-dev \
flex make bison gcc libgcc1 g++ ccache \
python python-dev \
python-opengl \
python-wxversion python-wxtools python-wxgtk3.0 \
python-dateutil libgsl-dev python-numpy python-pil python-matplotlib python-watchdog\
python3-numpy python3-pil python3-matplotlib python3-watchdog \
python3-wxgtk4.0 python3-wxgtk-webview4.0 \
wx3.0-headers wx-common libwxgtk3.0-dev \
libwxbase3.0-dev \
libncurses5-dev \
zlib1g-dev gettext \
libtiff5-dev libpnglite-dev \
libcairo2 libcairo2-dev \
sqlite3 libsqlite3-dev \
libpq-dev \
libreadline-dev libfreetype6-dev \
libfftw3-3 libfftw3-dev \
libboost-thread-dev libboost-program-options-dev liblas-c-dev \
resolvconf \
subversion \
libavutil-dev ffmpeg2theora \
libffmpegthumbnailer-dev \
libavcodec-dev \
libxmu-dev \
libavformat-dev libswscale-dev \
checkinstall \
libglu1-mesa-dev libxmu-dev \
ghostscript \
libproj-dev proj-data proj-bin \
libgeos-dev \
libgdal-dev python-gdal gdal-bin \
liblas-bin liblas-dev \
libzstd-dev
# Python 3.7 for latest GRASS is needed
sudo add-apt-repository ppa:deadsnakes/ppa -y && apt install -y python3.7
# libfreenect2
wget https://github.com/OpenKinect/libfreenect2/archive/v${LIBFREENECT2_RELEASE}.tar.gz
tar xvf v${LIBFREENECT2_RELEASE}.tar.gz
rm v${LIBFREENECT2_RELEASE}.tar.gz
cd libfreenect2-${LIBFREENECT2_RELEASE}
mkdir build && cd build
cmake ..
make
sudo make install
sudo cp ../platform/linux/udev/90-kinect2.rules /etc/udev/rules.d/
cd ../..
# PCL
wget https://github.com/PointCloudLibrary/pcl/archive/pcl-${PCL_RELEASE}.tar.gz
tar xvf pcl-${PCL_RELEASE}.tar.gz
rm pcl-${PCL_RELEASE}.tar.gz
cd pcl-pcl-${PCL_RELEASE}
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j${NCORES}
sudo make -j2 install
cd ../..
# GRASS GIS
wget https://github.com/OSGeo/grass/archive/${GRASS_RELEASE}.tar.gz
tar xvf ${GRASS_RELEASE}.tar.gz
cd grass-${GRASS_RELEASE}
CFLAGS="-O2 -Wall" LDFLAGS="-s" ./configure \
--enable-largefile=yes \
--with-nls \
--with-cxx \
--with-readline \
--with-pthread \
--with-proj-share=/usr/share/proj \
--with-geos=/usr/bin/geos-config \
--with-wxwidgets \
--with-cairo \
--with-opengl-libs=/usr/include/GL \
--with-freetype=yes --with-freetype-includes="/usr/include/freetype2/" \
--with-sqlite=yes \
--with-odbc=no \
--with-liblas=yes --with-liblas-config=/usr/bin/liblas-config
make -j${NCORES}
sudo make install
cd ..
# r.in.kinect
git clone --branch v${RINKINECT_RELEASE} --single-branch https://github.com/tangible-landscape/r.in.kinect
cd r.in.kinect
make MODULE_TOPDIR=../grass-${GRASS_RELEASE}
make install MODULE_TOPDIR=../grass-${GRASS_RELEASE}
cd ..
# TL plugin
# could use g.extension instead:
# g.extension g.gui.tangible url=github.com/tangible-landscape/grass-tangible-landscape
# this is for the development of grass-tangible-landscape
wget https://github.com/tangible-landscape/grass-tangible-landscape/archive/v${TANGIBLE_RELEASE}.tar.gz
tar xvf v${TANGIBLE_RELEASE}.tar.gz
cd grass-tangible-landscape-${TANGIBLE_RELEASE}
make MODULE_TOPDIR=../grass-${GRASS_RELEASE}
make install MODULE_TOPDIR=../grass-${GRASS_RELEASE}
cd ..
# set up GRASS GIS icon in dash
cat << EOF > /tmp/grass.desktop
[Desktop Entry]
Version=1.0
Name=GRASS GIS
Comment=Start GRASS GIS
Exec=`ls -d ${CDIR}/grass-${GRASS_RELEASE}/bin.x86_64-pc-linux-gnu/*`
Icon=${CDIR}/grass-${GRASS_RELEASE}/dist.x86_64-pc-linux-gnu/share/icons/hicolor/scalable/apps/grass.svg
Terminal=true
Type=Application
Categories=GIS;Application;
EOF
sudo mv /tmp/grass.desktop /usr/share/applications/grass.desktop
# set up kinect Protonect app in dash
cat << EOF > /tmp/kinect.desktop
[Desktop Entry]
Version=1.0
Name=Kinect Protonect
Comment=Start Kinect
Exec=${CDIR}/libfreenect2-${LIBFREENECT2_RELEASE}/build/bin/Protonect
Icon=
Terminal=true
Type=Application
Categories=GIS;Application;
EOF
sudo mv /tmp/kinect.desktop /usr/share/applications/kinect.desktop