diff --git a/LegacyInstaller/MainWindow.xaml.cs b/LegacyInstaller/MainWindow.xaml.cs index 1af73af..2e9201e 100644 --- a/LegacyInstaller/MainWindow.xaml.cs +++ b/LegacyInstaller/MainWindow.xaml.cs @@ -271,18 +271,6 @@ private async Task InstallVersion(Version version) watcher.Changed += FileSystemChanged; await Utilities.CopyDirectory(_steamProcess.Downloader.ContentAppDepotDir, SelectedVersionInstallDir); - // Install to steam - this.Dispatcher.Invoke((Action)delegate { installStateLabel.Content = "Installing..."; }); - await CopyLaunchFileTo(SelectedVersionInstallDir); - _steamProcess.Shortcuts.AddSteamShortcut(new SteamShortcut($"Beat Saber {SelectedVersion.BSVersion}", SelectedVersionInstallDir, "LaunchBS.bat")); - - // Restart steam - var steamAppId = Utilities.GetSteamAppId($"Beat Saber {SelectedVersion.BSVersion}", $"{BSInstallDir} {SelectedVersion.BSVersion}", "LaunchBS.bat"); - await RestartSteam($"steam://nav/games/details/{steamAppId}"); - - // Enable UI - this.Dispatcher.Invoke((Action)delegate { RefreshUI(true); }); - // Create Junction Links for custom levels if (customLevelsLinkCheckbox.IsChecked.GetValueOrDefault()) { @@ -309,6 +297,18 @@ private async Task InstallVersion(Version version) Utilities.CreateJunctionLink(targetDir, sourceDir); } + + // Install to steam + this.Dispatcher.Invoke((Action)delegate { installStateLabel.Content = "Installing..."; }); + await CopyLaunchFileTo(SelectedVersionInstallDir); + _steamProcess.Shortcuts.AddSteamShortcut(new SteamShortcut($"Beat Saber {SelectedVersion.BSVersion}", SelectedVersionInstallDir, "LaunchBS.bat")); + + // Restart steam + var steamAppId = Utilities.GetSteamAppId($"Beat Saber {SelectedVersion.BSVersion}", $"{BSInstallDir} {SelectedVersion.BSVersion}", "LaunchBS.bat"); + await RestartSteam($"steam://nav/games/details/{steamAppId}"); + + // Enable UI + this.Dispatcher.Invoke((Action)delegate { RefreshUI(true); }); } private void FileSystemChanged(object sender, FileSystemEventArgs e)