29 lines
955 B
PowerShell
29 lines
955 B
PowerShell
. "$PSScriptRoot/../../Scripts/Context.ps1";
|
|
|
|
$null = New-Module {
|
|
$path = "C:/tools/RetroArch-Win64";
|
|
$softwareName = "RetroArch";
|
|
|
|
function Backup-RetroArch([Context] $context) {
|
|
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 --ignore-checksums 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")
|
|
}
|
|
}
|