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 [hashtable] $Arguments
) )
& {
param($Parameters)
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; . "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1"; . "$PSScriptRoot/../../../Common/Scripts/System.ps1";
$path = "$HOME/Documents/ManiaPlanet";
Start-SoftwareInstaller @PSBoundParameters ` Start-SoftwareInstaller @Parameters `
-Installer { -Installer {
Install-WingetPackage Nadeo.ManiaPlanet; Install-WingetPackage Nadeo.ManiaPlanet;
Remove-DesktopIcon "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;