constructor icon indicating copy to clipboard operation
constructor copied to clipboard

Update installation for windows .exe

Open huche6 opened this issue 2 years ago • 3 comments

Description

  • No possibility to update an installation with windows .exe installer. It would be nice to have something which would look like the -u flag available for linux .sh installer #679.
  • I changed the MessageBox which would poped when a path already exists to a YESNO MessageBox. The message is now "The directory '$INSTDIR' is not empty, do you want to update the installation ?".
    • If the user choose "yes", the installer update the $INSTDIR
    • If the user choose "no", them are send back to select the installation path.
  • I added a function in main.nsi.tmpl which is called CheckInstdirValidity. It checks the validity of the selected directory during the installation. It avoids to install something in a windows critical directory or a non conda directory.
  • This function was made just by externalising some code from the function un.onInit. I had in mind to do so to be able to call it when necessary. However, for some reasons, I can not achieve to call CheckInstdirValidity within un.onInit. If anyone has some idea about how to do it, it would avoid code duplication.

Checklist - did you ...

  • [ ] Add a file to the news directory (using the template) for the next release's release notes?
  • [X] Add / update necessary tests?
  • [X] Add / update outdated documentation?

huche6 avatar Dec 15 '23 13:12 huche6

However, for some reasons, I can not achieve to call CheckInstdirValidity within un.onInit.

NSIS requires that all functions called during uninstallation start with un.. The way to implement this is to create a macro like it's done here: https://github.com/conda/constructor/blob/main/constructor/nsis/main.nsi.tmpl#L1020-L1059

marcoesters avatar Dec 15 '23 15:12 marcoesters

Thank you for your reply. I will have a look at it !

huche6 avatar Dec 15 '23 15:12 huche6

Hi @huche6, before we proceed any further, we should discuss what to expect out an installer-driven update. Best done at #679. I'll mark this as draft til we have agreed on a plan forward.

jaimergp avatar Dec 18 '23 09:12 jaimergp

Hi there, thank you for your contribution!

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this pull request to remain open please:

  1. Rebase and verify the changes still work
  2. Leave a comment with the current status

NOTE: If this pull request was closed prematurely, please leave a comment.

Thanks!

github-actions[bot] avatar Dec 18 '24 04:12 github-actions[bot]

Hi there, thank you for your contribution!

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this pull request to remain open please:

  1. Rebase and verify the changes still work
  2. Leave a comment with the current status

NOTE: If this pull request was closed prematurely, please leave a comment.

Thanks!

github-actions[bot] avatar Dec 18 '24 04:12 github-actions[bot]