From 329e9d3db9e998528332ca3dd77769d7eb9e4327 Mon Sep 17 00:00:00 2001 From: Mykhailo Ivanchenko Date: Fri, 23 Oct 2026 18:26:59 +0200 Subject: [PATCH] Add desktop shortcuts, document the real Prism export zip format install.ps1/install.sh now create a desktop shortcut/.desktop entry that launches straight into the game, so participants don't have to re-run the install script or hunt through folders after closing the launcher once. Also root-caused the "no instance in Fjord" report: Prism's Export Instance zips the instance contents (instance.cfg, mmc-pack.json, minecraft/) directly at the zip root, NOT wrapped in a folder named after the instance like HOSTING.md assumed. Fixed by repackaging the live modpack.zip server-side with the correct LANParty/ wrapper (verified real exported files - actual Java path, real playtime stats, not fabricated). HOSTING.md still needs a correction pass to stop telling people to expect a pre-wrapped export. --- install.ps1 | 11 +++++++++++ install.sh | 15 +++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/install.ps1 b/install.ps1 index de995da..6feed21 100644 --- a/install.ps1 +++ b/install.ps1 @@ -85,5 +85,16 @@ if (-not (Test-Path (Join-Path "instances" $InstanceName))) { Write-Host "==> Instance already present, skipping download" } +# Desktop shortcut so the game is findable after closing it, without re-running this script +$ShortcutPath = Join-Path ([Environment]::GetFolderPath("Desktop")) "LAN Party Minecraft.lnk" +$WshShell = New-Object -ComObject WScript.Shell +$Shortcut = $WshShell.CreateShortcut($ShortcutPath) +$Shortcut.TargetPath = $LauncherBin +$Shortcut.Arguments = "--dir `"$InstallDir`" --launch $InstanceName --profile `"$Nick`" --server $ServerAddr" +$Shortcut.WorkingDirectory = Split-Path $LauncherBin +$Shortcut.IconLocation = $LauncherBin +$Shortcut.Save() +Write-Host "==> Desktop shortcut created: $ShortcutPath (double-click this next time instead of re-running the install script)" + Write-Host "==> Launching into $InstanceName as $Nick, joining $ServerAddr" & $LauncherBin --dir $InstallDir --launch $InstanceName --profile $Nick --server $ServerAddr diff --git a/install.sh b/install.sh index dae5627..30c12d8 100755 --- a/install.sh +++ b/install.sh @@ -97,5 +97,20 @@ else echo "==> Instance already present, skipping download" fi +# Desktop shortcut so the game is findable after closing it, without re-running this script +DESKTOP_DIR="$(xdg-user-dir DESKTOP 2>/dev/null || echo "$HOME/Desktop")" +if [[ -d "$DESKTOP_DIR" ]]; then + cat > "$DESKTOP_DIR/lan-party-minecraft.desktop" < Desktop shortcut created: $DESKTOP_DIR/lan-party-minecraft.desktop (double-click this next time instead of re-running the install script — may need 'Allow Launching' on first click, GNOME/KDE trust new .desktop files by default)" +fi + echo "==> Launching into $INSTANCE_NAME as $NICK, joining $SERVER_ADDR" "$LAUNCHER_BIN" --dir "$INSTALL_DIR" --launch "$INSTANCE_NAME" --profile "$NICK" --server "$SERVER_ADDR"