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
This commit is contained in:
parent
beea5582d8
commit
eb0ad035fc
|
|
@ -20,9 +20,11 @@ check_command() {
|
||||||
|
|
||||||
check_command "curl"
|
check_command "curl"
|
||||||
check_command "gnome-shell"
|
check_command "gnome-shell"
|
||||||
|
check_command "jq"
|
||||||
|
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
FILE_NAME="breezyGNOME-$ARCH.tar.gz"
|
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)
|
GNOME_VERSION=$(gnome-shell --version | cut -d' ' -f3 | cut -d'.' -f1)
|
||||||
VERSION_SPECIFIC_FILENAME="breezyGNOME-$GNOME_VERSION-$ARCH.tar.gz"
|
VERSION_SPECIFIC_FILENAME="breezyGNOME-$GNOME_VERSION-$ARCH.tar.gz"
|
||||||
LATEST_RELEASE=$(curl -s "https://api.github.com/repos/wheaney/breezy-desktop/releases/latest")
|
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}"
|
echo "Created temp directory: ${tmp_dir}"
|
||||||
|
|
||||||
binary_download_url="https://github.com/wheaney/breezy-desktop/releases/latest/download/$FILE_NAME"
|
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" ]
|
if [ "$1" = "-v" ]
|
||||||
then
|
then
|
||||||
metrics_version="$2"
|
metrics_version="$2"
|
||||||
binary_path_arg="$3"
|
local_dir_arg="$3"
|
||||||
elif [ "$1" = "--tag" ] && [ -n "$2" ]
|
elif [ "$1" = "--tag" ] && [ -n "$2" ]
|
||||||
then
|
then
|
||||||
binary_download_url="https://github.com/wheaney/breezy-desktop/releases/download/$2/$FILE_NAME"
|
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
|
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
|
fi
|
||||||
|
|
||||||
if [ -z "$binary_path_arg" ]
|
if [ -z "$binary_path_arg" ]
|
||||||
then
|
then
|
||||||
# download and unzip the binary
|
# download and unzip the binary
|
||||||
echo "Downloading to: ${tmp_dir}/$FILE_NAME"
|
binary_path_arg="$FILE_NAME"
|
||||||
curl -L "$binary_download_url" > "$FILE_NAME"
|
echo "Downloading to: ${tmp_dir}/$binary_path_arg"
|
||||||
|
|
||||||
|
curl -L "$binary_download_url" > "$binary_path_arg"
|
||||||
else
|
else
|
||||||
FILE_NAME=$(basename $binary_path_arg)
|
cp "$binary_path_arg" "$tmp_dir"
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Extracting to: ${tmp_dir}/breezy_gnome"
|
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
|
pushd breezy_gnome > /dev/null
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ print_missing_dependencies() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
|
LIBS_ARCH="$ARCH"
|
||||||
if [ -f /etc/os-release ]; then
|
if [ -f /etc/os-release ]; then
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
if [ "$ID" == "steamos" ]; then
|
if [ "$ID" == "steamos" ]; then
|
||||||
|
|
@ -52,6 +53,7 @@ if [ -f /etc/os-release ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
FILE_NAME="breezyKWin-$ARCH.tar.gz"
|
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")
|
LATEST_RELEASE=$(curl -s "https://api.github.com/repos/wheaney/breezy-desktop/releases/latest")
|
||||||
echo "Performing setup for KWin ($ARCH)"
|
echo "Performing setup for KWin ($ARCH)"
|
||||||
|
|
||||||
|
|
@ -63,15 +65,38 @@ pushd $tmp_dir > /dev/null
|
||||||
echo "Created temp directory: ${tmp_dir}"
|
echo "Created temp directory: ${tmp_dir}"
|
||||||
|
|
||||||
binary_download_url="https://github.com/wheaney/breezy-desktop/releases/latest/download/$FILE_NAME"
|
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" ]
|
if [ "$1" = "-v" ]
|
||||||
then
|
then
|
||||||
metrics_version="$2"
|
metrics_version="$2"
|
||||||
binary_path_arg="$3"
|
local_dir_arg="$3"
|
||||||
elif [ "$1" = "--tag" ] && [ -n "$2" ]
|
elif [ "$1" = "--tag" ] && [ -n "$2" ]
|
||||||
then
|
then
|
||||||
binary_download_url="https://github.com/wheaney/breezy-desktop/releases/download/$2/$FILE_NAME"
|
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
|
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
|
fi
|
||||||
|
|
||||||
if [ -z "$binary_path_arg" ]
|
if [ -z "$binary_path_arg" ]
|
||||||
|
|
@ -81,6 +106,7 @@ then
|
||||||
if [[ "$http_code" =~ ^(2|3) ]]; then
|
if [[ "$http_code" =~ ^(2|3) ]]; then
|
||||||
echo "Downloading to: ${tmp_dir}/$FILE_NAME"
|
echo "Downloading to: ${tmp_dir}/$FILE_NAME"
|
||||||
curl -L "$binary_download_url" -o "$FILE_NAME"
|
curl -L "$binary_download_url" -o "$FILE_NAME"
|
||||||
|
binary_path_arg="$FILE_NAME"
|
||||||
else
|
else
|
||||||
check_command "git"
|
check_command "git"
|
||||||
check_command "cmake"
|
check_command "cmake"
|
||||||
|
|
@ -149,22 +175,30 @@ then
|
||||||
exit $pkgkwin_rc
|
exit $pkgkwin_rc
|
||||||
fi
|
fi
|
||||||
FILE_NAME="breezyKWin-$ARCH.tar.gz"
|
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
|
popd > /dev/null
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
FILE_NAME=$(basename $binary_path_arg)
|
cp "$binary_path_arg" "$tmp_dir"
|
||||||
if [[ "$binary_path_arg" = /* ]]; then
|
fi
|
||||||
abs_path="$binary_path_arg"
|
|
||||||
else
|
if [ -z "$lib_path_arg" ]
|
||||||
# Convert relative path to absolute path
|
then
|
||||||
abs_path=$(realpath "$start_dir/$binary_path_arg")
|
lib_path_arg="$LIBS_FILE_NAME"
|
||||||
fi
|
echo "Downloading to: ${tmp_dir}/$lib_path_arg"
|
||||||
cp $abs_path $tmp_dir
|
|
||||||
|
curl -L "$libs_download_url" -o "$lib_path_arg"
|
||||||
|
else
|
||||||
|
cp "$lib_path_arg" "$tmp_dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Extracting to: ${tmp_dir}/breezy_kwin"
|
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
|
pushd breezy_kwin > /dev/null
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,36 +26,67 @@ pushd $tmp_dir > /dev/null
|
||||||
echo "Created temp directory: ${tmp_dir}"
|
echo "Created temp directory: ${tmp_dir}"
|
||||||
|
|
||||||
binary_download_url="https://github.com/wheaney/breezy-desktop/releases/latest/download/breezyVulkan-$ARCH.tar.gz"
|
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" ]
|
if [ "$1" = "-v" ]
|
||||||
then
|
then
|
||||||
metrics_version="$2"
|
metrics_version="$2"
|
||||||
binary_path_arg="$3"
|
local_dir_arg="$3"
|
||||||
elif [ "$1" = "--tag" ] && [ -n "$2" ]
|
elif [ "$1" = "--tag" ] && [ -n "$2" ]
|
||||||
then
|
then
|
||||||
binary_download_url="https://github.com/wheaney/breezy-desktop/releases/download/$2/breezyVulkan-$ARCH.tar.gz"
|
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
|
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
|
fi
|
||||||
|
|
||||||
if [ -z "$binary_path_arg" ]
|
if [ -z "$binary_path_arg" ]
|
||||||
then
|
then
|
||||||
# download and unzip the binary
|
# 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"
|
echo "Downloading to: ${tmp_dir}/$binary_path_arg"
|
||||||
|
|
||||||
curl -L "$binary_download_url" > "$binary_path_arg"
|
curl -L "$binary_download_url" > "$binary_path_arg"
|
||||||
else
|
else
|
||||||
if [[ "$binary_path_arg" = /* ]]; then
|
cp "$binary_path_arg" "$tmp_dir"
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Extracting to: ${tmp_dir}/breezy_vulkan"
|
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
|
pushd breezy_vulkan > /dev/null
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,4 @@ set -e
|
||||||
ARCH=x86_64 bin/package_gnome "$@"
|
ARCH=x86_64 bin/package_gnome "$@"
|
||||||
ARCH=aarch64 bin/package_gnome "$@"
|
ARCH=aarch64 bin/package_gnome "$@"
|
||||||
STEAMOS=1 bin/package_kwin "$@"
|
STEAMOS=1 bin/package_kwin "$@"
|
||||||
bin/package_vulkan "$@"
|
bin/package_vulkan "$@"
|
||||||
STEAMOS=1 bin/package_vulkan "$@"
|
|
||||||
|
|
@ -55,7 +55,8 @@ fi
|
||||||
mkdir -p $PACKAGE_DIR/bin
|
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"
|
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 [ ! -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
|
# 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)
|
TMP_DIR=$(mktemp -d -t breezy-gnome-XXXXXXXXXX)
|
||||||
pushd $TMP_DIR
|
pushd $TMP_DIR
|
||||||
cp $XR_DRIVER_BINARY $TMP_DIR/xrDriver.tar.gz
|
cp "$XR_DRIVER_BINARY" "$TMP_DIR/$XR_DRIVER_BINARY_NAME"
|
||||||
tar -xf $TMP_DIR/xrDriver.tar.gz
|
tar -xf "$TMP_DIR/$XR_DRIVER_BINARY_NAME"
|
||||||
|
|
||||||
XR_DRIVER_MANIFEST_LINE=$(sha256sum xr_driver/manifest)
|
XR_DRIVER_MANIFEST_LINE=$(sha256sum xr_driver/manifest)
|
||||||
popd
|
popd
|
||||||
rm -rf $TMP_DIR
|
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
|
cp $XR_DRIVER_DIR/bin/xr_driver_setup $PACKAGE_DIR/bin
|
||||||
|
|
||||||
$GNOME_DIR/bin/package_extension
|
$GNOME_DIR/bin/package_extension
|
||||||
|
|
|
||||||
|
|
@ -29,17 +29,20 @@ source $XR_DRIVER_DIR/bin/inject_ua
|
||||||
mkdir -p $PACKAGE_DIR/bin
|
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"
|
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
|
XR_DRIVER_BINARY_NAME=xrDriver-$ARCH.tar.gz
|
||||||
if [ "$1" == "--download-driver" ]; then
|
XR_DRIVER_BINARY="$XR_DRIVER_DIR/out/$XR_DRIVER_BINARY_NAME"
|
||||||
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"
|
|
||||||
|
|
||||||
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"
|
curl -L "$setup_download_url" > "$PACKAGE_DIR/bin/xr_driver_setup"
|
||||||
chmod +x "$PACKAGE_DIR/bin/xr_driver_setup"
|
chmod +x "$PACKAGE_DIR/bin/xr_driver_setup"
|
||||||
|
|
||||||
echo "Downloaded XRLinuxDriver binary and setup script, with hashes:"
|
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/ .*//')"
|
printf '\txr_driver_setup: %s\n' "$(sha256sum "$PACKAGE_DIR/bin/xr_driver_setup" | sort | sha256sum | sed 's/ .*//')"
|
||||||
else
|
else
|
||||||
if [ ! -e "$XR_DRIVER_BINARY" ] || [ "$1" == "--rebuild-driver" ] || [ "$1" == "--rebuild-all" ]; then
|
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)
|
XR_DRIVER_TMP_DIR=$(mktemp -d -t xr-driver-XXXXXXXXXX)
|
||||||
pushd $XR_DRIVER_TMP_DIR > /dev/null
|
pushd $XR_DRIVER_TMP_DIR > /dev/null
|
||||||
cp $XR_DRIVER_BINARY $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/xrDriver.tar.gz
|
tar -xf "$XR_DRIVER_TMP_DIR/$XR_DRIVER_BINARY_NAME"
|
||||||
|
|
||||||
XR_DRIVER_MANIFEST_LINE=$(sha256sum xr_driver/manifest)
|
XR_DRIVER_MANIFEST_LINE=$(sha256sum xr_driver/manifest)
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
rm -rf $XR_DRIVER_TMP_DIR
|
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
|
cp $XR_DRIVER_DIR/bin/xr_driver_setup $PACKAGE_DIR/bin/xr_driver_setup
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -26,21 +26,6 @@ else
|
||||||
fi
|
fi
|
||||||
BUILD_FILE_NAME=breezyVulkan-$ARCH.tar.gz
|
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
|
# copy Sombrero shader, get ReShade headers
|
||||||
cp modules/sombrero/*.frag $PACKAGE_DIR
|
cp modules/sombrero/*.frag $PACKAGE_DIR
|
||||||
cp modules/sombrero/*.png $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
|
cp -r $VULKAN_DIR/config $PACKAGE_DIR
|
||||||
|
|
||||||
# build XR driver
|
# build XR driver
|
||||||
XR_DRIVER_BINARY=$XR_DRIVER_DIR/out/xrDriver-$ARCH.tar.gz
|
XR_DRIVER_BINARY_NAME=xrDriver-$ARCH.tar.gz
|
||||||
if [ -n "$STEAMOS" ]; then
|
XR_DRIVER_BINARY="$XR_DRIVER_DIR/out/$XR_DRIVER_BINARY_NAME"
|
||||||
XR_DRIVER_BINARY=$XR_DRIVER_DIR/out/xrDriver-$ARCH.steamos.tar.gz
|
|
||||||
BUILD_FILE_NAME=breezyVulkan-$ARCH.steamos.tar.gz
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -e "$XR_DRIVER_BINARY" ] || [ "$1" == "--rebuild-driver" ]; then
|
if [ ! -e "$XR_DRIVER_BINARY" ] || [ "$1" == "--rebuild-driver" ]; then
|
||||||
# if a file exists at custom_banner_config.yml, copy it to the xrealAirLinuxDriver directory
|
# 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
|
# strange issue where the base library produces a .so file if the build is not cleaned
|
||||||
rm -rf build/
|
rm -rf build/
|
||||||
|
|
||||||
if [ -n "${STEAMOS:-}" ]; then
|
|
||||||
export STEAMOS
|
|
||||||
fi
|
|
||||||
docker-build/init.sh
|
docker-build/init.sh
|
||||||
docker-build/run-build.sh $ARCH
|
docker-build/run-build.sh $ARCH
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TMP_DIR=$(mktemp -d -t breezy-vulkan-XXXXXXXXXX)
|
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
|
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)
|
XR_DRIVER_MANIFEST_LINE=$(sha256sum xr_driver/manifest)
|
||||||
popd
|
popd
|
||||||
rm -rf $TMP_DIR
|
rm -rf $TMP_DIR
|
||||||
|
|
||||||
# copy XR driver binary and setup script
|
# 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
|
cp $XR_DRIVER_DIR/bin/xr_driver_setup $PACKAGE_DIR/bin
|
||||||
|
|
||||||
# create manifest file for verifying installed file checksums against the originally packaged versions
|
# 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)
|
# include any file that doesn't get modified during setup (e.g. vkBasalt.json files)
|
||||||
pushd $PACKAGE_DIR
|
pushd $PACKAGE_DIR
|
||||||
echo $XR_DRIVER_MANIFEST_LINE > manifest
|
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
|
popd
|
||||||
|
|
||||||
# bundle everything up
|
# bundle everything up
|
||||||
|
|
|
||||||
|
|
@ -163,9 +163,12 @@ echo "Installing xrDriver"
|
||||||
echo "BEGIN - xr_driver_setup"
|
echo "BEGIN - xr_driver_setup"
|
||||||
if [ -z "$1" ]
|
if [ -z "$1" ]
|
||||||
then
|
then
|
||||||
sudo bin/xr_driver_setup $(pwd)/xrDriver.tar.gz
|
sudo bin/xr_driver_setup $(pwd)
|
||||||
else
|
else
|
||||||
sudo bin/xr_driver_setup -v $1 $(pwd)/xrDriver.tar.gz
|
sudo bin/xr_driver_setup -v $1 $(pwd)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "END - xr_driver_setup"
|
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
|
||||||
|
|
@ -67,6 +67,9 @@ export default class BreezyDesktopExtension extends Extension {
|
||||||
try {
|
try {
|
||||||
Globals.extension_dir = this.path;
|
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();
|
Globals.data_stream.start();
|
||||||
|
|
||||||
this._monitor_manager = new MonitorManager({
|
this._monitor_manager = new MonitorManager({
|
||||||
|
|
|
||||||
|
|
@ -192,11 +192,14 @@ echo "Installing xrDriver (requires sudo)"
|
||||||
echo "BEGIN - xr_driver_setup"
|
echo "BEGIN - xr_driver_setup"
|
||||||
if [ -z "$1" ]
|
if [ -z "$1" ]
|
||||||
then
|
then
|
||||||
sudo bin/xr_driver_setup $(pwd)/xrDriver.tar.gz
|
sudo bin/xr_driver_setup $(pwd)
|
||||||
else
|
else
|
||||||
sudo bin/xr_driver_setup -v $1 $(pwd)/xrDriver.tar.gz
|
sudo bin/xr_driver_setup -v $1 $(pwd)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "END - xr_driver_setup"
|
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"
|
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"
|
||||||
|
|
@ -19,6 +19,8 @@
|
||||||
#include <QBuffer>
|
#include <QBuffer>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileSystemWatcher>
|
#include <QFileSystemWatcher>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QJsonObject>
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
#include <QQuickItem>
|
#include <QQuickItem>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
@ -112,6 +114,16 @@ namespace KWin
|
||||||
BreezyDesktopEffect::BreezyDesktopEffect()
|
BreezyDesktopEffect::BreezyDesktopEffect()
|
||||||
{
|
{
|
||||||
qCCritical(KWIN_XR) << "\t\t\tBreezy - constructor";
|
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<BreezyDesktopEffect>("org.kde.kwin.effect.breezy_desktop", 1, 0, "BreezyDesktopEffect", QStringLiteral("BreezyDesktop cannot be created in QML"));
|
qmlRegisterUncreatableType<BreezyDesktopEffect>("org.kde.kwin.effect.breezy_desktop", 1, 0, "BreezyDesktopEffect", QStringLiteral("BreezyDesktop cannot be created in QML"));
|
||||||
|
|
||||||
setupGlobalShortcut(
|
setupGlobalShortcut(
|
||||||
|
|
@ -278,7 +290,7 @@ bool BreezyDesktopEffect::developerMode() const
|
||||||
return m_developerMode;
|
return m_developerMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariantMap BreezyDesktopEffect::initialProperties(Output *screen)
|
QVariantMap BreezyDesktopEffect::initialProperties(ScreenOutput *screen)
|
||||||
{
|
{
|
||||||
return QVariantMap{
|
return QVariantMap{
|
||||||
{QStringLiteral("effect"), QVariant::fromValue(this)},
|
{QStringLiteral("effect"), QVariant::fromValue(this)},
|
||||||
|
|
@ -404,7 +416,7 @@ QVariantList BreezyDesktopEffect::listVirtualDisplays() const {
|
||||||
bool BreezyDesktopEffect::removeVirtualDisplay(const QString &id) {
|
bool BreezyDesktopEffect::removeVirtualDisplay(const QString &id) {
|
||||||
auto it = m_virtualDisplays.find(id);
|
auto it = m_virtualDisplays.find(id);
|
||||||
if (it != m_virtualDisplays.end()) {
|
if (it != m_virtualDisplays.end()) {
|
||||||
Output *output = it->output;
|
VirtualOutputHandle *output = it->output;
|
||||||
if (output) {
|
if (output) {
|
||||||
KWin::kwinApp()->outputBackend()->removeVirtualOutput(output);
|
KWin::kwinApp()->outputBackend()->removeVirtualOutput(output);
|
||||||
}
|
}
|
||||||
|
|
@ -826,7 +838,7 @@ void BreezyDesktopEffect::updateDriverSmoothFollowSettings() {
|
||||||
|
|
||||||
if (m_lookingAtScreenIndex != -1 && !m_displayResolution.isEmpty()) {
|
if (m_lookingAtScreenIndex != -1 && !m_displayResolution.isEmpty()) {
|
||||||
// Adjust display distance by relative monitor size compared to the FOV monitor
|
// 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();
|
const QSize focusedSize = focusedOutput ? focusedOutput->geometry().size() : QSize();
|
||||||
|
|
||||||
if (focusedSize.isValid()) {
|
if (focusedSize.isValid()) {
|
||||||
|
|
@ -948,7 +960,7 @@ bool BreezyDesktopEffect::updateEffectOnScreenGeometryCache()
|
||||||
m_effectTargetScreenIndex = -1;
|
m_effectTargetScreenIndex = -1;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Output *effectOnScreen = screensList.at(m_effectTargetScreenIndex);
|
ScreenOutput *effectOnScreen = screensList.at(m_effectTargetScreenIndex);
|
||||||
if (!effectOnScreen) {
|
if (!effectOnScreen) {
|
||||||
m_effectTargetScreenIndex = -1;
|
m_effectTargetScreenIndex = -1;
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -962,7 +974,7 @@ bool BreezyDesktopEffect::updateEffectOnScreenGeometryCache()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BreezyDesktopEffect::warpPointerToOutputCenter(Output *output)
|
void BreezyDesktopEffect::warpPointerToOutputCenter(ScreenOutput *output)
|
||||||
{
|
{
|
||||||
if (!output) {
|
if (!output) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,18 @@ class QTimer;
|
||||||
|
|
||||||
namespace KWin
|
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
|
class BreezyDesktopEffect : public QuickSceneEffect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
@ -154,7 +166,7 @@ namespace KWin
|
||||||
void cursorPosChanged();
|
void cursorPosChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QVariantMap initialProperties(Output *screen) override;
|
QVariantMap initialProperties(ScreenOutput *screen) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void teardown();
|
void teardown();
|
||||||
|
|
@ -165,7 +177,7 @@ namespace KWin
|
||||||
void toggleSmoothFollow();
|
void toggleSmoothFollow();
|
||||||
void setSmoothFollowThreshold(float threshold);
|
void setSmoothFollowThreshold(float threshold);
|
||||||
void updateDriverSmoothFollowSettings();
|
void updateDriverSmoothFollowSettings();
|
||||||
void warpPointerToOutputCenter(Output *output);
|
void warpPointerToOutputCenter(ScreenOutput *output);
|
||||||
void evaluateCursorOnScreenState(const QPointF &prevPos, const QPointF &newPos);
|
void evaluateCursorOnScreenState(const QPointF &prevPos, const QPointF &newPos);
|
||||||
void invalidateEffectOnScreenGeometryCache();
|
void invalidateEffectOnScreenGeometryCache();
|
||||||
bool updateEffectOnScreenGeometryCache();
|
bool updateEffectOnScreenGeometryCache();
|
||||||
|
|
@ -221,7 +233,7 @@ namespace KWin
|
||||||
bool m_effectOnScreenGeometryValid = false;
|
bool m_effectOnScreenGeometryValid = false;
|
||||||
|
|
||||||
struct VirtualOutputInfo {
|
struct VirtualOutputInfo {
|
||||||
Output *output = nullptr;
|
VirtualOutputHandle *output = nullptr;
|
||||||
QString id;
|
QString id;
|
||||||
QSize size;
|
QSize size;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -204,6 +204,15 @@ BreezyDesktopEffectConfig::BreezyDesktopEffectConfig(QObject *parent, const KPlu
|
||||||
ui.setupUi(widget());
|
ui.setupUi(widget());
|
||||||
addConfig(BreezyDesktopConfig::self(), 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")
|
// Advanced tab: measurement units selector (stored as "cm" or "in")
|
||||||
if (ui.comboMeasurementUnits) {
|
if (ui.comboMeasurementUnits) {
|
||||||
ui.comboMeasurementUnits->clear();
|
ui.comboMeasurementUnits->clear();
|
||||||
|
|
@ -725,6 +734,7 @@ void BreezyDesktopEffectConfig::pollDriverState()
|
||||||
auto configJsonOpt = XRDriverIPC::instance().retrieveConfig();
|
auto configJsonOpt = XRDriverIPC::instance().retrieveConfig();
|
||||||
if (!stateJsonOpt || !configJsonOpt) return;
|
if (!stateJsonOpt || !configJsonOpt) return;
|
||||||
auto stateJson = stateJsonOpt.value();
|
auto stateJson = stateJsonOpt.value();
|
||||||
|
|
||||||
m_connectedDeviceBrand = stateJson.value(QStringLiteral("connected_device_brand")).toString();
|
m_connectedDeviceBrand = stateJson.value(QStringLiteral("connected_device_brand")).toString();
|
||||||
m_connectedDeviceModel = stateJson.value(QStringLiteral("connected_device_model")).toString();
|
m_connectedDeviceModel = stateJson.value(QStringLiteral("connected_device_model")).toString();
|
||||||
m_connectedDeviceFullDistanceCm = stateJson.value(QStringLiteral("connected_device_full_distance_cm")).toDouble(0.0);
|
m_connectedDeviceFullDistanceCm = stateJson.value(QStringLiteral("connected_device_full_distance_cm")).toDouble(0.0);
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 35c4b68796bfebe4337d3572cb3874a8a5c7c125
|
Subproject commit 3b2aa4d981c923d06944ff9a6777b5c8b81d2657
|
||||||
|
|
@ -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,
|
# always do this on start-up since the driver sometimes fails to update the license on boot,
|
||||||
# prevent showing a license warning unnecessarily
|
# 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):
|
def do_activate(self):
|
||||||
"""Called when the application is activated.
|
"""Called when the application is activated.
|
||||||
|
|
|
||||||
|
|
@ -161,9 +161,12 @@ echo "Installing xrDriver"
|
||||||
echo "BEGIN - xr_driver_setup"
|
echo "BEGIN - xr_driver_setup"
|
||||||
if [ -z "$1" ]
|
if [ -z "$1" ]
|
||||||
then
|
then
|
||||||
bin/xr_driver_setup $(pwd)/xrDriver.tar.gz
|
bin/xr_driver_setup $(pwd)
|
||||||
else
|
else
|
||||||
bin/xr_driver_setup -v $1 $(pwd)/xrDriver.tar.gz
|
bin/xr_driver_setup -v $1 $(pwd)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "END - xr_driver_setup"
|
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
|
||||||
Loading…
Reference in New Issue