2024-09-23 01:33:17 +00:00
|
|
|
. "$PSScriptRoot/../../Scripts/SoftwareManagement.ps1";
|
2024-08-08 02:36:35 +00:00
|
|
|
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
|
|
|
|
2024-08-28 10:47:07 +00:00
|
|
|
& {
|
|
|
|
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
|
|
|
|
Export-ModuleMember -Function @();
|
2024-08-08 02:36:35 +00:00
|
|
|
|
2024-08-28 10:47:07 +00:00
|
|
|
$getInstallPath = {
|
|
|
|
return "$((Get-KnownFolder -SpecialFolder ProgramFilesX86).Path)/osu!";
|
|
|
|
}
|
|
|
|
|
2024-09-30 03:00:20 +00:00
|
|
|
Start-SoftwareInstaller @args `
|
2024-08-28 10:47:07 +00:00
|
|
|
-Installer {
|
|
|
|
Install-ChocoPackage osu;
|
|
|
|
Remove-DesktopIcon "*osu*";
|
|
|
|
} `
|
|
|
|
-Backup {
|
2024-09-23 00:10:42 +00:00
|
|
|
param([string] $Name)
|
|
|
|
|
|
|
|
Add-BackupArtifacts -Source (& $getInstallPath) -Path "$Name" `
|
2024-08-28 10:47:07 +00:00
|
|
|
-Include @(
|
|
|
|
"Screenshots",
|
|
|
|
"Skins",
|
|
|
|
"Songs",
|
|
|
|
"osu!.cfg",
|
|
|
|
"scores.db"
|
|
|
|
);
|
|
|
|
} `
|
|
|
|
-Configurator {
|
2024-09-23 00:10:42 +00:00
|
|
|
param([string] $Name)
|
|
|
|
|
|
|
|
Expand-BackupArtifacts -Path "$Name" -Target (& $getInstallPath);
|
2024-08-28 10:47:07 +00:00
|
|
|
} `
|
|
|
|
-UserBackup {
|
2024-09-23 00:10:42 +00:00
|
|
|
param(
|
|
|
|
[string] $Name,
|
|
|
|
[hashtable] $Arguments
|
|
|
|
)
|
|
|
|
|
|
|
|
$user = $Arguments.Name;
|
|
|
|
Add-BackupArtifacts -Source "$(& $getInstallPath)/osu!.$user.cfg" -User $user -Path "$Name/osu!.cfg";
|
2024-08-28 10:47:07 +00:00
|
|
|
} `
|
|
|
|
-UserConfigurator {
|
|
|
|
param([hashtable] $Arguments)
|
|
|
|
$name = $Arguments.Name;
|
2024-09-23 00:10:42 +00:00
|
|
|
Expand-BackupArtifacts -User $name -Path "$Name/osu!.cfg" -Target "$(& $getInstallPath)/osu!.$name.cfg";
|
2024-08-28 10:47:07 +00:00
|
|
|
};
|
2024-09-30 03:00:20 +00:00
|
|
|
} @args;
|