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

Commit

Permalink
Bit cleaner build
Browse files Browse the repository at this point in the history
Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer committed May 29, 2017
1 parent d2d9044 commit f67f62f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 23 deletions.
13 changes: 6 additions & 7 deletions linux/AppImage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ FROM ubuntu:trusty

MAINTAINER Roeland Jago Douma <[email protected]>

RUN apt-get update
RUN apt-get update && \
apt-get install -y wget libsqlite3-dev libssl-dev cmake git \
software-properties-common build-essential mesa-common-dev fuse rsync

RUN apt-get install -y wget libsqlite3-dev libssl-dev cmake git software-properties-common build-essential mesa-common-dev fuse
RUN add-apt-repository -y ppa:beineri/opt-qt58-trusty && \
apt-get update && \
apt-get install -y qt58base qt58tools

RUN add-apt-repository -y ppa:beineri/opt-qt58-trusty

RUN apt-get update

RUN apt-get install -y qt58base qt58tools
57 changes: 41 additions & 16 deletions linux/AppImage/build.sh → linux/AppImage/build-appimage.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
#/bin/bash
#! /bin/bash

#Get Qt-5.8
source /opt/qt58/bin/qt58-env.sh
export SUDO_UID=${SUDO_UID:-1000}
export SUDO_GID=${SUDO_GID:-1000}

#QtKeyChain
cd
export APP=Nextcloud
export LOWERAPP=${APP,,}
export ARCH=x86_64
export VERSION=2.3.2-beta

#Set Qt-5.8
export QT_BASE_DIR=/opt/qt58
export QTDIR=$QT_BASE_DIR
export PATH=$QT_BASE_DIR/bin:$PATH
export LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH

#QtKeyChain 0.8.0
cd
git clone https://github.com/frankosterfeld/qtkeychain.git
cd qtkeychain
git checkout v0.8.0
Expand All @@ -15,7 +27,7 @@ make -j4
make install

#Build client
cd
cd
mkdir build-client
cd build-client
cmake -D CMAKE_INSTALL_PREFIX=/app \
Expand All @@ -27,12 +39,6 @@ cmake -D CMAKE_INSTALL_PREFIX=/app \
make -j4
make install

#Set info
ARCH=$(arch)
APP=Nextcloud
LOWERAPP=${APP,,}
VERSION=2.3.2-beta

#Create skeleton
mkdir -p $HOME/$APP/$APP.AppDir/usr/
cd $HOME/$APP/
Expand Down Expand Up @@ -72,22 +78,41 @@ strip usr/bin/* usr/lib/* || true
rm -rf app/ || true
# Copy, since libssl must be in sync with libcrypto
cp /lib/x86_64-linux-gnu/libssl.so.1.0.0 usr/lib/

# No need to add CMake stuff
rm -rf usr/lib/x86_64-linux-gnu/cmake/
rm -rf usr/mkspecs
# Don't bundle nextcloudcmd as we don't run it anyway
rm usr/bin/nextcloudcmd
# Don't bundle the explorer extentions as we can't do anything with them in the AppImage
rm -rf usr/share/caja-python/
rm -rf usr/share/nautilus-python/
rm -rf usr/share/nemo-python/

#Move qt5.8 libs to the right location
mv ./opt/qt58/lib/* ./usr/lib/
rm -rf ./opt/

#Move sync exlucde to right location
mv ./usr/etc/Nextcloud/sync-exclude.lst ./usr/bin/
rm -rf ./usr/etc

#desktop intergration
get_desktopintegration $LOWERAPP

#Generate the appimage
cd ..
wget -c https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
./appimagetool-x86_64.AppImage --appimage-extract

mkdir -p ../out/
generate_type2_appimage
GLIBC_NEEDED=$(glibc_needed)
APPIMAGE_FILENAME=${APP}-${VERSION}-${ARCH}.glibc$GLIBC_NEEDED.AppImage
APPIMAGE_PATH=../out/$APPIMAGE_FILENAME

./squashfs-root/AppRun -n -v $APP.AppDir $APPIMAGE_PATH

#move appimag
mv ../out/ /home/client/
#move appimage
chown $SUDO_UID:$SUDO_GID ../out/*.AppImage
mkdir -p /home/client/out
mv ../out/*.AppImage /home/client/out/

0 comments on commit f67f62f

Please sign in to comment.