This repository has been archived by the owner on Apr 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfinal_ubuntu_packaging_steps_QtWebEngine.sh
executable file
·103 lines (70 loc) · 3.73 KB
/
final_ubuntu_packaging_steps_QtWebEngine.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
#!/bin/bash
###
### Final packaging steps for CARTA QtWebEngine version on ubuntu (Last updated: 23/9/17)
###
### Note: Some paths may need to be adjusted for your system.
### So please check every line carefully.
###
# 0. Define the installed location of your Qt and CARTA source code (for grabing the latest html):
CARTABUILDHOME=~/cartahome
qtpath=/opt/Qt5.9.1/5.9.1/gcc_64 ## location of your Qt installation
casapath=~/cartahome/CARTAvis-externals/ThirdParty/casa ## location of casacore/code installation
cartapath=~/cartahome/CARTAvis ## location of your CARTA source code
thirdparty=~/cartahome/CARTAvis-externals/ThirdParty ## location where qooxdoo is installed
packagepath=/tmp/carta
version=1.2.4 ## version number to be put on the final package
# 1. Export the location of the successfully built casacore/casacode library files
export LD_LIBRARY_PATH=$casapath/trunk/linux/lib
# 2. Download and run the latest make-app-carta script using the 'carta-distro' template
svn export https://github.com/CARTAvis/deploytask/trunk/make-app-carta
chmod 755 make-app-carta
rm -rf $packagepath-$version
svn export https://github.com/CARTAvis/deploytask/trunk/carta-distro
./make-app-carta -ni -v version=$version out=/tmp ws=$CARTABUILDHOME/CARTAvis/build/cpp/desktop template=carta-distro
# 3. Fix a few things
cp -r $qtpath/plugins/platforms $packagepath-$version/bin/
cp $qtpath/lib/libQt5DBus.so.5 $packagepath-$version/lib/
chrpath -c -r '$ORIGIN/../../lib:$ORIGIN/../../plugins/CasaImageLoader' $packagepath-$version/plugins/ImageStatistics/libplugin.so
cp $thirdparty/cfitsio/lib/libcfitsio.so.5 $packagepath-$version/lib/
# 4. Copy over the html and qooxdoo
cp -r $cartapath/carta/html5 $packagepath-$version/etc
rm $packagepath-$version/etc/html5/common/qooxdoo-3.5.1-sdk
cp -r $thirdparty/qooxdoo-3.5.1-sdk $packagepath-$version/etc/html5/common/qooxdoo-3.5.1-sdk
rm -f $packagepath-$version/etc/html5/html5.iml
rm -f $packagepath-$version/etc/html5/._html5.iml
rm -f $packagepath-$version/etc/html5/.idea
# 5. Setup geodetic and ephemerides data
curl -O -L http://alma.asiaa.sinica.edu.tw/_downloads/measures_data.tar.gz
tar -xvf measures_data.tar.gz
mv measures_data $packagepath-$version/etc/
rm measures_data.tar.gz
# 6. Copy over the sample images
curl -O -L http://alma.asiaa.sinica.edu.tw/_downloads/images.tar.gz
tar -xvf images.tar.gz
mkdir $packagepath-$version/etc/images
mv images $packagepath-$version/etc/
rm images.tar.gz
# 7. Fix for QtSql; copy the library file to the correct location
mkdir $packagepath-$version/bin/sqldrivers
cp $qtpath/plugins/sqldrivers/libqsqlite.so $packagepath-$version/bin/sqldrivers
# 8. Copy NSS libraries
cp -rf /usr/lib/x86_64-linux-gnu/nss $packagepath-$version/lib/
# 9. Fixes for xcb
cp $qtpath/lib/libQt5XcbQpa.so.5 $packagepath-$version/lib/
cp -r $qtpath/plugins/xcbglintegrations $packagepath-$version/bin/
# 10. Copy the QtWebEngine files
cp $qtpath/libexec/QtWebEngineProcess $packagepath-$version/bin/
cp -r $qtpath/translations/qtwebengine_locales $packagepath-$version/bin/
cp $qtpath/resources/* $packagepath-$version/bin/
mkdir $packagepath-$version/bin/imageformats
cp -r $qtpath/plugins/imageformats/libqjpeg.so $packagepath-$version/bin/imageformats/
# 10. Remove PYTHONPATH from carta.sh as Ubuntu comes with Python2.7 by default
sed --in-place '/export PYTHONHOME=$dirname/d' $packagepath-$version/bin/carta.sh
# 12. Make the symbolic link so that the HTML can be found
cd $packagepath-$version/bin/
ln -s ../etc etc
cd -
# 13. Remove libEGL.so.1 otherwise there would be a conflict with a
# libmirclient.so.9 on a different Ubuntu distribution
rm $packagepath-$version/lib/libEGL.so.1
#Finished