2024-08-08 02:36:35 +00:00
|
|
|
param(
|
|
|
|
$Action,
|
|
|
|
[hashtable] $Arguments
|
|
|
|
)
|
|
|
|
|
2024-08-28 03:18:52 +00:00
|
|
|
& {
|
|
|
|
param($Parameters)
|
|
|
|
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
|
|
|
|
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
|
|
|
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
|
|
|
|
$path = "$HOME/Documents/ManiaPlanet";
|
2024-08-08 02:36:35 +00:00
|
|
|
|
2024-08-28 03:18:52 +00:00
|
|
|
Start-SoftwareInstaller @Parameters `
|
|
|
|
-Installer {
|
|
|
|
Install-WingetPackage Nadeo.ManiaPlanet;
|
|
|
|
Remove-DesktopIcon "ManiaPlanet*";
|
|
|
|
} `
|
|
|
|
-UserBackup {
|
|
|
|
param(
|
|
|
|
[hashtable] $Arguments
|
|
|
|
)
|
2024-08-08 02:36:35 +00:00
|
|
|
|
2024-08-28 03:18:52 +00:00
|
|
|
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;
|