-
Notifications
You must be signed in to change notification settings - Fork 3
/
install_Ubuntu-22.04_xbox-one.sh
133 lines (122 loc) · 3.57 KB
/
install_Ubuntu-22.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
#!/usr/bin/env bash
set -e
LIBFREENECT2_RELEASE=0.2.1
GRASS_RELEASE=8.2.1
PCL_RELEASE=1.13.1
TANGIBLE_RELEASE=1.2.2
RINKINECT_RELEASE=1.2.1
NCORES=2
CDIR=`pwd`
sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
# package dependencies
sudo apt-get update && sudo apt-get install \
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 libgcc-s1 g++ ccache \
python3-dateutil libgsl-dev \
python3-numpy python3-pil python3-matplotlib python3-watchdog \
python3-wxgtk4.0 python3-wxgtk-webview4.0 python3-pip \
python-is-python3 \
libncurses-dev \
zlib1g-dev gettext \
libtiff-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 \
subversion \
libavutil-dev \
libavcodec-dev \
libavformat-dev libswscale-dev \
libglu1-mesa-dev libxmu-dev \
ghostscript \
libproj-dev proj-data proj-bin \
libgeos-dev \
libgdal-dev python3-gdal gdal-bin \
libzstd-dev \
libpdal-dev \
libsdl2-dev
pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04 wxPython
# libfreenect2
wget https://github.com/OpenKinect/libfreenect2/archive/refs/tags/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 -DENABLE_CUDA:BOOL=OFF ..
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/refs/tags/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
git clone --branch ${GRASS_RELEASE} https://github.com/OSGeo/grass
cd grass
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-cairo \
--with-freetype=yes --with-freetype-includes="/usr/include/freetype2/" \
--with-sqlite=yes \
--with-odbc=no \
--with-liblas=no \
--with-opengl \
--with-pdal
make -j${NCORES}
sudo make install
cd ..
# r.in.kinect
git clone --branch v${RINKINECT_RELEASE} https://github.com/tangible-landscape/r.in.kinect
cd r.in.kinect
make MODULE_TOPDIR=../grass
make install MODULE_TOPDIR=../grass
cd ..
# TL plugin
git clone --branch v${TANGIBLE_RELEASE} https://github.com/tangible-landscape/grass-tangible-landscape
cd grass-tangible-landscape
make MODULE_TOPDIR=../grass
make install MODULE_TOPDIR=../grass
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=/usr/local/bin/grass
Icon=/usr/local/grass82/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