diff --git a/README.md b/README.md index 9041367d48..b249d43044 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ The port isn't downloaded ready-made. It's built on your PC from your own copy. and otherwise tells you what to do. 3. Double-click **`Build.bat`**. On Linux or macOS, run **`./Build.sh`** from a terminal instead (see [docs/linux.md](docs/linux.md) for Linux). + Want a desktop shortcut with the Leonida icon? Run `powershell -ExecutionPolicy Bypass -File scripts\make_shortcut.ps1`. It finds your copy of the game by itself: it looks in Downloads, Desktop, Documents (also where Windows keeps them, such as in OneDrive), Games, your home folder and the top of every drive, two folders deep. It recognises the diff --git a/scripts/make_shortcut.ps1 b/scripts/make_shortcut.ps1 new file mode 100644 index 0000000000..a0b6a79a71 --- /dev/null +++ b/scripts/make_shortcut.ps1 @@ -0,0 +1,11 @@ +# Creates a "Leonida" shortcut (with the project icon) on the Desktop that runs Build.bat. +# Usage: powershell -ExecutionPolicy Bypass -File scripts\make_shortcut.ps1 +$root = Split-Path -Parent $PSScriptRoot +$desktop = [Environment]::GetFolderPath('Desktop') +$lnk = (New-Object -ComObject WScript.Shell).CreateShortcut((Join-Path $desktop 'Leonida.lnk')) +$lnk.TargetPath = Join-Path $root 'Build.bat' +$lnk.WorkingDirectory = $root +$lnk.IconLocation = (Join-Path $root 'assets\logo.ico') + ',0' +$lnk.Description = 'Leonida - Game Builder' +$lnk.Save() +Write-Host "Created $($lnk.FullName)"