Issue with compiled app when located in Programs folder
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (2)
Image Analyst
le 18 Nov 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 commentaires
Image Analyst
le 19 Nov 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
le 25 Fév 2023
I'd rather install my standalone app under D:\ directory, and put it along with my project folder
1 commentaire
Image Analyst
le 25 Fév 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.
Voir également
Catégories
En savoir plus sur Package and Share Apps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!