fix(bionic): address review findings

Launcher (tools/bionic-runtime/tool/launch.sh)
- The FEX code cache is also cleared when another FEX build wrote to it since this tool last ran the prefix:
  the stamp now holds the FEX ID and a fingerprint of the caches, saved after each run (also after
  runinprefix and when Steam stops the game).
- A game started by a launcher that then exits keeps the tool waiting: the wait goes on while any program
  of the prefix runs, apart from Wine's own services. The game is looked up in this prefix only, by its
  name as fixed text.
- The tool exits with Wine's status instead of 0.

Install scripts (droiddeck-game-env)
- A "run process" entry counts as done only when its hasrunkey value is a DWORD of at least its
  MinimumHasRunValue (1 by default), as Steam's evaluator decides; a 0 or a value of another type no longer
  lets the evaluator be skipped.

Helpers
- execshim: non-regular files (a FIFO) go to libc without a blocking open; libc functions are bound at load
  through atomic slots; relative posix_spawn paths with file actions are left to libc; the argument vector
  has room for its terminator when argv is empty.
- gstag: replies and errors are matched to their request's sequence number per connection; one bounded
  packet reader; destroyed windows leave the candidate and tagged lists; the focus override needs a live
  tagged window and a successful focus read; only gone candidates are pruned.
- steamshm: a new shared object is created and sized under a private name and then put in place in one
  step; both code redirects go in or neither, and unused trampolines are released.
- check-needed.py fails when readelf fails and ignores dangling links.
- The bionic runtime workflow also runs for tools/gpuload changes.

App and tool wrapper
- FEX twin downloads run once per name; a twin that a game's FEX choice still needs on an installed tool
  cannot be deleted.
- With proot on and no DroidDeck-Proton installed, a launch sent to DroidDeck-Bionic stops with a message
  instead of starting the bionic tool.
This commit is contained in:
The412Banner committed 2026-11-22 17:56:19 -05:00
1 parent dca443e3aa
commit 2aae4b2284
11 files changed
+435 -122

No files matched your search

+7 -4
View File
@@ -37,15 +37,18 @@ def elf_files(pack):
def needed(readelf, path):
out = subprocess.run([readelf, "-d", path], capture_output=True, text=True).stdout
return [l.split("[", 1)[1].split("]", 1)[0] for l in out.splitlines() if "(NEEDED)" in l]
run = subprocess.run([readelf, "-d", path], capture_output=True, text=True)
if run.returncode != 0: # a damaged ELF must fail the check, not pass with no dependencies
raise SystemExit("check-needed: %s -d %s failed (%d): %s" % (readelf, path, run.returncode, run.stderr.strip()))
return [l.split("[", 1)[1].split("]", 1)[0] for l in run.stdout.splitlines() if "(NEEDED)" in l]
def names_in(*dirs):
names = set()
for d in dirs:
for _, _, files in os.walk(d):
names.update(files)
for root, _, files in os.walk(d):
# a link whose target is missing provides nothing
names.update(f for f in files if os.path.isfile(os.path.join(root, f)))
return names