Control: tags -1 +patch Hi Alexandre and Michael,
Am Donnerstag, den 25.06.2015, 06:49 +0200 schrieb Alexandre Detiste: > > I can provide a patch, but this would obviously > conflict with the one linked to #787985. not necessarily. We don't need to set gamemode but can provide a fake IWAD if no "-iwad" parameter was given based on the executable name. This would e.g. make it possible to run "hexen -iwad doom.wad" and it will start Doom, but I think this is somehow expected. The attached patch applies on top of the ones provided in #787985, #788053 and #788058. Cheers, Fabian
diff --git a/debian/doomsday-compat b/debian/doomsday-compat index 998c81d..23ee96f 100755 --- a/debian/doomsday-compat +++ b/debian/doomsday-compat @@ -69,6 +69,21 @@ do cmdline="$cmdline $arg" done +# if no -iwad parameter is given, guess from executable name +if [ -z "$iwadfile" ] +then + case "$(basename $0)" in + heretic) + iwadfile=heretic.wad + iwadpath=$iwaddir/$iwadfile + ;; + hexen) + iwadfile=hexen.wad + iwadpath=$iwaddir/$iwadfile + ;; + esac +fi + case "$(echo $iwadfile | tr '[:upper:]' '[:lower:]')" in doom1.wad) gamemode=doom1-share @@ -138,12 +153,23 @@ case "$(echo $pwadfile | tr '[:upper:]' '[:lower:]')" in ;; esac +# fall back to alternatives if [ $gamemode = "doom2" \ -a ! -f $iwaddir/doom2.wad \ -a ! -f $iwaddir/doom2f.wad \ -a -f $iwaddir/freedoom2.wad ] then gamemode=freedoom2 +elif [ \( $gamemode = "heretic" -o $gamemode = "heretic-ext" \) \ + -a ! -f $iwaddir/heretic.wad \ + -a -f $iwaddir/heretic1.wad ] +then + gamemode=heretic-share +elif [ $gamemode = "hexen" \ + -a ! -f $iwaddir/hexen.wad \ + -a -f $iwaddir/hexendemo.wad ] +then + gamemode=hexen-demo fi if [ -n "$pwadpath" ]
signature.asc
Description: This is a digitally signed message part