Skip to content

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

Merged
cjmartian merged 1 commit intoconda:masterfrom
ericpre:add_DISTRIBUTION_NAME_variable
Apr 1, 2021
Merged

Enable the menu name to depends on the folder name of the root prefix#77
cjmartian merged 1 commit intoconda:masterfrom
ericpre:add_DISTRIBUTION_NAME_variable

Conversation

@ericpre
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

ericpre commented Apr 2, 2021

@github-actions
Copy link
Copy Markdown

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.

4 participants