Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wine and bash scripts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
chromaf
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2013
Posts: 79

PostPosted: Thu Oct 24, 2013 8:30 am    Post subject: Wine and bash scripts Reply with quote

Hi ! I'm currently running Path Of Exile with great success ! With wine 1.6, kernel 3.11.5.

I have made an script to execute the game without going trough the strugglish windows-like path that wine creates. Problem is that the script is being executed on /home/cf/launchers and wine thinks the game is there. It executes the game, but starts making logs and looking for files there and it results on a no-go. What can I do to make the script so it's like executing it on the directories game ?

Thanks !
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Thu Oct 24, 2013 10:01 am    Post subject: Reply with quote

Probably want e.g.: export WINEPREFIX=$HOME/.wine-mygame
Back to top
View user's profile Send private message
chromaf
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2013
Posts: 79

PostPosted: Thu Oct 24, 2013 12:48 pm    Post subject: Reply with quote

I do this on the bash script :

Code:

#!/bin/bash
export WINEPREFIX=$HOME/.wine/drive_c/"Program Files (x86)"/"Grinding Gear Games"/"Path of Exile"
wine "PathofExile.exe"                                                                                 


But a nasty error from the game itself comes up when I execute it. Can't run-
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Thu Oct 24, 2013 1:15 pm    Post subject: Reply with quote

cd to the correct directory, before running wine.
Back to top
View user's profile Send private message
chromaf
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2013
Posts: 79

PostPosted: Thu Oct 24, 2013 2:05 pm    Post subject: Reply with quote

Game launch crashes and I got this error :

http://codepaste.net/zvwfkk

When I run it from it's directory by hand, it runs great ...

Thanks !
Back to top
View user's profile Send private message
Chiitoo
l33t
l33t


Joined: 28 Feb 2010
Posts: 983
Location: Here and Away Again

PostPosted: Fri Oct 25, 2013 2:56 pm    Post subject: ><)))°€ Reply with quote

Teegrins, chromaf!


Many applications indeed don't like to run from a working directory away from home. This is one of the ways I have my Wine shortcuts set up:

Code:
bash -c "cd '/path/to/the application' && WINEDEBUG=-all WINEPREFIX=/path/to/the/prefix schedtool -I -e wine application.exe &"

Edit:

Poor choice of words there, oops!

By “home” I meant the place the application is living at; the installation path/directory (not $HOME or ~/).
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.


Last edited by Chiitoo on Sun Oct 27, 2013 3:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
ryo-san
l33t
l33t


Joined: 17 Feb 2005
Posts: 729

PostPosted: Sat Oct 26, 2013 5:54 am    Post subject: Reply with quote

chromaf wrote:
I do this on the bash script :

Code:

#!/bin/bash
export WINEPREFIX=$HOME/.wine/drive_c/"Program Files (x86)"/"Grinding Gear Games"/"Path of Exile"
wine "PathofExile.exe"                                                                                 


But a nasty error from the game itself comes up when I execute it. Can't run-


hi,

This is not a WINEPREFIX. wine is expecting some files.It looks like this :
Code:

drwxr-xr-x 2 ryo users    4096 18 oct.  06:51 dosdevices
drwxr-xr-x 5 ryo users    4096 20 sept. 20:07 drive_c
-rw-r--r-- 1 ryo users 1062526 25 oct.  23:01 system.reg
-rw-r--r-- 1 ryo users    2122 20 sept. 19:58 userdef.reg
-rw-r--r-- 1 ryo users   45326 25 oct.  23:01 user.reg
-rw-r--r-- 1 ryo users     165  9 oct.  12:23 winetricks.log


so what you want to do is :

Code:

export WINEPREFIX="$HOME/.wine" some_commands


or

Code:
 
export WINEPREFIX="$HOME/.wine"
PATH_TO_EXE="drive_c/Program Files (x86)/Grinding Gear Games/Path of Exile"

cd "$WINEPREFIX/$PATH_TO_EXE"
wine PathofExile.exe


PS: why so many quotes ?

Quote:
Many applications indeed don't like to run from a working directory away from home

8O :?:
Back to top
View user's profile Send private message
Chiitoo
l33t
l33t


Joined: 28 Feb 2010
Posts: 983
Location: Here and Away Again

PostPosted: Sat Oct 26, 2013 6:18 pm    Post subject: Reply with quote

ryo-san wrote:
Quote:
Many applications indeed don't like to run from a working directory away from home

8O :?:

Referring to the “cd to the path where the executable is before running it”, where “home” is the place the executable is.
Not $HOME, if that's what you were thinking.

Sorry for my bad choice of words there. ^^;
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum