updated appimage packaging script to include x11 dependencies

This commit is contained in:
Lasan Mahaliyana
2026-07-23 20:33:06 +05:30
parent 6beb25cd44
commit c50b144b81
2 changed files with 20 additions and 15 deletions
-14
View File
@@ -1,17 +1,3 @@
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SHARING_LINUX_APP_NATIVE_FILE_LOGGING_H_
#define SHARING_LINUX_APP_NATIVE_FILE_LOGGING_H_
@@ -3,7 +3,17 @@ set -euo pipefail
shopt -s nullglob
readonly SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
readonly WORKSPACE_ROOT="$(realpath "$SCRIPT_DIR/../../../..")"
# `bazel run` executes this script from Bazel's output tree and exports the
# actual source checkout in BUILD_WORKSPACE_DIRECTORY. Falling back to the
# script-relative path keeps direct source-tree invocation working.
readonly WORKSPACE_ROOT="$(
if [[ -n "${BUILD_WORKSPACE_DIRECTORY:-}" ]]; then
realpath "$BUILD_WORKSPACE_DIRECTORY"
else
realpath "$SCRIPT_DIR/../../../.."
fi
)"
cd "$WORKSPACE_ROOT"
readonly BINARY="$WORKSPACE_ROOT/bazel-bin/sharing/linux/app/app"
readonly BAZEL_OUTPUT_BASE="$(bazel info output_base)"
readonly QT_ROOT="$BAZEL_OUTPUT_BASE/external/rules_qt++fetch+qt_linux_x86_64"
@@ -142,6 +152,7 @@ cp -aL \
readonly PLUGIN_CATEGORIES=(
platforms
imageformats
xcbglintegrations
wayland-decoration-client
wayland-graphics-integration-client
wayland-shell-integration
@@ -164,6 +175,14 @@ cp -aL \
"$QT_ROOT/plugins/imageformats/libqsvg.so" \
"$APPDIR/usr/lib/qt6/plugins/imageformats/"
# The XCB platform plugin delegates OpenGL context creation to one of these
# dynamically loaded integrations. Without them libqxcb still loads, but Qt
# reports that neither GLX nor EGL is enabled and Qt Quick cannot create an RHI.
cp -aL \
"$QT_ROOT/plugins/xcbglintegrations/libqxcb-egl-integration.so" \
"$QT_ROOT/plugins/xcbglintegrations/libqxcb-glx-integration.so" \
"$APPDIR/usr/lib/qt6/plugins/xcbglintegrations/"
for category in \
wayland-decoration-client \
wayland-graphics-integration-client \