Page 1 of 1

Command-line GZDoom Windows batch script generator

PostPosted: Thu Sep 10, 2020 6:35 am
by i2van
Command-line GZDoom Windows batch script generator.

Generates editable dbsg-<game>.bat where <game> is a game file.

Generated script can accept user parameters.

Project site

FEATURES

  • Generates editable Windows batch GZDoom command-line launch script.
  • User can control generation using custom configuration.
  • Should work with any GZDoom compatible port.
  • Generated script can be easily customized.
  • Generated script is portable.
  • Generated script can accept user parameters.
  • Last saved game can be loaded on startup.
  • Generated script can set own last write time to launch time.
  • Generated script -w switch performs Wad Archive game search.
  • Generated script -g switch Googles game.
  • Generated script -c switch opens GZDoom command line parameters help.

SCRIPTS

HELP

Spoiler: dbsg.bat


CONFIG

Spoiler: dbsg-config.bat


GENERATED SCRIPTS EXAMPLES

Spoiler: dbsg-doom2.bat: dbsg.bat -w doom2.wad


Spoiler: dbsg-dead-air_v2.bat: dbsg.bat dead-air_v2.pk3


USAGE

Copy script and game files to GZDoom dir first.

Code: Select allExpand view
dbsg.bat [-w] game [config.bat]


PARAMETERS

Code: Select allExpand view
-w             game is standalone, e.g. doom2.wad, etc.
game           any supported game (wad, pk3, zip, etc.).
config.bat     user batch config. If not specified 'dbsg-config.bat' will be used.


CONFIG

User batch config is executed first. The following variables are supported:

Code: Select allExpand view
doom           GZDoom executable. 'gzdoom.exe' is default.
doomConfig     GZDoom user configuration. 'gzdoom-%USERNAME%.ini' is default.
wad            main wad.
mods           mods (wad, pk3, zip, etc.).
deh            DEH patch.
bex            BEX patch.
savedir        savegames subdir. 'saves' is default.
shortdir       screenshots dir. 'screenshots' is default.
params         any parameters.
loadLast       load last save if set.
saveExt        save extension. 'zds' is default.
scriptPrefix   generated script prefix. '%%scriptName%%-' is default. "" for no prefix.
updateLaunch   updates last script launch time if set. set in config by default.


EXAMPLES

Edit generated script if you have any additional files.


GENERATED SCRIPT

Run script to launch the game. Any GZDoom parameters are accepted as script parameters if no script specific switches are specified.

COMMAND LINE

Switches are mutually exclusive, only one at a time:

Code: Select allExpand view
-w             Wad Archive game search.
-g             Google game search.
-c             open GZDoom command line help.


KNOWN ISSUES

Names with spaces, percent and culture-specific characters may not be handled properly.