# pw-wine-prefix-delta-startwrapper

Generic launcher for packages built with `pw-wine-prefix-delta.eclass`.

The binary is installed as `/usr/bin/pw-wine-prefix-delta-startwrapper`.
Packages create a symlink with their package name, for example `/usr/bin/moxa-nport-adm`.
The wrapper uses the symlink basename as app id and reads:

`/usr/share/pw-wine-delta/<app-id>/startwrapper.conf`

Supported config keys are tab-separated:

- `program_exe<TAB>drive_c/.../program.exe`
- `window_pattern<TAB>text matched case-insensitively against wmctrl -lx output`
- `shared_dir<TAB>drive_c/.../dir<TAB><shared-app-id><TAB>seed,migrate`

`shared_dir` creates a symlink from the managed per-app user prefix into a shared per-user Wine delta prefix. For example, command/app id `buhl-tax-2026` with:

```text
shared_dir	drive_c/ProgramData/Buhl Data Service GmbH	buhl-tax	seed,migrate
```

links `~/.wine-pwdelta/buhl-tax-2026/drive_c/ProgramData/Buhl Data Service GmbH` to `~/.wine-pwdelta/buhl-tax/drive_c/ProgramData/Buhl Data Service GmbH`.

Flags:

- `seed`: if the shared target is empty, copy packaged data from `shared-prefix-delta/<relpath>` first.
- `migrate`: if a real directory already exists in the per-app prefix and the shared target is empty, copy it to the shared target, move the original aside as `.slotted-backup.<timestamp>`, then create the symlink.
