daisy / pipeline-ui

A user interface for the DAISY Pipeline 2
MIT License
5 stars 2 forks source link

Pipeline installer should remove old Pipeline 2 installations #176

Closed marisademeglio closed 6 months ago

marisademeglio commented 7 months ago

Look for old Pipeline 2 installations (the JavaFX GUI, for example) and offer to remove them (or just remove them silently) as part of the current Pipeline installation process.

marisademeglio commented 7 months ago

From what I remember, I was going to work on macOS and @NPavie would take care of Windows.

NPavie commented 7 months ago

Yep (forgot to open the issue after the meeting, thanks ^^')

I started looking at how are installed the previous version of pipeline 1 and 2 on Windows. For now I'm focusing on the latest version available of DAISY Pipeline 1 (with GUI) and 2 (1.14.11 and Web UI separate program) that have Windows installers.

I identified some registry key that i could use to recover uninstallers for testing on my Windows 11 system:

(HKLM and HKCU are respectively HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER registry key trees on windows, the tree to search under usually depends on the privileges used to launch the installer)

(Also i was wrong about the template update : it is still using electron-builder for packaging installers)

NPavie commented 7 months ago

Just putting here a recap of what whas said in meeting regarding uninstaller :

New versions of the installer should

Example provided by romain of nsis install script for the pipeline 1 : https://github.com/daisy/pipeline1/blob/main/gui/release/windows/pipeline-setup.nsi

Possibility of customizing macos install with the "PKG" distribution : https://www.electron.build/configuration/pkg

NPavie commented 7 months ago

On this point :

  • Remove DAISY Pipeline (2023) installations and settings files
    • It is noted that the next release will likely have a name without "2023" in it.

On windows, the application data folder and installation folder is not based on the display name : it uses the project name (pipeline-ui) for installation and data folders. I'll do a quick test with renaming the product in dev to see if it does the replacements by default without having to cleanup with the nsis script.

NPavie commented 7 months ago

Confirmed : on Windows, as long as we don't change the name: "pipeline-ui" field in package.json, the previous install of the app would be automatically replaced.

marisademeglio commented 6 months ago

On macOS, we said we wanted to:

  1. Remove DAISY Pipeline (2023)

The postinstall script removes "DAISY Pipeline (2023)" from "/Applications".

This does not get automatically overwritten as the app name has changed to "DAISY Pipeline" and we have isRelocatable: false in the pkg settings (otherwise the install location is hard to work with as the pkg installer will try to update the first version it finds, e.g. the one in the development directory).

  1. clean up old settings:

not required for the same reason mentioned above

  1. Remove the DAISY Pipeline Java FX version

@bertfrees I forget - was there ever a mac installer that installed this? If so, can I download it to see what the app was called?

Update: I found an old installer which installs the old JavaFX gui as "DAISY Pipeline 2.app". The new postinstall script will be configured to remove it.

marisademeglio commented 6 months ago

This commit is for this issue too 4d614fdf2ee751afecef024336c637cbcc611f5f