Skip to content

Commit 78a0b1c

Browse files
committed
Also layout activate.bat for the created conda env
Add a start menu shortcut for droping into the activated env.
1 parent bc27c96 commit 78a0b1c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

scripts/windows/condainstall.bat

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ rem # with a local package, we need to create it manually.
3030
echo @echo off > "%PREFIX%\Scripts\conda.bat"
3131
echo call "%CONDA%" %%* >> "%PREFIX%\Scripts\conda.bat"
3232

33+
rem # same for activate.bat
34+
rem #
35+
for %%f in ( "%CONDA%" ) do ( set "CONDA_DIR=%%~dpf" )
36+
echo @echo off > "%PREFIX%\Scripts\activate.bat"
37+
echo call "%CONDA_DIR%\activate.bat" %%* >> "%PREFIX%\Scripts\activate.bat"
38+
set CONDA_DIR=
39+
3340
rem # Create .condarc file that includes conda-forge channel
3441
rem # We need it so add-ons can be installed from conda-forge
3542
echo Appending conda-forge channel

scripts/windows/orange-conda.nsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,11 @@ Section "Start Menu Shortcuts" SectionStartMenu
574574
"$SMPROGRAMS\$StartMenuFolder\${LAUNCHER_SHORTCUT_NAME}.lnk" \
575575
"$PythonExecPrefix\pythonw.exe" "-m Orange.canvas" \
576576
"$PythonPrefix\share\orange3\icons\orange.ico" 0
577+
578+
# A utility shortcut for activating the environment
579+
CreateShortCut \
580+
"$SMPROGRAMS\$StartMenuFolder\${APPNAME} Command Prompt.lnk" \
581+
"%COMSPEC%" '/S /K ""$PythonScriptsPrefix\activate.bat" "$InstDir""'
577582
${EndIf}
578583
!insertmacro MUI_STARTMENU_WRITE_END
579584
SectionEnd
@@ -604,6 +609,7 @@ Function un.Shortcuts
604609
${LogWrite} "Removing Start Menu Shortcuts (from $SMPROGRAMS\$0)"
605610
DetailPrint "Removing Start Menu shortcuts"
606611
Delete "$SMPROGRAMS\$0\${LAUNCHER_SHORTCUT_NAME}.lnk"
612+
Delete "$SMPROGRAMS\$0\${APPNAME} Command Prompt.lnk"
607613
RMDir "$SMPROGRAMS\$0"
608614
${EndIf}
609615
${LogWrite} "Removing Desktop shortcurt"

0 commit comments

Comments
 (0)