필터 지우기
필터 지우기

Adding a folder when building an standalone application

조회 수: 10 (최근 30일)
Vasista Adupa
Vasista Adupa 2020년 7월 27일
답변: Steven Lord 2020년 7월 27일
Hi, I am creating a .exe for a main file, when run, opens a app, where a button call's a .m file (myfile.m). using command
MAIN FILE (trail.mlapp). Part of the .mlapp file.
function ButtonPushed(app,event)
run myfile.m
closereq
end
This myfile.m also calls an another app in the middle (just an matlab app) not the exe. For this app to execute properly (to avoid shadowing), It asked me to create a folder (let's say X) and put the matlab app related files in there.
Now while creating a .exe file, I am not able to add the folder X. Is there anyway to do it.
I looked up in some previous answers, they said
if isdeployed
fid = fopen(fullfile(ctfroot,'myfolder','myfile.dat'))
end
But I don't know where to place this piece of code, whether in myfile.m or my main file for which I am creating the executable.
I am calling the inner app using this following commands
APPINFO = matlab.apputil.install('./X/Recomm')
matlab.apputil.run('RecommAPP')
  댓글 수: 2
Steven Lord
Steven Lord 2020년 7월 27일
Are you trying to run a piece of code that is not available when the application is created but is specified at runtime?
Vasista Adupa
Vasista Adupa 2020년 7월 27일
Yes. Exactly.

댓글을 달려면 로그인하십시오.

답변 (1개)

Steven Lord
Steven Lord 2020년 7월 27일
You cannot have a standalone application run code that was not compiled into the application when it was created. From the documentation "The MATLAB Runtime only works on MATLAB code that was encrypted when the deployable archive was built. Any function or process that dynamically generates new MATLAB code will not work against the MATLAB Runtime."

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by