Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
ducon

linux wad launcher

Recommended Posts

Hello,

I don't play Doom in Windows but in Debian Sarge GNU/Linux; when I download a nice zip I can't use the batch that's in it. So I wrote a simple perl script and 296 bash shell scripts.
Each shell script is equivalent to a DOS batch script and it invoques the perl script (doomloader.pl) with several options, special to the wad, the iwad, the doc, the hardness and so on.
For eaxmple 10yearsofdoom.sh is:

#!/bin/bash

IWADDIR=/usr/share/games/doom
WADDIR=/usr/local/share/games/doom

exec doomloader.pl -iwad $IWADDIR/doom.wad -file $WADDIR/wadoom/10years/10years.wad --dlreadme $WADDIR/wadoom/10years/10years.txt --dlep 3 --dllev 4 --dlhard --dltext "Happy 10 years, DOOM!" --dlnodm $*

The scripts explains that this wad and its doc must be in /usr/local/share/games/doom/wadoom/10years/.
So if you want to play 10 years of doom, just hit « 10yearsofdoom.sh », if you want to run legacy instead of lxdoom, add « --dlport llxdoom » and if you want to read the doc, add « --dlwadinfo ».
I coded just the wads I liked and the ones that work on my machine (no ZDoom).
I packed it in a tgz (http://ellisllk.lautre.net/jeu/doomlike/doomloader.0.10.4.tgz) and in a deb for Sarge (http://ellisllk.lautre.net/jeu/doomlike/doomloader_0.10.4_all.deb).
The packages are tiny (41 kO and 34 kO).
There's no GUI, I don't know how to.

ducon

Share this post


Link to post

Why don't you use cases for shell shortcuts like:
> doomloader.sh -wad 10years -play mydemo

#!/bin/bash
init_variables()
{
IWWADDIR=" "
WADDIR=" "
WAD=" "
PLAY=" "
while [ "$1" != "" ]; do
case $1 in
-wad) WAD=$2
shift
shift
continue;;
-play) PLAY=$2
shift
shift
continue;;
*)
;;
esac
done
grep $WAD /usr/local/share/games/wadlist` > /usr/local/share/games/wadlist-temp
wad_var=`cat /usr/local/share/games/wadlist-temp | awk '{print $2}'`
if $wad_var = lxdoom; then
exec doomloader.pl -iwad $IWADDIR/doom.wad -file $WADDIR/wadoom/10years/10years.wad --dlreadme $WADDIR/wadoom/{$WAD}/{$WAD}.txt --dlep 3 --dllev 4 --dlhard --dlnodm
#add embedded if loop for -playdemo
fi

or something like that, so you don't need 200 scripts.
just a thought.

Share this post


Link to post
DEMOn said:

Why don't you use cases for shell shortcuts like:
> doomloader.sh -wad 10years -play mydemo

or something like that, so you don't need 200 scripts.
just a thought.


Yeah, good idea but each script contains an info about the wad (toughness, levels and so on) and if your wad is somewhere else, just change the script. And the Doom 2 files are in wadoom2, the Heretic, Quake and Quake 2 ones are somewhere else.
And I prefer typing « hellrevealed.sh », it works with bash completion.
To play a demo, just add « -playdemo mydemo.lmp ». All the port options (ie the one that the perl script does not recognise) are passed through.

Share this post


Link to post

I've just run lintian on my Debian package. Damn, it was crap. Now it is OK, the 0.11.0 version fixes all that but it adds a lot of (fake) manpages.

Share this post


Link to post

There was a shell called lsh which emulated the dos shell but I cant seem to find it now. I dont know if it does scripts but it might work a bit better than your system.

Share this post


Link to post

I know my system is very heavy (because I'm no good programmer) but there's no doom.exe in linux and it's integrated in my linux system.
I think that something like fortune (or the DEBIAN/control in deb packages) may be simpler, a single file contains all the scripts, they're separated with %; and this file is read by doomloader.pl.
But I don't know how to code it, I made what I was able to.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×