AppImage build tool for Qt needs to know our qml files
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 24 Apr 2024 10:07:27 +0000 (12:07 +0200)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Fri, 26 Apr 2024 07:05:12 +0000 (09:05 +0200)
gives the path to qml files such that needed Qt qml modules are deployed
correctly inside the AppImage package

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
admin/linux/build-appimage.sh

index 21dab5c364e72c08dfd9a89f3ea467bce2b3206e..70d87ca174dde18a65542113b7515cabfd0d6d53 100755 (executable)
@@ -71,7 +71,6 @@ rm ./${APPIMAGE_NAME}
 cp -r ./squashfs-root ./linuxdeploy-squashfs-root
 
 export LD_LIBRARY_PATH=/app/usr/lib:/opt/qt6.6.3/lib:/usr/local/lib/x86_64-linux-gnu:/usr/local/lib:/usr/local/lib64
-export PATH=/opt/qt6.6.3/bin:${PATH}
 ./linuxdeploy-squashfs-root/AppRun --desktop-file=${DESKTOP_FILE} --icon-file=usr/share/icons/hicolor/512x512/apps/${APPNAME}.png --executable=usr/bin/${EXECUTABLE_NAME} --appdir=AppDir
 
 # Use linuxdeploy-plugin-qt to deploy qt dependencies
@@ -82,6 +81,8 @@ chmod a+x ${APPIMAGE_NAME}
 rm ./${APPIMAGE_NAME}
 cp -r ./squashfs-root ./linuxdeploy-plugin-qt-squashfs-root
 
+export PATH=/opt/qt6.6.3/bin:${PATH}
+export QML_SOURCES_PATHS=${DESKTOP_CLIENT_ROOT}/src/gui
 ./linuxdeploy-plugin-qt-squashfs-root/AppRun --appdir=AppDir
 
 ./linuxdeploy-squashfs-root/AppRun --desktop-file=${DESKTOP_FILE} --icon-file=usr/share/icons/hicolor/512x512/apps/${APPNAME}.png --executable=usr/bin/${EXECUTABLE_NAME} --appdir=AppDir --output appimage