Why doesn't my standalone MATLAB app display all figures and run fully?

7 views (last 30 days)
Hello, My OS: OSX 10.8.5, using MATLAB R2013a.
I've made a standalone MATLAB app that needs to display a few windows. This works fine on the machine I coded it in, but is extremely variable on other machines. On most Macs it just displays one figure, sometimes a few, of the several required.
I got it working on a Windows 7 machine, no problem.
Of course I've installed the MCR. At the end of the MCR installation process, the installer says to change DYLD_LIBRARY_PATH and XAPPLRESDIR:
I believe I should go to the Applications/MATLAB folder, and type the following:
>>export DYLD_LIBRARY_PATH=/Applications/MATLAB/MATLAB_Compiler_Runtime/v81/runtime/maci64:/Applications/MATLAB/MATLAB_Compiler_Runtime/v81/sys/os/maci64:/Applications/MATLAB/MATLAB_Compiler_Runtime/v81/bin/maci64:/System/Library/Frameworks/JavaVM.framework/JavaVM:/System/Library/Frameworks/JavaVM.framework/Libraries
and
>>export XAPPLRESDIR=/Applications/MATLAB/MATLAB_Compiler_Runtime/v81/X11/app-defaults
then if I use the command
>>env
it will show me that those environment variables have changed.
The standalone app. still won't fully run, or open all figure windows.
The original code it written in MATLAB R2013a on OSX 10.8.5, and is being deployed mostly on Mavericks, or 10.9, but also 10.8.5.
It seems to work much better/more easily on Windows machines.
Thank you for you help, I hope I've included enough information.
  1 Comment
Vincent Hall
Vincent Hall on 18 Mar 2014
Also this: Class bootstrap is implemented in both /Applications/MATLAB/MATLAB_Compiler_Runtime/v81/bin/maci64/libmwlaunchermain.dylib and /Users/MOAC/Downloads/SSNNGUI_Mac_2013a_pkg/SSNN_2013a.app/Contents/MacOS/SSNN_2013a. One of the two will be used. Which one is undefined.
How do I make it select one? Removing one by renaming it didn't work.

Sign in to comment.

Answers (1)

Vincent Hall
Vincent Hall on 18 Mar 2014
Aha! I opened it in Terminal. In Terminal: Navigate to the folder where the MATLAB app is stored, then
$ cd Name_of_app.app/Contents/MacOS
Then in Terminal:
$ ./Name_of_app
And it runs with all output, which is great for debugging.
Then we made a shell, or rather modified the MATLAB shell a little.
Open the shell "run_Name_of_app.sh" with Terminal or another command line application. Thing runs with full output.
Before I had tried to use open command in Terminal, but this wasn't any more successful.
  1 Comment
swallace17
swallace17 on 11 Aug 2015
Been searching for 2 weeks on how to do this! Thanks a lot!
For anyone else trying to make this work, I actually had to make a few modifications before this solution would work for me.
First of all, I had to go through and change the permissions for each file inside 'MacOS' in order for them to be able to execute them in terminal. (Before I did this, every attempt I made resulted in 'Permission Denied.') I took the lazy method and simply went through and
chmod 777 *file.ext*
each file. This is probably bad practice, and it likely would have been better to figure out exactly which permissions I needed, but again, I took the lazy method.
After that, instead of launching
./*applicaitonname*
from terminal, which did nothing for me, I instead typed
./applauncher
and everything worked swimmingly.

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!