$packageRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
$desktopBeastExe = Join-Path $packageRoot "DesktopBeast.exe"
$iconPath = Join-Path $packageRoot "Assets\DesktopBeast.ico"
$shell = New-Object -ComObject WScript.Shell

$desktopShortcut = $shell.CreateShortcut((Join-Path $packageRoot "DesktopBeast.lnk"))
$desktopShortcut.TargetPath = $desktopBeastExe
$desktopShortcut.WorkingDirectory = $packageRoot
$desktopShortcut.IconLocation = $iconPath
$desktopShortcut.Save()

$libraryShortcut = $shell.CreateShortcut((Join-Path $packageRoot "ArchiveBeast Library.lnk"))
$libraryShortcut.TargetPath = $desktopBeastExe
$libraryShortcut.Arguments = "--library"
$libraryShortcut.WorkingDirectory = $packageRoot
$libraryShortcut.IconLocation = $iconPath
$libraryShortcut.Save()

Write-Host "Created DesktopBeast.lnk and ArchiveBeast Library.lnk with the DesktopBeast icon."
