cryptomator / cryptomator-win

Cryptomator .exe installer for Windows
GNU General Public License v3.0
21 stars 12 forks source link

When updating existing installation, old files of prior versions remain in installation folder #2

Closed overheadhunter closed 7 years ago

overheadhunter commented 7 years ago

From @RiseT on September 21, 2016 14:53

Basic Info

When updating an existing Cryptomator installation, all old files of prior versions that are not overwritten remain in the installation folder.

One example would be the file "Cryptomator-1.1.4.jar", which co-exists with "Cryptomator-1.2.0.jar" and several other prior versions (of course this depends on how many prior versions the user had installed).

Potential solution (among others): Let the setup do an automatic uninstall prior to installing the new version.

Copied from original issue: cryptomator/cryptomator#348

overheadhunter commented 7 years ago

From @markuskreusch on September 21, 2016 16:7

I already noticed this and decided it is not a big problem because this does not affect many files. I had every version installed on my system and the overhead ist only 8 MB.

Nevertheless, we may change this in the future if it can be easily done using the installer script we currently use.

overheadhunter commented 7 years ago

From @RiseT on September 21, 2016 16:41

This should be rather simple. Inno Setup seems to have an [InstallDelete] section where you can specify any files and/or folders that should get deleted prior to installation. So you could just specify "{app}\app", "{app}\runtime" and some of the files in the {app} folder (see the warning within the page below).

http://www.jrsoftware.org/ishelp/topic_installdeletesection.htm

overheadhunter commented 7 years ago

From @markuskreusch on September 21, 2016 18:10

Ok thank you very much, didn't look into details yet.

Regarding the warnings: Looks like this would require us to add all relevant files as a list instead of using {app}\app etc. to prevent data loss in case of installation into an alread existing location.

We need a way we can automate this process because having to create a list of files to delete by hand would make the release process much more complicated. Will think about this.

overheadhunter commented 7 years ago

From @RiseT on September 21, 2016 18:39

Actually, they only warn about wildcard deleting the the {app} folder itself, not its subfolders. This prevents the potential mess if the user chose an already existing folder as the {app} folder.

So if you moved the remaining Cryptomator files from {app} to a subfolder of {app}, you could just delete all these subfolders of {app}. It probably would help if these subfolders had unique names in order to make it unlikely that they already exist from some 3rd party application.

Ok, this wouldn't take care of someone putting their stuff into one of these newly created subfolders after the initial installation. But I still hope there is intelligent life on earth...

Or - even simpler - you could just use something like {app}\Cryptomator\..., which would normally become Cryptomator\Cryptomator\.... So even if someone chose "Windows" as {app}, you still would have your (unique) "Cryptomator" folder as a subfolder of "Windows".