updater icon indicating copy to clipboard operation
updater copied to clipboard

When updating, delete what's not used by newer release

Open illwieckz opened this issue 3 years ago • 11 comments

When updating, delete what's not used by newer release : old dll, dpk we don't make use anymore…

We may need to save the install state when installing, see also:

  • #97

Some features to fulfill one need may be useful to fulfill the other one.

illwieckz avatar Aug 01 '22 18:08 illwieckz

ping @DolceTriade

illwieckz avatar Aug 01 '22 18:08 illwieckz

I have a feeling some portion of people will get mad that older DPKs are removed.

To implement uninstall, I think I will just have it nuke the whole install directory, so no need to track what was installed for that. I would have a checkbox for e.g. "Delete C:\Program Files\Unvanquished" upon configuring the uninstallation so that it's clear what's going to happen.

slipher avatar Apr 23 '24 00:04 slipher

The downside of deleting the existing dir is that you have to download everything. Currently, we only download new files and changed files.

DolceTriade avatar Apr 23 '24 08:04 DolceTriade

I have a feeling some portion of people will get mad that older DPKs are removed.

What about all the people who are already mad because we never delete anything? Ask me to test your cgame change: you spammed each user with at least 6MB of persistent garbage.

sweet235 avatar Apr 23 '24 08:04 sweet235

The downside of deleting the existing dir is that you have to download everything. Currently, we only download new files and changed files.

Of course we wouldn't do that for an update. That's only when uninstalling.

I have a feeling some portion of people will get mad that older DPKs are removed.

What about all the people who are already mad because we never delete anything? Ask me to test your cgame change: you spammed each user with at least 6MB of persistent garbage.

We just can't win, as every user (and developer) gets mad if the program doesn't work in their preferred manner.

slipher avatar Apr 23 '24 20:04 slipher

I have a feeling some portion of people will get mad that older DPKs are removed.

Why not providing a checkbox:

[ ] delete obsolete dpk

Also we better delete all obsolete files that are not dpk (dll, or things like that) in all cases.

illwieckz avatar Apr 23 '24 20:04 illwieckz

What obsolete files? Files that haven't been touched in X months? Files that are not maps, dependencies of maps, and are not default files?

idk seems like just tell people to delete what they want from the homedir and let it be redownloaded

DolceTriade avatar Apr 23 '24 20:04 DolceTriade

Obsolete files are files not being part of the torrent, and not being part of the engine zip for the current platform.

I talk about the install dir, not the home dir.

illwieckz avatar Apr 23 '24 20:04 illwieckz

The updater definitely won't delete anything from <homepath>/pkg. Only DPKs in the installation directory are in question. Dependencies of maps is a good point though: a map can potentially have a versioned dependency on anything.

If paks are not safe to delete, this feature request will be pretty low priority as paks are where the megabytes are. It's pretty rare that we get rid of a DLL. At that point if we want to optimize space we'd be better off filtering out the zips for other OSes (and symbols?).

slipher avatar Apr 23 '24 20:04 slipher

Oh...for the basepath, any dpk that's not part of the current release is "safe" to be deleted right? If it is required, it will be redownloaded?

DolceTriade avatar Apr 23 '24 21:04 DolceTriade

any dpk that's not part of the current release is "safe" to be deleted right?

Right.

If it is required, it will be redownloaded?

Right. If a dpk that is part of the current release is mistakenly deleted, it will be redownloaded.

The only reason why people may want to keep old released dpk from old releases are:

  • if community maps had hardcoded DEPS version (at least we can expect servers hosting them would also host the old dpk to download)
  • playing demos from older games (assuming the engine is still compatible with the old game code)

illwieckz avatar Apr 23 '24 21:04 illwieckz