HOWTO run Half-Life using WINE

in

轉貼來源︰ http://lhl.linuxgames.com/howto/half-life-HOWTO-0.5.html


HOWTO run Half-Life using WINE

David Hammerton

Adam Torgerson

Lars Munch

Version 0.5, September 23rd 2002

Revision History
Revision 0.5 2002-09-23 Revised by: Adam
Updated my email, changed a bunch of stuff.
Revision 0.4.1 2001-06-03 Revised by: David
Updated my email address and a few out-of-date things changed.
Revision 0.4 2001-06-01 Revised by: Lars
Changed document style to Docbook SGML 4.1. Generate the document as described in: Using ldp.dsl
Revision 0.3 2001-03-19 Revised by: Adam
I mostly fixed grammatical errors, I added some stuff in the OpenGL troubleshooting section and sound section, and generally cleaned it up a bit. There is a little note for you down in the sound troubleshooting section so take a look at that definately. Also I know *nothing* about SGML so I just opened the file, saw that it looked like HTML, and went at it. If I screwed things up let me know.

This HOWTO will help guide most people through setting up Half-Life to run at a very usable state under Linux or other un*x's using WINE.

Table of Contents
1. Introduction
1.1. Introduction
1.2. Acknowledgments
1.3. License
1.4. Latest Version
2. Doing It
2.1. Requirements
2.2. 3D
2.2.1. General installation
2.2.2. NVidia users
2.2.3. 3DFX users
2.2.4. G400 users
2.2.5. Other DRI users
2.3. Installing WINE
2.4. Installing Half-Life
2.5. Running and setting up Half-Life
2.6. Playing mods
3. Troubleshooting
3.1. Sound problems
3.1.1. Sound laggs a bit
3.1.2. No sound at all
3.1.3. No radio sounds in CS
3.2. Graphics problems
3.2.1. Messy fonts
3.2.2. Graphicks flicker a lot and/or walls are see through
3.2.3. Doesnt run full screen?
3.2.4. Half-Life is considerably dark
3.2.5. XFree86 dies when I start Half-Life
3.2.6. The supported OpenGL mode is not supported by your video card
3.3. Miss gamespy?
4. Closing
1. Introduction
1.1. Introduction
This HOWTO will help guide most people through setting up Half-Life to run at a very usable state under Linux or other un*x's using WINE. WINE is not a windows emulator, but it does let you run many windows programs under Linux. This HOWTO is designed for OpenGL users, for software Half-Life, I recommend you see the EHL project (which doesn't look active anymore).
1.2. Acknowledgments
This HOWTO has been built from many recources, such as other HOWTOs, web sites, newsgroups, people on IRC and my personal experience. The two main recources were David McBride's HOWTO and the WINE newsgroup. Also a few idea's come from the brain of Sting of Death who has a website Emulated Half Life
1.3. License
Linux Half-Life Howto: Running Half-Life under WINE Copyright (C) 2000, 2001, 2002 David Hammerton.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

A copy of the GPL can be found at the GNU Homepage

1.4. Latest Version
The latest version of this document should be found at LHL
2. Doing It
2.1. Requirements
  • An x86 PC that can conforms to the Half-Life system requirements. Actually, maybe a bit better than what's on the box since WINE doesn't run quite as good as native windoze.
  • A relatively recent Linux install
  • XFree86 4.0.1 or later (XFree86 4.2.0 is recommended for DRI users).
  • Half-Life
  • A 3D accelerator card that supports OpenGL under Linux
  • Your 3D card setup and working in XFree86
  • You do NOT need any Windows partition or installation
  • If you are experiencing sound problems, you may need to switch to OSS sound drivers for your sound card. For some cards, Alsa simply doesn't play nice with Wine.
2.2. 3D
2.2.1. General installation
This HOWTO does not cover installing and setting up your 3D card for Linux. This HOWTO assumes you have a working 3D card (you can run Quake3, Heretic2, Descent3, or whatever else in 3D accelerated mode). Here are some links:
2.2.2. NVidia users
NVidia cards are the best for getting this working. They have the best support under Linux, hence run the fastest and most stable in most situations. There are no special settings requred for NVidia users, just follow this HOWTO.
2.2.3. 3DFX users
Since the release of XFree86 4.0.2, the latest TDFX branch has been put into the DRI CVS - so it may be possible for 3DFX users to download and compile XFree86 and DRI from CVS - this is untested! It may be even better with the recent release of XFree86 4.0.3, but this is untested as well. If anyone tests this out and it works, let someone know. Otherwise, continue with the old method:

3DFX users seem to have it a bit tough, but it is still possible. I have been in contact with one very helpful person who has finally got CS working well with his 3DFX card (voodoo 3). You have two options, DRI (x4.0.1), but currently this seems ridiculously slow, so I'm not going to bother. The other options is Glide (x3.3.6). As I dont have a voodoo 3, I cant be sure what is here is correct, but here is what should work.

From email from Lars Munch < c948114@student.dtu.dk >

Here is what I did:
------
First remove all traces of glide and mesa.
 
Get the latest Device3Dfx driver from the cvs at
glide.sourceforge.net and install those. Requered if you
run kernel 2.4.x.
 
Get the Glide V3 source rpm from linux.3dfx.com. Rebuild and
install those, both the libraries the devel stuff.
 
Then get Mesa 3.4 from mesa3d.sourceforge.net. You will need
both MesaDemos and MesaLib. Compile it using 
 
# ./configure --without-svga --without-ggi --with-glide=/usr \
              --prefix=/usr --sysconfdir=/etc
 
And do 

# make; make install.
 
Now test it a lot, to make sure at actually works (testGlide3x,
quake etc..).
 
You can use export MESA_FX_INFO=1 to get some usefull
statistics.

Install the WickedGL drivers (miniGL from Wicked3D) and they
give a VERY good performance 30-70 fps at 640x480.

Then configure the wine sources with --enable-opengl option ,
and run halflife/counter-strike with:
 
# export MESA_GLX_FX=fullscreen
 
# wine -desktop hl.exe -- hl.exe -gl -gldrv Default -w 640 -full \
       -game cstrike -noipx -nojoy -numericping -console -toconsole
2.2.4. G400 users
I have finally been contacted by a user who is running LHL wonderfully with his G400. There are a few steps to take, it seems easier than the 3DFX users. Note: you will probably need a fairly fast CPU (500+ anyone?).

Now that XFree86 4.0.2 (XFree86 4.2.0, actually) is out, all that you must do is install that.. it will NOT work with the normal X4.0.1 release, you MUST use XFree86 4.0.2. You will also probably get some flickering, to fix this look down in the troubleshooting section, there is a fix there. For the best performance, you will probably want to upgrade to 4.2.0.

2.2.5. Other DRI users
ATI Radeon should work with newer versions of X. Other than that, I havent heard from any other DRI users yet, but please let me know how you go. Try and get the latest XFree86 DRI from CVS as described in the G400 section, let me know.
2.3. Installing WINE
The first step we must do is install WINE. Depending on how much you've played around with Linux, this shouldnt be a huge hassle. If you already have WINE installed from an RPM/binary package or otherwise, remove it. We will be installing from source and will get an up-to-the minute version with CVS. In RPM based systems do this:

      # rpm -qa |grep WINE
      # rpm -qa |grep wine
      # rpm -e "whatever showed up above"

In a Debian based system do this:

# apt-get remove wine

If you have previously compiled and installed WINE from source, go into the source directory and:

      # make uninstall
  1. Now, download WINE. With Transgaming now working on it, I recommend getting their version (winex). I will assume that you downloaded wine into /usr/src, so your wine source will be in /usr/src/wine. For more information on this process, please see the winex Sourceforge project site.

    To use CVS, try this:

            # export CVSROOT=:pserver:anonymous@cvs.winex.sf.net:/cvsroot/winex
    	# cvs login
    	*** There is no password (leave it empty) ***
    	# cvs -z3 co wine

    Please note this is a rather large CVS checkout. It may take a while for modem users. Also, there are some binaries of WINE compiled with OpenGL support. These are untested as far as I know, so don't complain if they don't work.

  2. Get the development packages for OpenGL for your distro. For Debian, this is xlibmesa-dev. Other distros should have similar packages. You are also going to need a file called glext.h. Let's see if you have it:
            # updatedb
    	# locate glext.h

    If your system doesnt already have glext.h, then you will need to get it before compiling WINE. I have made a copy available here, download it and put it in "/usr/X11R6/include/GL/". WINE will not compile with OpenGL support without this file.

  3. Now to compile, first configure wine. Go into /usr/src/wine and:
    	 # ./configure --enable-opengl

    Wine will configure itself. Check the screen output to make sure OpenGL was properly detected. Mine looks like this:

    	 checking GL/gl.h usability... yes
    	 checking GL/gl.h presence... yes
    	 checking for GL/gl.h... yes
    	 checking GL/glx.h usability... yes
    	 checking GL/glx.h presence... yes
    	 checking for GL/glx.h... yes
    	 checking for GL/glext.h... yes
    	 checking for up-to-date OpenGL version... yes
    	 checking for thread-safe OpenGL version... yes
    	 checking for glXCreateContext in -lGL... yes
    	 checking for glXGetProcAddressARB in -lGL... yes
    	 checking for OpenGL extension functions prototypes... no
    	 checking for gluLookAt in -lGLU... yes

    If everything appears to be good, check include/config.h for "#define HAVE_OPENGL 1". If this line is commented out, or not in the file, OpenGL support will not build. Don't even bother compiling Wine yet; first fix your OpenGL problem. Only when include/config.h contains that line should you move on to the next step.

  4. With Wine configured (and OpenGL support enabled), it's time to compile. From /usr/src/wine:
    	 # make depend
    	 # make

    Wine will compile so go take a nap or whatever. If you are really bored you can read some funny IRC quotes here. Once done, it should say "Wine build complete." and we can install it with:

    	 # make install

    Wine is now compiled and installed on your system.

  5. Time to configure wine.conf. Open up wine.conf in your faviourate editor. A sample file can be found at '/usr/src/wine/documentation/samples/config'. Your standard C drive should probably be set to /usr/local/wine, check thats the case in wine.conf. You will also want a drive that points to your CD-ROM mount point to install Half-Life. Now go down to the [x11drv] section, ensure that double-buffering is ON. useDGA may be either on or off as DGA now works in XFree86. Some people have reported to have problems with this, try fiddling around with useDGA and double-buffering (set them to off) if something doesnt work. Once the config file works fine, go to your home directory (as the user you will be running LHL as) and:
            # mkdir ~/.wine/
    	# cp /usr/src/wine/documentation/samples/config ~/.wine/config

WINE should now be installed and configured.

2.4. Installing Half-Life
Half-Life should be ready to install.

Put the HL cd into your cdrom, then:

     # mount /xxx (your cdrom's mount point)
     # cd /xxx
     # wine SETUP.EXE

Follow through the installation, it should install perfectly. At the end if the installer hangs (which it often does), go back to your main console with "CTRL+ALT+F1", login as root and type:

     # killall -9 wine
     # ps -ax

to make sure no WINE clients/servers are running any more. If any are running, kill them off individually.

Do the same procedure for each patch you load (HL, CS etc).. Although you must remember you can only run a .exe from a path that exists in wine.conf!

2.5. Running and setting up Half-Life
This is it, good or bad ;-). cd into your Half-Life dir 'cd /usr/local/wine/games/Half-Life/' (or wherever you installed it and then run:

$ wine hl.exe -- hl.exe -console

(please note, when you get it working, dont run it like this.. run it from my script found in the section "missing gamespy?") You will see the menu's SLOWLY generate infront of you. Once there finished, click "Configuration" -> "Video" -> "Video Modes". Set it to OpenGL, whatever res you play in and the default driver. Click ok. It may freeze when you click OK, but that shouldnt matter (it didn't for me) - just go back to a console with "CTRL+ALT+F1" and `killall -9 wine`. Make sure the res you chose is one that you have configured in your "XF86Config" ("XF86Config-4" for Debian) file (X Windows configuration).

Configure your keys now. The internal key-binder now works, so you should have not problems. You can always manually edit "config.cfg" if needs be.

2.6. Playing mods
If you want to play any mods (CS, DoD, whatever), first install the mod with Wine, the same way you installed Halflife. Follow the setup program as normal and when it is done, you can launch directly into the mod with something like the following:

$ wine hl.exe -- hl.exe -console -game cstrike

The above is for CS, but replace the 'cstrike' with the mod of your choice.

3. Troubleshooting
未完,待續........
關於作者
User picture

一個非常不像雙子座的雙子座頹廢男

使用者登入

書籍列表

線上使用者

目前共有 0 位註冊使用者8 位訪客 在線上。

部落格觀察

串聯

RSS feed

蟑螂的敵手

遠離過敏源,從此無需再見「小強」而抬腳 ^_^

科技 環保 省錢 乾淨 有效
有效去除蟑螂!!
小S也買了很多箱 BASF 送給親朋好友,大家都稱讚不絕呢!!
查閱細節 按此購買

最新回應

Happy Share

BlogAD Union