리눅스에서 WINE 으로 하프라이프 하기 - _-

hiseob의 이미지

원출처


Emulated: Steam, Half Life and Counter-Strike on Linux   
Author: Hethrep
Published: 2003-12-20
Read 9644 times 
Size 10.48 KB   
 
  
Author: patson
Contributers: overflowed, Hethrep hethrep@linux-gamers.net, GlaDiaC
Language: english
Date: 19h December 2003
Version: 0.5

Warning: This HOWTO comes with no explicit or implicit warranty whatsoever. Use at you own risk!

1) Get and install the latest Wine CVS
2) Install DCOM98
3) Install IE6
4) Install fonts
5) Configure Wine
6) Install Half Life
7) Install Steam
8) Edit the CS configs


1) Getting the latest Wine from CVS

Note! Any version of Wine later than wine-20031610 will most likely work, however, the CVS version was the only usable one at the time of writing

At first we need wine. So download the newest Version from the CVS repository.

$ export CVSROOT=:pserver:cvs@cvs.winehq.com:/home/wine
$ cvs login


Now you have to enter a password which is called "cvs",
after you pressed return we can start downloading:

$ cvs -z3 checkout wine

Then we can start to build wine

$ cd wine
$ ./configure --enable-debug --enable-trace
$ make depend && make
$ su -c "make install"


Now you can use wine, really? You forgot the config files!
Oh don't write them, download them! Download the winecfg suite.
http://sourceforge.net/projects/winecfg/
Now replace the dotwine dir with the .wine in your home dir.

$ mv /[dirs]/dotwine /home/[username]/.wine

Now, you've got Wine installed. You could leave out the --enable-debug and --enable-trace lines and/or replace them by --disable-debug and --disable-trace if you want some extra speed. This will make diagnosing problems harder, though.

With wine installed and configured we can move on to install dcom98.


2) Installing DCOM98

You'll need to backup the Wine config file about now, since you'll be making some changes to it for the duration of the installation. So do something like 

$ cp ~/.wine/config ~/.wine/config.orig

to copy the config to a safe location. Then edit the DLLOVERRIDES section of the config so it looks like this:

[DllOverrides]"mshtml" = "native"; For ie6"*comctl32" = "builtin"; For Outlook97"mapi" = "native, builtin""mapi32" = "native, builtin"; Native dlls needed for various parts of the install"ole32" = "native, builtin""compobj" = "native, builtin""ole2" = "native, builtin""ole2nls" = "native, builtin""ole2conv" = "native, builtin""ole2prox" = "native, builtin""ole2thk" = "native, builtin""storage" = "native, builtin""olepro32" = "native, builtin""rpcrt4" = "native, builtin""oleaut32" = "native, builtin""msvcrt" = "native, builtin""wininet" = "native, builtin"; for the ie runonce"setupapi" = "native, builtin""devenum" = "native, builtin""quartz" = "native, builtin""urlmon" = "native""shdocvw" = "native, builtin""jscript" = "native, builtin""wintrust" = "native, builtin""shlwapi" = "native, builtin""secur32" = "native, builtin""crypt32" = "native, builtin""ddraw" = "native, builtin"; allow launching user.exe (for Remedy)"*user.exe" = "native,builtin"; default for all other dlls"*" = "builtin, native"
At this point you have two choices, either trust me and take this file or search the Microsoft website for dcom98. Then, make sure the Wine windows version is set to win98. Then run

$ WINEDLLOVERRIDES="ole32=n" wine dcom98.exe

the DCOM98 components should now install themselves without complaint.

3) Installing IE6

Now, on to the installation of IE6. Get the IE6 sp1 installer executable from
Microsoft and run 

$ wine ie6setup.exe

and choose custom install, pick just the browser and vbscript support (do NOT pick any fonts). You will get one error message (just click Ok) and a notice that the exception pack wasn't installed.

You've just installed a "core operating system component", and it has installed a few libs in your .wine/fake_windows directory. Run 

$ wine wineboot

to reload the wine libraries (similar to booting windows). Assuming all has gone well we should back up the .wine directory. 

$ cp -R .wine/ .winebackup/

Now, since the config we remade has outlived its usefulness, we may aswell delete it. 

$rm .wine/config
$cp .wine/config.orig .wine/config


Now you've got the old config back, time to install some fonts...

4) Install some fonts

You can download the fonts and find a description how to install windows fonts under linux here:
http://avi.alkalay.net/software/msfonts/

If you don't want to install the fonts system wide copy it to the .wine/fake_windows/Windows/Fonts directory.

To see the max/minimize symbols in steam, download the Marlett.ttf and copy/unzip it to your .wine/fake_windows/Windows/Fonts directory.
http://www.uq.net.au/~zziwilki/marletts.htm

Now that the fonts are in, let's restart Wine again (just to be sure).

$ wine wineboot

Now, let's move on to the real stuff.

5) Configuring Wine

This should be the time to pop in the game cdrom and start installing... but wait, let's set the Wine config to what it should be before we start tinkering... My config file has been provided for your convenience, and it contains all the required tweaks. But let's go over them, in case you want to do it yourself... Busy readers: just copy my config to ~/.wine/config and move on to installing the game.

To those who persist: nice to see there are still tweakers among us :)

In the Wine config file, you'll find a section titled [AppDefaults\\IEXPLORE.EXE\\DllOverrides]. Make a copy of this and set the title to [AppDefaults\\Steam.exe\\DllOverrides]. Now, go back to the DllOverrides of IEXPLORE.EXE and add a line called that says 


"mshtml" = "native"

If that line is missing, IE6 will not display pages, but try downloading them instead. Obviously, this is not what we want.

Then, add these lines to the end of the Steam.exe DllOverrides section


"shdocvw" = "native, builtin" "shlwapi" = "native, builtin"
Otherwise, you'll have strange errors running it. Then make a new section for the Half Life executable, like so: 


[AppDefaults\\hl.exe\\DllOverrides] "shdocvw" = "native, builtin" "shlwapi" = "native, builtin"
Otherwise, Half Life will just sit there and do nothing (strange but true). Now the Wine config should be pretty much like we want it. Check my config file if your own tweaks fail.

Oh, one more thing... I had trouble running Half Life fullscreen, so you may want to run it in a window. Add this section after the hl.exe dlloverrides: 


[AppDefaults\\hl.exe\\x11drv]"Desktop" = "800x600""DXGrab" = "Y"

Feel free to set the desktop window size to whatever you like.

6) Installing Half Life

Now, we install the game. Mount the game cdrom and type 

$ wine /cdrom/Setup.exe

where /cdrom is your cdrom mount point. Easy, isn't it? When you've got it installed, move on...

7) Installing Steam

Now, download the Steam CS installer (called steaminstall_cs.exe). You can find it on any decent game file server.

Then just run the installer, 

$ wine steaminstall_cs.exe

The install should go fine, and after it's completed and wasted your time "updating" steam (it generated strangely small amounts of network traffic) Steam will launch. Create an account or log in, then add Counter Strike to your list of games. NOTE! If you don't get keyboard focus (99% of the time you won't), then right-click on an edit box and select any option (cut/copy/paste). Presto: keyboard input focus. 

If all has gone well, Steam should detect your existing Half Life installation and upgrade it to Steam time. It didn't work on my machine without Half Life preinstalled (even though it should). Don't ask me why :)

Then, after the games have installed themselves, try connecting to a server. It might crash and exit, if it doesn't (but hangs there), activate a console or jump to some another TTY and type

$ killall wine or even $ killall -9 wine 

on newer version

$ killall wine-pthread or even $ killall -9 wine-pthread 

Steam will "disappear" for the moment and we can change the counter-strike configs a bit...

8) Edit the CS configs

It seems Counter-Strike bugs out on MOTD requests. This might just be a more or less random bug with html rendering, but it's safer to just disable the motd altogether. cd into whatever directory you installed Steam in. Then go to ./SteamApps/[youremail]/counter-strike/cstrike
Then, remove the file custom.hpk if such a file exists: 
$ rm custom.hpk
Then make the welcome message html file read-only 

$ chmod 400 motd_temp.html

Then open up config.cfg in your favourite text editor (vim, nano, pico, emacs, whatever) and add the line 


"hpk_maxsize" "0"

The errors should cease.
권순선의 이미지

이 글은 자유 강좌/팁 게시판이 더 적당한 것 같습니다. 시간나면 언제 한번 테스트해 봐야겠네요. :-)

kbs4x4의 이미지