Skip to content

Update: Seed new prefixes from a per-runner template instead of a full wineboot - #19

Merged
NotProtonNot merged 1 commit into
NotProtonNot:dev-1.1.0from
natbro:seed-prefix-from-template
Oct 7, 2026
Merged

NotProtonNot merged 1 commit into
NotProtonNot:dev-1.1.0from
natbro:seed-prefix-from-template

Conversation

@natbro

@natbro natbro commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

(supersedes #15 rather than re-base and confusing deltas)
A fresh prefix is close to a gigabyte of files that wineboot copies out of the runner, and every game gets its own. Build one template per runner and seed each game from it with "cp -c", which clones on APFS so the files share blocks. A seeded prefix also needs no wineboot at all, so launches after the first are noticeably faster.

The template sits in the library's compatdata, so it is always on the volume it seeds; a same_volume check falls back to a plain copy otherwise. It is built through lay_out_proton_profile and then wineboot, the same steps and the same order a game's prefix takes, because a bare wineboot leaves a real users/crossover directory that lay_out_proton_profile then refuses to convert, which would cost every seeded prefix the steamuser layout. That needed lay_out_proton_profile to accept the prefix to lay out.

The key is the build this compatibility tool runs plus the unix arch: builds can be installed alongside each other, and one runner serves both flavors, which populate a prefix from different PE sets.

@NotProtonNot

Copy link
Copy Markdown
Owner

Thank you so much! I'll review this shortly.

@NotProtonNot

Copy link
Copy Markdown
Owner

I am testing this locally now, fixing bugs, doing some UI work related to supporting it, handling edge cases.

@NotProtonNot

Copy link
Copy Markdown
Owner

I have this PR in a great state locally, on my local branch. I'll be merging this into Dev tomorrow. I have done a bunch of work to other parts of the app to make this feature work better. I improved the app and did some safety work for users who are using non-APFS file systems.

I would like to make some stylistic changes to the PR so as to match my 'house style' (which there is no real way you would be aware of - I haven't posted any Contributing guidance yet but will do that as soon as I can tomorrow).

This is where I ask you something: how would you like me to go about modifying the PR? I have no strong feelings either way: do you want me to merge your commit in/make changes in a commit from me immediately after or do you want me to merge your commit but modify it include the changes I made (which are nearly entirely stylistic)? I wouldn't do either without asking the person who made the PR first.

This feature is an excellent one. I explored APFS clones during development, but only briefly. I dropped it at one point to deal with something that was more critical at the time - I forget what, probably Steam Overlay stuff. This feature works very well and reduces storage use by a great deal. A worthy merge. I appreciate it.

@natbro

natbro commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

please feel absolutely free to modify and incorporate as you feel. doing this as-is isn't important to me, I'm trying to derive house-style from what I see, but some things like where the templates are per-volume/-library were a bit arbitrary, as were some other aspects of comments in the code. if useful for future reference, closing this PR with a reference to the commit(s) which do the equivalent work in the way you prefer might be good, but totally up to you.

@NotProtonNot

Copy link
Copy Markdown
Owner

please feel absolutely free to modify and incorporate as you feel. doing this as-is isn't important to me, I'm trying to derive house-style from what I see, but some things like where the templates are per-volume/-library were a bit arbitrary, as were some other aspects of comments in the code. if useful for future reference, closing this PR with a reference to the commit(s) which do the equivalent work in the way you prefer might be good, but totally up to you.

Thank you! I will merge the PR and alter the comments.

My comment style is....complicated. I didn't provide any guidance, as I've been suffering from 'lack of time'. That's on my.

I'll merge this and alter the comments and ta-da. Stay tuned!

A fresh prefix is close to a gigabyte of files that wineboot copies out of the
runner, and every game gets its own. Build one template per runner and seed each
game from it with "cp -c", which clones on APFS so the files share blocks.
Measured across two games: 2834 MB logical, 942 MB actually consumed. A seeded
prefix also needs no wineboot at all, so launches after the first are noticeably
faster.

The template sits in the library's compatdata, so it is always on the volume it
seeds; a same_volume check falls back to a plain copy otherwise. It is built
through lay_out_proton_profile and then wineboot, the same steps and the same
order a game's prefix takes, because a bare wineboot leaves a real
users/crossover directory that lay_out_proton_profile then refuses to convert,
which would cost every seeded prefix the steamuser layout. That needed
lay_out_proton_profile to accept the prefix to lay out.

The key is the build this compatibility tool runs plus the unix arch: builds can
be installed alongside each other, and one runner serves both flavors, which
populate a prefix from different PE sets.
@NotProtonNot
NotProtonNot force-pushed the seed-prefix-from-template branch 2 times, most recently from 7b02818 to e38acc3 Compare October 7, 2026 00:41
@NotProtonNot
NotProtonNot changed the base branch from dev to dev-1.1.0 October 7, 2026 00:41
@NotProtonNot
NotProtonNot force-pushed the seed-prefix-from-template branch from e38acc3 to 7b02818 Compare October 7, 2026 00:41
@NotProtonNot NotProtonNot reopened this Oct 7, 2026
@NotProtonNot
NotProtonNot merged commit 7b02818 into NotProtonNot:dev-1.1.0 Oct 7, 2026
@NotProtonNot

Copy link
Copy Markdown
Owner

Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants