wudipao88 Okay, I verified that your binary works as expected. Try adding the following to your ~/.bashrc
(remove your current definition of ISSM_DIR
and define yours below; also, set the MATLAB version as needed),
function change_issm_dir {
if [[ $# -eq 1 ]]; then
export ISSM_DIR="${1}"
else
export ISSM_DIR="${PWD}" # Default
fi
export ISSM_DIR_WIN=$(cygpath -ms "${ISSM_DIR}") # Needed by MATLAB
if [[ "${OS}" == "mingw" ]]; then
MATLAB_ENV_CMDS="addpath ${ISSM_DIR_WIN}/bin ${ISSM_DIR_WIN}/lib"
MATLAB_DEV_ENV_CMDS="addpath ${ISSM_DIR_WIN}/src/m/dev; devpath"
else
MATLAB_DEV_ENV_CMDS="addpath ${ISSM_DIR}/src/m/dev; devpath"
fi
alias issm-env="source "${ISSM_DIR}"/etc/environment.sh"
alias issm-matlab-dev-env="issm-env; matlab-cli -r '${MATLAB_DEV_ENV_CMDS}'" # Then run runme(<options>)
alias issm-matlab-gui-dev-env="issm-env; matlab-gui -r '${MATLAB_DEV_ENV_CMDS}'" # Then run runme(<options>)
}
######################
### Path Variables ###
######################
## MATLAB
#
MATLAB_VER="R2024b" # Allows for easy resetting of MATLAB version added to PATH
export MATLAB_PATH=$(cygpath -u $(cygpath -ms "/c/Program Files/MATLAB/${MATLAB_VER}"))
export PATH="${MATLAB_PATH}/bin:${PATH}"
## ISSM
#
export ISSM_DIR="<CHANGE_TO_YOUR_ISSM_REPO>"
# Change ISSM directory and related variables
change_issm_dir ${ISSM_DIR}
From the command line, you can then run issm-matlab-gui-dev-env
to start up MATLAB. If everything works, you should see a message that says, "ISSM development path correctly loaded".
NOTE: You could also simplify things by removing the change_issm_dir
function and just hardcoding everything in aliases, but I shared with you what I personally use on machines where I have multiple copies of the ISSM repository.