#26 posted by
Joel B on 2014/04/06 21:23:07
Getting away from runes for a bit: :-)
FYI it looks like there is a way to externally launch a Steam application with command-line arguments. The icky thing for Quake is: for games that have several different "variants" that can be launched, this method is only able to launch the first variant. So you can only start Steam's Winquake.exe this way... not GLQuake.exe or either of the QuakeWorld variants.
Just for testing though, I munged launch.bat a little so that it would generate this command line when I dragged a pak onto it (in this case e1m5quotha.pak):
C:\Games\Steam\Steam.exe -applaunch 2310 -hipnotic -game quoth +map e1m5quotha
"-applaunch 2310" is the special sauce there that runs Quake, and gives Quake the remaining options. The unmodified launch.bat can't quite generate this command line, because:
- If I include "-applaunch 2310" in quothengine, the EXIST check on %quothengine% fails.
- If I include "-applaunch 2310" in quothoptions, it doesn't get sent to Steam.exe as the first option (which is necessary).
But with a little re-arranging this works... launch.bat runs Steam's Winquake.exe with the desired options.
The bummer about this situation is that it can only launch Winquake.exe. Obviously you can replace Winquake.exe with whatever you want, and that's helpful for some groups of users, but not others.
Something to chew on maybe.
Order Of Options
#27 posted by
Preach on 2014/04/07 00:08:53
Thanks for the info, that eliminates a major failing of the steam version! I think I might have to accommodate it differently though, because there's less freedom to choose the order of options than would allow for applaunch to always be first.
As an example, the randomiser code always prepends the map command to the supplied options. This is necessary so that if a user supplies a map command in the options, it overrides the one that the randomiser supplies. Conversely, -width specified for glquake at the bottom of the engine selection is appended, because first entry wins for that command line option, and again it ought to be user controllable.
So instead what I've done is rework the messy engine selection stuff at the end of the batch to incorporate this new feature. Now there's no error message path in the batch - instead if we detect steam then:
1. We check for the ultimate quake patch and use glquake if we think it's there
2. If not we set the engine to be "..\..\..steam.exe -applaunch 2310". Because we're already at past the engine checking step the problem with trying to do this manually is gone. This version is now uploaded.