How do I make a path relative instead of absolute when I deploy my app as a standalone?
조회 수: 18 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2020년 4월 27일
답변: MathWorks Support Team
2020년 4월 27일
I'm using the MATLAB Compiler GUI to manage my project and the deploytool function to generate the .exe. I've noticed that the main file and the "files required for your application to run" are stored with absolute path (unlike all other parameters when I looked at the .prj file with text editor). This leads to an error if someone else gets the project and try to generate the .exe.
Is there a way to make all path relative without having to modify the .prj file with a text editor afterward?
채택된 답변
MathWorks Support Team
2020년 6월 2일
The main file will be expressed as a relative path if the file you select is in the subfolder hierarchy of the PRJ. For example, if the PRJ is at location "<root>/foo.prj", then the main file could be in <root> or any subfolder of root and it will be recorded in the PRJ as a relative path. If the main file cannot be expressed as a path relative to the PRJ in this manner, MATLAB falls back to the absolute path.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Filename Construction에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!