File tree Expand file tree Collapse file tree 2 files changed +23
-9
lines changed
Expand file tree Collapse file tree 2 files changed +23
-9
lines changed Original file line number Diff line number Diff line change 3535ANACONDA=/opt/anaconda1anaconda2anaconda3
3636PYTHON=${ANACONDA} /bin/python
3737GPI_LAUNCH=${ANACONDA} /bin/gpi_launch
38- WIN_PYTHON=${ANACONDA} /python
39- WIN_GPI_LAUNCH=${ANACONDA} /Scripts/gpi_launch
38+
39+ BINDIR=" $ANACONDA /bin"
40+ if ! echo $PATH | grep -q $BINDIR ; then
41+ PATH=" ${BINDIR} :${PATH} "
42+ fi
4043
4144GPI_LINK=/tmp/GPI
4245
@@ -49,7 +52,7 @@ elif [ "$(uname)" == "Linux" ]; then
4952 $PYTHON $GPI_LAUNCH -style cleanlooks $@
5053# Windows
5154else
52- $WIN_PYTHON -u $WIN_GPI_LAUNCH -style Windows $@
55+ python -u gpi_launch -style Windows $@
5356fi
5457
5558
Original file line number Diff line number Diff line change 11@ echo off
2-
2+ setlocal
33:: Copyright (C) 2014 Dignity Health
44::
55:: This program is free software: you can redistribute it and/or modify
2424:: MAKES NO WARRANTY AND HAS NO LIABILITY ARISING FROM ANY USE OF THE
2525:: SOFTWARE IN ANY HIGH RISK OR STRICT LIABILITY ACTIVITIES.
2626
27- :: The GPI launcher script. The .command suffix is used by OSX open.
28-
29- :: get user environment settings
30- :: -this will pickup the user's visual editor
27+ :: The GPI launcher script for Windows installations.
3128
3229set ANACONDA = /opt/anaconda1anaconda2anaconda3
3330set PYTHON = %ANACONDA% \python
3431set GPI_LAUNCH = %ANACONDA% \Scripts\gpi_launch
3532
36- %PYTHON% %GPI_LAUNCH% -style Windows %*
33+ :: Add needed folders to the path if launching from outside an active conda
34+ set ANACONDA_WIN = %ANACONDA:/ =\ %
35+ echo %PATH% | findstr %ANACONDA_WIN% > NUL
36+ if %ERRORLEVEL% NEQ 0 goto :fixpath
37+ goto :endif
3738
39+ :fixpath
40+ set PATH = %ANACONDA_WIN% \bin;%PATH%
41+ set PATH = %ANACONDA_WIN% \Scripts;%PATH%
42+ set PATH = %ANACONDA_WIN% \Library\bin;%PATH%
43+ set PATH = %ANACONDA_WIN% \Library\usr\bin;%PATH%
44+ set PATH = %ANACONDA_WIN% \Library\mingw-w64\bin;%PATH%
45+ set PATH = %ANACONDA_WIN% ;%PATH%
46+ :endif
47+
48+ %PYTHON% %GPI_LAUNCH% -style Windows %*
3849
You can’t perform that action at this time.
0 commit comments