Deployed App help files when app launched using shortcut

3 visualizaciones (últimos 30 días)
Marc Elpel
Marc Elpel el 20 de Ag. de 2020
I have an app that works fine within matlab, but when deployed and launched via the auto-generated shortcut the Help menus do not come up. Navigating and clicking on the acutal exe file works OK.
I believe the issue is the "start-in" directory is not set to the application directory, and therefore my help files are not found.
I've added code for this and tried a few versions, none of which currently work. The else code below handles the deployed situation. The commented out part was tried but the path returned look like it was for the runtime engine, not the app (I could be wrong - some limits on what I can test internally).
% Always execute from the Alinity folder as current path.
if(~isdeployed)
cd(handles.Build.Directory);
handles.AppPath = handles.Build.Directory;
else
% User is running an executable in standalone mode.
handles.AppPath = pwd;
% [status, result] = system('set PATH');
% executableFolder = char(regexpi(result, 'Path=(.*?);', 'tokens', 'once'));
end
The code which uses the directory and is not working is included below. Ideally I could just use a relative address in the form '.\Help\HelpMenu.htm' but this failed.
fname = fullfile(handles.AppPath,'Help\HelpMenu.htm');
web(fname,'-browser');
Questions:
  1. Is there a way to do relative addressing on a deployed application for this so I do not need to get about the installed path.
  2. Is there a way to get the actual installed path to build tthe file name as above?

Respuestas (0)

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by