@@ -205,7 +205,12 @@ function ok_Callback(hObject, eventdata, handles)
205
205
% path = fullfile(ctfroot,'configs','configs.txt');
206
206
% writetable(new,path,'WriteVariableNames',0);
207
207
% end
208
- writetable(new ,' configs.txt' ,' WriteVariableNames' ,0 );
208
+ if ~isdeployed
209
+ path = fullfile(pwd ,' configs' ,' configs.txt' );
210
+ writetable(new ,path ,' WriteVariableNames' ,0 );
211
+ else
212
+ writetable(new ,' configs.txt' ,' WriteVariableNames' ,0 );
213
+ end
209
214
close(gcf );
210
215
211
216
@@ -247,7 +252,12 @@ function cancel_Callback(hObject, eventdata, handles)
247
252
% path = fullfile(ctfroot,'configs','configs.txt');
248
253
% writetable(new,path,'WriteVariableNames',0);
249
254
% end
250
- writetable(new ,' configs.txt' ,' WriteVariableNames' ,0 );
255
+ if ~isdeployed
256
+ path = fullfile(pwd ,' configs' ,' configs.txt' );
257
+ writetable(new ,path ,' WriteVariableNames' ,0 );
258
+ else
259
+ writetable(new ,' configs.txt' ,' WriteVariableNames' ,0 );
260
+ end
251
261
close(gcf );
252
262
253
263
function axes1_CreateFcn(hObject , eventdata , handles )
@@ -277,7 +287,12 @@ function default_Callback(hObject, eventdata, handles)
277
287
% path = fullfile(ctfroot,'configs','configs.txt');
278
288
% writetable(new,path,'WriteVariableNames',0);
279
289
% end
280
- writetable(new ,' configs.txt' ,' WriteVariableNames' ,0 );
290
+ if ~isdeployed
291
+ path = fullfile(pwd ,' configs' ,' configs.txt' );
292
+ writetable(new ,path ,' WriteVariableNames' ,0 );
293
+ else
294
+ writetable(new ,' configs.txt' ,' WriteVariableNames' ,0 );
295
+ end
281
296
% Update the gui
282
297
[FontName , FontSize , LineWidth , Export , ExportStyle ] = parse_configs ;
283
298
fonts = get(handles .fname ,' String' );
0 commit comments