• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

SoF starthilfe

gosh

Newbie
mahlzeit, hab SoF (soldier of fortune) installiert kriegs allerdings nich gestartet weil folgende fehlermeldung kommt:

Code:
Couldn't run Soldier of Fortune (sof-bin). Is SOF_DATA_PATH set?

irgendjemand einen plan???

:)[/quote]
 

Dr. Glastonbury

Advanced Hacker
Hi,
du musst das Script raussuchen, das du startest (ich vermute mal, du gibst zum starten `sof' ein - dann gib mal `whereis sof' ein und schon haste den Pfad zum Script).

Dieses Script musste dann öffnen und nach "SOF_DATA_PATH" suchen. Wenn du den Gefunden hast muss hier der Pfad zu SOF rein (sollte sowas wie /usr/local/games/sof sein). Ich weiß aber nicht, wohin du das installiert hast - aber ET und Unreal liegen da...

Dann speichern und nochmal probieren - jetzt sollte das ganze gehn ;)
 
OP
G

gosh

Newbie
jup, das ging fix, danke :)

ja habs auch gefunden nur mach ich da irgendwie einen fehler... ( hab jetzt überall mal das SoF verzeichnis eingesetzt wo "sof_data_path" stand, sieht folgendermaßenaus:

hier der code

Code:
#!/bin/sh

# Function to find the real directory a program resides in.
# Feb. 17, 2000 - Sam Lantinga, Loki Entertainment Software
FindPath()
{
    fullpath="`echo $1 | grep /`"
    if [ "$fullpath" = "" ]; then
        oIFS="$IFS"
        IFS=:
        for path in $PATH
        do if [ -x "$path/$1" ]; then
               if [ "$path" = "" ]; then
                   path="."
               fi
               fullpath="$path/$1"
               break
           fi
        done
        IFS="$oIFS"
    fi
    if [ "$fullpath" = "" ]; then
        fullpath="$1"
    fi
    # Is the awk/ls magic portable?
    if [ -L "$fullpath" ]; then
        fullpath="`ls -l "$fullpath" | awk '{print $11}'`"
    fi
    dirname $fullpath
}

if [ "${/usr/local/games/sof}" = "" ]; then
        /usr/local/games/sof=`FindPath $0`
fi

# First needed for libTitan.so. Last needed for stupid
# crap in the game like "./ref_gl.so", etc.
LD_LIBRARY_PATH=${/usr/local/games/sof/}:.

export SOF_DATA_PATH
export LD_LIBRARY_PATH

if [ -x "${/usr/local/games/sof}/sof-bin" ]; then
    exec ${/usr/local/games/sof}/sof-bin $*
fi

echo "Couldn't run Soldier of Fortune (sof-bin). Is SOF_DATA_PATH set?"
exit 1

krieg jetzt aber folgenden fehler:
linux:/usr/local/games/sof # sof
/usr/local/bin/sof: line 32: ${/usr/local/games/sof}: bad substitution
/usr/local/bin/sof: line 36: ${/usr/local/games/sof/}:.: bad substitution
/usr/local/bin/sof: line 41: ${/usr/local/games/sof}/sof-bin: bad substitution
Couldn't run Soldier of Fortune (sof-bin). Is SOF_DATA_PATH set?
linux:/usr/local/games/sof #


mh, die dateien, die er sucht (lib.so) sind auch im usr/logal/games/sof verzeichnix, wo also liegt mein fehler?
 

Dr. Glastonbury

Advanced Hacker
Hi,
so stimmt das noch nicht ganz^^
aber liegt an mir - hab mich unklar ausgedrückt - das SOF_DATA_PATH ist eine Variable, die du mit SOF_DATA_PATH="/usr/local/games/sof" festlegen musst.

Also nimm die originalversion des Scripts (ich hoffe, die ist noch vorhanden^^), und schreib die eine Zeile um:

Code:
if [ "${SOF_DATA_PATH}" = "" ]; then
        SOF_DATA_PATH="/usr/local/sof"
fi
Wenn du also jetzt tatsächlich jedes SOF_DATA_PATH gegen /usr/local/games/sof getauscht hast, dann sollte die Ziele, wie ich sie oben geschrieben hab stimmen. ;)
 
Oben