diff --git a/scripts/Windows/Collections/Personal.ps1 b/scripts/Windows/Collections/Personal.ps1 index 3302097c7..125dc7284 100644 --- a/scripts/Windows/Collections/Personal.ps1 +++ b/scripts/Windows/Collections/Personal.ps1 @@ -37,4 +37,5 @@ function Restore-PersonalApps([Context] $context) { Restore-Osu $context; Restore-OsuLazer $context; Restore-PuTTY $context; + Restore-RetroArch $context; } diff --git a/scripts/Windows/Software/RetroArch/Manage.ps1 b/scripts/Windows/Software/RetroArch/Manage.ps1 index 992a0a2b9..cf07b0ebe 100644 --- a/scripts/Windows/Software/RetroArch/Manage.ps1 +++ b/scripts/Windows/Software/RetroArch/Manage.ps1 @@ -8,4 +8,22 @@ $null = New-Module { Write-Host "Backing up RetroArch"; $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"")); } + + function Restore-RetroArch([Context] $context) { + Write-Host "Restoring RetroArch"; + Write-Information "Installing RetroArch"; + choco install -y retroarch; + Write-Information "Restoring files"; + $context.Restore($context.SoftwareArchive($softwareName), $path); + + Write-Information "Adding cloud sync folders"; + + $context.AddNextcloudSync( + "$path\saves", + "/Saved Games/RetroArch/Saves"); + + $context.AddNextcloudSync( + "$path\system", + "/Saved Games/RetroArch/System") + } }