This is required for UE4 games, for example, for which the .exe launched by itch isn't the actual game, it's just a launcher, that spawns the actual game.
What's done:
We already have a CreateProcess{A,W} hooks, which do the job for UE4 - more hooks might need to be added for other variants. Our hooks use Deviare-InProc's inject methods to make sure it is also injected into the grandchild
On Linux/macOS, LD_PRELOAD and DYLD_INSERT_LIBRARIES are inherited by the child, so any grandchilds it spawns have libcapsule loaded up already
What's to do:
capsulerun works under the assumption that it has a single connection to the child and that's it. With children, that's no longer the case. The original child might exit early (in which case capsule should probably wait on the grandchild - there's corner cases here, what if the child opens a web browser?), and we should handle connection switching.
Exactly how connection switching is going to work, I'm not sure yet - I introduced capture::SawBackend recently so that maybe the game could send that info via the connection and capsulerun would have an overview of which backends are available where, and pick the best connection to attempt a capture on.
This is required for UE4 games, for example, for which the .exe launched by itch isn't the actual game, it's just a launcher, that spawns the actual game.
What's done:
LD_PRELOAD
andDYLD_INSERT_LIBRARIES
are inherited by the child, so any grandchilds it spawns have libcapsule loaded up alreadyWhat's to do:
Exactly how connection switching is going to work, I'm not sure yet - I introduced
capture::SawBackend
recently so that maybe the game could send that info via the connection and capsulerun would have an overview of which backends are available where, and pick the best connection to attempt a capture on.