diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-09 13:52:40 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-09 13:52:40 +0300 |
| commit | b2db361984b7f6833d24eb4c574ec3513d8b7633 (patch) | |
| tree | 1696a76a81582ab43cae0e01c01c3ff1c2d799e1 /Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs | |
| parent | a5f9c99d51f7e096ff612da6605ab4d4f5067009 (diff) | |
| download | Tango-b2db361984b7f6833d24eb4c574ec3513d8b7633.tar.gz Tango-b2db361984b7f6833d24eb4c574ec3513d8b7633.zip | |
Removed APPLICATION_VERSIONS & EMBEDDED_SOFTWARE_VERSIONS TABLES.
Added TANGO_VERSIONS.
Working on PPC machine setup.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs | 41 |
1 files changed, 3 insertions, 38 deletions
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; |
