-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #152 from CCC-members/develop
Updating application
- Loading branch information
Showing
5 changed files
with
104 additions
and
94 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
function [updated, errors] = update_version() | ||
result = true; | ||
errors = []; | ||
% App check version | ||
% | ||
% | ||
% Authors: | ||
% - Ariosky Areces Gonzalez | ||
% - Deirel Paz Linares | ||
% - Pedro Valdes Sosa | ||
|
||
% - Date: November 15, 2019 | ||
try | ||
%% Download latest version | ||
if(getGlobalGuimode()) | ||
d = uiprogressdlg(app.CiftiStormUIFigure,'Title','Downloading CiftiStorm latest version'); | ||
end | ||
filename = strcat('CiftiStorm_latest.zip'); | ||
disp(strcat("-->> Downloading laster version.......")); | ||
url = local.generals.base_url; | ||
matlab.net.http.HTTPOptions.VerifyServerName = false; | ||
options = weboptions('Timeout',Inf,'RequestMethod','auto'); | ||
downladed_file = websave(filename,url,options); | ||
pause(1); | ||
if(getGlobalGuimode()) | ||
delete(d); | ||
end | ||
|
||
%% Unzip lasted version | ||
if(getGlobalGuimode()) | ||
d = uiprogressdlg(app.CiftiStormUIFigure,'Title','Unziping files'); | ||
end | ||
disp(strcat("-->> Unziping files.......")); | ||
exampleFiles = unzip(filename,pwd); | ||
pause(1); | ||
delete(filename); | ||
if(getGlobalGuimode()) | ||
delete(d); | ||
end | ||
|
||
%% Moving files | ||
if(getGlobalGuimode()) | ||
d = uiprogressdlg(app.CiftiStormUIFigure,'Title','Deploging the new vew version'); | ||
end | ||
disp(strcat("-->> Deploging the new vew version.......")); | ||
movefile( strcat('CiftiStorm-ESI-master',filesep,'*'), pwd, 'f'); | ||
rmdir CiftiStorm-ESI-master ; | ||
|
||
disp('-->> The project is already update with the laster version.'); | ||
disp('-->> The process was stoped to refresh all file'); | ||
disp('-->> Please configure the app properties file, before restart the process.'); | ||
result = 'updated'; | ||
if(getGlobalGuimode()) | ||
delete(d); | ||
end | ||
|
||
catch | ||
updated = false; | ||
return; | ||
end | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.