Pages

Monday, December 7, 2009

Howto Install latest wine with patched source and manage wine prefixes

If you dont need a patched wine, I strongly recommend you to use the package manager to install compiled sources.

To obtain the latest wine in this way, you first need to add the gpg key of winehq's repository:

wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -

Then add the repository:

sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/$(lsb_release -sc).list \ -O /etc/apt/sources.list.d/winehq.list

And then wine can be installed with:

sudo apt-get update
sudo apt-get install wine

Introduction

Well, although there are repositories with the latest development version of wine 1.1.33 at the date of writing, many of the latest games require some patches to the source. So, this is what this tutorial is about!

Unlike other howtos ive seen elsewhere, I download and keep the sources up to date using git, and install wine with checkinstall. Almost all this with some slight modifications was written by the user Massimo from the Wine appDB.

1. Installing Wine

So lets begin by removing wine (only if you have installed it already through the package manager):
sudo apt-get remove wine

If you had previously added the winehq repository, delete it:

sudo rm /etc/apt/sources.list.d/winehq.list

Then, we install git:

sudo apt-get install git-core

And download wine sources from the git repository (this should take a while):

git clone git://source.winehq.org/git/wine.git ~/wine-git

This will download the sources at a folder called wine-git inside your home folder. You should keep this folder after the installation so it is easier (and less time consuming) to update and apply your patches later.

Next, we install the necessary packages to build wine:

sudo apt-get build-dep wine
sudo apt-get install fakeroot

You will also need checkinstall to install it later:

sudo apt-get install checkinstall

Build wine. This will quite some time (over 40 minutes to me with an AthlonX2 with 2gb ram):

cd ~/wine-git
./configure --prefix=/usr
make

Then, install wine (DONT CLOSE YOUR TERMINAL! or if you did, open it again and run cd ~/wine-git). I use checkinstall because it creates a deb package and installs it, and this makes it easier at the end to manage all of your compiled programs (NOTE, if you have installed the latest wine with the package manager, then you should delete the entry of the wine repository from /etc/apt/sources.list and then run sudo apt-get update before continuing). To install wine, I need to specify the version on checkinstall so it works. For example, with the 1.1.33 version, I did this:

sudo checkinstall --fstrans=no --pkgversion=1.1.33

Answer yes to everything, add a minor comment to the package if you like, and you'll have wine installed.

2. Patching Wine

This instructions can be followed any number of times you want, for all the patches you want, after going through the installation as explained above. Take care though, that it might be possible that patching one application will affect another one.

Almost all patches can be downloaded from internet. So, Ill suppose you have the URL of the patch (referred as ). First, we will create a folder to store your patches on your home folder:

mkdir ~/wine-patches

Then we download the patch:

wget -O ~/wine-patches/

Where is the name you want for the patch. If you have more than one patch, you need to download each one separetaly. Then, patch and compile wine (Compilation will take MUCH less time than before):

cd ~/wine-git
patch -p1 < ~/wine-patches/
make

If you have more than one patch, run the patch command for each patch before compiling. Finally, you must install it again with checkinstall:

sudo checkinstall --fstrans=no --pkgversion=1.1.33

and TADA! you have a patched wine installed.

3. Updating Wine

To update wine, first you need to update your sources:

cd ~/wine-git
git reset --hard origin
git fetch
git rebase origin

Then you should apply your patches as explained in the previous section, compile, and install (I suppose here the version changed form 1.1.33 to 1.1.34 so I change that on checkinstall):

cd ~/wine-git
patch -p1 < ~/wine-patches/
make
sudo checkinstall --fstrans=no --pkgversion=1.1.34

(REMEMBER TO RUN THE PATCH COMMAND FOR EACH OF YOUR PATCHES)

4. Undoing patches

To undo patches, you can try two different methods, number 1 is a sure way to go, but is time consuming cause you need to recompile everything, and number 2 should compile swiftly, but I havent personally tried it. I recommend trying number 2 first, and if it fails, trying number 1.

Method 1: Slow but sure...
If a particular patch ruined your installation, then you have to recover the original sources, apply the patches you want to use (obviously, omitting the one that left a mess), recompile and install:

cd ~/wine-git
git reset --hard origin
patch -p1 < ~/wine-patches/
make
sudo checkinstall --fstrans=no --pkgversion=1.1.34

Remember to run the patch command for all your patches but the one that caused conflicts!

Method 2: swift, but untested
However, the precious procedure will have to recompile everything and so, it will take quite long. The unsure way to do this while avoiding (I mean unsure cause I haven't test it) is to unpatch your sources:

cd ~/wine-git
patch -p1 -R < ~/wine-patches/
make
sudo checkinstall --fstrans=no --pkgversion=1.1.34

Where the patch command should be run for all patches you wish to undo. This should take much less time than compiling with the first method. If it works for you, please let me know...

5. Wine prefixes, or as I like to call them, BOTTLES!

Next, Ill explain an additional topic, BOTTLES!. Bottles (actually called wine prefixes, but I got accustomed to this term) let you encapsulate different applications, and apply particular tweaks only to the environment of a particular application. Here Ill explain how to install an application in a bottle, run the wine configuration utility winecfg, downloading windows dlls and setting as native, and uing winetricks, all these for an specific bottle so we dont mess with other applications configuration.

5.1 Keeping all your application on separate "bottles"

It is highly recommended to keep all your applications on separate "bottles" with they're own tweaks. This is because the tweaks for one application usually render other ones useless. To do this, lets create first a directory to keep all your bottles (You only need to do this once!):

mkdir ~/wine-bottles

Then, to install an application, do the following:

export WINEPREFIX=/home//wine-bottles/
wine

So, for example, if I want to install spore, Ill call the bottle spore, my username is pablo, and the installer is in /media/cdrom0/SPORESetup.exe and the previous commands would read:

export WINEPREFIX=/home/pablo/wine-bottles/spore
wine /media/cdrom0/SPORESetup.exe

And thats it!

5.2 Running winecfg to configure different bottles

There are some windows applications that I prefer to keep windowed, while others full-screened. Another advantage of bottles is that you can configure this and many other stuff with winecfg for each bottle independently. To run winecfg for a bottle, you must open a terminal, specify the bottle, and run winecfg:

export WINEPREFIX=/home//wine-bottles/
winecfg

And go ahead and configure all you want!

5.3 Set a dll as native on a bottle

To use a downloaded dll as native for an specific bottle, you must download your dll and put it at the appropriate place in the appropriate bottle. The folder where you must put the dlls is:
~/wine-bottles//drive_c/windows/system32
(In case you dont know, ~/ is equal to /home//)

Then, open the winecfg application for the bottle as mentioned in the previous section, select libraries, look for your dll, and set it as native.

5.4 Use winetricks with a bottle

winetricks is an useful app to install common packages needed for some applications. Usually, the versions required for different applications vary, for instance, some applications work with dotnet 1.1, and others with dotnet 2.0, so By keeping things on separate bottles, you can solve this.

First, lets download the winetricks script and make it executable (You only need to do this once). Ill keep winetricks on the wine-patches folder:

cd ~/wine-patches/
wget http://www.kegel.com/wine/winetricks
chmod +x winetricks

Then, you can run winetricks with the console, specifying first the bottle, and the running winetricks:

export WINEPREFIX=/home//wine-bottles/
~/wine-patches/winetricks

5.5 File association
To associate a specific file type in gnome with a wine application, first, create an executable for your application in /usr/bin (WARNING: BE SURE NOT TO OVERWRITE ANYTHING ON /usr/bin).First, create an open the file to edit it:

sudo gedit /usr/bin/

Here is the name of the file that will launch your application. REMEMBER NOT TO OVERWRITE ANYTHING UNDER /usr/bin. On the editor, add this content to the file and save it:

export WINEPREFIX=/home//wine-bottles/

wine "" "`winepath -w "$*"`"

Remember to change and accordingly, and where it says put the path of your program .exe file. If you are not using bottles, drop the line that starts with export. Then, make this executable:

sudo chmod +x /usr/bin/

Then, on a file you want to associate to this application, select "open with another application", then choose "use custom command", and put this:

/usr/bin/ %f

After that, your files should be correctly associated.

6. Conclusions

Well, I hope this helps someone. If something can be run with wine, then by following this instructions together with specific instructions for the installation of the application (such as patches, extra things needed, etc) you should get it done, as long as there are no hardware specific problems that affect you. Almost all the application-specific info you need can be found at the Wine appdb (http://appdb.winehq.org/).



Sunday, December 6, 2009

HOWTO Install Multiple Wine Versions on One System

Wine Technology advances at a rapid rate, in the last month we have seen two updates to Wine (1.1.33 & 1.1.34). Many of us like to stay using the latest and greatest Wine software - with good reason each new version typically fixes issues and improves performance - however on occasion a new Wine release will suffer from some regressions that cause some applications to stop working properly. The solution to this? Quite simple: revert your Wine install back to the previous version so your application can still work properly for you.

This is fantastic if you are only using Wine to run a single program - however in the case you are running two or more programs under Wine it is not unheard of for each of the different programs you are running to perform better under different Wine versions (or with different patches). The solution to this issue is simple: install multiple versions of Wine on the same system and run each program with the version that it behaves best under.

Step 1 - Setup:
Download the source code tar.bz2 file for the additional Wine version you wish to install from Source Forge. Extract the contents of the tar.bz2 file to your preferred directory
Then we want to install all of the build dependencies we will need to compile Wine from source. On Ubuntu we can do this by running the following command in terminal sudo apt-get build-dep wine (You should check here for information on getting the Wine build dependencies on other distributions.)

Step 2 - Compiling Wine:
Open your favorite terminal and change directory to the location of your extracted Wine source. (If you wanted to apply a patch to your Wine source now is the time). Once you are ready we are going to configure and compile your Wine source. To do so we use the following command in terminal ./configure --prefix=/usr/local/bin/wine-someversion && make depend && make



Putty for Mac
Putty for Mac
$15.00

https://winereviews.onfastspring.com/putty-for-mac



Saturday, December 5, 2009

Wine 1.1.34 Released

The Wine development release 1.1.34 is now available.
What's new in this release:
  • Many fixes for crypto certificates support.
  • A lot of MSHTML improvements.
  • Various fixes to support the Left 4 Dead 2 DRM.
  • A number of OLE marshalling fixes.
  • More Listview improvements.
  • Various bug fixes.
The source is available now. Binary packages are in the process of being built, and will appear soon at their respective download locations.

Bugs fixed in 1.1.34:

835 Add support for the new PDB format
3048 CSpy/Up-Down: Multiple Inconsistencies/Major Work needed
3154 Matchad 5 remains in memory on exit
4543 Free & Clear (fc.exe) crashes after unhandled exception (page fault)
4770 BlackBerry Device Manager fails to install under wine
5061 Copying from Windows Firefox in Wine and pasting to Linux OpenOffice pastes metadata as data
5726 MotionBased agent main screen doesn't render all elements
6159 DeviceLock installer crashes in NdrSendReceive()
7142 Wanted: OpenAL support
8302 Transparent backgrounds of text-labels in Ragnarok Online
8407 MPLab 7.60 hangs at splash screen
9464 err:ole:marshal_object object doesn't expose interface {00000001-0000-0000-c000-000000000046}
9527 Silent Hill 4 Does not start
9990 Google Pack installer aborts with dialog "Invalid command line -install -extra ..."
10342 Add support for SubPixel font rendering
11090 menu items are redrawn incorrectly on mouse over - jedi knight dark forces II
11495 Need For Speed: Pro Street crashes during start
12419 eISLP crashes in ole on exit
12632 Publisher 2003 crashes when saving a file
12736 d3d:sampler GL_INVALID_ENUM from glActiveTextureARB @ state.c
12852 Alibre Design: installer fails
12881 whizlabs software does't work
12910 Alcohol 120% refuses to install
13011 Mail.ru_err_ole32.dll
13195 GLXMakeCurrent error with BadMatch (invalid parameter attributes) in SolidWorks
13234 Quicktime 7.4.5, window decoration problems
13963 menubuilder does not escape certain characters
14228 Strip off double quotes from path before trying to load COM servers (Microsoft Device Emulator 3.0/Device Emulator Manager)
14407 wineserver should support Solaris event completion framework (event ports)
14455 Greedy Torrent Does not function without Virtual Desktop Enabled
14517 winscp crashes on exit after connecting
14684 Might and Magic 7: crash at startup
14692 Microsoft Money 2007: Crashes on Program startup
14863 Crash in SCAPS SAM
15046 Graphics Corruption in Star Trek Legacy
15189 Google Chrome can't dock tabs
15251 SQLNotes 0.9.23.6 installer fails to register DLL
15271 Europa Universalis III In Nomine - Crashes at start-up
15448 Font selector is empty in inetcpl.cpl (IMLangFontLink2)
15455 Witcher Enhanced Edition - fails to complete installation at redistributable stage
15605 Baan client Date field is not display correctly.
15805 NetStat live unable to run/install
15885 Phrogram 2.5 requires SHGetImageList implementation
15961 Need for Speed ProStreet: Very slow/low fps when smoke not disabled
16377 AlphaSkins hangs while starting
16490 Falcon 4.0 AF: Clouds visible trough walls
16494 Falcon 4.0 AF: After patching to 1.0.13 game crashes
16589 Unimplemented d3dx9_36.dll functions : .D3DXLoadSurfaceFromFileInMemory, D3DXLoadSurfaceFromFileW, D3DXLoadSurfaceFromMemory
16727 r1gl fails to request wgl features such as multi sampling
16881 CashComm cannot be installed (clicking on Next doesn't do anything)
16955 Dreamfall: TLJ fails to launch.
17099 CallWave: Cannot play recieved calls.
17116 MinGW 5.1.4 won't install
17297 widl should accept unnamed arguments to functions
17367 BizAgi Modeler does not start
17513 Rome total war detects a debugger
17665 Studio Tax fails to install
17921 Just a translation problem
17937 Cygwin compilation fails in rpc_transport.c
17996 inetmib1 test fails when duplicate addresses are in the route table
18009 Tlknow32.exe hangs in startup screen
18250 VDrumLib crashes on startup
18377 NFS 4 Road Challenge: Installer hangs after choosing Setup Type
18378 NFS 4 Road Challenge: Installation of 4.50 patch fails
18400 The program FlatOut2.exe has encountered serious problem...
18425 DLL_PROCESS_DETACH isn't called if a dll returns FALSE on a DLL_PROCESS_ATTACH call
18451 Program error starting Nortel IP Softphone 2050
18466 Wine does not support genitive forms of month names
18472 Mafia hangs
18473 Mafia game losses sound
18478 Wine (snapshot and stable version) crash when running Nikon's ViewNX application
18772 Missing User32.PrintWindow implementation
18852 3dmark Vantage requires avrt.dll
18902 S.T.A.L.K.E.R. (part 1 and 2) crashes
18968 Maize Sampler: GUI is only a white box
19015 quik say: general protection fault
19270 Dragon NaturallySpeaking 10 Standard freezes after selecting alsa in winecfg
19413 WinZip 12.1 fails to install
19749 EasyWorship crashes
19906 Visual artifacts in Anno 1701
19907 Thunderbird Portable v. 2.0.0.23 startup crash. [dogfood]
19978 python installer: puts python26.dll in C:\windows\system32, not C:\python26 (appinstall)
19982 SetThreadAffinityMask() seems not to work correctly
20152 Oracle IRM Desktop application fails with "unable to initialize the Oracle IRM engine" when invoking a systray context menu option
20249 Venetica game crash
20495 CryptUnprotectData can't handle zero-length payloads (affects chromium unit_tests)
20504 Left 4 Dead 2 crashes after intro movie
20516 Alt-F10 sent on press of F10 with wineconsole --backend=user
20517 temporary language switch causes permanent change of codepage
20527 wine iexplore crashes with charset=gb2312 (with testcase)
20529 SolidWorks Viewer 2010: unimplemented function KERNEL32.dll.CreateMemoryResourceNotification
20553 Invalid read in LISTVIEW_NCDestroy in chromium unit_tests.exe in TableViewTest.Sort?
20602 thread/cpu affinity not correct with multi core enabled source engine games
20622 chromium's net_unittests.exe hangs in SSLClientSocketTest.Read
20672 GetDC change causes black screen in Seven Kingdoms
20681 Microsoft Visual C++ .NET 2003 INTERNAL COMPILER ERROR
20686 World of Warcraft screen corruption
20692 Probable benign window title leak
20693 Bogus entries in wine.inf transferred into registry
20696 PAF5 crashes when leaving 'Individual' tab for another tab.
20697 Some applications do not correctly detect administrative privileges
20709 Mordor - the depths of Dejenol installer crashes
20715 ACDSee 3.0 (old version) hanging on exit
20729 Logos4: wine has the ALLUSERS property set
20733 installation of yahoo messenger fails
20734 sfirm demo complains LogonUser contains no value.
20736 Left 4 Dead 2 needs imagehlp/ImageAddCertificate() to complete installation
20737 Mordor - the depths of Dejenol installer crashes
20739 winecfg emits a warning called an error
20745 WinZip 12.1 installer subprocess crashes during installation
20754 QIP Infium does not start
20759 Read buffer overflow in NdrConformantArrayMarshall?
20760 Write buffer overrun in CreateFileMoniker()
20764 Reason 4 application aborts with "unexpected error" dialog after installation
20768 Flight Simulator 98 install: the screen is repainted only when moving the mouse
20772 Wordpad allows opening more than one find dialog
20774 Vampire: The Masquerade - Bloodlines: broken fonts
20787 Watchtower library 2008 (português): crashes when closing the application
20836 Opening non-exe/dll files causes a segfault
20849 read buffer overflow in CRYPT_RemoveStringFromMultiString() triggered by crypt32/tests/oid.c
20855 Appraise-It 8.3 installer fails to download redistributable packages
20860 Read buffer overflow in INTERNET_SendCallback in wininet... calling strlen on non-nul-terminated buffer?
20861 CoTaskMemAlloc()/SysFreeString() mismatch in DocHost_Release(), caught by valgrind in shdocvw/tests/webbrowser.c
20875 EasyWorship 2009 crashes before UI loads
20883 Faults on Portuguese translation of the Winecfg.exe program