-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinstall_linux.sh
executable file
·58 lines (46 loc) · 1.97 KB
/
install_linux.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
#!/bin/bash
#
# Copyright (c) 2020, 219 Design, LLC
# See LICENSE.txt
#
# https://www.219design.com
# Software | Electrical | Mechanical | Product Design
#
set -Eeuxo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $DIR # enter this script's directory.
source $DIR/path_to_qmake.bash
mkdir -p AppImage_staging
cd AppImage_staging
mkdir -p usr/bin
mkdir -p usr/lib
mkdir -p usr/share/applications
mkdir -p usr/share/icons/hicolor/256x256/apps
cp "$DIR/tools/AppImage/logo256.png" usr/share/icons/hicolor/256x256/apps/app.png
cp "$DIR/tools/AppImage/app.desktop" usr/share/applications/
cp "$DIR/build/src/app/"* usr/bin/
# unless you run linuxdeployqt with '-bundle-non-qt-libs', the end user on
# target install machine will need to run provision.sh, too. So put it in the
# image:
cp "$DIR/tools/ci/provision.sh" usr/bin/
cd $DIR # enter this script's directory.
if [ -f linuxdeployqt-6-x86_64.AppImage ]; then
echo "Skipping linuxdeployqt download. Looks done already."
else
wget https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage
chmod 0755 linuxdeployqt-6-x86_64.AppImage
fi
# if we extract linuxdeployqt instead of "running the AppImage", it works on
# more machines (in particular it will work even on those Docker boxes where
# FUSE is disabled)
./linuxdeployqt-6-x86_64.AppImage --appimage-extract
# '-unsupported-allow-new-glibc' enables running this script on Ubuntu 18
# ^^ BE ADVISED ^^ The above means your image ONLY RUNS ON 18 AND UP.
squashfs-root/usr/bin/linuxdeployqt \
AppImage_staging/usr/share/applications/app.desktop \
-extra-plugins=imageformats,platformthemes/libqgtk3.so,platforms/libqxcb.so,xcbglintegrations/libqxcb-glx-integration.so,platforminputcontexts/libibusplatforminputcontextplugin.so \
-qmldir=src/ \
-no-strip \
-no-copy-copyright-files \
-unsupported-allow-new-glibc \
-verbose=2