@@ -12,8 +12,10 @@ enum UpdatorStatus : byte
1212 {
1313 Idle ,
1414 Preparing ,
15- Downloading ,
16- Installing
15+ DownloadingModule ,
16+ DownloadingLauncher ,
17+ InstallingModule ,
18+ InstallingLauncher
1719 }
1820
1921 public static class Updator
@@ -42,11 +44,17 @@ private static void SetStatus(UpdatorStatus status)
4244 {
4345 switch ( status )
4446 {
45- case UpdatorStatus . Downloading :
46- m_updateCtrl . UpdateType = Controls . CRUpdate . UpdateLayouts . Downloading ;
47+ case UpdatorStatus . DownloadingModule :
48+ m_updateCtrl . UpdateType = Controls . CRUpdate . UpdateLayouts . DownloadingModule ;
4749 break ;
48- case UpdatorStatus . Installing :
49- m_updateCtrl . UpdateType = Controls . CRUpdate . UpdateLayouts . Installing ;
50+ case UpdatorStatus . DownloadingLauncher :
51+ m_updateCtrl . UpdateType = Controls . CRUpdate . UpdateLayouts . DownloadingLauncher ;
52+ break ;
53+ case UpdatorStatus . InstallingModule :
54+ m_updateCtrl . UpdateType = Controls . CRUpdate . UpdateLayouts . InstallingModule ;
55+ break ;
56+ case UpdatorStatus . InstallingLauncher :
57+ m_updateCtrl . UpdateType = Controls . CRUpdate . UpdateLayouts . InstallingLauncher ;
5058 break ;
5159 default :
5260 break ;
@@ -140,7 +148,7 @@ private static async Task<Result> InstallModule(bool bForceInstall)
140148 {
141149 Logger . Write ( "Downloading module archive..." ) ;
142150 Architecture . Path downloadedFile = ( tempFolder / "CodeRedModule.zip" ) ;
143- SetStatus ( UpdatorStatus . Downloading ) ;
151+ SetStatus ( UpdatorStatus . DownloadingModule ) ;
144152
145153 if ( await Downloaders . DownloadFile ( moduleUrl , tempFolder , "CodeRedModule.zip" ) )
146154 {
@@ -154,7 +162,7 @@ private static async Task<Result> InstallModule(bool bForceInstall)
154162 }
155163
156164 Logger . Write ( "Extracting file from archive..." ) ;
157- SetStatus ( UpdatorStatus . Installing ) ;
165+ SetStatus ( UpdatorStatus . InstallingModule ) ;
158166 await Task . Delay ( 1500 ) ;
159167
160168 using ( ZipArchive zipArchive = ZipFile . OpenRead ( downloadedFile . GetPath ( ) ) )
@@ -262,7 +270,7 @@ private static async Task<Result> InstallLauncher(bool bForceInstall)
262270 Architecture . Path dropperExe = ( tempFolder / "CodeRedDropper.exe" ) ;
263271
264272 Logger . Write ( "Downloading launcher archive..." ) ;
265- SetStatus ( UpdatorStatus . Downloading ) ;
273+ SetStatus ( UpdatorStatus . DownloadingLauncher ) ;
266274
267275 if ( await Downloaders . DownloadFile ( launcherUrl , tempFolder , "CodeRedLauncher.zip" ) )
268276 {
@@ -291,7 +299,7 @@ private static async Task<Result> InstallLauncher(bool bForceInstall)
291299 if ( dropperArchive . Exists ( ) )
292300 {
293301 Logger . Write ( "Extracting file from archive..." ) ;
294- SetStatus ( UpdatorStatus . Installing ) ;
302+ SetStatus ( UpdatorStatus . InstallingLauncher ) ;
295303 await Task . Delay ( 1500 ) ;
296304
297305 using ( ZipArchive zipArchive = ZipFile . OpenRead ( dropperArchive . GetPath ( ) ) )
0 commit comments