diff --git a/README.md b/README.md index 584e65e..adc3c33 100644 --- a/README.md +++ b/README.md @@ -154,9 +154,9 @@ Rerun the `breezy_vulkan_setup` script. No need to re-download this script, as i If you wish to completely remove the installation: * For **Breezy GNOME**: - * If you installed *via the setup script* run the following: `~/$XDG_BIN_HOME/breezy_gnome_uninstall` or `~/.local/bin/breezy_gnome_uninstall` if the XDG variable isn't set + * If you installed *via the setup script* run the following: `~/.local/bin/breezy_gnome_uninstall` * If you installed via `yay` run the following: `pacman -R breezy-desktop-gnome-git`, you may also want to uninstall the base driver with `pacman -R xr-driver-breezy-gnome-git` -* For **Breezy Vulkan** run the following: `sudo ~/bin/breezy_vulkan_uninstall`. This won't uninstall the base driver package, follow the instructions at the end of the uninstallation to do this manually. +* For **Breezy Vulkan** run the following: `~/.local/bin/breezy_vulkan_uninstall`. This won't uninstall the base driver package, follow the instructions at the end of the uninstallation to do this manually. ## Data Privacy Notice diff --git a/bin/breezy_vulkan_setup b/bin/breezy_vulkan_setup index 5d3eeb6..464e785 100755 --- a/bin/breezy_vulkan_setup +++ b/bin/breezy_vulkan_setup @@ -15,6 +15,10 @@ fi start_dir=$(pwd) ARCH=$(uname -m) +if [ "$ARCH" != "x86_64" ]; then + echo "Breezy Vulkan only supports x86_64 currently" + exit 1 +fi # create temp directory tmp_dir=$(mktemp -d -t breezy-vulkan-XXXXXXXXXX) diff --git a/modules/XRLinuxDriver b/modules/XRLinuxDriver index 98df646..a0bf750 160000 --- a/modules/XRLinuxDriver +++ b/modules/XRLinuxDriver @@ -1 +1 @@ -Subproject commit 98df6469d5bf084f93cded90a69ec60258f80b44 +Subproject commit a0bf7506445d61eb62da7684f361a2435300fad0 diff --git a/vulkan/bin/breezy_vulkan_uninstall b/vulkan/bin/breezy_vulkan_uninstall index 02c43d9..2871771 100755 --- a/vulkan/bin/breezy_vulkan_uninstall +++ b/vulkan/bin/breezy_vulkan_uninstall @@ -14,6 +14,9 @@ if [ "$(id -u)" != "0" ]; then exit 1 fi +# Get the directory of the current script +script_dir=$(dirname "$0") + USER=${SUDO_USER:-$USER} GROUP=$(id -gn $USER) USER_HOME=$(getent passwd $USER | cut -d: -f6) @@ -39,6 +42,7 @@ fi if [ -z "$XDG_BIN_HOME" ]; then XDG_BIN_HOME="$USER_HOME/.local/bin" fi +OLD_BIN_DIR="$USER_HOME/bin" BIN_DIR="$XDG_BIN_HOME" if [ ! -d "$BIN_DIR" ]; then mkdir -p $BIN_DIR @@ -87,4 +91,11 @@ rm -f $BIN_DIR/breezy_vulkan_verify [ "$for_install" -eq 0 ] && echo "To manually uninstall xrDriver, do: \"sudo xr_driver_uninstall\"" # this script is self-deleting, leave this as the last command -rm -f $BIN_DIR/breezy_vulkan_uninstall \ No newline at end of file +# remove the one we're not using first +if [ "$script_dir" = "$OLD_BIN_DIR" ]; then + rm -f "$BIN_DIR/breezy_vulkan_uninstall" + rm -f "$OLD_BIN_DIR/breezy_vulkan_uninstall" +else + rm -f "$OLD_BIN_DIR/breezy_vulkan_uninstall" + rm -f "$BIN_DIR/breezy_vulkan_uninstall" +fi \ No newline at end of file diff --git a/vulkan/bin/setup b/vulkan/bin/setup index 08b9772..ab5bac4 100755 --- a/vulkan/bin/setup +++ b/vulkan/bin/setup @@ -29,6 +29,7 @@ VKBASALT_CONFIG_DIR="$XDG_CONFIG_HOME/vkBasalt" if [ -z "$XDG_BIN_HOME" ]; then XDG_BIN_HOME="$USER_HOME/.local/bin" fi +OLD_BIN_DIR="$USER_HOME/bin" BIN_DIR="$XDG_BIN_HOME" if [ ! -d "$BIN_DIR" ]; then mkdir -p $BIN_DIR @@ -97,6 +98,9 @@ sed -i -e "s/{bin_dir}/$ESCAPED_BIN_DIR/g" \ cp bin/breezy_vulkan_verify $BIN_DIR cp manifest $DATA_DIR +# keep putting this in the old location in case an older version of the script tries to find it +cp bin/breezy_vulkan_uninstall $OLD_BIN_DIR + echo "Installing vkBasalt; copying binaries, configs, and shader files" # much of the setup below was informed by https://github.com/simons-public/steam-deck-vkbasalt-install @@ -134,6 +138,9 @@ chown -R $USER:$GROUP $VKBASALT_CONFIG_DIR chown -R $USER:$GROUP $STATE_DIR chown -R $USER:$GROUP $BIN_DIR/breezy_vulkan_* +# clear bash's cache of executable locations, so it can find the newly installed scripts +hash -r + # set up the XR driver using the local binary echo "Installing xrDriver" echo "BEGIN - xr_driver_setup"