HOWTO Wine

From ZWHLUG

Jump to: navigation, search

Contents

[edit] About

Wine is an Open Source implementation of the Windows API on top of X and Unix. Wine Is Not an Emulator.

[edit] CVS

Since it is still under (heavy) development, using the CVS version of Wine, instead of the latest stable one, has its advantages. The biggest advantage of all is that you might get your program running early on linux and that you will be able to help the developers.

I would suggest you to create a "wine" directory in you home dir where you'll install the Wine CVS version.

mkdir /home/[username]/wine
cd /home/[username]/wine

Now let's connect to the European CVS server.

export CVSROOT=:pserver:cvs@rhlx01.fht-esslingen.de:/home/wine
cvs login

Note: Use "cvs" as the password. The /home/wine is a path on the server, not on your machine!

Check out the entire Wine source tree. If you're using a slow internet connection, like a 56k modem, you may want to compress the traffic with -z3. However, there are known bugs in CVS with this compressed communication mode, make sure you use cvs version 1.11.5 or later.

cvs -z 0 checkout wine

I've written small script to automate the cvs update part, which makes my life easier. I've installed it into /home/[username]/scripts/wineupdate

#!/bin/bash
# Wine update script
# Author: SWAT

cd /home/[username]/wine
cvs update -PAd
./configure
make depend
make

echo "WineCVS updated"

Now let's optimize your CVS by adding these lines to your /home/[username]/.cvsrc

cvs -z 0
update -PAd
diff -u

I might imagine you would want to use the synthax "wine [program.exe]" with the CVS version too. And you would probably also want to simply run "wineupdate" and your current Wine CVS version would automatically update itself. If you want to do this you'll need to create a couple of new entries in your /home/[username]/.bash_aliases

alias wine='/home/[username]/wine/wine'
alias wineupdate='/home/[username]/scripts/wineupdate'

[edit] Windows

What's this about? It's about helping the WINE project with their regression testing. This is basically a way to check if their newly created patches and/or code changes don't do unwanted things, like crashing certain programs or invoking unwanted methods etc. It doesn't matter which Windows version you have, all are very welcome. You can do this while you go get a cup of coffee, for example. Just in case, close and/or backup any important data/programs. (the 'standard' Windows warning)

[Open this website] and go to the directory at the bottom. Once inside you just need to click on the big blue build number to download the program. Then just run the program, type in a description name, click OK, <go do something for 5 minutes>, click the YES button to submit the test results.

[edit] Macromedia Dreamweaver 8, Fireworks 8 and Flash 8

I used wine version 0.9.11 to get these tools working. The big downside to getting these Macromedia applications working on linux is that you need to use a Windows machine to install them to. So boot some Windows machine and install your Macromedia Studio or specific applications onto it.

When you've finished installing the applications you need to zip/tar/rar a lot of files. The following (Windows) directories you need to compress, then copy to your linux machine and then decompress:

Directory on WindowsDirectory on Linux
C:\Program Files\Macromedia\/home/[username]/.wine/drive_c/Program Files/Macromedia/
C:\Windows\system32\Macromed\/home/[username]/.wine/drive_c/windows/system32/Macromed/
C:\Documents and Settings\All users\Application data\Macromedia\/home/[username]/.wine/drive_c/windows/profile/All Users/Application Data/Macromedia/
C:\Program Files\Common Files\Macromedia\/home/[username].wine/drive_c/Program Files/Common Files/Macromedia/
C:\Program Files\Common Files\Macromedia Shared\/home/[username]/.wine/drive_c/Program Files/Common Files/Macromedia Shared/

Dreamweaver 8, Fireworks 8 or Flash 8 should now work on your own Linux system.


In case you run into some strange errors related to the registry you could always export the Macromedia registry entries from Windows and import them with Wine. I don't think you'll need it, but just in case, I'll explain how you can do this.

First you need to open regedit. Then you need to Export the entire HKEY_LOCAL_MACHINE/Software/Macromedia/ directory as a registry file and copy the file to your linux machine. On your linux machine you can open regedit using wine regedit and Import your registry file. Note: If wine/regedit complains about the encoding (UTF-8, ASCII) you can open the registry with Gedit and then save it with a ASCII encoding for full compatability.

[edit] Mozilla ActiveX control script

Some programs need the Mozilla ActiveX control component to work properly. This is sadly quite a common component which is used kind of often. Yet setting it up might be tricky.

All you need to do is save the script into a file and run that file. Just touch the file and add the script into that file using your favourite editor, in my case it's vim.

touch mozcontrolscript.sh
vim mozcontrolscript.sh

Now insert the following code into the mozcontrolscript.sh file and save it.

#!/bin/sh
WINE="wine"

wget -NP/tmp http://downloads.transgaming.com/mozilla_control_downloads/mozcontrol.tgz
if test $? != 0; then exit 1; fi

$WINE --version &> /dev/null || exit 1
ProgFiles=`$WINE wcmd /c echo %ProgramFiles%`
ProgFiles=`$WINE winepath -u "$ProgFiles"`
tar -xzf /tmp/mozcontrol.tgz -C "$ProgFiles"
cd "$ProgFiles/mozcontrol"
WINEDEBUG=-ole $WINE regsvr32 mozctlx.dll</pre>

Let's make the file executable and run it!

chmod 666 mozcontrolscript.sh
sh ./mozcontrolscript.sh

[edit] Related sites

[Wine CVS-HOWTO]
[WRT homepage]
[WRT results]

Views
Personal tools