Re: The perils of GMAX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/19/2010 11:41 AM, A Nonny Moose wrote:
I guess it is like playing a piano.  [b]No more surface playing[/b].  I just pulled a pile of documentation to read when going to sleep, or trying in this heat.  I am convinced that I need to delve into the WINEPREFIX and other system variables in greater depth.

Is there any reason I couldn't set myself up with a script to create all this stuff, then call the relevant program?  I think it might save a lot of typing since I am going to test the blazes out of this package.  Naturally, I can set up the redirects within the scripts as well to grab whatever happens.

I get your point about running from a user console.

Oh, and a 61 page PDF manual.  I only took a quick look, but it seems very thorough.  Congrats to the author.

Scripts are a great way to control WINE invocation. It only gets a little complicated when you are launching a program that takes arguments, such as the name of a file you wish to open with the program running through WINE. Its also handy to deactivate compiz fusion before starting a 3D game, then starting it up again afterward.

Another caveat I've discovered are programs that do not launch correctly unless WINE is invoked in the installation directory of the program. Scripts can also be used in launchers you create on panels on your desktop or desktop panels. Here is an example script with comments:

---Start Code---
#!/bin/bash

# Simple script to launch Tomb Raider - Legend with WINE

# Stop composite desktop panel
killall -KILL avant-window-navigator

# Switch to non-composite window management (GTK desktop)
metacity --replace &

# Change working directory, tra.exe will not launch otherwise!!!
cd ${HOME}/wine/trl/drive_c/Program\ Files/Tomb\ Raider\ -\ Legend/

# Set WINEPREFIX, disable debugging for performance, lanuch game;
# backslashes allow commands to stretch over multiple lines!
WINEPREFIX=${HOME}/wine/trl \
WINEDEBUG=-all \
wine trl.exe

# Switch back to composite window management
compiz --replace ccp &

# Start composite desktop panel
avant-window-navigator
---End Code---

You don't have to use all of the stuff I've included here. The most important part is the launch command starting with WINEPREFIX. Note that if you are having problems with your program, you will need to omit the WINEDEBUG setting and launch the program from the terminal to get debugging info with which to file a bug.

If you start using WINEPREFIX and shell scripts to launch programs, the next thing you are going to notice is that you won't get the program icons for launchers you make from the scripts. This can be done manually by ripping the icons from the Windows binary file and copying them to an appropriate directory. I keep them in their own folder in my home directory. Then you can assign the correct icon to your desktop launcher.

To rip the icons, you need the icoutils package from your distribution's package manager. The command to rip the icons is:

$ wrestool -x <filename>

Where filename is the .exe file that launches your program. BEWARE: wrestool will rip ALL resource files embedded in the binary, so I recommend unpacking them in a controlled directory, e.g.

$ wrestool -x <filename> -o $HOME/icons

Where "icons" is a folder in your home directory. After you do this you will have to view each file manually to identify the proper icon for the program. Sometimes the icons are pretty low-res, so you may wish to find alternatives on the Internet. Not all programs keep their icons as an embedded resource either, so look around the installation path for .ico files or folders, too.


	Bryan



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux