How can I know which files are being used by my compiled GUI?
24 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mark Golberg
el 28 de Abr. de 2022
Editada: Image Analyst
el 1 de Mayo de 2022
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 comentarios
Rik
el 1 de Mayo de 2022
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.
Respuesta aceptada
Image Analyst
el 30 de Abr. de 2022
Editada: Image Analyst
el 1 de Mayo de 2022
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!