1 Commits
Author SHA1 Message Date
MichaelScottsmanandClaude Opus 5.5 313d043115 Native glass survives an update: the daemon turns native back on when glassd is in place again; the installer restarts a running LiquidAss around the swap
- Installing while LiquidAss ran swapped the folder under the daemon: glassd's binary vanished for a
  moment, the daemon went CSS-only for good (the glass looked transparent). It now puts the shipped
  binary in place or waits for it, and turns native back on once a second.
- install.sh turns a running LiquidAss off before the swap and on again after it, on the new version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:31:53 -04:00
2 changed files with 27 additions and 5 deletions

No files matched your search

+13 -3
View File
@@ -931,7 +931,7 @@ class Shell:
self.native_enabled, self.css_reason = False, css_reason_for(self.native_req, self.native_src)
elif not self.glassd_path:
self.native_enabled, self.css_reason = False, "glassd disabled"
elif not os.access(self.glassd_path, os.X_OK):
elif not os.access(self.glassd_path, os.X_OK) and not ensure_glassd(self.glassd_path):
self.native_enabled, self.css_reason = False, "no glassd binary at start; python glass.py native-build"
else:
self.native_enabled, self.css_reason = True, None
@@ -2700,8 +2700,18 @@ class Shell:
if self.gseq and not self.g_files_removed: # native mode ended mid-session
self.g_files_removed = True
remove_glassd_files()
# only the binary was missing (an install swapping the folder under us, a toggle run before the
# install finished): native comes back as soon as a glassd is in place again
if self.native_requested and self.glassd_path and str(self.css_reason or "").startswith(
("glassd binary removed", "no glassd binary at start")) and ensure_glassd(self.glassd_path):
log("glassd: binary in place again; native layer back on")
self.native_enabled, self.css_reason = True, None
self.g_files_removed = False
self.g_given_up = False
self.tasks.append(asyncio.create_task(self.glassd_loop()))
self.changed.set()
return
if not os.access(self.glassd_path, os.X_OK):
if not os.access(self.glassd_path, os.X_OK) and not ensure_glassd(self.glassd_path):
self.disable_native("glassd binary removed")
await self.kill_glassd()
return
@@ -2749,7 +2759,7 @@ class Shell:
return
temp_streak = 0
while not self.stopping and self.native_possible():
if not os.access(self.glassd_path, os.X_OK):
if not os.access(self.glassd_path, os.X_OK) and not ensure_glassd(self.glassd_path):
self.disable_native("glassd binary removed")
return
# glassd needs SteamVR and something to cover (and the theme on: not dormant)
+14 -2
View File
@@ -68,6 +68,15 @@ install_app() {
tar -xzf "$tmp/$ASSET" -C "$tmp/new"
[ -f "$tmp/new/device/lgs.py" ] || die "the archive is not a LiquidAss release"
# A running LiquidAss is stopped for the swap (its files, glassd's binary included, vanish for a moment)
# and started again after it, on the new version.
was_on=0
if command -v systemctl >/dev/null 2>&1 && systemctl --user is-active --quiet lgs-shell 2>/dev/null && [ -f "$DEST/device/lgs.py" ]; then
was_on=1
say "turning LiquidAss off for the update"
py "$DEST/device/lgs.py" off --quiet >/dev/null 2>&1 || true
fi
# Swap the whole folder so files a release dropped do not linger; keep a glassd built on this headset.
mkdir -p "$(dirname "$DEST")"
if [ -f "$DEST/native/glassd/glassd" ] && [ ! -e "$tmp/new/native/glassd/glassd" ]; then
@@ -93,8 +102,11 @@ install_app() {
v=$(cat "$DEST/VERSION" 2>/dev/null || echo "")
say "installed ${v:+$v }in $DEST"
say "turn it on: dashboard bar > + > Launch Program > LiquidAss"
say "(already on? launch LiquidAss twice to load the new version)"
if [ "$was_on" = 1 ]; then
py "$DEST/device/lgs.py" on --quiet >/dev/null 2>&1 && say "LiquidAss is back on (the new version)" || say "could not turn LiquidAss back on: launch it from + > Launch Program > LiquidAss"
else
say "turn it on: dashboard bar > + > Launch Program > LiquidAss"
fi
}
uninstall_app() {