With no further ado, How to do it...
The entire meat and potatoes of this relies on 2 things
1) Directory Structure

ignore proxy.bat. It's purpose was radiant related and isn't necessary for using my scripts this way.
2) Run.bat
I put a bunch of stuff in here that is not necessary but, can be handy to force certain results early on
Code:
:: turn off console printing for a moment @echo off :: set some user options set height=720 set width=1200 set conheight=480 set conwidth=768 set gamename=id1 :: set path to the directory which this bat resides in set path=%~dp0 :: change CWD to current directory cd /d %path% :: turn printing back on ECHO. :: make sure there is any data at all if "%1" EQU "" goto ENG_ERR :: make sure there is a map name if "%2" EQU "" (goTo MAP_ERR) else set map=%~n2 :: print out the current commandline variables ECHO Label: %1 ECHO -basedir %path% ECHO -game %gamename% ECHO +map: %map% :: determine which engine was chosen if "%1" EQU "darkplaces" goto DP if "%1" EQU "darkplaces_develop" goto DP_DEV if "%1" EQU "fitzquake" goto FQ if "%1" EQU "proquake" goto PQ if "%1" EQU "qbismsuper8" goto QBS8 if "%1" EQU "fteqw" goto FTE if "%1" EQU "qrack" goto QR if "%1" EQU "quakespasm" goto QS if "%1" EQU "directq" goto DQ :: unrecognized label :UNR_ERR ECHO their is no engine path associated with this label: %1 goto END :: there are no commands :ENG_ERR ECHO you didn't specify anything goto END :: no map name was specified :MAP_ERR ECHO you didn't specify a map goto END :: run the commandline that corresponds with the "case" provided by %1 :DP set engine=%path%darkplaces\darkplaces.exe ECHO Engine Path: %engine% %engine% -basedir %path% -game %gamename% +map %map% -width %width% -height %height% -conwidth %conwidth% -conheight %conheight% -window goto END :DP_DEV set engine=%path%darkplaces\darkplaces.exe ECHO Engine Path: %engine% %engine% -basedir %path% -game %gamename% +map %map% -width %width% -height %height% -conwidth %conwidth% -conheight %conheight% -window goto END :FQ set engine=%path%fitzquake\fitzquake085.exe ECHO Engine Path: %engine% %engine% -basedir %path% -game %gamename% +map %map% -width %width% -height %height% -conwidth %conwidth% -conheight %conheight% -window -bpp 32 goto END :PQ set engine=%path%proquake\glpro493.exe ECHO Engine Path: %engine% %engine% -basedir %path% -game %gamename% +map %map% -width %width% -height %height% -conwidth %conwidth% -conheight %conheight% -window -bpp 32 goto END :FTE set engine=%path%fteqw\fteqw.exe ECHO Engine Path: %engine% %engine% -basedir %path% -game %gamename% +map %map% -width %width% -height %height% -conwidth %conwidth% -conheight %conheight% -window goto END :QBS8 set engine=%path%qbismsuper8\qbismS8.exe ECHO Engine Path: %engine% %engine% -nocdaudio -basedir %path% -game %gamename% +map %map% goto END :QR set engine=%path%qrack\glQrack.exe ECHO Engine Path: %engine% %engine% -basedir %path% -game %gamename% +map %map% -width %width% -height %height% -conwidth %conwidth% -conheight %conheight% -window -bpp 32 goto END :QS set engine=%path%quakespasm\quakespasm.exe ECHO Engine Path: %engine% %engine% -nocdaudio -basedir %path% -game %gamename% +map %map% goto END :DQ set engine=%path%directq\DirectQ.exe ECHO Engine Path: %engine% %engine% -basedir %path% -game %gamename% +map %map% -width %width% -height %height% -conwidth %conwidth% -conheight %conheight% -window -bpp 32 goto END :END PAUSE EXIT
To utilize this script is simple:
:> Run.bat "fitzquake" "e1m1"
A menu could be made fairly easy where each engine would be tied to a %choice% and then you are asked to type the mapname. Maybe I'll spin a simple one today. I forgot I can program in this language, and it might be fun to play with it for a minute.
Edit: whoops I forgot to implement the -developer flag in the DP_DEV build. I didn't add it in during this edit cause I don't remember if there is more to it and I don't feel like looking it up.
Edit2: I remember that QubismSuper8 does not like this method at all. I never could get it to run properly. The rest of the engines work fine.




ne,:two,:three) may seem repetitive but, this is because this is not a real world example. Those cases could do very different things, completely different. That's the whole power behind the menu. The case will only be hit by the menu that corresponds and the case knows the exact value of the chosen option (you could make more cases). consider:
Leave a comment: