Editing startup script

Talk about everything.
Post Reply
Gast

Editing startup script

Post by Gast » Fri Dec 16, 2005 23:01

I am using wine to run some games. There is a wine commandline option to turn off debug messsages, which is supposed to make games run a little faster (WINEDEBUG="-all").

the normal syntax is 'WINEDEBUG="-all" wine <appname.exe>' (no quotes). But I don't know where to add WINEDEBUG="-all" in the startup script. Here is the farcry script (as one example) -

Code: Select all

#!/bin/sh
###############################################################################
#
## LIFLG Startup Script
#
###############################################################################
#
# The game binary
GAME_BINARY="FarCry.exe"

# Subdirectory
SUBDIR="Bin32"

# Which wine do you want to use?
WINE_NAMES="wine"

###############################################################################
## DO NOT EDIT BELOW THIS LINE
###############################################################################
readlink() {
    local path=$1 ll
        
    if [ -L "$path" ]; then
        ll="$(LC_ALL=C ls -l "$path" 2> /dev/null)" &&
        echo "${ll/* -> }"
    else
        return 1
    fi
}

script=$0
count=0

while [ -L "$script" ]  
do
    script=$(readlink "$script")
    count=`expr $count + 1`

    if [ $count -gt 100 ]  
    then
       	echo "Too many symbolic links"
       	exit 1
    fi
done

GAME_DIR=`dirname $script`

if [ -z "$WINE_EXEC" ]
then
	WINE_EXEC=`type -p $WINE_NAMES | head -n 1`
fi


if [ -e "$WINE_EXEC" ]
then
	cd $GAME_DIR
	cd $SUBDIR
	$WINE_EXEC $GAME_BINARY "$@" &
	sleep 2 &&
	renice 15 -p `pgrep wineserver`
else 
	echo "Wine(X)/Cedega not in your PATH"
	exit 1
fi 
Can you show me where exactly to put WINEDEBUG="-all" please?

btw, I am having better success with farcry under wine 0.9 than with cedega. It's still crashing (posted about this a while ago), but at least all the ingame movies work! :)

kratz00
liflg member
Posts: 1662
Joined: Fri Oct 22, 2004 16:23

Post by kratz00 » Fri Dec 16, 2005 23:09

maybe try this:

change WINE_NAMES="wine" to

WINE_NAMES="WINEDEBUG=\"-all\" wine"

Gast

Post by Gast » Fri Dec 16, 2005 23:57

Didn't make any difference. Neither did -

WINE_NAMES="WINEDEBUG="-all" wine"

or

WINE_NAMES=""WINEDEBUG="-all"" wine"

But I'm just guessing.

Any other ideas?

btw I have tried this from the commandline after browsing to the farcry directory (in other words, not using the script) and it does work - wine runs a lot 'quieter' this way.

kratz00
liflg member
Posts: 1662
Joined: Fri Oct 22, 2004 16:23

Post by kratz00 » Sat Dec 17, 2005 0:04

did you missed the \ (backslashs) to escape the inner quotes?

Gast

Post by Gast » Sat Dec 17, 2005 0:44

kratz00 wrote:did you missed the \ (backslashs) to escape the inner quotes?
you mean leave the backslashes out? yes, I tried that. To be clear, though, can you write the "WINE_NAMES=" line in the way that you mean here? THanks.

kratz00
liflg member
Posts: 1662
Joined: Fri Oct 22, 2004 16:23

Post by kratz00 » Sat Dec 17, 2005 1:36

with the backslashes like I wrote

WINE_NAMES="WINEDEBUG=\"-all\" wine"

if it's not working try

WINE_NAMES="WINEDEBUG=-all wine"

Gast

Post by Gast » Sat Dec 17, 2005 3:35

No, that doesn't work either. Still getting loads of messages :(

Maybe edit some other part of the file?

kratz00
liflg member
Posts: 1662
Joined: Fri Oct 22, 2004 16:23

Post by kratz00 » Sat Dec 17, 2005 12:33

whats with

WINE_NAMES="wine --debugmsg -all "

Gast

Post by Gast » Sat Dec 17, 2005 16:06

No, not working. It seems like such a simple thing to add :?:

Maybe "WINE_EXEC" line should be changed somehow??

kratz00
liflg member
Posts: 1662
Joined: Fri Oct 22, 2004 16:23

Post by kratz00 » Sat Dec 17, 2005 16:12

strange

if you change in the proper directory and run

wine --debug-msg -all FarCry.exe

does this work?

Gast

Post by Gast » Sat Dec 17, 2005 16:57

No, I get this - wine: cannot find '--debug-msg'.

The original WINEDEBUG.... works this way, though - not one message gets displayed.

Maybe 'wine --debug-msg -all' is from an old version of wine? WINEDEBUG.... is from the current wine user guide, however...

kratz00
liflg member
Posts: 1662
Joined: Fri Oct 22, 2004 16:23

Post by kratz00 » Sat Dec 17, 2005 17:13

i see

last attempt :)


WINE_NAMES="wine"

....

export WINEDEBUG=-all
$WINE_EXEC $GAME_BINARY "$@" &

Gast

Post by Gast » Sat Dec 17, 2005 19:06

Great, it worked! :) The only message that comes is the renice notification, which of course is in the script!

Bearing in mind that it should be -

export WINEDEBUG="-all"
$WINE_EXEC $GAME_BINARY "$@" &

Also, as this may help other users, perhaps you should make some kind of sticky thread how-to? Should also say of course that this extra command should only be run once you have a game working properly, and can be removed again if new problems arise, so that you can get the debug output.

Thanks a lot for the help! :)

kratz00
liflg member
Posts: 1662
Joined: Fri Oct 22, 2004 16:23

Post by kratz00 » Sat Dec 17, 2005 22:20

Thank God! :)

you are right but if it's only "-all" you don't need the quotation marks

fell free to open a new thread and write a little howto and if it's ok i will make it sticky

Gast

Post by Gast » Sun Dec 18, 2005 21:58

kratz00 wrote:fell free to open a new thread and write a little howto and if it's ok i will make it sticky
OK, I'm happy to do that. Would it best perhaps if I put it in the wine/cedega forum?

Also, will this edit work on all the startup scripts? Is the section where you put the WINEDEBUG... line the same in all of them?...

Post Reply