You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fmt = repmat('%s',[1,3]);
if ~isdeployed
fileID = fopen('configs.txt');
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
else
fileID = fopen(fullfile(ctfroot,'configs','configs.txt'));
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
end
The code above reads a text file inside the folder 'configs' which is located inside the root folder of the project.
Unfortunately even by following the above guidelines the code still does not work on the standalone version.
The matlab fopen(fullfile(ctfroot,'configs','configs.txt')) command points to the location: C:\Users\user_name\AppData\Local\Temp\user_name\mcrCache9.0.1\mwm_ml0\configs\configs.txt
where no configs exists.
By navigating inside the folder *C:\Users\user_name\AppData\Local\Temp\user_name\mcrCache9.0.1\mwm_ml0* I noticed that the folder hierarchy of my project (and the folder configs) is actually located inside:
**C:\Users\user_name\AppData\Local\Temp\user_name\mcrCache9.0.1\mwm_ml0\Users\user_name\Documents\MATLAB\Deploy Beta Version**.
I should investigate this further. At the moment if all the files of the project are located inside the same folder and are compiled then the standalone version works like charm.
According to the following:
in order to make sure that your code works both on MATLAB and the standalone app it needs to be written like:
The code above reads a text file inside the folder 'configs' which is located inside the root folder of the project.
Unfortunately even by following the above guidelines the code still does not work on the standalone version.
The
matlab fopen(fullfile(ctfroot,'configs','configs.txt'))
command points to the location: C:\Users\user_name\AppData\Local\Temp\user_name\mcrCache9.0.1\mwm_ml0\configs\configs.txtwhere no configs exists.
By navigating inside the folder *C:\Users\user_name\AppData\Local\Temp\user_name\mcrCache9.0.1\mwm_ml0* I noticed that the folder hierarchy of my project (and the folder configs) is actually located inside:
**C:\Users\user_name\AppData\Local\Temp\user_name\mcrCache9.0.1\mwm_ml0\Users\user_name\Documents\MATLAB\Deploy Beta Version**.
I should investigate this further. At the moment if all the files of the project are located inside the same folder and are compiled then the standalone version works like charm.
(refer also to #22)
The text was updated successfully, but these errors were encountered: