improvemets & fixes:
- added 'open with' handling to desktop shortcuts - move logs button to app configuration - fix sync progress disappearing after long hashing - fix sync double file counter - merge wine and proton prefix folders via symlink
This commit is contained in:
parent
8c6db38fab
commit
59ff0b1088
15 changed files with 520 additions and 113 deletions
|
|
@ -102,9 +102,20 @@ handlers in src/ipc/. Keep new APIs in that pattern.
|
|||
looks finished the moment it starts. Hashing and copying walk tens of
|
||||
thousands of files, so every per-file update goes through progressGate
|
||||
(~10/s, phase changes forced) - never send one IPC message per file.
|
||||
- The launcher's own defaults are opt-in (the "defaults" sync category):
|
||||
payload.defaults carries the default wine and prefix, and the receiver only
|
||||
applies values that exist there (an unknown wine id or prefix is skipped).
|
||||
- Registry-level settings are opt-in (the "settings" sync category, shown as
|
||||
"Sync settings"; the old name "defaults" is still accepted as an alias on
|
||||
BOTH sides - the receiver normalizes payload.categories, so a sender from an
|
||||
older version keeps working). payload carries defaults (default wine and
|
||||
prefix), wineSettings (displayName + disabled per build id), prefixSettings
|
||||
(the registry names; a settings sync never renames or creates folders -
|
||||
that is the prefixes category), appSettings (name, wine, prefix, args, env,
|
||||
dllOverrides, disableUmu per app id) and appOrder. The receiver only patches
|
||||
things that already exist there: an unknown wine id / prefix / app is
|
||||
skipped, nothing is created or deleted, and the order merge keeps local
|
||||
entries the sender does not know at the end. Values are written through the
|
||||
normal helpers (setWineDisplayName clears a custom label when the sender has
|
||||
none, library.updateGame pins the prefix of prefix imports, reorderGames
|
||||
merges by id).
|
||||
- LAN sync remembers file hashes in files/data/lansync-hashes.json, keyed by
|
||||
path with size + mtime (machine-local, never synced): equal size and mtime
|
||||
means equal bytes, so a repeat sync only stat's the tree. Hashing and the
|
||||
|
|
@ -160,6 +171,33 @@ handlers in src/ipc/. Keep new APIs in that pattern.
|
|||
- File permissions travel with a sync (manifest entry `mode`): the receiving
|
||||
side applies them after writing the bytes and repairs a file that has the
|
||||
same hash but the wrong mode without re-uploading it.
|
||||
- A sync must never walk through a symlinked ROOT. pruneTree/healUnitRoots
|
||||
(sync), removeTree/treeSize (fsutil) and healBuild (wines) lstat their root
|
||||
first and treat anything that is not a real directory as the link (or file)
|
||||
it is: a build, prefix or app folder kept on another disk must not have its
|
||||
target deleted, pruned or rewritten through the link. `listDirs()` in the
|
||||
sync counts symlinked folders as units, so such a folder still travels - as
|
||||
the link it is (`wineUnits` maps nested builds to their TOP folder under
|
||||
wines/, otherwise a zip-extracted build becomes a phantom unit whose root
|
||||
does not exist and the "Wine versions" totals grow).
|
||||
- Generated app shortcuts are file handlers too: `Exec=<launcher>
|
||||
--launch <id> --file %f` (the field code is appended after escaping - a
|
||||
literal % is `%%`). argv.js takes the file from `--file` or from a bare
|
||||
trailing path (KDE appends it to Exec lines without a file field), and
|
||||
runner.windowsPathFor passes it to the app the way Windows would: `C:\...`
|
||||
when it sits inside the prefix's drive_c, `Z:\...` otherwise. Giving a file
|
||||
to an app that is ALREADY running is a handoff (runGame `handoff: true`):
|
||||
an extra untracked process, no log/playtime writes, because the app's own
|
||||
single-instance logic is what actually opens the file.
|
||||
- A sender hashing a big unit is minutes of network silence: it pings
|
||||
`/plwl/ping` (+token) every HEARTBEAT_MS for the whole sync, the receiver's
|
||||
handler re-arms its popup watchdog (stage 'wait' changes nothing on screen),
|
||||
and a receiving popup its watchdog closed reopens on the next real event -
|
||||
only the 'done' stage ends a sync for good, and reopening NEVER asks for
|
||||
consent again: the Accept/Decline gate is the onIncoming popup at verify
|
||||
time (a fresh session), while the progress popup is driven by the same
|
||||
token's events. A 'wait' event that reopens a closed popup fills the phase
|
||||
line (`recvWaiting`) instead of leaving every line blank.
|
||||
- Tests are plain assert-by-print scripts (see test/): set PLWL_BUILD_DIR to
|
||||
a temp dir, check(), exit 1 on failure. Add one when fixing a bug.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue