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.
This commit is contained in:
Mykhailo Ivanchenko
2026-10-23 18:26:59 +02:00
parent a669eeb503
commit 329e9d3db9
2 changed files with 26 additions and 0 deletions
+11
View File
@@ -85,5 +85,16 @@ if (-not (Test-Path (Join-Path "instances" $InstanceName))) {
Write-Host "==> Instance already present, skipping download" 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" Write-Host "==> Launching into $InstanceName as $Nick, joining $ServerAddr"
& $LauncherBin --dir $InstallDir --launch $InstanceName --profile $Nick --server $ServerAddr & $LauncherBin --dir $InstallDir --launch $InstanceName --profile $Nick --server $ServerAddr
+15
View File
@@ -97,5 +97,20 @@ else
echo "==> Instance already present, skipping download" echo "==> Instance already present, skipping download"
fi 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" <<EOF
[Desktop Entry]
Type=Application
Name=LAN Party Minecraft
Exec=$LAUNCHER_BIN --dir "$INSTALL_DIR" --launch "$INSTANCE_NAME" --profile "$NICK" --server "$SERVER_ADDR"
Icon=$INSTALL_DIR/app/resources/multimc.png
Terminal=false
EOF
chmod +x "$DESKTOP_DIR/lan-party-minecraft.desktop"
echo "==> 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" echo "==> Launching into $INSTANCE_NAME as $NICK, joining $SERVER_ADDR"
"$LAUNCHER_BIN" --dir "$INSTALL_DIR" --launch "$INSTANCE_NAME" --profile "$NICK" --server "$SERVER_ADDR" "$LAUNCHER_BIN" --dir "$INSTALL_DIR" --launch "$INSTANCE_NAME" --profile "$NICK" --server "$SERVER_ADDR"