Issue with compiled app when located in Programs folder
조회 수: 6 (최근 30일)
이전 댓글 표시
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
답변 (2개)
Image Analyst
2022년 11월 18일
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
Image Analyst
2022년 11월 19일
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
2023년 2월 25일
I'd rather install my standalone app under D:\ directory, and put it along with my project folder
댓글 수: 1
Image Analyst
2023년 2월 25일
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Package and Share Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!