master
marxzuckerburg 4 years ago
parent 060f6c536e
commit 857705ee29

@ -3,7 +3,15 @@
## ##
# Run the mobile app # Run the mobile app
## ##
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
CYGWIN*) machine=Cygwin;;
MINGW*) machine=MinGw;;
MSYS*) machine=MinGw;;
*) machine="UNKNOWN:${unameOut}"
esac
# funcs (mac doesnt have realpath) # funcs (mac doesnt have realpath)
realpath() { realpath() {
@ -17,6 +25,12 @@ path_repo="`realpath ~/comrad/code`"
source $path_conda/etc/profile.d/conda.sh source $path_conda/etc/profile.d/conda.sh
export PATH="$path_conda/Library/bin:$path_conda/Scripts:$path_conda:$PATH" export PATH="$path_conda/Library/bin:$path_conda/Scripts:$path_conda:$PATH"
export PATH="$path_conda/bin:$PATH" export PATH="$path_conda/bin:$PATH"
if [ "$machine" = "MinGw" ]
then
cmd //c call "$path_conda/Scripts/activate"
fi
conda activate $path_venv conda activate $path_venv
# update? # update?

@ -305,6 +305,10 @@ export PATH="$path_conda/bin:$PATH"
# source "`realpath ~/.bashrc`" # source "`realpath ~/.bashrc`"
source "$path_conda/etc/profile.d/conda.sh" source "$path_conda/etc/profile.d/conda.sh"
if [ "$machine" = "MinGw" ]
then
cmd //c call "$path_conda/Scripts/activate"
fi
# condaexec="conda" # condaexec="conda"
pythonexec="python" pythonexec="python"
@ -326,9 +330,18 @@ echo "Now using python (t1): `which python`"
$condaexec create -y -p "$path_venv" python=3.7 cartopy pip virtualenv rtree $condaexec create -y -p "$path_venv" python=3.7 cartopy pip virtualenv rtree
source "$path_conda/etc/profile.d/conda.sh" source "$path_conda/etc/profile.d/conda.sh"
cd $path_venv
if [ "$machine" = "MinGw" ]
then
cmd //c call "$path_conda/Scripts/activate"
fi
$condaexec activate "$path_venv" $condaexec activate "$path_venv"
$condaexec
if [ "$machine" = "MinGw" ] if [ "$machine" = "MinGw" ]
then then
$condaexec install libpython m2w64-toolchain -c msys2 $condaexec install libpython m2w64-toolchain -c msys2
@ -434,6 +447,9 @@ then
echo "You may run the app by looking for 'Comrad.app' in your /Applications folder." echo "You may run the app by looking for 'Comrad.app' in your /Applications folder."
fi fi
# run? # run?
. $path_bin/comrad-app . $path_bin/comrad-app

Loading…
Cancel
Save