From 42c9de7986910820d46998b6d6ac7c108f60e126 Mon Sep 17 00:00:00 2001 From: wheaney <42350981+wheaney@users.noreply.github.com> Date: Mon, 27 Oct 2025 14:05:20 -0700 Subject: [PATCH] Add distrobox build support --- bin/breezy_kwin_setup | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/bin/breezy_kwin_setup b/bin/breezy_kwin_setup index def1b69..3c93eab 100755 --- a/bin/breezy_kwin_setup +++ b/bin/breezy_kwin_setup @@ -23,10 +23,15 @@ check_command "curl" print_missing_dependencies() { echo "" printf "\n\033[1;31mMissing required components\033[0m\n" + if [ -n "${BREEZY_DISTROBOX:-}" ]; then + echo "" + echo "If you are using a Distrobox container, enter it and install packages there:" + echo " distrobox enter $BREEZY_DISTROBOX" + fi echo "" echo "Install the corresponding packages with your package manager, then rerun this setup:" echo " Debian/Ubuntu: sudo apt-get update && sudo apt-get install -y extra-cmake-modules kwin-dev libkf6config-dev libkf6configwidgets-dev libkf6coreaddons-dev libkf6kcmutils-dev libkf6globalaccel-dev libkf6i18n-dev libkf6windowsystem-dev libkf6xmlgui-dev qt6-base-dev qt6-declarative-dev libdrm-dev && (sudo apt-get install -y qml6-module-qtquick3d-helpers || true)" - echo " Fedora/RHEL: sudo dnf install -y extra-cmake-modules kwin-devel kf6-kconfig-devel kf6-kconfigwidgets-devel kf6-kcoreaddons-devel kf6-kcmutils-devel kf6-kglobalaccel-devel kf6-ki18n-devel kf6-kwindowsystem-devel kf6-kxmlgui-devel qt6-qtbase-devel qt6-qttools-devel wayland-devel libepoxy-devel libdrm-devel" + echo " Fedora/RHEL: sudo dnf install -y extra-cmake-modules kwin-devel kf6-kconfig-devel kf6-kconfigwidgets-devel kf6-kcoreaddons-devel kf6-kcmutils-devel kf6-kglobalaccel-devel kf6-ki18n-devel kf6-kwindowsystem-devel kf6-kxmlgui-devel qt6-qtbase-devel qt6-qttools-devel qt6-qtquick3d wayland-devel libepoxy-devel libdrm-devel" echo " Arch: sudo pacman -S --needed extra-cmake-modules qt6-base qt6-declarative qt6-tools qt6-quick3d kconfig kconfigwidgets kcoreaddons kglobalaccel ki18n kcmutils kxmlgui kwindowsystem kwin" echo "" printf "\n\033[1;33mIf you continue to see this issue\033[0m rerun as follows and attach the full output to a bug report:\n" @@ -114,13 +119,23 @@ then pushd $start_dir > /dev/null fi - echo "Building Breezy Desktop from source, this may take a while..." set +e - pkgkwin_stderr=$(LOCAL_BUILD_SYSTEM=1 bin/package_kwin --download-driver 2>&1) - pkgkwin_rc=$? + distrobox_name="${BREEZY_DISTROBOX:-}" + if [ -n "$distrobox_name" ]; then + check_command "distrobox" + echo "Building Breezy Desktop from source inside Distrobox container: $distrobox_name" + build_dir=$(pwd) + distrobox_shell_cmd="cd \"$build_dir\" && LOCAL_BUILD_SYSTEM=1 bin/package_kwin --download-driver" + pkgkwin_stderr=$(distrobox enter --name "$distrobox_name" -- /bin/sh --noprofile --norc -lc "$distrobox_shell_cmd" 2>&1) + pkgkwin_rc=$? + else + echo "Building Breezy Desktop from source, this may take a while..." + pkgkwin_stderr=$(LOCAL_BUILD_SYSTEM=1 bin/package_kwin --download-driver 2>&1) + pkgkwin_rc=$? + fi set -e if [ "$pkgkwin_rc" -ne 0 ]; then - if echo "$pkgkwin_stderr" | grep -qi "could not find" && [ -z "${PRINT_FULL_STDERR+x}" ]; then + if echo "$pkgkwin_stderr" | grep -qiE 'could not find|Please install "cmake"' && [ -z "${PRINT_FULL_STDERR+x}" ]; then print_missing_dependencies "$*" else echo "$pkgkwin_stderr"