Pull in driver with gamescope support, update vulkan setup to copy shader files to the appropriate gamescope directory, fix license issues in Breezy GNOME UI

This commit is contained in:
wheaney 2024-09-12 22:03:22 -07:00
parent 04e8bf2a6e
commit b7daefed82
6 changed files with 38 additions and 16 deletions

@ -1 +1 @@
Subproject commit 27f102ea97ddc015bf340a5627a7957fc6d39378 Subproject commit dd272422d665ec2f6d7d7006f94837fad73e1553

View File

@ -1,4 +1,5 @@
from gi.repository import Adw, Gtk, GLib from gi.repository import Adw, Gtk, GLib
from .nolicense import NoLicense
from .statemanager import StateManager from .statemanager import StateManager
from .licensetierrow import LicenseTierRow from .licensetierrow import LicenseTierRow
from .licensefeaturerow import LicenseFeatureRow from .licensefeaturerow import LicenseFeatureRow
@ -29,6 +30,8 @@ class LicenseDialog(Gtk.Dialog):
self.verify_token.connect('apply', self._on_verify_token) self.verify_token.connect('apply', self._on_verify_token)
self.refresh_license_button.connect('clicked', self._refresh_license) self.refresh_license_button.connect('clicked', self._refresh_license)
self.no_license = NoLicense(hide_refresh_button = True)
def _refresh_license(self, widget): def _refresh_license(self, widget):
self.refresh_license_button.set_sensitive(False) self.refresh_license_button.set_sensitive(False)
self.ipc.write_control_flags({'refresh_device_license': True}) self.ipc.write_control_flags({'refresh_device_license': True})
@ -46,19 +49,24 @@ class LicenseDialog(Gtk.Dialog):
for child in self.tiers: for child in self.tiers:
self.tiers.remove(child) self.tiers.remove(child)
tiers_group = Adw.PreferencesGroup(title=_("Paid Tier Status"), margin_top=20)
self.tiers.append(tiers_group)
for tier_name, tier_details in license_view['tiers'].items():
tiers_group.add(LicenseTierRow(tier_name, tier_details))
for child in self.features: for child in self.features:
self.features.remove(child) self.features.remove(child)
features_group = Adw.PreferencesGroup(title=_("Feature Availability"), margin_top=20)
self.features.append(features_group)
for feature_name, feature_details in license_view['features'].items(): if license_view:
features_group.add(LicenseFeatureRow(feature_name, feature_details)) tiers_group = Adw.PreferencesGroup(title=_("Paid Tier Status"), margin_top=20)
self.tiers.append(tiers_group)
for tier_name, tier_details in license_view['tiers'].items():
tiers_group.add(LicenseTierRow(tier_name, tier_details))
features_group = Adw.PreferencesGroup(title=_("Feature Availability"), margin_top=20)
self.features.append(features_group)
for feature_name, feature_details in license_view['features'].items():
features_group.add(LicenseFeatureRow(feature_name, feature_details))
else:
self.tiers.append(self.no_license)
self.refresh_license_button.set_sensitive(True) self.refresh_license_button.set_sensitive(True)

View File

@ -106,7 +106,7 @@ class BreezydesktopApplication(Adw.Application):
modal=True, modal=True,
program_name='Breezy Desktop', program_name='Breezy Desktop',
logo_icon_name='com.xronlinux.BreezyDesktop', logo_icon_name='com.xronlinux.BreezyDesktop',
version='0.12.0', version='1.0.0',
authors=['Wayne Heaney'], authors=['Wayne Heaney'],
copyright='© 2024 Wayne Heaney') copyright='© 2024 Wayne Heaney')
about.present() about.present()

View File

@ -8,13 +8,16 @@ class NoLicense(Gtk.Box):
refresh_license_button = Gtk.Template.Child() refresh_license_button = Gtk.Template.Child()
def __init__(self, **kwargs): def __init__(self, hide_refresh_button = False, **kwargs):
super(Gtk.Box, self).__init__() super(Gtk.Box, self).__init__()
self.init_template() self.init_template()
self.ipc = XRDriverIPC.get_instance() self.ipc = XRDriverIPC.get_instance()
self.refresh_license_button.connect("clicked", self.on_refresh_license_button_clicked) if hide_refresh_button:
self.refresh_license_button.hide()
else:
self.refresh_license_button.connect("clicked", self.on_refresh_license_button_clicked)
def on_refresh_license_button_clicked(self, button): def on_refresh_license_button_clicked(self, button):
self.ipc.write_control_flags({'refresh_device_license': True}) self.ipc.write_control_flags({'refresh_device_license': True})

View File

@ -79,10 +79,10 @@ class BreezydesktopWindow(Gtk.ApplicationWindow):
self.main_content.append(self.failed_verification) self.main_content.append(self.failed_verification)
elif not self.state_manager.driver_running: elif not self.state_manager.driver_running:
self.main_content.append(self.no_driver) self.main_content.append(self.no_driver)
elif not state_manager.connected_device_name:
self.main_content.append(self.no_device)
elif not self.state_manager.license_present: elif not self.state_manager.license_present:
self.main_content.append(self.no_license) self.main_content.append(self.no_license)
elif not state_manager.connected_device_name:
self.main_content.append(self.no_device)
elif not ExtensionsManager.get_instance().is_installed(): elif not ExtensionsManager.get_instance().is_installed():
self.main_content.append(self.no_extension) self.main_content.append(self.no_extension)
else: else:

View File

@ -20,6 +20,10 @@ fi
VULKAN_DATA_DIR="$XDG_DATA_HOME/vulkan" VULKAN_DATA_DIR="$XDG_DATA_HOME/vulkan"
XR_DRIVER_DATA_DIR="$XDG_DATA_HOME/xr_driver" XR_DRIVER_DATA_DIR="$XDG_DATA_HOME/xr_driver"
GAMESCOPE_DATA_DIR="$XDG_DATA_HOME/gamescope"
GAMESCOPE_RESHADE_SHADERS_DIR="$GAMESCOPE_DATA_DIR/reshade/Shaders"
GAMESCOPE_RESHADE_TEXTURES_DIR="$GAMESCOPE_DATA_DIR/reshade/Textures"
if [ -z "$XDG_CONFIG_HOME" ]; then if [ -z "$XDG_CONFIG_HOME" ]; then
XDG_CONFIG_HOME="$USER_HOME/.config" XDG_CONFIG_HOME="$USER_HOME/.config"
fi fi
@ -127,14 +131,21 @@ sed -e "s|/path/to/reshade-shaders|${RESHADE_CONFIG_DIR}|" \
-e "s|/path/to/sombrero|${RESHADE_CONFIG_DIR}/Shaders/Sombrero.frag|" \ -e "s|/path/to/sombrero|${RESHADE_CONFIG_DIR}/Shaders/Sombrero.frag|" \
config/vkBasalt.conf > $VKBASALT_CONFIG_DIR/vkBasalt.conf config/vkBasalt.conf > $VKBASALT_CONFIG_DIR/vkBasalt.conf
echo "Installing the Sombrero shaders and texture files to ${RESHADE_CONFIG_DIR}/{Shaders,Textures}" echo "Installing the Sombrero shader and texture files to ${RESHADE_CONFIG_DIR}/{Shaders,Textures} and ${GAMESCOPE_DATA_DIR}/reshade/{Shaders,Textures}"
cp *.frag $RESHADE_CONFIG_DIR/Shaders cp *.frag $RESHADE_CONFIG_DIR/Shaders
cp *.fx* $RESHADE_CONFIG_DIR/Shaders cp *.fx* $RESHADE_CONFIG_DIR/Shaders
cp *.png $RESHADE_CONFIG_DIR/Textures cp *.png $RESHADE_CONFIG_DIR/Textures
mkdir -p $GAMESCOPE_RESHADE_SHADERS_DIR
mkdir -p $GAMESCOPE_RESHADE_TEXTURES_DIR
cp *.frag $GAMESCOPE_RESHADE_SHADERS_DIR
cp *.fx* $GAMESCOPE_RESHADE_SHADERS_DIR
cp *.png $GAMESCOPE_RESHADE_TEXTURES_DIR
chown -R $USER:$GROUP $LIB_DIR chown -R $USER:$GROUP $LIB_DIR
chown -R $USER:$GROUP $LIB32_DIR chown -R $USER:$GROUP $LIB32_DIR
chown -R $USER:$GROUP $DATA_DIR chown -R $USER:$GROUP $DATA_DIR
chown -R $USER:$GROUP $GAMESCOPE_DATA_DIR
chown -R $USER:$GROUP $VULKAN_DATA_DIR chown -R $USER:$GROUP $VULKAN_DATA_DIR
chown -R $USER:$GROUP $RESHADE_CONFIG_DIR chown -R $USER:$GROUP $RESHADE_CONFIG_DIR
chown -R $USER:$GROUP $VKBASALT_CONFIG_DIR chown -R $USER:$GROUP $VKBASALT_CONFIG_DIR