param( $Action, [hashtable] $Arguments ) . "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; & { param($Parameters) . "$PSScriptRoot/../../Scripts/Restoration.ps1"; Export-ModuleMember -Function @(); $getInstallPath = { return "$((Get-KnownFolder -SpecialFolder ProgramFilesX86).Path)/osu!"; } Start-SoftwareInstaller @Parameters ` -Installer { Install-ChocoPackage osu; Remove-DesktopIcon "*osu*"; } ` -Backup { param([string] $Name) Add-BackupArtifacts -Source (& $getInstallPath) -Path "$Name" ` -Include @( "Screenshots", "Skins", "Songs", "osu!.cfg", "scores.db" ); } ` -Configurator { param([string] $Name) Expand-BackupArtifacts -Path "$Name" -Target (& $getInstallPath); } ` -UserBackup { param( [string] $Name, [hashtable] $Arguments ) $user = $Arguments.Name; Add-BackupArtifacts -Source "$(& $getInstallPath)/osu!.$user.cfg" -User $user -Path "$Name/osu!.cfg"; } ` -UserConfigurator { param([hashtable] $Arguments) $name = $Arguments.Name; Expand-BackupArtifacts -User $name -Path "$Name/osu!.cfg" -Target "$(& $getInstallPath)/osu!.$name.cfg"; }; } $PSBoundParameters;