Project

General

Profile

Actions

Emulator Issues #9389

closed

[Windows] Re-installing Dolphin doesn't delete old GameSettings

Added by JosJuice about 8 years ago. Updated about 8 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
Windows
Issue type:
Bug
Milestone:
Current
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
Yes
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What's the problem? Describe what went wrong.

When installing Dolphin on a computer that already has an old Dolphin install, the GameSettings directory gets copied to the install directory, with new files overwriting old files. However, old files that don't have files with equivalent names in the new version are left untouched instead of being deleted. If this problem will be present in 5.0, upgrading from 4.0 to 5.0 using the installer will leave around about 1500 files that take up unnecessary space, with some of them containing outdated settings that will override the correct ones.

The problem also applies to other directories like Themes. While this also wastes a little bit of space, it won't have an effect on running Dolphin, so it's not as much as a problem. It does however mean that the Clean themes readme file that has been deleted from the development versions won't be deleted.

I don't know if there are similar problems on operating systems other than Windows. If anyone is aware of one, please submit it as a separate issue report, because the fix isn't going to be the same as for Windows.

What steps will reproduce the problem?

First, install Dolphin 4.0.2 x64 using the installer available on dolphin-emu.org. Then, follow the instructions in Readme.md to create an installer of a development build, and run that installer. Once the install is complete, check the Sys/GameSettings/ directory in the install directory.

Which versions of Dolphin did you test on? Does using an older version of Dolphin solve your issue? If yes, which versions of Dolphin used to work?

I used 4.0-8901 to test. I haven't tested any older versions, but the installer hasn't been edited since 4.0.

What are your PC specifications? (CPU, GPU, Operating System, more)

Windows 7, NSIS 2.50

Actions #1

Updated by Fog about 8 years ago

This is essentially installing on-top of an existing installation. I'm not sure if we should support such a use case installation.

Normal procedure would be to uninstall the previous version of Dolphin, then install the new version of Dolphin.

Actions #2

Updated by JosJuice about 8 years ago

I thought running an installer while having an old version installed was a completely normal thing to do?

Actions #3

Updated by BhaaL about 8 years ago

I believe NSIS creates a setup running on the Windows Installer/MSI infrastructure provided by Windows. And with MSI, there are generally a bunch of ways of doing an update: https://shieldmaster.wordpress.com/2011/06/27/installshield-upgrade-strategy/ (ignore the "InstallShield" in the title, the idea applies to all MSI-based installers)

For that particular problem, there might be two ways of doing this:
1) Tell the installer that this is a major upgrade (which is effectively an uninstall followed by a reinstall). If the uninstall clears everything, we should be good to go (but this probably needs to be tested).
2) Tell the installer to delete files/folders on install (which is a rather huge authoring effort, depending on how fine-grained control inside NSIS is - again, I can only speak from experience with InstallShield, and it kinda works there in a way)

I strongly hope that 1) works and solves this issue. Basically we'd have to bump/change the Product Code to do this (no idea how NSIS manages that) and the MSI infrastructure should do the rest.
If not, we'd have to write a RMDir (or worst case, Delete) for the files/folders we want to trash before actually installing things (when we need to use approach 2).

Actions #4

Updated by delroth about 8 years ago

NSIS is not based on the MSI framework, it's its own thing AFAIK.

Our installer needs some revamp for 5.0 anyway (new version of redistributables, stuff like that). rmdir solution SGTM, let me know if you feel like writing the patch.

Actions #5

Updated by delroth about 8 years ago

  • Status changed from New to Accepted
  • Easy changed from No to Yes
Actions #6

Updated by Fog about 8 years ago

  • Status changed from Accepted to Fix pending
Actions #7

Updated by Fog about 8 years ago

  • Status changed from Fix pending to Fixed
Actions

Also available in: Atom PDF