[stable-3.16] Bugfix/version windows integration improve install - #8315
Merged
Conversation
nilsding
approved these changes
May 30, 2025
nilsding
marked this pull request as ready for review
May 30, 2025 07:22
shoudl enable replacing files during install happen only when needed instead of always will need to take care of migration from older releases Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com> Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
…ating The MSIs we distribute perform so-called "major upgrades". From the Microsoft docs, we learn that... > A typical major upgrade **removes a previous version** of an > application and installs a new version. Indeed that was the case -- the previous version is uninstalled completely before the new version gets installed. Since we install an extension that's loaded by explorer, the installer will ask the user to restart Windows Explorer during the uninstallation of the previous version (and restarting that might not always work as expected). There is a way to change this behaviour though, using Wix3's `MajorUpgrade` element. Through its `Schedule` property it's possible to define when the removal of the previous version should occur. The previous value `afterInstallInitialize` is one of two values that perform a complete uninstall/install sequence. The new value `afterInstallExecute` will install new files on top of the previous installation (depending on the `REINSTALLMODE` I guess) and remove older files that are not present. In the case of the extensions this means that the .dlls from the previous installation will not be touched, as long as the version embedded in the DLL info didn't change. This results in the installer no longer requesting Windows Explorer to restart, which is a big plus :D I also changed the REINSTALLMODE to `dmus` to allow downgrades as well. With this change, the request to restart Windows Explorer should hopefully happen only once an installation was made using an MSI that contains this change. Further updates will only request a restart if the DLL version of these extensions change... See also: - https://learn.microsoft.com/en-us/windows/win32/msi/major-upgrades - https://docs.firegiant.com/wix/schema/wxs/majorupgrade/#attributes:~:text=Schedule Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
Stopping the Windows Explorer process does not always work. Per default the MSI Restart Manager will display a warning message after a timeout, and not attempt to restart Explorer afterwards -- resulting in a black screen if no other window is open. Setting the property `MSIRMSHUTDOWN` to `1` will force the termination of the process when the timeout is reached, which finally allows the Explorer to be restarted. Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
let's have the MSI RestartManager take care of that Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org> [skip ci]
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
mgallien
force-pushed
the
backport/8178/stable-3.16
branch
from
May 30, 2025 07:40
8c2cc7d to
54653f6
Compare
Contributor
|
Artifact containing the AppImage: nextcloud-appimage-pr-8315.zip SHA256 checksum: To test this change/fix you can download the above artifact file, unzip it, and run it. Please make sure to quit your existing Nextcloud app and backup your data. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Backport of #8178
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.