-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall
executable file
·168 lines (152 loc) · 5.18 KB
/
install
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#!/bin/sh
#
# Installer/Updater for the Speckle Instrument drivers and GUI
#
echo ""
echo "-------------------------------------------------------------"
echo "Installing dependencies"
echo "-------------------------------------------------------------"
echo ""
sudo apt remove -y libvips*
sudo apt-get -y install tk tk-dev tcl tcl-dev tcl-fitstcl make g++ automake autogen autoconf \
libcfitsio-bin libcfitsio-dev wcslib-dev pkg-config libglib2.0-dev \
gnuplot default-mysql-client default-mysql-server mysqltcl xpa-tools zlib1g zlib1g-dev \
bwidget build-essential libexpat1-dev libjpeg-dev libpng-dev \
libwebp-dev libgif-dev libexif-dev imagemagick libmagick++-dev saods9 xterm \
libtiff5-dev libjpeg-dev libjpeg8-dev libgsf-1-dev libfftw3-bin libfftw3-dev \
libusb-1.0-0 libusb-1.0-0-dev qfits-tools qfitsview topcat libpangoft2-1.0-0 wget
export SPECKLE_DIR=$HOME/speckle-control
export PKG_CONFIG_PATH=$HOME/speckle-control/lib/pkgconfig
mkdir -p bin
cd lib
ln -s /usr/lib/tcltk/x86_64-linux-gnu/fitsTcl/libfitstcl.so libfitstcl.so
cd ../ccd
make
cp libccd_linux.so.1.0 ../lib/libccd.so
cd ../guider
make
cp libguider_linux.so ../lib/libguider.so
# vips may need
#
# make AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=:
# make install AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=:
#
#if [ ! -f lib/libvips.so ]; then
# cd ../vips-8.5.9
# ./configure --prefix=$HOME/speckle-control --without-rsvg --enable-introspection=no --enable-shared=yes
# make CPPFLAGS="$(pkg-config --cflags glib-2.0) --std=c++14"
# make install
# if [! -f $HOME/speckle-control/lib/libvips.so ]; then
# echo ""
# echo "-----------------------------------------------------------"
# echo "Failed to build libvips.so using vips-8.5.9 sources"
# echo "-----------------------------------------------------------"
# echo ""
# exit
# fi
#fi
echo ""
echo "-------------------------------------------------------------"
echo "Installing/Upgrading Andor Linux support"
echo "-------------------------------------------------------------"
echo ""
cd ../andor
rm -fr andor.tgz andor-driver
wget http://www.randomfactory.com/speckle/andor.tgz
tar xzf andor.tgz
mv andor andor-driver
cd andor-driver
sudo ./install_andor
cd ..
rm -fr andorTclInit.so
./buildlib
if [ ! -f andorTclInit.so ]; then
echo ""
echo "-----------------------------------------------------------"
echo "Failed to build andorTclInit.so using andor/buildlib"
echo "-----------------------------------------------------------"
echo ""
exit
fi
mv andorTclInit.so ../lib/.
mv andor.tgz ../andor-driver.tgz
echo "Building shared libraries"
cd ../oriel
rm -f liboriel.so
./buildlib
if [ ! -f liboriel.so ]; then
echo ""
echo "-----------------------------------------------------------"
echo "Failed to build liboriel.so using oriel/buildlib"
echo "-----------------------------------------------------------"
echo ""
exit
fi
mv liboriel.so ../lib/.
cd ../andor
rm -fr andorTclInit.so
./buildlib
if [ ! -f andorTclInit.so ]; then
echo ""
echo "-----------------------------------------------------------"
echo "Failed to build andorTclInit.so using andor/buildlib"
echo "-----------------------------------------------------------"
echo ""
exit
fi
mv andorTclInit.so ../lib/.
cd ..
mkdir -p $HOME/Desktop
if [ ! -f startspeckle2 ]; then
echo ""
echo "-----------------------------------------------------------"
echo ""
echo "Setting up the runtime environment"
echo ""
echo "Select your target Observatory from the following list:"
echo "1. Gemini South"
echo "2. Gemini North"
echo "3. WIYN"
echo "-----------------------------------------------------------"
echo ""
read type
if [ $type -eq 1 ]; then
cp startspeckle2.geminiS startspeckle2
cp cleanRestart.geminiS cleanRestart
cp powerbar.desktop.geminiS $HOME/Desktop/powerbar.desktop
cp cleanRestart $HOME/Desktop/cleanRestart.desktop
fi
if [ $type -eq 2 ]; then
cp startspeckle2.geminiN startspeckle2
cp cleanRestart.geminiN cleanRestart
cp powerbar.desktop.geminiN $HOME/Desktop/powerbar.desktop
cp cleanRestart $HOME/Desktop/cleanRestart.desktop
fi
if [ $type -eq 3 ]; then
cp startspeckle2.wiyn startspeckle2
cp cleanRestart.wiyn cleanRestart
cp powerbar.desktop.wiyn $HOME/Desktop/powerbar.desktop
cp cleanRestart $HOME/Desktop/cleanRestart.desktop
fi
fi
cp startspeckle2 $HOME/Desktop/SpeckleGUI.desktop
cp setDevicePermissions $HOME/Desktop/SpecklePermissions.desktop
cp SAO*.desktop $HOME/Desktop/.
echo "Testing environment and doing an inventory of connected hardware"
./setDevicePermissions
./startspeckle2 test
export INVENTORY_EXIT=1
$SPECKLE_DIR/gui-scripts/inventory.tcl
unset INVENTORY_EXIT
echo ""
echo "-------------------------------------------------------------"
echo "If this is a new Installation, please update the Andor Camera"
echo "and Filter Wheel serial numbers in the appropriate site"
echo "specific andorsConfiguration and filtersConfiguration files."
echo ""
echo "If this a new site, then a completely new set of configuration"
echo "files will need to be generated."
echo ""
echo "Details can be found in the Programmers Guide"
echo "-------------------------------------------------------------"
echo ""