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

Add cross-platform support for the new menuinst #474

Merged
merged 118 commits into from
Jan 5, 2024

Conversation

jaimergp
Copy link
Contributor

@jaimergp jaimergp commented Nov 22, 2021

Changes:

  • Use the new menuinst (draft) to create shortcuts in all platforms.
  • Make sure conda-standalone is always named _conda.exe
  • Use conda/conda#11035's --shortcuts-only
  • Provide GUI and CLI options to enable or disable shortcut creation across environments.
    • Windows GUI
    • MacOS PKG (tests pending)
    • Shell installer (tests pending)
  • Allow installer creators to disable shortcut functionality all together by setting ALL menu_packages entries to []. This is a bit confusing I think, so we might need to rethink it.
  • Ensure .nonadmin files are created for all-users installations in all OS (see discussion at MENU_ITEM_LOCATION is incorrect for all-user installation on macOS menuinst#137)
  • Add tests

@anaconda-issue-bot anaconda-issue-bot added the cla-signed [bot] added once the contributor has signed the CLA label Nov 22, 2021
@jaimergp jaimergp requested a review from a team as a code owner September 15, 2022 17:22
@jaimergp
Copy link
Contributor Author

I am starting to sync this branch to main, adding some UI on top to follow the developments with the pre/post install scripts. This requires a new menuinst and a new conda, so most tests will fail for now. Do not review yet :)

@jaimergp jaimergp marked this pull request as ready for review December 20, 2023 12:55
@jaimergp
Copy link
Contributor Author

@conda/constructor - this is finally ready for review! It will require conda-standalone 23.11.0, which is available as a nightly but not released yet. I'll wait to release it til this PR is merged, in case we find something we want to change there. Thanks in advance!

@marcoesters
Copy link
Contributor

Nightlies passing as expected. For some reason, while conda-standalone 23.10 is able to create the miniforge shortcuts (v1), it fails to delete them despite using the same NSIS code. Interestingly, in #740 it succeeds, so maybe there's something about the changes in _nsis.py that make it fail? Looking into it, I had introduced a bug in conda-standalone, where we pass the same value to both prefix and root_prefix. This creates a discrepancy between creation time conditions and removing time conditions, since menuinst v1 calculates different file names.

This conda-standalone <=23.10 bug only would only affect removal of menuinst v1 shortcuts if the installer was created with a constructor version including this PR, but bundling a conda-standalone 23.10 or older. Since it would be hard to debug (I spent a few hours between yesterday and today), I'll require conda-standalone 23.11.0.

There is another possible explanation for the shortcut problems: conda/conda#13338

I've seen this happen when you install and then remove an installation without installing anything into the base environment.

constructor/fcp.py Outdated Show resolved Hide resolved
constructor/header.sh Outdated Show resolved Hide resolved
constructor/header.sh Show resolved Hide resolved
constructor/construct.py Show resolved Hide resolved
@jaimergp jaimergp merged commit 764ba8a into conda:main Jan 5, 2024
17 checks passed
@hoechenberger
Copy link
Contributor

Awesome!

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
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Create windows shortcuts with micromamba [Meta-issue] Upstreaming changes from custom fork
6 participants