From eb0ad035fc725cf583b0ca52ac8f11984a5d139e Mon Sep 17 00:00:00 2001 From: Wayne Heaney <42350981+wheaney@users.noreply.github.com> Date: Fri, 13 Feb 2026 11:37:01 -0800 Subject: [PATCH] v2.8.x (#154) * Update all Breezy setup scripts and apps to request the necessary license features * Fix backwards-incompatible KWin API change in v6.5.90 * Update package and setup to build and utilize separate build and libs archives --- VERSION | 2 +- bin/breezy_gnome_setup | 61 ++++++++++++++----- bin/breezy_kwin_setup | 58 ++++++++++++++---- bin/breezy_vulkan_setup | 55 +++++++++++++---- bin/package_all | 3 +- bin/package_gnome | 9 +-- bin/package_kwin | 21 ++++--- bin/package_libs | 78 +++++++++++++++++++++++++ bin/package_vulkan | 33 ++--------- gnome/bin/setup | 9 ++- gnome/src/extension.js | 3 + kwin/bin/setup | 7 ++- kwin/src/breezydesktopeffect.cpp | 22 +++++-- kwin/src/breezydesktopeffect.h | 18 +++++- kwin/src/kcm/breezydesktopeffectkcm.cpp | 10 ++++ modules/XRLinuxDriver | 2 +- ui/src/main.py | 2 +- vulkan/bin/setup | 9 ++- 18 files changed, 304 insertions(+), 98 deletions(-) create mode 100755 bin/package_libs diff --git a/VERSION b/VERSION index 37c2961..1817afe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.7.2 +2.8.2 diff --git a/bin/breezy_gnome_setup b/bin/breezy_gnome_setup index 274bad5..7208d85 100755 --- a/bin/breezy_gnome_setup +++ b/bin/breezy_gnome_setup @@ -20,9 +20,11 @@ check_command() { check_command "curl" check_command "gnome-shell" +check_command "jq" ARCH=$(uname -m) FILE_NAME="breezyGNOME-$ARCH.tar.gz" +LIBS_FILE_NAME="breezyGNOME-libs-$ARCH.tar.gz" GNOME_VERSION=$(gnome-shell --version | cut -d' ' -f3 | cut -d'.' -f1) VERSION_SPECIFIC_FILENAME="breezyGNOME-$GNOME_VERSION-$ARCH.tar.gz" LATEST_RELEASE=$(curl -s "https://api.github.com/repos/wheaney/breezy-desktop/releases/latest") @@ -44,35 +46,68 @@ pushd $tmp_dir > /dev/null echo "Created temp directory: ${tmp_dir}" binary_download_url="https://github.com/wheaney/breezy-desktop/releases/latest/download/$FILE_NAME" +libs_download_url="https://github.com/wheaney/breezy-desktop/releases/latest/download/$LIBS_FILE_NAME" if [ "$1" = "-v" ] then metrics_version="$2" - binary_path_arg="$3" + local_dir_arg="$3" elif [ "$1" = "--tag" ] && [ -n "$2" ] then binary_download_url="https://github.com/wheaney/breezy-desktop/releases/download/$2/$FILE_NAME" + libs_download_url="https://github.com/wheaney/breezy-desktop/releases/download/$2/$LIBS_FILE_NAME" else - binary_path_arg="$1" + local_dir_arg="$1" +fi + +if [ -n "$local_dir_arg" ] +then + if [[ "$local_dir_arg" = /* ]]; then + local_dir="$local_dir_arg" + else + local_dir=$(realpath "$start_dir/$local_dir_arg") + fi + + binary_path_arg="$local_dir/$FILE_NAME" + if [ ! -f "$binary_path_arg" ]; then + echo "Error: Breezy GNOME archive not found at $binary_path_arg" 1>&2 + exit 1 + fi + + lib_path_arg="$local_dir/$LIBS_FILE_NAME" + if [ ! -f "$lib_path_arg" ]; then + echo "Error: Breezy GNOME libs archive not found at $lib_path_arg" 1>&2 + exit 1 + fi fi if [ -z "$binary_path_arg" ] then # download and unzip the binary - echo "Downloading to: ${tmp_dir}/$FILE_NAME" - curl -L "$binary_download_url" > "$FILE_NAME" + binary_path_arg="$FILE_NAME" + echo "Downloading to: ${tmp_dir}/$binary_path_arg" + + curl -L "$binary_download_url" > "$binary_path_arg" else - FILE_NAME=$(basename $binary_path_arg) - if [[ "$binary_path_arg" = /* ]]; then - abs_path="$binary_path_arg" - else - # Convert relative path to absolute path - abs_path=$(realpath "$start_dir/$binary_path_arg") - fi - cp $abs_path $tmp_dir + cp "$binary_path_arg" "$tmp_dir" fi echo "Extracting to: ${tmp_dir}/breezy_gnome" -tar -xf $FILE_NAME +tar -xf $(basename $binary_path_arg) + +if [ -z "$lib_path_arg" ] +then + lib_path_arg="$LIBS_FILE_NAME" + echo "Downloading to: ${tmp_dir}/$lib_path_arg" + + curl -L "$libs_download_url" > "$lib_path_arg" +else + cp "$lib_path_arg" "$tmp_dir" +fi + +echo "Extracting lib to: ${tmp_dir}/breezy_gnome" +# Extract libs into the extracted directory +tar -xf $(basename $lib_path_arg) +mv breezy_desktop_lib/* breezy_gnome/ pushd breezy_gnome > /dev/null diff --git a/bin/breezy_kwin_setup b/bin/breezy_kwin_setup index a73a73a..3cc68d2 100755 --- a/bin/breezy_kwin_setup +++ b/bin/breezy_kwin_setup @@ -45,6 +45,7 @@ print_missing_dependencies() { } ARCH=$(uname -m) +LIBS_ARCH="$ARCH" if [ -f /etc/os-release ]; then . /etc/os-release if [ "$ID" == "steamos" ]; then @@ -52,6 +53,7 @@ if [ -f /etc/os-release ]; then fi fi FILE_NAME="breezyKWin-$ARCH.tar.gz" +LIBS_FILE_NAME="breezyKWin-libs-$LIBS_ARCH.tar.gz" LATEST_RELEASE=$(curl -s "https://api.github.com/repos/wheaney/breezy-desktop/releases/latest") echo "Performing setup for KWin ($ARCH)" @@ -63,15 +65,38 @@ pushd $tmp_dir > /dev/null echo "Created temp directory: ${tmp_dir}" binary_download_url="https://github.com/wheaney/breezy-desktop/releases/latest/download/$FILE_NAME" +libs_download_url="https://github.com/wheaney/breezy-desktop/releases/latest/download/$LIBS_FILE_NAME" if [ "$1" = "-v" ] then metrics_version="$2" - binary_path_arg="$3" + local_dir_arg="$3" elif [ "$1" = "--tag" ] && [ -n "$2" ] then binary_download_url="https://github.com/wheaney/breezy-desktop/releases/download/$2/$FILE_NAME" + libs_download_url="https://github.com/wheaney/breezy-desktop/releases/download/$2/$LIBS_FILE_NAME" else - binary_path_arg="$1" + local_dir_arg="$1" +fi + +if [ -n "$local_dir_arg" ] +then + if [[ "$local_dir_arg" = /* ]]; then + local_dir="$local_dir_arg" + else + local_dir=$(realpath "$start_dir/$local_dir_arg") + fi + + binary_path_arg="$local_dir/$FILE_NAME" + if [ ! -f "$binary_path_arg" ]; then + echo "Error: Breezy KWin archive not found at $binary_path_arg" 1>&2 + exit 1 + fi + + lib_path_arg="$local_dir/$LIBS_FILE_NAME" + if [ ! -f "$lib_path_arg" ]; then + echo "Error: Breezy KWin libs archive not found at $lib_path_arg" 1>&2 + exit 1 + fi fi if [ -z "$binary_path_arg" ] @@ -81,6 +106,7 @@ then if [[ "$http_code" =~ ^(2|3) ]]; then echo "Downloading to: ${tmp_dir}/$FILE_NAME" curl -L "$binary_download_url" -o "$FILE_NAME" + binary_path_arg="$FILE_NAME" else check_command "git" check_command "cmake" @@ -149,22 +175,30 @@ then exit $pkgkwin_rc fi FILE_NAME="breezyKWin-$ARCH.tar.gz" - cp "out/$FILE_NAME" "$tmp_dir" + binary_path_arg="$FILE_NAME" + cp "out/$binary_path_arg" "$tmp_dir" popd > /dev/null fi else - FILE_NAME=$(basename $binary_path_arg) - if [[ "$binary_path_arg" = /* ]]; then - abs_path="$binary_path_arg" - else - # Convert relative path to absolute path - abs_path=$(realpath "$start_dir/$binary_path_arg") - fi - cp $abs_path $tmp_dir + cp "$binary_path_arg" "$tmp_dir" +fi + +if [ -z "$lib_path_arg" ] +then + lib_path_arg="$LIBS_FILE_NAME" + echo "Downloading to: ${tmp_dir}/$lib_path_arg" + + curl -L "$libs_download_url" -o "$lib_path_arg" +else + cp "$lib_path_arg" "$tmp_dir" fi echo "Extracting to: ${tmp_dir}/breezy_kwin" -tar -xf $FILE_NAME +tar -xf $(basename "$binary_path_arg") + +echo "Extracting lib to: ${tmp_dir}/breezy_kwin" +tar -xf $(basename "$lib_path_arg") +mv breezy_desktop_lib/* breezy_kwin/ pushd breezy_kwin > /dev/null diff --git a/bin/breezy_vulkan_setup b/bin/breezy_vulkan_setup index bac0377..7311913 100755 --- a/bin/breezy_vulkan_setup +++ b/bin/breezy_vulkan_setup @@ -26,36 +26,67 @@ pushd $tmp_dir > /dev/null echo "Created temp directory: ${tmp_dir}" binary_download_url="https://github.com/wheaney/breezy-desktop/releases/latest/download/breezyVulkan-$ARCH.tar.gz" +libs_download_url="https://github.com/wheaney/breezy-desktop/releases/latest/download/breezyVulkan-libs-$ARCH.tar.gz" +LIBS_FILE_NAME="breezyVulkan-libs-$ARCH.tar.gz" +FILE_NAME="breezyVulkan-$ARCH.tar.gz" if [ "$1" = "-v" ] then metrics_version="$2" - binary_path_arg="$3" + local_dir_arg="$3" elif [ "$1" = "--tag" ] && [ -n "$2" ] then binary_download_url="https://github.com/wheaney/breezy-desktop/releases/download/$2/breezyVulkan-$ARCH.tar.gz" + libs_download_url="https://github.com/wheaney/breezy-desktop/releases/download/$2/breezyVulkan-libs-$ARCH.tar.gz" else - binary_path_arg="$1" + local_dir_arg="$1" +fi + +if [ -n "$local_dir_arg" ] +then + if [[ "$local_dir_arg" = /* ]]; then + local_dir="$local_dir_arg" + else + local_dir=$(realpath "$start_dir/$local_dir_arg") + fi + + binary_path_arg="$local_dir/$FILE_NAME" + if [ ! -f "$binary_path_arg" ]; then + echo "Error: Breezy Vulkan archive not found at $binary_path_arg" 1>&2 + exit 1 + fi + + lib_path_arg="$local_dir/$LIBS_FILE_NAME" + if [ ! -f "$lib_path_arg" ]; then + echo "Error: Breezy Vulkan libs archive not found at $lib_path_arg" 1>&2 + exit 1 + fi fi if [ -z "$binary_path_arg" ] then # download and unzip the binary - binary_path_arg="breezyVulkan-$ARCH.tar.gz" + binary_path_arg="$FILE_NAME" echo "Downloading to: ${tmp_dir}/$binary_path_arg" - curl -L "$binary_download_url" > "$binary_path_arg" else - if [[ "$binary_path_arg" = /* ]]; then - abs_path="$binary_path_arg" - else - # Convert relative path to absolute path - abs_path=$(realpath "$start_dir/$binary_path_arg") - fi - cp $abs_path $tmp_dir + cp "$binary_path_arg" "$tmp_dir" fi echo "Extracting to: ${tmp_dir}/breezy_vulkan" -tar -xf $(basename $binary_path_arg) +tar -xf $(basename "$binary_path_arg") + +if [ -z "$lib_path_arg" ] +then + lib_path_arg="$LIBS_FILE_NAME" + echo "Downloading to: ${tmp_dir}/$lib_path_arg" + curl -L "$libs_download_url" > "$lib_path_arg" +else + cp "$lib_path_arg" "$tmp_dir" +fi + +echo "Extracting lib to: ${tmp_dir}/breezy_vulkan" +tar -xf $(basename "$lib_path_arg") +mv breezy_desktop_lib/* breezy_vulkan/ pushd breezy_vulkan > /dev/null diff --git a/bin/package_all b/bin/package_all index 5209d6e..e591392 100755 --- a/bin/package_all +++ b/bin/package_all @@ -6,5 +6,4 @@ set -e ARCH=x86_64 bin/package_gnome "$@" ARCH=aarch64 bin/package_gnome "$@" STEAMOS=1 bin/package_kwin "$@" -bin/package_vulkan "$@" -STEAMOS=1 bin/package_vulkan "$@" \ No newline at end of file +bin/package_vulkan "$@" \ No newline at end of file diff --git a/bin/package_gnome b/bin/package_gnome index 0750131..99321d4 100755 --- a/bin/package_gnome +++ b/bin/package_gnome @@ -55,7 +55,8 @@ fi mkdir -p $PACKAGE_DIR/bin copy_and_inject_ua "$XR_DRIVER_DIR/bin/ua.sh" "$PACKAGE_DIR/bin" "$GNOME_DIR/bin/setup" "$GNOME_DIR/bin/breezy_gnome_verify" "$GNOME_DIR/bin/breezy_gnome_uninstall" -XR_DRIVER_BINARY=$XR_DRIVER_DIR/out/xrDriver-$ARCH.tar.gz +XR_DRIVER_BINARY_NAME=xrDriver-$ARCH.tar.gz +XR_DRIVER_BINARY="$XR_DRIVER_DIR/out/$XR_DRIVER_BINARY_NAME" if [ ! -e "$XR_DRIVER_BINARY" ] || [ "$1" == "--rebuild-driver" ] || [ "$1" == "--rebuild-all" ]; then # if a file exists at custom_banner_config.yml, copy it to the xrealAirLinuxDriver directory @@ -75,14 +76,14 @@ fi TMP_DIR=$(mktemp -d -t breezy-gnome-XXXXXXXXXX) pushd $TMP_DIR -cp $XR_DRIVER_BINARY $TMP_DIR/xrDriver.tar.gz -tar -xf $TMP_DIR/xrDriver.tar.gz +cp "$XR_DRIVER_BINARY" "$TMP_DIR/$XR_DRIVER_BINARY_NAME" +tar -xf "$TMP_DIR/$XR_DRIVER_BINARY_NAME" XR_DRIVER_MANIFEST_LINE=$(sha256sum xr_driver/manifest) popd rm -rf $TMP_DIR -cp $XR_DRIVER_BINARY $PACKAGE_DIR/xrDriver.tar.gz +cp $XR_DRIVER_BINARY $PACKAGE_DIR/$XR_DRIVER_BINARY_NAME cp $XR_DRIVER_DIR/bin/xr_driver_setup $PACKAGE_DIR/bin $GNOME_DIR/bin/package_extension diff --git a/bin/package_kwin b/bin/package_kwin index 00b4281..6e07f7b 100755 --- a/bin/package_kwin +++ b/bin/package_kwin @@ -29,17 +29,20 @@ source $XR_DRIVER_DIR/bin/inject_ua mkdir -p $PACKAGE_DIR/bin copy_and_inject_ua "$XR_DRIVER_DIR/bin/ua.sh" "$PACKAGE_DIR/bin" "$KWIN_DIR/bin/setup" "$KWIN_DIR/bin/breezy_kwin_uninstall" -XR_DRIVER_BINARY=$XR_DRIVER_DIR/out/xrDriver-$ARCH.tar.gz -if [ "$1" == "--download-driver" ]; then - driver_download_url="https://github.com/wheaney/XRLinuxDriver/releases/latest/download/xrDriver-$ARCH.tar.gz" - setup_download_url="https://github.com/wheaney/XRLinuxDriver/releases/latest/download/xr_driver_setup" +XR_DRIVER_BINARY_NAME=xrDriver-$ARCH.tar.gz +XR_DRIVER_BINARY="$XR_DRIVER_DIR/out/$XR_DRIVER_BINARY_NAME" - curl -L "$driver_download_url" > "$PACKAGE_DIR/xrDriver.tar.gz" +XR_DRIVER_VERSION=$(sed -nE 's/^project\([^)]*VERSION[[:space:]]+([0-9]+\.[0-9]+\.[0-9]+).*$/\1/p' "$XR_DRIVER_DIR/CMakeLists.txt" | head -n 1) +if [ "$1" == "--download-driver" ]; then + driver_download_url="https://github.com/wheaney/XRLinuxDriver/releases/download/v$XR_DRIVER_VERSION/xrDriver-$ARCH.tar.gz" + setup_download_url="https://github.com/wheaney/XRLinuxDriver/releases/download/v$XR_DRIVER_VERSION/xr_driver_setup" + + curl -L "$driver_download_url" > "$PACKAGE_DIR/$XR_DRIVER_BINARY_NAME" curl -L "$setup_download_url" > "$PACKAGE_DIR/bin/xr_driver_setup" chmod +x "$PACKAGE_DIR/bin/xr_driver_setup" echo "Downloaded XRLinuxDriver binary and setup script, with hashes:" - printf '\txrDriver-%s.tar.gz: %s\n' "$ARCH" "$(sha256sum "$PACKAGE_DIR/xrDriver.tar.gz" | sort | sha256sum | sed 's/ .*//')" + printf '\txrDriver-%s.tar.gz: %s\n' "$ARCH" "$(sha256sum "$PACKAGE_DIR/$XR_DRIVER_BINARY_NAME" | sort | sha256sum | sed 's/ .*//')" printf '\txr_driver_setup: %s\n' "$(sha256sum "$PACKAGE_DIR/bin/xr_driver_setup" | sort | sha256sum | sed 's/ .*//')" else if [ ! -e "$XR_DRIVER_BINARY" ] || [ "$1" == "--rebuild-driver" ] || [ "$1" == "--rebuild-all" ]; then @@ -60,14 +63,14 @@ else XR_DRIVER_TMP_DIR=$(mktemp -d -t xr-driver-XXXXXXXXXX) pushd $XR_DRIVER_TMP_DIR > /dev/null - cp $XR_DRIVER_BINARY $XR_DRIVER_TMP_DIR/xrDriver.tar.gz - tar -xf $XR_DRIVER_TMP_DIR/xrDriver.tar.gz + cp "$XR_DRIVER_BINARY" "$XR_DRIVER_TMP_DIR/$XR_DRIVER_BINARY_NAME" + tar -xf "$XR_DRIVER_TMP_DIR/$XR_DRIVER_BINARY_NAME" XR_DRIVER_MANIFEST_LINE=$(sha256sum xr_driver/manifest) popd > /dev/null rm -rf $XR_DRIVER_TMP_DIR - cp $XR_DRIVER_BINARY $PACKAGE_DIR/xrDriver.tar.gz + cp "$XR_DRIVER_BINARY" "$PACKAGE_DIR/$XR_DRIVER_BINARY_NAME" cp $XR_DRIVER_DIR/bin/xr_driver_setup $PACKAGE_DIR/bin/xr_driver_setup fi diff --git a/bin/package_libs b/bin/package_libs new file mode 100755 index 0000000..56d809b --- /dev/null +++ b/bin/package_libs @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +# exit when any command fails +set -e + +# Package shared/rarely-changing library artifacts. +# +# Produces 5 total artifacts: +# - breezyVulkan-libs-x86_64.tar.gz +# - breezyGNOME-libs-$ARCH.tar.gz (x86_64 + aarch64) +# - breezyKWin-libs-$ARCH.tar.gz (x86_64 + aarch64) + +ARCHITECTURES=("x86_64" "aarch64") +VULKAN_ARCHITECTURES=("x86_64") +APPS=("breezyVulkan" "breezyGNOME" "breezyKWin") + +# https://stackoverflow.com/a/246128 +SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) +ROOT_DIR=$(realpath "$SCRIPT_DIR/..") +XR_DRIVER_DIR="$ROOT_DIR/modules/XRLinuxDriver" +VULKAN_DIR="$ROOT_DIR/vulkan" +VKBASALT_MODULE_DIR="$VULKAN_DIR/modules/vkBasalt" +VKBASALT_BUILD_DIR="$VKBASALT_MODULE_DIR/out" + +echo "Building XR Driver libs packages" +pushd "$XR_DRIVER_DIR" > /dev/null +./bin/package_libs +popd > /dev/null + +echo "Building vkBasalt build artifacts" +if [ ! -d "$VKBASALT_BUILD_DIR" ] || [ "${1:-}" == "--rebuild-vkbasalt" ]; then + pushd "$VKBASALT_MODULE_DIR" > /dev/null + ./docker-build + popd > /dev/null +fi + +echo "Building Breezy libs packages for all architectures" + +BUILD_PATH="$ROOT_DIR/build" +mkdir -p "$BUILD_PATH" + +pushd "$BUILD_PATH" > /dev/null + +for APP in "${APPS[@]}"; do + ARCHES=("${ARCHITECTURES[@]}") + if [ "$APP" == "breezyVulkan" ]; then + ARCHES=("${VULKAN_ARCHITECTURES[@]}") + fi + + for ARCH in "${ARCHES[@]}"; do + XR_LIB_ARCHIVE="$XR_DRIVER_DIR/out/xrDriver-libs-$ARCH.tar.gz" + + PACKAGE_LIB_DIR=breezy_desktop_lib + rm -rf "$PACKAGE_LIB_DIR" + mkdir -p "$PACKAGE_LIB_DIR" + cp "$XR_LIB_ARCHIVE" "$PACKAGE_LIB_DIR/" + + if [ "$APP" == "breezyVulkan" ]; then + mkdir -p "$PACKAGE_LIB_DIR"/{vkBasalt.64,vkBasalt.32} + cp "$VKBASALT_BUILD_DIR/builddir/src/libvkbasalt.so" "$PACKAGE_LIB_DIR/vkBasalt.64/" + cp "$VKBASALT_BUILD_DIR/builddir/config/vkBasalt.json" "$PACKAGE_LIB_DIR/vkBasalt.64/" + cp "$VKBASALT_BUILD_DIR/builddir.32/src/libvkbasalt.so" "$PACKAGE_LIB_DIR/vkBasalt.32/" + fi + + LIB_ARTIFACT_NAME="$APP-libs-$ARCH.tar.gz" + tar -zcvf "$LIB_ARTIFACT_NAME" "$PACKAGE_LIB_DIR" > /dev/null + + # Clean up for next iteration + rm -rf "$PACKAGE_LIB_DIR" + done +done + +popd > /dev/null + +mkdir -p "$ROOT_DIR/out" +cp "$BUILD_PATH"/breezy*-libs-*.tar.gz "$ROOT_DIR/out/" + +rm -f "$BUILD_PATH"/breezy*-libs-*.tar.gz diff --git a/bin/package_vulkan b/bin/package_vulkan index a94c255..d3f19a8 100755 --- a/bin/package_vulkan +++ b/bin/package_vulkan @@ -26,21 +26,6 @@ else fi BUILD_FILE_NAME=breezyVulkan-$ARCH.tar.gz -# build vkBasalt -VKBASALT_MODULE_DIR=$VULKAN_MODULES/vkBasalt -VKBASALT_BUILD_DIR=$VKBASALT_MODULE_DIR/out -if [ ! -d "$VKBASALT_BUILD_DIR" ] || [ "$1" == "--rebuild-vkbasalt" ]; then - pushd $VKBASALT_MODULE_DIR - ./docker-build - popd -fi - -# copy vkBasalt binaries and configs -mkdir -p $PACKAGE_DIR/{vkBasalt.64,vkBasalt.32} -cp $VKBASALT_BUILD_DIR/builddir/src/libvkbasalt.so $PACKAGE_DIR/vkBasalt.64/ -cp $VKBASALT_BUILD_DIR/builddir/config/vkBasalt.json $PACKAGE_DIR/vkBasalt.64/ -cp $VKBASALT_BUILD_DIR/builddir.32/src/libvkbasalt.so $PACKAGE_DIR/vkBasalt.32/ - # copy Sombrero shader, get ReShade headers cp modules/sombrero/*.frag $PACKAGE_DIR cp modules/sombrero/*.png $PACKAGE_DIR @@ -58,11 +43,8 @@ copy_and_inject_ua "$XR_DRIVER_DIR/bin/ua.sh" "$PACKAGE_DIR/bin" "$VULKAN_DIR/bi cp -r $VULKAN_DIR/config $PACKAGE_DIR # build XR driver -XR_DRIVER_BINARY=$XR_DRIVER_DIR/out/xrDriver-$ARCH.tar.gz -if [ -n "$STEAMOS" ]; then - XR_DRIVER_BINARY=$XR_DRIVER_DIR/out/xrDriver-$ARCH.steamos.tar.gz - BUILD_FILE_NAME=breezyVulkan-$ARCH.steamos.tar.gz -fi +XR_DRIVER_BINARY_NAME=xrDriver-$ARCH.tar.gz +XR_DRIVER_BINARY="$XR_DRIVER_DIR/out/$XR_DRIVER_BINARY_NAME" if [ ! -e "$XR_DRIVER_BINARY" ] || [ "$1" == "--rebuild-driver" ]; then # if a file exists at custom_banner_config.yml, copy it to the xrealAirLinuxDriver directory @@ -75,32 +57,29 @@ if [ ! -e "$XR_DRIVER_BINARY" ] || [ "$1" == "--rebuild-driver" ]; then # strange issue where the base library produces a .so file if the build is not cleaned rm -rf build/ - if [ -n "${STEAMOS:-}" ]; then - export STEAMOS - fi docker-build/init.sh docker-build/run-build.sh $ARCH popd fi TMP_DIR=$(mktemp -d -t breezy-vulkan-XXXXXXXXXX) -cp $XR_DRIVER_BINARY $TMP_DIR/xrDriver.tar.gz +cp "$XR_DRIVER_BINARY" "$TMP_DIR/$XR_DRIVER_BINARY_NAME" pushd $TMP_DIR -tar -xf $TMP_DIR/xrDriver.tar.gz +tar -xf "$TMP_DIR/$XR_DRIVER_BINARY_NAME" XR_DRIVER_MANIFEST_LINE=$(sha256sum xr_driver/manifest) popd rm -rf $TMP_DIR # copy XR driver binary and setup script -cp $XR_DRIVER_BINARY $PACKAGE_DIR/xrDriver.tar.gz +cp "$XR_DRIVER_BINARY" "$PACKAGE_DIR/$XR_DRIVER_BINARY_NAME" cp $XR_DRIVER_DIR/bin/xr_driver_setup $PACKAGE_DIR/bin # create manifest file for verifying installed file checksums against the originally packaged versions # include any file that doesn't get modified during setup (e.g. vkBasalt.json files) pushd $PACKAGE_DIR echo $XR_DRIVER_MANIFEST_LINE > manifest -sha256sum bin/breezy_vulkan_uninstall vkBasalt.64/libvkbasalt.so vkBasalt.32/libvkbasalt.so *.frag *.fx* *.png >> manifest +sha256sum bin/breezy_vulkan_uninstall *.frag *.fx* *.png >> manifest popd # bundle everything up diff --git a/gnome/bin/setup b/gnome/bin/setup index e61c132..e549215 100755 --- a/gnome/bin/setup +++ b/gnome/bin/setup @@ -163,9 +163,12 @@ echo "Installing xrDriver" echo "BEGIN - xr_driver_setup" if [ -z "$1" ] then - sudo bin/xr_driver_setup $(pwd)/xrDriver.tar.gz + sudo bin/xr_driver_setup $(pwd) else - sudo bin/xr_driver_setup -v $1 $(pwd)/xrDriver.tar.gz + sudo bin/xr_driver_setup -v $1 $(pwd) fi -echo "END - xr_driver_setup" \ No newline at end of file +echo "END - xr_driver_setup" + +echo "Setting up productivity features" +printf "request_features=productivity_basic\n" >> /dev/shm/xr_driver_control 2>/dev/null || true \ No newline at end of file diff --git a/gnome/src/extension.js b/gnome/src/extension.js index cb2c827..cb22608 100644 --- a/gnome/src/extension.js +++ b/gnome/src/extension.js @@ -67,6 +67,9 @@ export default class BreezyDesktopExtension extends Extension { try { Globals.extension_dir = this.path; + // safe to request on each load, acts as a no-op if already present + this._write_control('request_features', 'productivity_basic'); + Globals.data_stream.start(); this._monitor_manager = new MonitorManager({ diff --git a/kwin/bin/setup b/kwin/bin/setup index ba30508..be32ded 100755 --- a/kwin/bin/setup +++ b/kwin/bin/setup @@ -192,11 +192,14 @@ echo "Installing xrDriver (requires sudo)" echo "BEGIN - xr_driver_setup" if [ -z "$1" ] then - sudo bin/xr_driver_setup $(pwd)/xrDriver.tar.gz + sudo bin/xr_driver_setup $(pwd) else - sudo bin/xr_driver_setup -v $1 $(pwd)/xrDriver.tar.gz + sudo bin/xr_driver_setup -v $1 $(pwd) fi echo "END - xr_driver_setup" +echo "Setting up productivity features" +printf "request_features=productivity_basic\n" >> /dev/shm/xr_driver_control 2>/dev/null || true + printf "\n\033[1;33m!!! IMPORTANT !!!\033[0m You must log out and back in, then enable Breezy Desktop from the Desktop Effects in System Settings\n\n" \ No newline at end of file diff --git a/kwin/src/breezydesktopeffect.cpp b/kwin/src/breezydesktopeffect.cpp index c1256e8..ee99951 100644 --- a/kwin/src/breezydesktopeffect.cpp +++ b/kwin/src/breezydesktopeffect.cpp @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include #include #include @@ -112,6 +114,16 @@ namespace KWin BreezyDesktopEffect::BreezyDesktopEffect() { qCCritical(KWIN_XR) << "\t\t\tBreezy - constructor"; + + // safe to request on each load, acts as a no-op if already present + { + QJsonObject flags; + QJsonArray requested; + requested.append(QStringLiteral("productivity_basic")); + flags.insert(QStringLiteral("request_features"), requested); + XRDriverIPC::instance().writeControlFlags(flags); + } + qmlRegisterUncreatableType("org.kde.kwin.effect.breezy_desktop", 1, 0, "BreezyDesktopEffect", QStringLiteral("BreezyDesktop cannot be created in QML")); setupGlobalShortcut( @@ -278,7 +290,7 @@ bool BreezyDesktopEffect::developerMode() const return m_developerMode; } -QVariantMap BreezyDesktopEffect::initialProperties(Output *screen) +QVariantMap BreezyDesktopEffect::initialProperties(ScreenOutput *screen) { return QVariantMap{ {QStringLiteral("effect"), QVariant::fromValue(this)}, @@ -404,7 +416,7 @@ QVariantList BreezyDesktopEffect::listVirtualDisplays() const { bool BreezyDesktopEffect::removeVirtualDisplay(const QString &id) { auto it = m_virtualDisplays.find(id); if (it != m_virtualDisplays.end()) { - Output *output = it->output; + VirtualOutputHandle *output = it->output; if (output) { KWin::kwinApp()->outputBackend()->removeVirtualOutput(output); } @@ -826,7 +838,7 @@ void BreezyDesktopEffect::updateDriverSmoothFollowSettings() { if (m_lookingAtScreenIndex != -1 && !m_displayResolution.isEmpty()) { // Adjust display distance by relative monitor size compared to the FOV monitor - const Output *focusedOutput = effects->screens().at(m_lookingAtScreenIndex); + const ScreenOutput *focusedOutput = effects->screens().at(m_lookingAtScreenIndex); const QSize focusedSize = focusedOutput ? focusedOutput->geometry().size() : QSize(); if (focusedSize.isValid()) { @@ -948,7 +960,7 @@ bool BreezyDesktopEffect::updateEffectOnScreenGeometryCache() m_effectTargetScreenIndex = -1; return false; } - Output *effectOnScreen = screensList.at(m_effectTargetScreenIndex); + ScreenOutput *effectOnScreen = screensList.at(m_effectTargetScreenIndex); if (!effectOnScreen) { m_effectTargetScreenIndex = -1; return false; @@ -962,7 +974,7 @@ bool BreezyDesktopEffect::updateEffectOnScreenGeometryCache() return true; } -void BreezyDesktopEffect::warpPointerToOutputCenter(Output *output) +void BreezyDesktopEffect::warpPointerToOutputCenter(ScreenOutput *output) { if (!output) { return; diff --git a/kwin/src/breezydesktopeffect.h b/kwin/src/breezydesktopeffect.h index 9be5552..5e1ff4e 100644 --- a/kwin/src/breezydesktopeffect.h +++ b/kwin/src/breezydesktopeffect.h @@ -17,6 +17,18 @@ class QTimer; namespace KWin { + class BackendOutput; + class LogicalOutput; + class Output; + +#if defined(KWIN_VERSION_ENCODED) && KWIN_VERSION_ENCODED >= 60590 + using ScreenOutput = LogicalOutput; + using VirtualOutputHandle = BackendOutput; +#else + using ScreenOutput = Output; + using VirtualOutputHandle = ScreenOutput; +#endif + class BreezyDesktopEffect : public QuickSceneEffect { Q_OBJECT @@ -154,7 +166,7 @@ namespace KWin void cursorPosChanged(); protected: - QVariantMap initialProperties(Output *screen) override; + QVariantMap initialProperties(ScreenOutput *screen) override; private: void teardown(); @@ -165,7 +177,7 @@ namespace KWin void toggleSmoothFollow(); void setSmoothFollowThreshold(float threshold); void updateDriverSmoothFollowSettings(); - void warpPointerToOutputCenter(Output *output); + void warpPointerToOutputCenter(ScreenOutput *output); void evaluateCursorOnScreenState(const QPointF &prevPos, const QPointF &newPos); void invalidateEffectOnScreenGeometryCache(); bool updateEffectOnScreenGeometryCache(); @@ -221,7 +233,7 @@ namespace KWin bool m_effectOnScreenGeometryValid = false; struct VirtualOutputInfo { - Output *output = nullptr; + VirtualOutputHandle *output = nullptr; QString id; QSize size; }; diff --git a/kwin/src/kcm/breezydesktopeffectkcm.cpp b/kwin/src/kcm/breezydesktopeffectkcm.cpp index 223c43e..4124664 100644 --- a/kwin/src/kcm/breezydesktopeffectkcm.cpp +++ b/kwin/src/kcm/breezydesktopeffectkcm.cpp @@ -204,6 +204,15 @@ BreezyDesktopEffectConfig::BreezyDesktopEffectConfig(QObject *parent, const KPlu ui.setupUi(widget()); addConfig(BreezyDesktopConfig::self(), widget()); + // safe to request on each load, acts as a no-op if already present + { + QJsonObject flags; + QJsonArray requested; + requested.append(QStringLiteral("productivity_basic")); + flags.insert(QStringLiteral("request_features"), requested); + XRDriverIPC::instance().writeControlFlags(flags); + } + // Advanced tab: measurement units selector (stored as "cm" or "in") if (ui.comboMeasurementUnits) { ui.comboMeasurementUnits->clear(); @@ -725,6 +734,7 @@ void BreezyDesktopEffectConfig::pollDriverState() auto configJsonOpt = XRDriverIPC::instance().retrieveConfig(); if (!stateJsonOpt || !configJsonOpt) return; auto stateJson = stateJsonOpt.value(); + m_connectedDeviceBrand = stateJson.value(QStringLiteral("connected_device_brand")).toString(); m_connectedDeviceModel = stateJson.value(QStringLiteral("connected_device_model")).toString(); m_connectedDeviceFullDistanceCm = stateJson.value(QStringLiteral("connected_device_full_distance_cm")).toDouble(0.0); diff --git a/modules/XRLinuxDriver b/modules/XRLinuxDriver index 35c4b68..3b2aa4d 160000 --- a/modules/XRLinuxDriver +++ b/modules/XRLinuxDriver @@ -1 +1 @@ -Subproject commit 35c4b68796bfebe4337d3572cb3874a8a5c7c125 +Subproject commit 3b2aa4d981c923d06944ff9a6777b5c8b81d2657 diff --git a/ui/src/main.py b/ui/src/main.py index 61f3cc2..720abe6 100644 --- a/ui/src/main.py +++ b/ui/src/main.py @@ -80,7 +80,7 @@ class BreezydesktopApplication(Adw.Application): # always do this on start-up since the driver sometimes fails to update the license on boot, # prevent showing a license warning unnecessarily - XRDriverIPC.get_instance().write_control_flags({'refresh_device_license': True}) + XRDriverIPC.get_instance().write_control_flags({'request_features': ['productivity_basic']}) def do_activate(self): """Called when the application is activated. diff --git a/vulkan/bin/setup b/vulkan/bin/setup index 87170fc..069dbaa 100755 --- a/vulkan/bin/setup +++ b/vulkan/bin/setup @@ -161,9 +161,12 @@ echo "Installing xrDriver" echo "BEGIN - xr_driver_setup" if [ -z "$1" ] then - bin/xr_driver_setup $(pwd)/xrDriver.tar.gz + bin/xr_driver_setup $(pwd) else - bin/xr_driver_setup -v $1 $(pwd)/xrDriver.tar.gz + bin/xr_driver_setup -v $1 $(pwd) fi -echo "END - xr_driver_setup" \ No newline at end of file +echo "END - xr_driver_setup" + +echo "Setting up gaming features" +printf "request_features=sbs,smooth_follow\n" >> /dev/shm/xr_driver_control 2>/dev/null || true \ No newline at end of file