Skip to content

Commit

Permalink
add simple menu test recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Dec 10, 2024
1 parent d053cb9 commit 14d960e
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 0 deletions.
55 changes: 55 additions & 0 deletions test-data/menuinst/pixi-editor/menu/menu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"$schema": "https://json-schema.org/draft-07/schema",
"$id": "https://schemas.conda.io/menuinst-1.schema.json",
"menu_name": "pixi-editor",
"menu_items": [
{
"name": {
"target_environment_is_base": "pixi-editor",
"target_environment_is_not_base": "pixi-editor ({{ ENV_NAME }})"
},
"description": "Scientific PYthon Development EnviRonment",
"icon": "{{ MENU_DIR }}/pixi-icon.{{ ICON_EXT }}",
"activate": false,
"terminal": false,
"command": [""],
"platforms": {
"win": {
"desktop": true,
"app_user_model_id": "dev.prefix.pixi-editor",
"command": ["notepad.exe", "%*"],
"file_extensions": [
".pixi"
]
},
"linux": {
"Categories": [
"Development",
"Science"
],
"command": ["gedit", "%F"],
"MimeType": [
"text/x-pixi"
]
},
"osx": {
"command": ["open", "$@"],
"CFBundleName": "Pixi Editor",
"CFBundleIdentifier": "dev.prefix.pixi-editor",
"CFBundleVersion": "0.1.0",
"CFBundleDocumentTypes": [
{
"CFBundleTypeName": "text document",
"CFBundleTypeRole": "Editor",
"LSHandlerRank": "Default",
"CFBundleTypeIconFile": "pixi-icon.icns",
"LSItemContentTypes": [
"public.pixi"
]
}
]
}
}
}
]
}
Binary file not shown.
Binary file added test-data/menuinst/pixi-editor/menu/pixi-icon.ico
Binary file not shown.
Binary file added test-data/menuinst/pixi-editor/menu/pixi-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions test-data/menuinst/pixi-editor/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package:
name: pixi-editor
version: "0.1.0"

build:
script:
- if: unix
then:
- mkdir -p $PREFIX/Menu
- cp $RECIPE_DIR/menu/menu.json $PREFIX/Menu/pixi-editor.json
- cp $RECIPE_DIR/menu/pixi-icon.* $PREFIX/Menu/
- if: win
then:
- if not exist "%PREFIX%\Menu" mkdir "%PREFIX%\Menu"
- copy "%RECIPE_DIR%\menu\menu.json" "%PREFIX%\Menu\pixi-editor.json"
- copy "%RECIPE_DIR%\menu\pixi-icon.ico" "%PREFIX%\Menu\"

0 comments on commit 14d960e

Please sign in to comment.