Issue with compiled app when located in Programs folder
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
This is a graphics application developed in App Designer. Two additional files are included in the build: default parameters and gui configuration. User loads the parameters, changes as required, and generates a graphics with the "Run" button. If in update mode every subsequent parameter change via either slider of numeric field data entry produces a callback which delete the UIAxes contents and redraws the data. Other than the two files initial read there is no external I/O other than user GUI.
This works 100% when the .exe is located in user space, anywhere under Documents, for example, but the update mode doesn't work when the .exe is located in Programs. I've inserted debug outputs to a .txt file, but hesitate to invest too much time given I can probably avoid using the normal deployment instalation. Given there are no explicit external dependencies I can't fathom the difference in behavior.
0 comentarios
Respuestas (2)
Image Analyst
el 18 de Nov. de 2022
That's correct. It's not MATLAB -- that's a Windows rule. Windows does not let you store any new files under the C:\program Files folder (unless you're an official installer or setup program). Like it or not, that's the way it is.
So if I have values that I need to save between sessions, for example settings of various controls or results workbooks or whatever, I store them under "C:\users\Public\Documents\MATLAB\My Project Name". Use the fullfile function if you want.
2 comentarios
Image Analyst
el 19 de Nov. de 2022
When the "User loads the parameters" where is that happening? By adjusting controls on the GUI, or by reading in some files from disk? What happens when the user does "changes required"? That all happens (or is supposed to) on the GUI? What if you store the "the two files initial read" in the c:\users\prublic\documents\MATLAB folder but still install the exe under "c:\Program Files\MATLAB\your app" or wherever it is?
If you want people to debug it further, can you upload the .mlapp file and tell us what to do to observe the problem? Like run it, say Go!, see some initial output, then change some parameters, and it should change the displayed data (but it doesn't).
Adi Purwandana
el 25 de Feb. de 2023
I'd rather install my standalone app under D:\ directory, and put it along with my project folder
1 comentario
Image Analyst
el 25 de Feb. de 2023
That's fine. You can install the executable anywhere, and your data anywhere, as long as your user, computer, and program know where everything is.
For users internal to my company I also create a subfolder of the program folder called "Source Code" where I install all the MATLAB source code files that I used to develop the program. That way if years from now someone inherits my program, they will have everything they need to make modifications.
Ver también
Categorías
Más información sobre Package and Share Apps 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!