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

Enable the menu name to depends on the folder name of the root prefix #77

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

ericpre
Copy link
Contributor

@ericpre ericpre commented Jan 14, 2021

Currently, the name of the menu needs to be defined in the shortcu config json, which indirectly makes the conda recipe specific to a distribution.
The idea of this PR is to use the name of the distribution (Anaconda, Miniconda, Miniforge, etc.) as the name of the menu in the start menu. The name of the folder of the root prefix is used to determine the name of the distribution - this is the case by default. I am not aware of a better way to get the name of the distribution.

This PR is primarily for https://github.com/conda-forge/miniforge_console_shortcut-feedstock/blob/master/recipe/console_shortcut.json, and with this PR, its shortcut config could be changed to:

{
    "menu_name": "${DISTRIBUTION_NAME}${PY_VER}",
    "menu_items":
    [
        {
            "name": "${DISTRIBUTION_NAME} Prompt",
            "system": "%windir%\\system32\\cmd.exe",
            "scriptarguments": ["/K", "${ROOT_PREFIX}\\Scripts\\activate.bat", "${PREFIX}"],
            "icon": "${MENU_DIR}/console_shortcut.ico"
        }
    ]
}

More generally, this would also be useful for other conda-forge recipes (spyder, notebook, etc.)

@isuruf
Copy link
Contributor

isuruf commented Mar 29, 2021

@chenghlee, @cjmartian can you review this?

@cjmartian cjmartian merged commit 68586a1 into conda:master Apr 1, 2021
@ericpre ericpre mentioned this pull request Apr 2, 2021
@ericpre
Copy link
Contributor Author

ericpre commented Apr 2, 2021

@github-actions
Copy link

github-actions bot commented Apr 9, 2022

Hi there, thank you for your contribution!

This pull request has been automatically locked because it has not had recent activity after being closed.

Please open a new issue or pull request if needed.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Apr 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants