Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant start ioquake3 when pak file names is not lower cased #2

Open
DeivAstra opened this issue Oct 24, 2023 · 4 comments
Open

Cant start ioquake3 when pak file names is not lower cased #2

DeivAstra opened this issue Oct 24, 2023 · 4 comments
Assignees

Comments

@DeivAstra
Copy link

DeivAstra commented Oct 24, 2023

Hello,

I meet a problem.
My quake3 files named in upper case, so I got error message "ioquake3 needs the official Quake 3...".
For examples pak0.PAK3 or PAK0.PAK3 .. etc.
In fact that quake3 ignores file names case, so I think that changing startup script is good deal.

I have modified ioquake3 bash script to avoid the problem and add some improvements.
Hope that the fixed script will commited to upstream. Thanks a lot!

#!/bin/bash
 
# Copyright 2021 Mattias Bengtsson <mattias.jc.bengtsson@gmail.com>
# SPDX-License-Identifier: GPL-3.0-or-later

BASEQ3_HOME=${XDG_DATA_HOME}/baseq3

echo "BASEQ3_HOME = ${BASEQ3_HOME}"

function error-message {
    local pak_name=${1}
    cat << EOM
File ${pak_name} not found!

ioquake3 needs the official Quake 3 .pk3-files to function
properly (specifically baseq3/pak0.pk3 … baseq3/pak8.pk3).

One way to obtain these files is to buy Quake 3 Arena on
Steam, and extract the files from the installation directory.

Once you have obtained the files, copy them to:

    ${BASEQ3_HOME}/

… and restart ioquake3
EOM
}

# Ensure ioquake3 reaches our pak-files and configs.
ln -ns "${XDG_DATA_HOME}" "${HOME}/.q3a"

mkdir -p "${XDG_DATA_HOME}"/{baseq3,missionpack}

function check_pak_files_icase {
    for i in $(seq 0 8); do
        local pak_name="pak${i}.pk3"
        echo -n "Check ${pak_name} .. "
        if [[ -n $(find ${BASEQ3_HOME} -maxdepth 1 -iname ${pak_name}) ]]; then
            echo "OK";
        else
            echo "Not found!"
            show_error_dialog ${pak_name}
            exit 2
        fi
    done
}

function show_error_dialog {
    local pak_name=${1}
    zenity --error      \
           --width=400  \
           --height=200 \
           --text="$(error-message ${pak_name})"
}

check_pak_files_icase

/app/games/quake3/ioquake3 "${@}"
@DeivAstra DeivAstra changed the title Cant start ioquake3 when pak file names in not lower cased Cant start ioquake3 when pak file names is not lower cased Oct 24, 2023
@AsciiWolf
Copy link
Collaborator

Good point. :) Thanks for reporting this.

@AsciiWolf AsciiWolf self-assigned this Oct 26, 2023
@DeivAstra
Copy link
Author

DeivAstra commented Oct 26, 2023

@AsciiWolf Also Quake 3 is not sold on the Steam platform. I found offer on the gog.com, https://www.gog.com/en/game/quake_iii_arena, but maybe better delete text about that - "One way to obtain these files is to buy Quake 3 Arena on Steam"

@AsciiWolf
Copy link
Collaborator

I see it on Steam: https://store.steampowered.com/app/2200/Quake_III_Arena/

@DeivAstra
Copy link
Author

Steam region restrictions filtered offer for me ). Ok, then no problem there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants