How can I know which files are being used by my compiled GUI?
조회 수: 21 (최근 30일)
이전 댓글 표시
Hello,
I've created a uitility via App Designer, and compiled an exe version for my colleagues to use it as well.
The utiliy composed of all sorts of files: *.m , *.jpg , *.xml
I'd like to prepare a "distribution" folder with only the necessary files. I mean the main exe file itself + (???)
How this can be done? Obviously if I open the exe and try to do a certain functionality, I may revieve an error if a certain file is missing. So that way I know for sure this file is required to be included in my "distribution folder". BUT, the GUI has a lot of options / functionalities / modes of operation... I don't want to go a check each and everyone of them, to see if it works in the compiled version.
So, either I simply share with everyone the FULL Project folder that contains everything, or is there a smart & easy way to do this selection?
THANK YOU.
댓글 수: 9
Rik
2022년 5월 1일
The point of the already compiled file is that it should already include all m files. Therefore asking for identification of all other files doesn't make sense, for reasons Steven pointed out.
I personally use my own system of flags in comments when I call one of my own functions. Not bulletproof, but it works reasonably well. I use it to compose a single large m file, but gathering files for a compilation to exe should also be possible.
채택된 답변
Image Analyst
2022년 4월 30일
편집: Image Analyst
2022년 5월 1일
You can get a list of all functions that could possibly be run by your program using the attached function. When you compile the main app, these dependent m-files will automatically be included in the compiled executable so there is nothing you need to do to enable that. However if you want to ship your source code somewhere, like upload it to the File Exchange or make a "Source Code" subfolder on your target computer, that would be useful for locating all the m-files that you need to ship.
If there are run-time files of yours that are needed, such as Excel template files, MAT files, sound files, splash images, other data files, etc. you just have to find those. Usually I know what files my app will open. Just to be sure I use the search function to search my code for all extensions that I know I use, such as search for .xlsx, .png, .txt, .wav, .mat, etc.
Of course if there are some that your user specifies as input data while running your function, you can't possibly know what your user will pick. Those are their own files.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!