Okidoki, I spent last night looking closely at this, and I think
I've riddled it out -- I'd be keen for others to try it out and
post back -- note: I'm not entirely sure it works for OSX yet...(untested)
test case --> app_id=6798
silver bullet -> app_id=8477
requires --> Crossover Games 10 or better (for postdependency function) with this (app_id=6268) already installed
trigger --> WINE_WAIT_CHILD_PIPE_IGNORE
What happens -- In your BFG app's install profile, you set WINE_WAIT_CHILD_PIPE_IGNORE against bfggameservices.exe ; (same is so for 8477, but you don't need touch this one). During the actual installation phase of (here) 6798's profile, both bfggameservices.exe & bfgclient.exe are started (the GUI part) ; both these things hold locks at this time, but, once the installation is actually complete, it's the still running bfgclient.exe stopping the show, not bfggameservices.exe as we've specified WINE_WAIT_CHILD_PIPE_IGNORE against that process. From the end user's perspective, (who's watching the BFG Manager actually downloading and installing things), there's a chance they may notice cxinstaller sitting there likewise as the install proceeds. Users being people, are too hard to predict as to what they might do next, but, if they immediately choose to launch the game (from BFGM) after the game finishes installing, it should be ok (unless the default fullscreen of the BFG title smashes the display, figuratively speaking) You can ~try~ avoid this with install notes in the BFG title's install profile ...ie; Please exit the BigFishGames Manager when the game has completed installing ... for as long as bfgclient.exe is running, cxinstaller is going to be around showing install notes text (which should be able to flash and blink to get users' attention ... ;)
In any event, they either tried starting the game straight away and it went BOOM!, or they exited the BFGM once they saw the game install successfully,
and there's the auditory sound of Felix the Fish vibing on his Xylophone ... or they may have even played the game and want to 'finish installing'. The moment user exits BFGM and bfgclient.exe dies, 6798.tie is free to complete it's WINE_WAIT_CHILD_PIPE_IGNORE trigger, and move onto the next stage of execution (sic) -- postinstalldependency. Note that even though 6798 has been escaped here, -technically- speaking it was escaped far too early in the piece, and it's caught the 'go away now please' call long before the actual game has finished installing ; if we escape completely at this point, we won't end up with any menus (we need a rm menus function), -and-, installed detection will fail. This bit, accomplishes the 'controlled wait state' I was looking for here - get the user to do it =) .... they just appreciate interacting with BFGM as they should be ; they don't know they hold Uzi...
....cleaning up... as 6798.tie leaves center stage in sympathy with bfgclient.exe being closed, bfggameservices.exe is still running .. this has always been the problem ... so ... 8744 is invoked to kill this process dead, absolutely, 'double tap'. If you cite 8477.tie, you'll see it calls itself as a postdependency -- get the impression I'm fairly pissed at bfggameservices.exe? You bet! =) I haven't actually checked if the recursive rattle-gun effect is evident, but, 8477 is only virtual -- it calls the same 'taskill.exe' used in app_id=7992, but it's used in a different way -- 7992 provides (now) a task killer for CXG 9 users who install this (6268) via c4p/tie. We don't need to that for CXG 10 ; we can just link to the newly added 'taskkill.exe' native wine utility for this. When 8477 uses taskill.exe, it's to kill off bfggameservices.exe, even though the tie actually ignores the already running bfggameservices.exe process as such ; 8477 should always complete successfully (caveat no sanity checking is done to see if we -succeeded- or not, hence my attempt at a double-tap), and on the way out it's going to reread/refresh the bottle's menus/links, which 6798.tie probably didn't get done ... another double-tap at worst, benign at best... note: 8477 do not install anything - it fudges the line around the premise of being a 'virtual application' ... hehe ...
This gives the impression that the installation happened as a smooth progression, even though some non-typical install profile usage is afoot ....
Note: it still needs some cleaning up ; if .net is involved, more apps need to die =)
Let me know how it goes (or not) - try your own ties out using 6798.tie as a template
Cheers!
edit -SIFA