public async Task <bool> UpdateClientFiles() { var currentClientVersion = GetCurrentClientVersion(); if (currentClientVersion == null) { return(await TryDownloadNewClientFiles()); } var newestClientVersion = await TryGetNewestClientVersion(); if (newestClientVersion == null) { return(true); } _logger.Write($"Current client version: {currentClientVersion}, newest client version: {newestClientVersion}"); if (currentClientVersion == newestClientVersion) { return(true); } #if DEBUG return(true); #endif if (!ShouldDownloadNewClientVersion(currentClientVersion, newestClientVersion)) { return(true); } _splashScreenProgressProvider.SetCurrentStep(SplashScreenProgressStep.DownloadNewClient); return(await TryDownloadNewClientFiles()); }
public async Task <Process> LaunchGame(GameLaunchMode launchMode, bool joinServer = false) { if (!_settingsProvider.GetCurrentSettings().AcceptedEula) { return(null); } if (IsLaunching) { return(null); } IsLaunching = true; if (!joinServer) { SetJoinServerAddress(null); } _logger.Write($"Launching game. ({launchMode})"); _notificationService.ShowNotification("Launching game...", Notification.ShortMessageDelay); _splashScreenProgressProvider.SetCurrentStep(SplashScreenProgressStep.Initializing); var gameProcess = launchMode == GameLaunchMode.Multiplayer ? await ExecuteGrandTheftMultiplayerLaunchSteps() : await ExecuteGtaLaunchSteps(); IsLaunching = false; return(gameProcess); }