Skip to content

Commit

Permalink
makes Qt path and openssl path depend on environment variable
Browse files Browse the repository at this point in the history
provide default value that may work outside our docker build images

will get sensible value when run inside our official docker build images

Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Apr 29, 2024
1 parent f4d9fbc commit 2ba2425
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions admin/linux/build-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export EXECUTABLE_NAME=${EXECUTABLE_NAME:-nextcloud}
export BUILD_UPDATER=${BUILD_UPDATER:-OFF}
export BUILDNR=${BUILDNR:-0000}
export DESKTOP_CLIENT_ROOT=${DESKTOP_CLIENT_ROOT:-/home/user}
export QT_BASE_DIR=${QT_BASE_DIR:-/usr}
export OPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR:-/usr/lib/x86_64-linux-gnu}

# Set defaults
export SUFFIX=${DRONE_PULL_REQUEST:=master}
Expand All @@ -24,8 +26,8 @@ mkdir build-client
cd build-client
cmake \
-G Ninja \
-DCMAKE_PREFIX_PATH=/opt/qt6.6.3 \
-DOPENSSL_ROOT_DIR=/usr/local/lib64 \
-DCMAKE_PREFIX_PATH=${QT_BASE_DIR} \
-DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_TESTING=OFF \
-DBUILD_UPDATER=$BUILD_UPDATER \
Expand Down Expand Up @@ -70,7 +72,7 @@ chmod a+x ${APPIMAGE_NAME}
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 LD_LIBRARY_PATH=/app/usr/lib:${QT_BASE_DIR}/lib:/usr/local/lib/x86_64-linux-gnu:/usr/local/lib:/usr/local/lib64
./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
Expand All @@ -81,7 +83,7 @@ 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 PATH=${QT_BASE_DIR}/bin:${PATH}
export QML_SOURCES_PATHS=${DESKTOP_CLIENT_ROOT}/src/gui
./linuxdeploy-plugin-qt-squashfs-root/AppRun --appdir=AppDir

Expand Down

0 comments on commit 2ba2425

Please sign in to comment.