diff --git a/scripts/Windows/Software/LGHub/Manage.ps1 b/scripts/Windows/Software/LGHub/Manage.ps1 index 61a4472f..c342ad1c 100644 --- a/scripts/Windows/Software/LGHub/Manage.ps1 +++ b/scripts/Windows/Software/LGHub/Manage.ps1 @@ -12,6 +12,7 @@ $null = New-Module { function Stop-LogitechGHUB() { [OutputType([string])] param(); + Write-Host "Killing Logitech G HUB process"; $hubName = Get-LogitechGHUBName; $lghubPath = $(Get-Process | Where-Object { [System.IO.Path]::GetFileName($_.Path) -eq $hubName })[0].Path; @@ -23,18 +24,26 @@ $null = New-Module { } function Backup-LogitechGHUB([Context] $context) { + Write-Host "Backing Up Logitech G HUB"; $hubPath = Stop-LogitechGHUB; + + Write-Information "Backing up important files"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i!settings.db", "-i!icon_cache")); if ($hubPath) { + Write-Information "Restarting Logitech G HUB"; Start-Process $hubPath; } } function Restore-LogitechGHUB([Context] $context) { + Write-Host "Restoring Logitech G HUB"; + Write-Information "Installing the app"; choco install -y lghub; $hubPath = Stop-LogitechGHUB; + Write-Information "Restoring important files"; $context.Restore($context.SoftwareArchive($softwareName), $path); + Write-Information "Restarting Logitech G HUB"; Start-Process $hubPath; } } diff --git a/scripts/Windows/Software/ManiaPlanet/Manage.ps1 b/scripts/Windows/Software/ManiaPlanet/Manage.ps1 index 697ca624..7b460120 100644 --- a/scripts/Windows/Software/ManiaPlanet/Manage.ps1 +++ b/scripts/Windows/Software/ManiaPlanet/Manage.ps1 @@ -5,6 +5,7 @@ $null = New-Module { $softwareName = "ManiaPlanet"; function Backup-ManiaPlanet([Context] $context) { + Write-Information "Backing up ManiaPlanet"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"")); } } diff --git a/scripts/Windows/Software/Nextcloud/Manage.ps1 b/scripts/Windows/Software/Nextcloud/Manage.ps1 index 70535875..b912d61a 100644 --- a/scripts/Windows/Software/Nextcloud/Manage.ps1 +++ b/scripts/Windows/Software/Nextcloud/Manage.ps1 @@ -3,12 +3,16 @@ $null = New-Module { function Restore-Nextcloud([Context] $context) { if (-not (choco list --exact nextcloud-client)) { + Write-Information "Installing Nextcloud Client"; choco install nextcloud-client -y --params="'/KeepUpdateCheck'"; } + Write-Information "Ensuring all Let's Encrypt certificates are cached"; $null = Invoke-WebRequest https://valid-isrgrootx1.letsencrypt.org/; if (-not (Test-Path $context.GetNextcloudConfigFile())) { + Write-Information "Setting up Nextcloud configuration"; + while (-not (Test-Path $context.GetNextcloudConfigFile())) { Write-Host "Nextcloud has been installed!"; Read-Host "Please log in in the Nextcloud app and hit enter to continue"; diff --git a/scripts/Windows/Software/PuTTY/Manage.ps1 b/scripts/Windows/Software/PuTTY/Manage.ps1 index 38244602..66df3f08 100644 --- a/scripts/Windows/Software/PuTTY/Manage.ps1 +++ b/scripts/Windows/Software/PuTTY/Manage.ps1 @@ -5,6 +5,7 @@ $null = New-Module { $configFile = "$($softwareName).reg"; function Backup-PuTTY([Context] $context) { + Write-Host "Backing up PuTTY"; $tempDir = $context.GetTempDirectory(); $fileName = Join-Path "$tempDir" $configFile; & reg export "HKCU\Software\SimonTatham" "$fileName" /y; diff --git a/scripts/Windows/Software/RetroArch/Manage.ps1 b/scripts/Windows/Software/RetroArch/Manage.ps1 index 7aa67a4a..992a0a2b 100644 --- a/scripts/Windows/Software/RetroArch/Manage.ps1 +++ b/scripts/Windows/Software/RetroArch/Manage.ps1 @@ -5,6 +5,7 @@ $null = New-Module { $softwareName = "RetroArch"; function Backup-RetroArch([Context] $context) { + Write-Host "Backing up RetroArch"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"")); } } diff --git a/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 b/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 index 3b0ed2d2..26ed0888 100644 --- a/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 +++ b/scripts/Windows/Software/TrackMania Nations Forever/Manage.ps1 @@ -5,6 +5,7 @@ $null = New-Module { $softwareName = "TmNationsForever"; function Backup-TmNations([Context] $context) { + Write-Host "Backing up TrackMania Nations Forever"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"")); } } diff --git a/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 b/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 index 720b6650..a23f1d9b 100644 --- a/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 +++ b/scripts/Windows/Software/TrackMania United Forever/Manage.ps1 @@ -5,6 +5,7 @@ $null = New-Module { $softwareName = "TmUnitedForever"; function Backup-TmUnited([Context] $context) { + Write-Host "Backing up TrackMania United Forever"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"")); } } diff --git a/scripts/Windows/Software/VisualStudio/Manage.ps1 b/scripts/Windows/Software/VisualStudio/Manage.ps1 index 47c09a94..6a380726 100644 --- a/scripts/Windows/Software/VisualStudio/Manage.ps1 +++ b/scripts/Windows/Software/VisualStudio/Manage.ps1 @@ -13,7 +13,11 @@ $null = New-Module { } function Backup-VisualStudio([Context] $context) { + Write-Host "Backing up Visual Studio"; + foreach ($version in $versions) { + Write-Information "Backing up $($version[1]): $($version[2])"; + $configPath = Get-ConfigPath $context $version[0]; $null = New-Item -Force -ItemType Directory "$(Split-Path -Parent $configPath)"; diff --git a/scripts/Windows/Software/git/Manage.ps1 b/scripts/Windows/Software/git/Manage.ps1 index 93d182b1..ef0f9549 100644 --- a/scripts/Windows/Software/git/Manage.ps1 +++ b/scripts/Windows/Software/git/Manage.ps1 @@ -4,9 +4,12 @@ $null = New-Module { function Backup-Git([Context] $context) {} function Restore-Git([Context] $context) { + Write-Host "Restoring git"; $script = New-TemporaryFile; $script = Rename-Item $script "$($script.Name).sh" -PassThru; + Write-Information "Preparing setup script"; + Set-Content $script ( [string]::Join( "`n", @@ -14,6 +17,7 @@ $null = New-Module { "bash `"$PSScriptRoot/../../../Common/Config/git/install.sh`"", "bach rm ~/.bashrc"))); + Write-Information "Running prepared script"; Start-Process -Wait $script; Remove-Item $script; } diff --git a/scripts/Windows/Software/osu!/Manage.ps1 b/scripts/Windows/Software/osu!/Manage.ps1 index 52dfa58a..914bd6b9 100644 --- a/scripts/Windows/Software/osu!/Manage.ps1 +++ b/scripts/Windows/Software/osu!/Manage.ps1 @@ -6,8 +6,11 @@ $null = New-Module { $genericConfigName = "osu!.User.cfg"; function Backup-Osu([Context] $context) { + Write-Host "Backing up osu!"; $archive = $context.SoftwareArchive($softwareName); + Write-Information "Backing up important files"; $context.Backup($path, $archive, @("-i@`"$PSScriptRoot/include.txt`"")); + Write-Information "Renaming user configuration to $genericConfigName"; & 7z rn "$archive" "osu!.$env:USERNAME.cfg" $genericConfigName; } } diff --git a/scripts/Windows/Software/osu!lazer/Manage.ps1 b/scripts/Windows/Software/osu!lazer/Manage.ps1 index e2ab812f..00b93bda 100644 --- a/scripts/Windows/Software/osu!lazer/Manage.ps1 +++ b/scripts/Windows/Software/osu!lazer/Manage.ps1 @@ -5,6 +5,7 @@ $null = New-Module { $softwareName = "osu!lazer"; function Backup-OsuLazer([Context] $context) { + Write-Host "Backing up osu!lazer"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"", "-i!*.realm", "-i!*.db")); } } \ No newline at end of file diff --git a/scripts/Windows/Software/reWASD/Manage.ps1 b/scripts/Windows/Software/reWASD/Manage.ps1 index 0d3c9ede..cda5b718 100644 --- a/scripts/Windows/Software/reWASD/Manage.ps1 +++ b/scripts/Windows/Software/reWASD/Manage.ps1 @@ -5,6 +5,7 @@ $null = New-Module { $softwareName = "reWASD"; function Backup-reWASD([Context] $context) { + Write-Host "Backing up reWASD"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-x@`"$PSScriptRoot/exclude.txt`"")); } }