Issue with compiled app when located in Programs folder
9 ビュー (過去 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!