I don't know how to compile Wine!

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
RedMartin
Level 1
Level 1
Posts: 5
Joined: Sat Jun 14, 2008 11:18 am

I don't know how to compile Wine!

Post by RedMartin »

I'm a Linux noob. I'm using Ubuntu 8.04 and understand that, in order to get FEAR to run, I need to remove Wine 1.0, download the source and a patch and then recompile Wine.

I have no idea how to do this. The How To section on the AppsDB makes assumptions that you know what to do already.

Where can I find an explanation of the process? I've had no luck searching probably because I don't know the correct terms!

Many thanks.
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

I don't know how to compile Wine!

Post by austin987 »

On Thu, Jun 26, 2008 at 1:46 PM, RedMartin <[email protected]> wrote:
I'm a Linux noob. I'm using Ubuntu 8.04 and understand that, in order to get FEAR to run, I need to remove Wine 1.0, download the source and a patch and then recompile Wine.

I have no idea how to do this. The How To section on the AppsDB makes assumptions that you know what to do already.

Where can I find an explanation of the process? I've had no luck searching probably because I don't know the correct terms!

Many thanks.





http://wiki.winehq.org/RegressionTesting

While not specifically about that, should have most of the info you need.
arrenlex
Newbie
Newbie
Posts: 4
Joined: Sat Jun 28, 2008 12:43 am

Post by arrenlex »

The regression testing howto isn't really applicable, to be honest. It's some very advanced stuff involving checking wine out of the development repository, which you totally don't need to do. Try this:

Download the source of whatever version you're interested in (you want a .tar.bz2 file, that's an archive format like .zip)
http://sourceforge.net/project/showfile ... e_id=77449

Extract the downloaded file (try right-clicking in your file manager and going to something like "extract"). This should create a folder of the same name as the archive (i.e. if you downloaded the source archive wine-1.1.0.tar.bz2, extracting it should create the folder "wine-1.1.0" containing the sources for wine.

Download your patch (should be a .patch file) and save it into the root of this folder as well.

Open a command line (terminal). Navigate to the wine directory. For example, if you extracted your archive into /home/brian/development/wine-1.1.0, then you would open a terminal and issue the following command: (cd means "change directory").

cd /home/brian/development/wine-1.1.0

Apply your patch using the following command:
patch -p1 < whateverfile.patch

Look carefully at the output. If it tells you that "hunks failed", stop. Your patch didn't apply, because the source has changed too much from the version the patch was made for. Are you sure you downloaded the version of wine the patch was made for? Post here for more help if this happens.

If the patch applied successfully, it's time to compile wine. Open up your package manager (i.e. synaptic) and remove the "wine" package, which you will be replacing. Then install the build-essential package. This includes the gcc compilers and some libraries which you will need to build wine. Additionally, install the packages "nasm", "yasm" and "bison".

Go back to your terminal and type the command

./configure

Watch the output carefully. If it tells you that you need something else that I've forgotten, search for it on Synaptic or post here and we'll tell you what package to download. If the command finished successfully, you'll see it end with "run make depend && make to compile wine". In that case, run the following command:

(if you have a single core machine, run:)
make depend && make

(if you have dual core machine, instead run:)
make depend && make -j 3

(quad core machine, instead run:)
make depend && make -j 6

Then sit back and grab a cup of coffee, wine will take anywhere from 15 minutes to 45 minutes to compile, depending on your machine.

If the make command produces errors, come back here. Otherwise, if it finishes successfully, issue the command "sudo make install" to install wine, and type your password when prompted.

You can now use the "wine" command to run your newly patched wine. :) Check to make sure you're running the expected version using wine --version.
RedMartin
Level 1
Level 1
Posts: 5
Joined: Sat Jun 14, 2008 11:18 am

Post by RedMartin »

Wow! What an answer. Thank you.

I've got nothing planned for this weekend so I'll give it a go and report back here with my results.

Thanks again.
arrenlex
Newbie
Newbie
Posts: 4
Joined: Sat Jun 28, 2008 12:43 am

Post by arrenlex »

RedMartin wrote:Wow! What an answer. Thank you.

I've got nothing planned for this weekend so I'll give it a go and report back here with my results.

Thanks again.
My pleasure. :) Just so you know, for newbie questions, the #ubuntu channel on irc.freenode.net is a great bunch of folks (or was a year ago when I was active there). Don't be afraid to ask them questions about anything you want to know.
RedMartin
Level 1
Level 1
Posts: 5
Joined: Sat Jun 14, 2008 11:18 am

Post by RedMartin »

Despite one hunk failing it's apparently not an issue according to wine apps db.

So I set about compiling Wine and get this:
configure: error: X development files not found. Wine will be built
without X support, which probably isn't what you want. You will need to install
development packages of Xlib/Xfree86 at the very least.
Use the --without-x option if you really want this.
The issue is that I can't find xlib or xfree86 in Synaptic!
looki
Level 2
Level 2
Posts: 38
Joined: Mon Apr 21, 2008 3:20 pm

Post by looki »

to compile wine u need some packages, on opensuse im using zypper or yast2 -i for it. the package u just need may be called xorg-x11-devel (on opensuse).

if the configure script bothers for missing files, i recommend to download them. sure u need not all of them, for example u may not need isdn support or digital camera support.
but to be sure all will be fine u can download them all, because there are not really much files needed.

btw the devel files arnt needed to run wine, they are needed to compile it, this will happen to you offten when you need to compile software. but this wont slow your system down, it just blows it up a bit.

if u have a 64bit linux, it can happen to you, that you will come in much trouble, because wine is 32 bit and that means u need alot 32bit files.

after downloading the needed files, do ./configure again, until it stops asking for missing files. then go on with "make depend".
RedMartin
Level 1
Level 1
Posts: 5
Joined: Sat Jun 14, 2008 11:18 am

Post by RedMartin »

Wine is compiling now. Time for a cup of tea.

It's funny that, even though it's a PITA, this is so much more fun than doing something similar in Windows. I feel like I'm learning something minute after minute.
RedMartin
Level 1
Level 1
Posts: 5
Joined: Sat Jun 14, 2008 11:18 am

Post by RedMartin »

All done and FEAR is running very well.

I must say that I do prefer the package version of Wine in the way it sets up the Application menu to give easy access to Drive C and Winecfg.

One final question. What is the correct format for creating a launcher so that I can run FEAR with one click? I've tried:
wine /home/martin/.wine/drive_c/Pro*/Sierra/FEAR/FEAR.exe

but it fails. If I navigate cd /home/martin/.wine/drive_c/Pro*/Sierra/FEAR and then wine FEAR.exe I can run it via a Terminal. I just can't seem to figure out how to make that into one command.

Many thanks for all the help.
Roccivic
Newbie
Newbie
Posts: 2
Joined: Mon Jun 30, 2008 4:23 am

Post by Roccivic »

RedMartin wrote:All done and FEAR is running very well.
One final question. What is the correct format for creating a launcher so that I can run FEAR with one click? I've tried:
wine /home/martin/.wine/drive_c/Pro*/Sierra/FEAR/FEAR.exe

but it fails. If I navigate cd /home/martin/.wine/drive_c/Pro*/Sierra/FEAR and then wine FEAR.exe I can run it via a Terminal. I just can't seem to figure out how to make that into one command.

Code: Select all

env WINEPREFIX="/home/martin/.wine" wine "C:\Pro*\Sierra\FEAR.EXE"
Peace
Usurp
Level 4
Level 4
Posts: 161
Joined: Sat Apr 19, 2008 7:16 am

Post by Usurp »

Roccivic wrote:
RedMartin wrote:All done and FEAR is running very well.
One final question. What is the correct format for creating a launcher so that I can run FEAR with one click? I've tried:
wine /home/martin/.wine/drive_c/Pro*/Sierra/FEAR/FEAR.exe

but it fails. If I navigate cd /home/martin/.wine/drive_c/Pro*/Sierra/FEAR and then wine FEAR.exe I can run it via a Terminal. I just can't seem to figure out how to make that into one command.

Code: Select all

env WINEPREFIX="/home/martin/.wine" wine "C:\Pro*\Sierra\FEAR.EXE"
Peace
Wrong way to do this.
See http://wiki.winehq.org/FAQ#head-3b297df ... b8edc21619
looki
Level 2
Level 2
Posts: 38
Joined: Mon Apr 21, 2008 3:20 pm

Post by looki »

by having the same purpose i figuered out that u must use the full pathes (no * inside) when writing shell scripts.
Locked