2024-08-08 02:36:35 +00:00
|
|
|
param(
|
|
|
|
$Action,
|
|
|
|
[hashtable] $Arguments
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2024-09-03 10:02:09 +00:00
|
|
|
& {
|
|
|
|
param($Parameters)
|
|
|
|
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
|
|
|
|
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
|
|
|
$path = "$HOME/Documents/TmForever";
|
|
|
|
|
|
|
|
Start-SoftwareInstaller @Parameters `
|
|
|
|
-Installer {
|
|
|
|
foreach ($feature in @("DirectPlay", "NetFx3")) {
|
|
|
|
if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") {
|
|
|
|
Write-Information "Enabling the ``$feature`` feature…";
|
|
|
|
choco install --source windowsFeatures -y $feature;
|
|
|
|
}
|
2024-08-08 02:36:35 +00:00
|
|
|
}
|
2024-08-24 02:24:55 +00:00
|
|
|
|
2024-09-03 10:02:09 +00:00
|
|
|
Install-WingetPackage Nadeo.TrackManiaNationsForever;
|
|
|
|
Remove-DesktopIcon "*TmNationsForever*";
|
|
|
|
} `
|
|
|
|
-UserBackup {
|
2024-09-23 00:10:42 +00:00
|
|
|
param(
|
|
|
|
[string] $Name,
|
|
|
|
[hashtable] $Arguments
|
|
|
|
)
|
|
|
|
|
2024-09-03 10:02:09 +00:00
|
|
|
$name = $Arguments.Name;
|
2024-08-08 02:36:35 +00:00
|
|
|
|
2024-09-23 00:10:42 +00:00
|
|
|
Add-BackupArtifacts -User $name -Source $path -Path "$Name" `
|
2024-09-03 10:02:09 +00:00
|
|
|
-Include @(
|
|
|
|
"ChallengeMusics",
|
|
|
|
"MediaTracker",
|
|
|
|
"MenuMusics",
|
|
|
|
"Painter",
|
|
|
|
"Scores",
|
|
|
|
"Skins",
|
|
|
|
"Tracks"
|
|
|
|
);
|
|
|
|
} `
|
|
|
|
-UserConfigurator {
|
2024-09-23 00:10:42 +00:00
|
|
|
param(
|
|
|
|
[string] $Name,
|
|
|
|
[hashtable] $Arguments
|
|
|
|
)
|
|
|
|
|
|
|
|
$user = $Arguments.Name;
|
|
|
|
Expand-BackupArtifacts -User $user -Path "$Name" -Target $path;
|
2024-09-03 10:02:09 +00:00
|
|
|
};
|
|
|
|
} $PSBoundParameters;
|