필터 지우기
필터 지우기

Compiling Code Dependent on External Files

조회 수: 1 (최근 30일)
Kevin
Kevin 2014년 7월 25일
편집: Kevin 2014년 7월 31일
The script I am trying to compile modifies existing external files (i.e. Excel files). When I compile the script and add the external files to "Files required for your application to run," how are these files stored in the compiled program? The reason I am asking is that these external files reference each other based on location, so the script wouldn't work if their relative locations change in the compilation.
The obvious alternative is to distribute the compiled script and the external files as separate attachments, and then use uigetfile to have the user retrieve them manually, but this is less convenient.

답변 (1개)

Robert Cumming
Robert Cumming 2014년 7월 25일
if i recall the files will be extracted into the same directory as your exe - so you could work the relative paths from that scenario.
  댓글 수: 3
Robert Cumming
Robert Cumming 2014년 7월 25일
did you add the files in the "Files required for your application to run" or the section "Files installed with you application"?
Adding the files to the 2nd option should result in the files being located in the same dir as your exe.
Kevin
Kevin 2014년 7월 31일
편집: Kevin 2014년 7월 31일
So I added the files to both "Files required" and "Files installed". I have the script associated with the .exe reference the external file assuming they are in the same directory.
But when I run the .exe, it appears the script is located in some obscure "...\AppData\Local\Temp\..." folder. Any way I can get a handle on this?

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

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by