Sunday, September 27, 2009

Installing Quake 3 Arena Demo on Ubuntu...

1) Download the installer from Id Software
    $ wget ftp://ftp.idsoftware.com/idstuff/quake3/linux/linuxq3ademo-1.11-6.x86.gz.sh
2) Allow the file to be executed as a program
    $ sudo chmod 755 linuxq3ademo-1.11-6.x86.gz.sh
3) Post Dapper, dash is a default shell for Ubuntu. We need to change this to bash before installing the game. To do so, open terminal and at home folder execute the following command and select <No>.
    $ sudo dpkg-reconfigure dash
4) Execute the installer
    $ ./linuxq3ademo-1.11-6.x86.gz.sh -target ~/programs/q3-temp
5) If the installer is returning an error like below
    Warning: unknown mime-type for "archive" -- using "application/*"
    Warning: unknown mime-type for "integrity..." -- using "application/*"
    Error: no such file "-r"
    Error: no such file "-n"
    Error: no such file "Verifying"
    Error: no such file "archive"
    Error: no such file "integrity..."
    tail: cannot open `+6' for reading: No such file or directory
    Warning: unknown mime-type for "-r" -- using "application/*"
    Warning: unknown mime-type for "Error" -- using "application/*"
    Warning: unknown mime-type for "in" -- using "application/*"
    Warning: unknown mime-type for "check" -- using "application/*"
    Warning: unknown mime-type for "sums" -- using "application/*"
    Warning: unknown mime-type for "1808389199" -- using "application/*"
    Warning: unknown mime-type for "1300192087" -- using "application/*"
    Error: no such file "-r"
    Error: no such file "Error"
    Error: no such file "in"
    Error: no such file "check"
    Error: no such file "sums"
    Error: no such file "1808389199"
    Error: no such file "1300192087"
    Press Return to close this window ...
6) Simply execute the command below and re-executing the installer
    $ export _POSIX2_VERSION=199209
7) During the installation, if there's a permission denied error on the targeted bin folder, simply create the folder manually using terminal or nautilus and proceed with the installation
    /
        /home
            /your-username
                /programs
                    /q3-demo
                        /bin
8) Launch the game
    $ programs/q3-demo/q3demo.x86
9) If there's no sound, check sound initialization section from the output, if it's the same as below
    ------- sound initialization -------
    /dev/dsp: Broken pipe
    Could not toggle.
10) Edit bootmisc.sh
    $ sudo gedit /etc/init.d/bootmisc.sh
From
    ...
    case "$1" in
    start|"")
    do_start
    ;;
    ...
to
    ...
    case "$1" in
    start|"")
    do_start
    echo "q3demo.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss
    echo "q3demo.x86 0 0 disable" > /proc/asound/card0/pcm0c/oss
    ;;
    ...
11) Restart your machine (there should be a way to restart the service alone)

12) Launch the game with parameters shown below
    $ programs/q3-demo/q3demo.x86 +set s_musicvolume -1
13) Remove installer temp folder
    $ rm -r programs/q3-temp
14) Change back shell from bash to dash by selecting <Yes>
    $ sudo dpkg-reconfigure dash 
Note:
Installation steps tested on Ubuntu 9.04, 9.10, 10.04 and Linux Mint 7

Update (04/12/2009):
/etc/init.d/bootmisc.sh has been removed from Ubuntu 9.10.

Solution:
Add echo "q3demo.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss into your game launcher script.
    #!/bin/sh
    # Needed to make symlinks/shortcurts work.
    # Run Quake III with some default arguments

    cd "/home/your-username/programs/q3-demo"
    sudo echo "q3demo.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss
    quake="./q3demo.x86"
    "$quake" $*
    exit $?
Update (03/06/2010)
To install on Ubuntu 64 bit, need to add linux32 to the command
    $ linux32 ./linuxq3ademo-1.11-6.x86.gz.sh -target ~/programs/q3-temp
Tested on Ubuntu 10.04 Lucid Lynx 64 bit.

Update (27/08/2010)
If suddenly the sound gone and you couldn't get it back, open terminal and test this command:
    $ sudo echo "q3demo.x86_64 0 0 direct" > /proc/asound/card0/pcm0p/oss
If you're getting this error
    bash: /proc/asound/card0/pcm0p/oss: Permission denied
Just set the correct permission to the file and you're done. Tested on Ubuntu 10.04 Lucid Lynx 64 bit.

Update (18/11/2010)
Installation steps working correctly on Linux Mint 10. However I'm having difficulty executing the binary. Getting error "bash: ./q3demo.x86_64: No such file or directory". Still trying to figure out what went wrong.

Update (19/11/2010)
I almost forgot. Quake 3 Arena demo is a 32 bit application. Since I'm using Linux Mint 64 bit, I need to install 32 bit library to make it work. The library was pre-installed on Ubuntu 64 bit, but that's not the case for Linux Mint. Above issue solved!!!
    $ sudo apt-get install ia32-libs
Now there's one more issue left. The sound. /proc/asound/card0/pcm0p/oss file seems missing.

Update (20/11/2010)
Just found out that the ubuntu developers decided the majority of people don’t need OSS support, so they compiled the kernel without it.

Quake 3 without sound in Ubuntu 10.10
Ubuntu 10.10 no /dev/dsp

Damn!!!

No comments:

Post a Comment