Cockatrice/cmake
Lukas Brübach fa081f20e1 [Installer] Wait on the process that launched the update installer
The in-app updater starts the installer and only then quits itself, so the
installer has to decide whether the launching process is still alive while it is
running. It did that by polling powershell.exe for an image name under the
install directory, which is a proxy for the real question - is the process that
started me still holding its Qt DLLs mapped - and a proxy that can answer "not
running" or "could not determine" while the process is very much alive. Either
answer let the install carry on into the mixed Qt DLL set.

Take /PID= from the command line and wait on that process handle directly:

- OpenProcess with PROCESS_SYNCHRONIZE only, which is all that is needed to wait
  and the least likely to be refused for an unrelated reason
- WaitForSingleObject for the same 60 s the name based check allows, so a client
  slow to flush its card database is not squeezed
- Treat an unopenable handle as "already exited", which is what it means for a
  dead process
- Cancel the upgrade if the launcher has not exited, rather than replacing files
  it is still using

Run it before EnsureAppsNotRunning, not after: it needs no powershell.exe, so it
is the one check that still works on a machine where the process lookup cannot
run, and it is what lets that case keep upgrading instead of being cancelled by
what was only ever a proxy for it. Keep an older client, which passes no /PID=,
on the existing path.

An older installer ignores /PID=, and /D= stays the last parameter either way.
2026-10-01 17:58:09 +02:00
..
pch [Build] Add precompiled headers for Qt-backed executables (#7235) 2026-09-05 19:40:36 +02:00
CMakeDMGSetup.script [Deprecation] Remove DBConverter from sources. (#6431) 2025-12-20 15:25:13 +01:00
createversionfile.cmake Add cmake format (#4618) 2022-05-08 21:22:43 +02:00
dmgBackground.tif CPack DMG Installer with Background Image (#4787) 2023-04-29 23:13:01 -04:00
FindLibexecinfo.cmake Add cmake format (#4618) 2022-05-08 21:22:43 +02:00
FindQtRuntime.cmake [Theme] Add scheme-variant asset resolution (#7275) 2026-09-11 17:59:57 +02:00
FindVCredistRuntime.cmake CI: Use windows-2022 image with Visual Studio 17 2022 (#4999) 2024-05-13 17:41:50 -04:00
getversion.cmake Use dash instead of underscore 2026-05-08 10:13:40 -04:00
gtest-CMakeLists.txt.in Bump minimum required cmake to 3.10 in gtest (#6851) 2026-05-09 00:05:10 +02:00
headerimage.bmp svg+png updates 2015-04-28 16:06:36 +02:00
Info.plist Define Cockatrice as an editor/handler for .cod files and cockatrice:// protocol on all platforms (#6775) 2026-08-08 19:02:19 +02:00
launch-c.in Travis: enable ccache usage under macOS; halves compilation time (#3052) 2018-01-27 13:43:48 -05:00
launch-cxx.in Travis: enable ccache usage under macOS; halves compilation time (#3052) 2018-01-27 13:43:48 -05:00
leftimage.bmp svg+png updates 2015-04-28 16:06:36 +02:00
NSIS.definitions.nsh.in NSIS: misc fixes [wip] (#3300) 2018-06-25 18:34:58 +02:00
NSIS.template.in [Installer] Wait on the process that launched the update installer 2026-10-01 17:58:09 +02:00
SignMacApplications.cmake [Deprecation] Remove DBConverter from sources. (#6431) 2025-12-20 15:25:13 +01:00