AppDesigner Packaging Data Files Location

12 views (last 30 days)
dpb
dpb on 27 Oct 2022
Answered: dpb on 29 Oct 2022
Packaged an EXE with MATLAB Compiler -- on install, accepted default location and let it put a shortcut on the desktop.
That went ok, but the datafile associated with the application it uses to save the previous state on restart was also placed on the desktop and so isn't being found.
How do you make it put the datafile in the same location as the executable on install. I've a problem here that I don't have administrator rights so can't just move it myself without calling in IT.
  5 Comments
dpb
dpb on 27 Oct 2022
Ah...that would probably work albeit not quite so clean as keeping it with the executable. Sorry I didn't catch your drift first go...
But, I think I have figured out how to make it work -- I had figured when it (the .mat file) was also included with the m-files that were needed by the auto dependency walker it (the compiler/packager) would have enough sense to put the data file in with the executable when it was installed.
One can add other dependencies as well; I've not included the data file there and will repackage and we'll see what the installer does with that. I shoulda' tried a sample install on my own system first; I just made too many assumptions that it would "just work" for the first try at doing it on the network machine...
dpb
dpb on 28 Oct 2022
Edited: dpb on 28 Oct 2022
Oh...but I was also forgetting that the executable install location is also unwriteable w/o admin level privileges so it's also out; which, I suppose is why the default is to choose to clutter up the desktop...although I discovered that the the save isn't updating that file, either, for some reason. Haven't got to the bottom of that,yet.
Oh! such a pain they've made stuff...I haven't seen anything about being able to customize the installer yet in the doc, off on that goose chase....
However, they do supply ctfroot that is the install location root directory and isdeployed that is true when deployed...guess you have to be more creative than just compile what works inside MATLAB development.
Still not clear to me why the save instruction isn't changing the copy on the desktop, however....off top o' head that just seems bizarre...

Sign in to comment.

Answers (1)

dpb
dpb on 29 Oct 2022
OK, in the end I did as the above suggestion from @Mario Malic -- used %LOCALAPPDATA% root and the app creates a subfolder for itself for the configuration file folder. I then took an easy out and put a base copy onto the shared drive as the way to get a starting set of values on first execution after install -- I can eventually build a routine to create one from scratch and package it in the app for distribution, but for now this will get me by...
It's off to make the same patches to the other app's built and then package two or three more functionalities into others before there's time for more niceties...

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!