Update windows: releasing without cutting matches
=================================================

The OSRS-style flow: a countdown everyone sees, matchmaking closed, matches
already running played to the end, then clients and servers on the new build.

Pieces
- tools/update_notice.py (in the iw4x-qa container) publishes
  /srv/zeal/downloads/update-notice.txt:
      ZEAL UPDATE NOTICE V1 / <client version, or - for servers only> / <deadline, unix s> / <id>
- Clients (client_native/RankedUpdate.hpp, RankedUpdatePolicy.hpp) read it every
  30 s and the feed (stable.release) every 5 min, every 30 s during a window.
  In the menus they draw "ZEAL UPDATE IN m:ss". After the deadline, once the feed
  names a newer release than the installed launcher and the player is not in a
  match (menus, or a Zeal server's search lobby = free-for-all), a 5 s warning,
  then the game restarts through zeal-launcher.exe --zeal-play --wait-pid <pid>,
  which verifies and installs the release. A player in a match restarts when it
  ends. Games not started by the launcher (own scripts running iw4x.exe) only
  get a notice. A version already restarted for in the last 30 min is not forced
  again (players/zeal_update_restart.txt), so a failed install cannot loop.
  Without a window, a newer feed release gives a 15 s warning between matches.
- Game servers: the bridge (ranked_lobby/bridge.py) reads the notice every 15 s
  and writes ranked_service/update.txt (U1|<id>|<seconds left>|<version>, or U1|-).
  ranked_system.gsc then starts no new match; the search lobby shows
  "MATCHMAKING CLOSED -- ZEAL UPDATE" with the countdown, matches show "ZEAL UPDATE
  AFTER THIS MATCH". update_done.txt (written by switch.sh) ends the window for a
  server once it runs the new build.
- deploy/update-window/switch.sh switches one instance (DLL, server.cfg lines,
  scripts link, update_done.txt, restart, check, rollback) and only while no match
  runs; watch.sh does every instance on a host from 30 s after the deadline.

A release, step by step
1. Build and publish as usual (art pack first, the installer under
   releases/<version>/), but do not switch stable.release yet.
2. Game hosts: copy the current scripts to /opt/zeal-ranked/scripts-<old>, point
   every instance's userraw/scripts at that copy, extract the new tree, stage
   /srv/zeal/assets/iw4x-<version>.dll (and server-cfg-<version>.txt if server.cfg
   lines change). Running servers keep the old DLL with the old scripts.
3. Open the window: python3 update_notice.py open --minutes 10 --version <version>
4. Start deploy/update-window/watch.sh <version> <window id> <deadline> on each
   host (nohup setsid ... &).
5. At the deadline switch stable.release to the new release (clients wait for the
   feed, so a few minutes late is fine).
6. When every instance is switched: python3 update_notice.py close.

Servers-only update: the same with update_notice.py open --minutes N (no
--version); clients only see the countdown.

Note: servers still on scripts from before this feature do not close
matchmaking; the first release with it is deployed the old way.
