From b2db361984b7f6833d24eb4c574ec3513d8b7633 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 9 Aug 2018 13:52:40 +0300 Subject: Removed APPLICATION_VERSIONS & EMBEDDED_SOFTWARE_VERSIONS TABLES. Added TANGO_VERSIONS. Working on PPC machine setup. --- .../MachineSetup/MachineSetupManager.cs | 41 ++-------------------- 1 file changed, 3 insertions(+), 38 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs index dc5164465..64500b454 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs @@ -81,7 +81,7 @@ namespace Tango.PPC.Common.MachineSetup //Download software package. var tempFile = TemporaryManager.CreateFile(".zip"); - UpdatingPackagesStatus = "Downloading application package..."; + UpdatingPackagesStatus = "Downloading software package..."; int fileSize = 0; UpdatingPackagesProgress = 0; @@ -100,48 +100,13 @@ namespace Tango.PPC.Common.MachineSetup LogManager.Log("Connecting to FTP site: " + setup_response.FtpAddress); ftp.ConnectAsync().Wait(); LogManager.Log("Retrieving download size..."); - fileSize = (int)ftp.GetFileSize(setup_response.ApplicationFtpFilePath); + fileSize = (int)ftp.GetFileSize(setup_response.FilePath); LogManager.Log("Download size: " + fileSize + " bytes."); LogManager.Log("Starting download..."); - ftp.DownloadAsync(fs, setup_response.ApplicationFtpFilePath).Wait(); + ftp.DownloadAsync(fs, setup_response.FilePath).Wait(); } } - //Extract software package. - ZipFile.ExtractToDirectory(tempFile, software_package_folder); - - //Download embedded package. - tempFile = TemporaryManager.CreateFile(".zip"); - - UpdatingPackagesStatus = "Downloading embedded package..."; - - fileSize = 0; - UpdatingPackagesProgress = 0; - - using (FileStreamWrapper fs = new FileStreamWrapper(tempFile.Path, FileMode.Create, (current) => - { - InvokeUINow(() => - { - Thread.Sleep(10); - UpdatingPackagesProgress = ((double)current / (double)fileSize) * 100d; - }); - })) - { - using (FtpClient ftp = new FtpClient(setup_response.FtpAddress, setup_response.UserName, setup_response.Password)) - { - LogManager.Log("Connecting to FTP site: " + setup_response.FtpAddress); - ftp.ConnectAsync().Wait(); - LogManager.Log("Retrieving download size..."); - fileSize = (int)ftp.GetFileSize(setup_response.EmbeddedFtpFilePath); - LogManager.Log("Download size: " + fileSize + " bytes."); - LogManager.Log("Starting download..."); - ftp.DownloadAsync(fs, setup_response.EmbeddedFtpFilePath).Wait(); - } - } - - //Extract embedded package. - ZipFile.ExtractToDirectory(tempFile, embedded_package_folder); - //Synchronize database String remote_address = setup_response.DbAddress; -- cgit v1.3.1