Tip for getting games to run in WINE 1.7

Questions about Wine on Linux
Locked
tkoco
Level 1
Level 1
Posts: 6
Joined: Sun Sep 21, 2008 1:37 am

Tip for getting games to run in WINE 1.7

Post by tkoco »

I am currently running Linux Mint 15 and had problems getting older games to run from a desktop icon. After much troubleshooting, I came across a method which works well and wanted to share it with you. The goal was to get the game to run without a lot of trouble.

First I checked the WINE HQ appdb and make sure the game was listed as Silver or Gold rating. Due to the executable flag being inhibited by default in current Linux distros, I copied over the CD contents to a separate directory in the home directory and set the executable permission for the "setup.exe" program. I then installed the game using the "setup.exe". Of course, the installed menu listing/icon for the game would bomb out with all kinds of errors.

The tip:

I first created a link in the home directory to the directory where the game was installed (within the WINE directory structure).
Example:
I installed the "Tone Rebellion" and then created a link called "Tone" in my home directory which points to the "~/.wine/c_drive/Program Files/Tone" directory. Then I created a shell script called "Tone-Reb.sh" on my desktop like this (use your home directory instead of the stars which I have listed below):

Code: Select all

#!/bin/sh
env WINEPREFIX="/home/******/.wine" wine C:\\windows\\command\\start.exe /Unix /home/******/Tone/float.exe
Note the absolute path instead of a relative path.

And then I set the executable permission for the shell script. When I click on the script icon, it will ask if I want to view or run it. I simply answer with Run. For Tone Rebellion, you would need to drag the screen to the upper left position to get the starting screen of the game.

I've tried this method with other games and have been successful so far. Good luck and hopefully this work-around will help you get the older games up and running.
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: Tip for getting games to run in WINE 1.7

Post by oiaohm »

tkoco you are correct on the full paths bit bit you have made a mistake. For dependability don't use Unix random paths. Use windows full paths or full paths unix paths going into wine prefix to dosdevices then on to file. Why 1 folder in unix might have more than 1 wine assigned drive letter. If you don't tell wine the drive letter exactly you are asking it to guess..

This is a safe windows path example.

Code: Select all

#!/bin/sh
env WINEPREFIX="/home/******/.wine" wine C:\\windows\\command\\start.exe  C:\\Program\ Files\\Tone\\float.exe
This is a safe unix path example.

Code: Select all

#!/bin/sh
env WINEPREFIX="/home/******/.wine" wine C:\\windows\\command\\start.exe  /unix /home/******/.wine/dosdevices/c:/Program\ Files/Tone/float.exe
The single line execute line can be placed inside a freedesktop .desktop file so you can assign an icon as well.

A wine generated desktop file minor edited removing my home computers username. Yes everywhere with xxxxx was my home user.

Code: Select all

[Desktop Entry]
Name=Mozilla Firefox
Exec=env WINEPREFIX="/home/xxxxx/.wine" wine C:\\\\windows\\\\command\\\\start.exe /Unix /home/xxxxx/.wine/dosdevices/c:/users/Public/Desktop/Mozilla\\ Firefox.lnk
Type=Application
StartupNotify=true
Path=/home/xxxxx/.wine/dosdevices/c:/Program Files/Mozilla Firefox
Icon=F0E6_firefox.0
Notice the dosdevices/c: bit that is being used by default by wine and my unix path example. This allows wine to know from a unix path that this is referring to C: not some other random drive. No desdevices bit in your unix path you are asking wine to guess. Wine is a fairly good at guessing but its not perfect. Guessing the wrong drive letter can break some applications.
tkoco
Level 1
Level 1
Posts: 6
Joined: Sun Sep 21, 2008 1:37 am

Re: Tip for getting games to run in WINE 1.7

Post by tkoco »

Oh wise one, I already tried the "safe" method which you have outlined here. For some reason, it will not work as advertised. That is why I used symbolic links to complete the "safe" Unix path. For some reason, the symbolic links method works flawlessly whereas spelling out the full path (as you have done) does not work. Could be some sort of issue with Linux Mint and by extension, possibly Ubuntu as well since Linux Mint is based from Ubuntu.
Also, thank you for the information on setting up a desktop file. Looks like it will be better than what I currently use.

Initially after installing games, I would be forced to drill down to the directory where the game was installed and click on the game icon (gui method). Got tired of having to do that and looked into getting a desktop icon to work. I figured that I could not be the sole person encountering this issue. Does that make sense?
oiaohm wrote:tkoco you are correct on the full paths bit but you have made a mistake. For dependability don't use Unix random paths. Use windows full paths or full paths unix paths going into wine prefix to dosdevices then on to file. Why 1 folder in unix might have more than 1 wine assigned drive letter. If you don't tell wine the drive letter exactly you are asking it to guess..

This is a safe windows path example.

Code: Select all

#!/bin/sh
env WINEPREFIX="/home/******/.wine" wine C:\\windows\\command\\start.exe  C:\\Program\ Files\\Tone\\float.exe
This is a safe unix path example.

Code: Select all

#!/bin/sh
env WINEPREFIX="/home/******/.wine" wine C:\\windows\\command\\start.exe  /unix /home/******/.wine/dosdevices/c:/Program\ Files/Tone/float.exe
The single line execute line can be placed inside a freedesktop .desktop file so you can assign an icon as well.

A wine generated desktop file minor edited removing my home computers username. Yes everywhere with xxxxx was my home user.

Code: Select all

[Desktop Entry]
Name=Mozilla Firefox
Exec=env WINEPREFIX="/home/xxxxx/.wine" wine C:\\\\windows\\\\command\\\\start.exe /Unix /home/xxxxx/.wine/dosdevices/c:/users/Public/Desktop/Mozilla\\ Firefox.lnk
Type=Application
StartupNotify=true
Path=/home/xxxxx/.wine/dosdevices/c:/Program Files/Mozilla Firefox
Icon=F0E6_firefox.0
Notice the dosdevices/c: bit that is being used by default by wine and my unix path example. This allows wine to know from a unix path that this is referring to C: not some other random drive. No dosdevices bit in your unix path you are asking wine to guess. Wine is a fairly good at guessing but its not perfect. Guessing the wrong drive letter can break some applications.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Tip for getting games to run in WINE 1.7

Post by dimesio »

tkoco wrote:Could be some sort of issue with Linux Mint
If the links generated by winemenubuilder didn't work on your system, it is probably this upstream bug: http://bugs.winehq.org/show_bug.cgi?id=27706.
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: Tip for getting games to run in WINE 1.7

Post by oiaohm »

tkoco I am sorry to say what I said was correct just I had not allowed for particular distribution issues caused by default shell selection.

Code: Select all

env WINEPREFIX="/home/******/.wine" wine "C:\windows\command\start.exe"  /unix "/home/******/.wine/dosdevices/c:/Program Files/Tone/float.exe"
Some you are required to quote everything. It does not change the fact unix path containing dosdevices/*driveletter*: is required so wine selects the right drive every time.

Instead of using #!/bin/sh generic under mint using #!/bin/bash will with some of the processing bugs. Yes posix shells are meant to respect \*space* being a space mint default shell has a habit of being posix incompatible. There are others were using "" around a section fails as well. Distro particular bugs are a pain.
tkoco
Level 1
Level 1
Posts: 6
Joined: Sun Sep 21, 2008 1:37 am

Re: Tip for getting games to run in WINE 1.7

Post by tkoco »

Please reread this thread. At no time did I say anything about you being correct or not. So, please do not take it personal. I simply stated that I had tried coding the script the way that you had outlined. When I ran it, the script failed. And through our exchanges, it appears that the failure is due to a bug in my distro.

Anyhow, you appear to be missing the point of this message thread. The thread is supposed to be about getting a clickable working icon on the desktop to start an installed Windows game using WINE in a Linux distro.

Are you volunteering to write a tutorial?
oiaohm wrote:tkoco I am sorry to say what I said was correct just I had not allowed for particular distribution issues caused by default shell selection.

Code: Select all

env WINEPREFIX="/home/******/.wine" wine "C:\windows\command\start.exe"  /unix "/home/******/.wine/dosdevices/c:/Program Files/Tone/float.exe"
Some you are required to quote everything. It does not change the fact unix path containing dosdevices/*driveletter*: is required so wine selects the right drive every time.

Instead of using #!/bin/sh generic under mint using #!/bin/bash will with some of the processing bugs. Yes posix shells are meant to respect \*space* being a space mint default shell has a habit of being posix incompatible. There are others were using "" around a section fails as well. Distro particular bugs are a pain.
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: Tip for getting games to run in WINE 1.7

Post by oiaohm »

tkoco I was not taking it as you getting up me. I was kicking myself. I was the support person who sent that mint user to submit this http://bugs.winehq.org/show_bug.cgi?id=27706 bug. So how could I forget it existence. You did state you distribution and I should have got it right first time.

So I should have known that you would hit that issue using Mint and should have written my instructions allowing on it.

In a random a Linux distro requires allowing for the bug that they have. Shells not accepting space in file names except under particular conditions. Some require the \ before space some require the string in "" and some just to be really really annoying ''. Of course in a not broken shell any 1 of the 3 should work and mixed combinations should work.

There are some other cases where distributions just to be nasty will not support a executable

tkoco so from what you know now you should be able to write a exactly working tutorial. I am not the best at writing tutorials.

tkoco I did not miss the point of the thread. If you miss the dosdevices bit your application will lead to some application installs being broken. Some applications don't like being run on two different drive letters. Works most of the time but the ones where it does not work are complete disasters. That error in your instructions had to be fixed.
Locked