Add backup support for ManiaPlanet

This commit is contained in:
Manuel Thalmann 2024-08-28 05:18:52 +02:00
parent 25a43268c9
commit a51999007e

View file

@ -3,13 +3,42 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
& {
param($Parameters)
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
$path = "$HOME/Documents/ManiaPlanet";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {
Install-WingetPackage Nadeo.ManiaPlanet;
Remove-DesktopIcon "ManiaPlanet*";
};
Start-SoftwareInstaller @Parameters `
-Installer {
Install-WingetPackage Nadeo.ManiaPlanet;
Remove-DesktopIcon "ManiaPlanet*";
} `
-UserBackup {
param(
[hashtable] $Arguments
)
# ToDo: Add restoration
Add-BackupArtifacts -User $Arguments.Name -Source $path -Path "ManiaPlanet" `
-Include @(
"Actions",
"Blocks",
"Items",
"Maps",
"Media",
"Modules",
"Packs",
"Replays",
"Scripts",
"Skins"
);
} `
-UserConfigurator {
param(
[hashtable] $Arguments
)
Expand-BackupArtifacts -User $Arguments.Name -Path "ManiaPlanet" -Target $path;
};
} $PSBoundParameters;