2023-07-12 20:37:31 +00:00
|
|
|
#!/bin/pwsh
|
2023-06-07 20:48:05 +00:00
|
|
|
. "$PSScriptRoot/../../Scripts/Context.ps1";
|
|
|
|
|
2023-06-08 00:28:33 +00:00
|
|
|
$null = New-Module {
|
|
|
|
$path = "C:/tools/RetroArch-Win64";
|
|
|
|
$softwareName = "RetroArch";
|
|
|
|
|
2023-06-30 10:19:54 +00:00
|
|
|
function Backup-RetroArch([Context] $context) {
|
2023-06-30 12:23:20 +00:00
|
|
|
Write-Host "Backing up RetroArch";
|
2023-06-08 00:28:33 +00:00
|
|
|
$context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`""));
|
|
|
|
}
|
2023-07-02 13:58:36 +00:00
|
|
|
|
|
|
|
function Restore-RetroArch([Context] $context) {
|
|
|
|
Write-Host "Restoring RetroArch";
|
|
|
|
Write-Information "Installing RetroArch";
|
2023-07-02 16:57:10 +00:00
|
|
|
choco install -y --ignore-checksums retroarch;
|
2023-07-02 13:58:36 +00:00
|
|
|
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")
|
|
|
|
}
|
2023-06-07 20:48:05 +00:00
|
|
|
}
|