How to fix a deploy problem in a custom app which uses GUI Layout toolbox?

2 views (last 30 days)
Hi dear community,
I have created a custom app with GUI Layout Toolbox and to install toolbox and check correctly installed in Matlab 2018b, I use the below code line in my main function:
gui_layout_toolbox_ver = ver('layout');
if isempty(gui_layout_toolbox_ver)
temp_toolbox_path = [p, '\external\Toolboxes\GUI Layout Toolbox 2.3.4.mltbx'];
is_installed_gui_layout_toolbox = matlab.addons.toolbox.installToolbox(temp_toolbox_path,true); % line 14.
else
is_installed_gui_layout_toolbox = 1;
end
I want to create a standalone exe (one file which includes both MCR and the App together). I do not want to create the app with MCR installed via web version.
I deployed my app and created exe for both with web and with MCR included versions and tried to install it another PC.
  • MCR included version absolutely did not work and never tried to install even MCR. It gives me the below warning on Windows 10:
"This app can't run on your PC. To find a version for your PC check with the software publisher."
The publisher is supposed to be me in this case :)
  • MCR with web version installed the MCR by downloading it from the internet and installed the app it also created shortcut on desktop. When I run the app, it gives me below error:
"Undefined variable matlab or class "matlab.addons.toolbox.installToolbox". Error in => mainFunc.m at line 14 ".
The rest of the app creates my other custom classes, etc. What should I do to make 1st option? What am I missing? Any ideas for me to try is really appreciated.
Note: MCR and Matlab versions are correct. I double checked them. Also the both PCs are Win10.
Thank you.

Answers (0)

Categories

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

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!