mkevenaar / chocolatey-packages

My chocolatey packages
https://mkevenaar.github.io/chocolatey-packages/
Apache License 2.0
42 stars 66 forks source link

(samsung-magician) Add support for upgrade/reinstall operations #177

Closed brogers5 closed 1 year ago

brogers5 commented 1 year ago

Description

This changeset enhances the AutoHotKey install script to look for a dialog that is shown only when there is an existing Samsung Magician installation, and if shown, sends the necessary input to progress the installation process.

Motivation and Context

If the installer detects an eligible existing installation of Samsung Magician, the following dialog will be shown after the Language Selection dialog:

Samsung Magician Overwrite Dialog screenshot

This will be shown if the version being installed is either newer or the same version. Downgrades are not directly supported and require the user to manually uninstall first.

The AutoHotkey script currently only supports the new install workflow, and will block while WinWaiting for the Welcome screen. Notably, this prevents completely automated upgrades or forced reinstallations. Consequently, manual user input to press the Yes button is required to nudge the script along.

Partially addresses #156. Another PR will be required to address language-related incompatibilities.

How Has this Been Tested?

Environments

Dev

Chocolatey Test Environment

Steps

Note Prerequisite: Samsung Magician (both the package and software) should NOT be installed. Otherwise, you may encounter issues with an attempted software downgrade or an undesired AHK v2 installation/upgrade.

  1. Created a test package that consumes the modified script (i.e. choco pack).
  2. Install/downgrade to AutoHotKey v1.1 to satisfy current package dependency while avoiding current v2-related failures (i.e. choco install autohotkey.portable --version=1.1.36.02 --allow-downgrade).
  3. Install a previous version of Samsung Magician (e.g. choco install samsung-magician --version=6.0.0)

    Note Additional manual user input may be required for later package versions. For versions [6.1.0, 6.3.0.301], users may be prompted to install Visual C++ Redistributable for Visual Studio 2015 (i.e. vcredist140 v14.0.23026.0 or later) if not currently installed. No support for this existed in either the package's dependencies or the AutoHotkey script. v6.3.0.301 or later introduced at least one AHK-breaking change that was fixed with #172.

  4. Upgrade to the test package version (i.e. choco upgrade samsung-magician --source="'.'").
  5. Confirm the AutoHotKey script executes successfully, and guides the installer to completion without requiring manual user input.
  6. Forcibly reinstall the test package version (i.e. choco install samsung-magician --source="'.'" --force).
  7. Repeat step 5.
  8. Uninstall Samsung Magician to prepare for a clean install test (i.e. choco uninstall samsung-magician).
  9. Reinstall the test package version to regression test clean installs (i.e. choco install samsung-magician --source="'.'").
  10. Repeat step 5.

Screenshot (if appropriate, usually isn't needed):

N/A

Types of changes

Checklist:

AppVeyorBot commented 1 year ago

:white_check_mark: Package verification completed without issues. PR is now pending human review

mkevenaar commented 1 year ago

@brogers5 this has been superseded by #179. I would like to thank you for your contribution!