Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation for windows .exe #736

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

huche6
Copy link

@huche6 huche6 commented Dec 15, 2023

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 (RFC) How to update existing installations #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?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@huche6 huche6 requested a review from a team as a code owner December 15, 2023 13:44
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Dec 15, 2023
@marcoesters
Copy link
Contributor

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

@huche6
Copy link
Author

huche6 commented Dec 15, 2023

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

@jaimergp
Copy link
Contributor

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 jaimergp marked this pull request as draft December 18, 2023 09:33
Copy link

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 github-actions bot added the stale [bot] marked as stale due to inactivity label Dec 18, 2024
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA stale [bot] marked as stale due to inactivity
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

4 participants