Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build of appimage for branded clients #4414

Merged
merged 1 commit into from
Apr 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions admin/linux/build-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mkdir build
cd build
cmake -G Ninja -D CMAKE_INSTALL_PREFIX=/usr ..
cmake --build . --target all
cmake --install . --prefix /app/usr
DESTDIR=/app cmake --install .


# Build client
Expand All @@ -49,18 +49,16 @@ cmake \
-D MIRALL_VERSION_SUFFIX="$VERSION_SUFFIX" \
${DESKTOP_CLIENT_ROOT}
cmake --build . --target all
cmake --install . --prefix /app/usr
mkdir -p /app/usr/etc/Nextcloud
mv /etc/Nextcloud/sync-exclude.lst /app/usr/etc/Nextcloud/sync-exclude.lst
DESTDIR=/app cmake --install .

# Move stuff around
cd /app

mv usr/lib/x86_64-linux-gnu/* usr/lib/

mkdir usr/plugins
mv usr/lib/${APPNAME}sync_vfs_suffix.so usr/plugins
mv usr/lib/${APPNAME}sync_vfs_xattr.so usr/plugins
mv usr/lib/*sync_vfs_suffix.so usr/plugins
mv usr/lib/*sync_vfs_xattr.so usr/plugins


rm -rf usr/lib/cmake
Expand All @@ -74,13 +72,13 @@ rm -rf usr/share/nautilus-python/
rm -rf usr/share/nemo-python/

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

# com.nextcloud.desktopclient.nextcloud.desktop
DESKTOP_FILE=$(ls /app/usr/share/applications/*.desktop)
sed -i -e 's|Icon=nextcloud|Icon=Nextcloud|g' ${DESKTOP_FILE} # Bug in desktop file?
cp ./usr/share/icons/hicolor/512x512/apps/Nextcloud.png . # Workaround for linuxeployqt bug, FIXME
cp ./usr/share/icons/hicolor/512x512/apps/*.png . # Workaround for linuxeployqt bug, FIXME


# Because distros need to get their shit together
Expand All @@ -102,7 +100,7 @@ export LD_LIBRARY_PATH=/usr/lib/
./squashfs-root/AppRun ${DESKTOP_FILE} -bundle-non-qt-libs -qmldir=${DESKTOP_CLIENT_ROOT}/src/gui

# Set origin
./squashfs-root/usr/bin/patchelf --set-rpath '$ORIGIN/' /app/usr/lib/lib${APPNAME}sync.so.0
./squashfs-root/usr/bin/patchelf --set-rpath '$ORIGIN/' /app/usr/lib/lib*sync.so.0

# Build AppImage
./squashfs-root/AppRun ${DESKTOP_FILE} -appimage -updateinformation="gh-releases-zsync|nextcloud-releases|desktop|latest|Nextcloud-*-x86_64.AppImage.zsync"
Expand Down