RFC: reducing wasted disk space from addon files

Hans Leidekker hans at codeweavers.com
Wed Mar 27 05:37:26 CDT 2019


On Sat, 2019-03-16 at 01:28 +0100, Hans Leidekker wrote:
> On Fri, 2019-03-15 at 18:09 -0500, Vincent Povirk wrote:
> > On Fri, Mar 15, 2019 at 5:05 PM Hans Leidekker <hans at codeweavers.com> wrote:
> > > That shouldn't be needed. All they'd need to do is run the installer
> > > with MONOBASEDIR set to the desired shared directory. The first install
> > > would create it, the second would increase the reference count. Removal
> > > of the package or an upgrade would decrement the reference count.
> > 
> > A reference count won't work if a prefix is deleted or copied.
> > Currently, Wine has no official tools for either task.
> 
> Deleting or copying wouldn't hurt either. If you want to delete
> prefixes at will without caring about the shared prefix you should
> store the shared directory in the first prefix. If you copy a prefix,
> that means the refcount could drop to zero before all users are gone.
> The guard against that is to run a repair.
> 
> > Old versions would be left in place until all prefixes that use them
> > are upgraded, even if the old Wine that needs them no longer exists.
> 
> No, the last upgrade would have deleted it.

Here's what a reference counted shared directory would look like.
The first patch implements the needed custom actions in a Wine dll,
which can be cross compiled with MinGW. 

The second patch adds necessary changes to the wine-mono build. I left
out the custom action binary.

The third patch changes mscoree to check the MonoBaseDir registry
value. It's a bit large because it also moves to dynamically allocated
path buffers.

There's no support for upgrades or removals yet.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shareddir.diff
Type: text/x-patch
Size: 7537 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190327/2170e53d/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winemono.diff
Type: text/x-patch
Size: 3017 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190327/2170e53d/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mscoree.diff
Type: text/x-patch
Size: 7842 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190327/2170e53d/attachment-0005.bin>


More information about the wine-devel mailing list