Skip to content

Instantly share code, notes, and snippets.

@nerdCopter
Last active June 20, 2024 13:08
Show Gist options
  • Save nerdCopter/022709392824295846b5ce0b0992b578 to your computer and use it in GitHub Desktop.
Save nerdCopter/022709392824295846b5ce0b0992b578 to your computer and use it in GitHub Desktop.
Linux PTB run script -- requires Matlab runtime R2017b specifically.
#!/bin/bash
BBLFolder=~/Path/To/BlackBoxLogs ## do not use quotes.
# INSTALL PTB into preferred destination. example into ${BBLFolder} (preferred) or /home/${USER}/usr/PIDtoolbox ## NOTE: cannot use $USER variable in the installer, use actual username
# INSTALL MATLAB into /home/${USER}/usr/local/MATLAB/MATLAB_Runtime ## NOTE: cannot use $USER variable in the installer, use actual username
## 0.55 requires this action:
## https://www.mathworks.com/matlabcentral/answers/363058-deploying-standalone-matlab-exe-on-a-linux-based-server#answer_839604
## cd ~/usr/local/MATLAB/MATLAB_Runtime/v93/bin/glnxa64
## mv libmwcoder_types.so libmwcoder_types_old.so
MATLAB=/home/${USER}/usr/local/MATLAB/MATLAB_Runtime/v93
LD_LIBRARY_PATH=${MATLAB}/runtime/glnxa64:${MATLAB}/bin/glnxa64:${MATLAB}/sys/os/glnxa64:${MATLAB}/sys/opengl/
cd "${BBLFolder}" ## OR alternative installation folder, but BBL files need to exist in same location for PTB 0.45
./run_PIDtoolbox.sh ${MATLAB} $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment