windows: write steam_appid.txt before starting (the cause of the Steam error box); start the server window minimized

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
esefandClaude Opus 5.5 committed 2026-10-15 21:22:41 +03:00
1 parent 7d8aa4a029
commit d84d736846
4 files changed
+12 -8

No files matched your search

+1 -1
View File
@@ -90,7 +90,7 @@ The same stack, native instead of Docker: the win32 builds of every part, `hlds.
Things that differ from Linux:
- **First start after an install.** The server's Steam part sets itself up on its first run (`hlds\appcache`, `hlds\config`) and the server stops with a "Fatal error: Unable to initialize Steam" box. Every start after that works, with or without the Steam client running. `Start-CsServer` notices that box (window title "Fatal error"), closes the server and starts it once more.
- **`steam_appid.txt`.** A fresh SteamCMD install has no `hlds\steam_appid.txt`. `hlds.exe` writes it while starting, but after Steam has already failed, so the very first start ends in a "Fatal error: Unable to initialize Steam" box that blocks the desktop until it's closed. `Start-CsServer` writes the file (`10`) before every start. If the box shows up anyway, it closes the server and starts it again (up to 3 times). The server window starts minimized so it doesn't take the focus.
- **Firewall.** Setup adds an allow rule for `hlds\hlds.exe` on all network types (admin prompt) before the first start, so Windows' own popup doesn't appear, and removes block rules Windows made if that popup was ever cancelled. Normal users often can't read firewall rules, so the result is remembered in `secrets\firewall-rule.txt`.
- **Install folder.** `Documents\cs16`, or `%USERPROFILE%\cs16` when Documents is synced by OneDrive, or `C:\cs16` when the user folder has non-ASCII characters (SteamCMD and HLDS can't handle them). The folder is remembered in `%LOCALAPPDATA%\cs16-dm-server\install-folder.txt`, so running a newly downloaded `setup.cmd` updates the existing install.
- **Console log.** `-condebug` writes `hlds\qconsole.log`; setup shows its end when the server doesn't come up.