Skip to content
This repository was archived by the owner on Jun 14, 2018. It is now read-only.

Commit d0a46ea

Browse files
rullzerDaniel Hansson
authored andcommitted
AppImage Qt5.8 (#162)
1 parent a864ed1 commit d0a46ea

3 files changed

Lines changed: 132 additions & 2 deletions

File tree

linux/AppImage/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM ubuntu:trusty
2+
3+
MAINTAINER Roeland Jago Douma <roeland@famdouma.nl>
4+
5+
RUN apt-get update && \
6+
apt-get install -y wget libsqlite3-dev libssl-dev cmake git \
7+
software-properties-common build-essential mesa-common-dev fuse rsync
8+
9+
RUN add-apt-repository -y ppa:beineri/opt-qt58-trusty && \
10+
apt-get update && \
11+
apt-get install -y qt58base qt58tools
12+

linux/AppImage/build-appimage.sh

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
#! /bin/bash
2+
3+
export SUDO_UID=${SUDO_UID:-1000}
4+
export SUDO_GID=${SUDO_GID:-1000}
5+
6+
export APP=Nextcloud
7+
export LOWERAPP=${APP,,}
8+
export ARCH=x86_64
9+
export VERSION=2.3.2-beta
10+
11+
#Set Qt-5.8
12+
export QT_BASE_DIR=/opt/qt58
13+
export QTDIR=$QT_BASE_DIR
14+
export PATH=$QT_BASE_DIR/bin:$PATH
15+
export LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH
16+
export PKG_CONFIG_PATH=$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
17+
18+
#QtKeyChain 0.8.0
19+
cd
20+
git clone https://github.com/frankosterfeld/qtkeychain.git
21+
cd qtkeychain
22+
git checkout v0.8.0
23+
mkdir build
24+
cd build
25+
cmake -D CMAKE_INSTALL_PREFIX=/app ../
26+
make -j4
27+
make install
28+
29+
#Build client
30+
cd
31+
mkdir build-client
32+
cd build-client
33+
cmake -D CMAKE_INSTALL_PREFIX=/app \
34+
-D NO_SHIBBOLETH=1 \
35+
-D OEM_THEME_DIR=/home/client/nextcloudtheme \
36+
-DMIRALL_VERSION_SUFFIX=beta \
37+
-DMIRALL_VERSION_BUILD=14 \
38+
/home/client/client
39+
make -j4
40+
make install
41+
42+
#Create skeleton
43+
mkdir -p $HOME/$APP/$APP.AppDir/usr/
44+
cd $HOME/$APP/
45+
46+
#Fetch appimage functions
47+
wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
48+
. ./functions.sh
49+
50+
cd $APP.AppDir
51+
52+
#clean binary
53+
sed -i -e 's|/app|././|g' /app/bin/nextcloud
54+
55+
# Copy installed stuff
56+
cp -r /app/* ./usr/
57+
58+
get_apprun
59+
60+
cp /app/share/applications/nextcloud.desktop .
61+
cp /app/share/icons/hicolor/256x256/apps/Nextcloud.png nextcloud.png
62+
63+
#Copy qt plugins
64+
mkdir -p ./usr/lib/qt5/plugis
65+
cp -r /opt/qt58/plugins ./usr/lib/qt5/plugins
66+
67+
#Copy dependencies
68+
copy_deps
69+
70+
delete_blacklisted
71+
72+
# We don't bundle the developer stuff
73+
rm -rf usr/include || true
74+
rm -rf usr/lib/cmake || true
75+
rm -rf usr/lib/pkgconfig || true
76+
find . -name '*.la' | xargs -i rm {}
77+
strip usr/bin/* usr/lib/* || true
78+
rm -rf app/ || true
79+
# Copy, since libssl must be in sync with libcrypto
80+
cp /lib/x86_64-linux-gnu/libssl.so.1.0.0 usr/lib/
81+
# No need to add CMake stuff
82+
rm -rf usr/lib/x86_64-linux-gnu/cmake/
83+
rm -rf usr/mkspecs
84+
# Don't bundle nextcloudcmd as we don't run it anyway
85+
rm usr/bin/nextcloudcmd
86+
# Don't bundle the explorer extentions as we can't do anything with them in the AppImage
87+
rm -rf usr/share/caja-python/
88+
rm -rf usr/share/nautilus-python/
89+
rm -rf usr/share/nemo-python/
90+
91+
#Move qt5.8 libs to the right location
92+
mv ./opt/qt58/lib/* ./usr/lib/
93+
rm -rf ./opt/
94+
95+
#Move sync exlucde to right location
96+
mv ./usr/etc/Nextcloud/sync-exclude.lst ./usr/bin/
97+
rm -rf ./usr/etc
98+
99+
#desktop intergration
100+
get_desktopintegration $LOWERAPP
101+
102+
#Generate the appimage
103+
cd ..
104+
wget -c https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
105+
chmod +x appimagetool-x86_64.AppImage
106+
./appimagetool-x86_64.AppImage --appimage-extract
107+
108+
mkdir -p ../out/
109+
GLIBC_NEEDED=$(glibc_needed)
110+
APPIMAGE_FILENAME=${APP}-${VERSION}-${ARCH}.glibc$GLIBC_NEEDED.AppImage
111+
APPIMAGE_PATH=../out/$APPIMAGE_FILENAME
112+
113+
./squashfs-root/AppRun -n -v $APP.AppDir $APPIMAGE_PATH
114+
115+
#move appimage
116+
chown $SUDO_UID:$SUDO_GID ../out/*.AppImage
117+
mkdir -p /home/client/out
118+
mv ../out/*.AppImage /home/client/out/

linux/appimage-build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ sudo apt-get -y build-dep owncloud-client
1414
git submodule update --init --recursive
1515
mkdir build-linux
1616
cd build-linux
17-
cmake -D CMAKE_INSTALL_PREFIX=/app -D OEM_THEME_DIR=`pwd`/../nextcloudtheme ../client
17+
cmake -D CMAKE_INSTALL_PREFIX=/usr -D OEM_THEME_DIR=`pwd`/../nextcloudtheme ../client
1818
make
1919
find .
20-
sudo make install
20+
sudo make install DESTDIR=/app
2121
find /app
2222

2323
########################################################################

0 commit comments

Comments
 (0)