Posted: Wed 05 Oct 2005, 11:39 Post subject:
How to compile and run Wine for Puppy

I have just finished compiling the latest Wine for Puppy and am posting this tutorial for anyone who might want to give it a shot themselves. Wine is a very large and complicated program and is not really suited for dotpup or pupget, so for the time being compiling it yourself is your best option. Please note also that these instructione are for running Puppy from the live cd and the methods would have to change in order to apply to Puppy from usb or hd.

The version I used is the latest build as of this writing-Wine-20050930

Compiling Wine

Extract the wine source tarball to your Linux partition using whatever method you prefer, whether that be command line or gui. You will be building wine HERE, NOT inside pup001. Wine is too large to be built inside pup001.

Wine has a script that will automatically build and install Wine for you. Don't use it, as it will install everything in the wrong place for Puppy and won't run. The libraries would end up in /usr/local/lib and puppy is not set up to look there.

Open a terminal an change to the directory that the wine source is located in. If I had extracted it to /mnt/hda2, I'd type:

Code:

cd /mnt/hda2/wine-20050930

Now we must configure wine. Type:

Code:

./configure --prefix=/usr

--prefix=usr tells the compiler to put everything into /usr instead of /usr/local

Ordinarily with most programs the next step would be make. In the case of wine things are somewhat different. Type:

Code:

make depend

After that completes, type:

Code:

make

As long as that gives you no errors then Wine has compiled successfully. The last step is to install the binaries. Type:

Code:

make install

It is very important that your pupfile has been resized to accomodate Wine before you7 do this. Otherwise you will run out of room before wine is even installed all of the way. I reccomend you increase it's size by at least 512mb, which should give you enough room for wine and for some of the programs that you want to install.

Save the directory you compiled wine in. When a new version of wine comes out, you can remove the old one by typing:

Code:

make uninstall

You can then compile and install the new version.

Configuring Wine

After you have installed Wine, it must be configured before it can be used. There are several ways of doing this.

Winetools is an excellent gui tool that will automatically install many popular programs. It also has the benefit of being open source and free. Unfortunately, winetools can not be run as root. I've tried using it as Spot but there are just too many hassles.

Winesetuptk is a little TK gui that will do a basic configuration. It has the same drawbacks as winetools but very few strengths.

The best way to setup Wine in our case is by using the included tools. Run, from the command line:

Code:

winecfg

The first time winecfg runs it will create a directory .wine in /root. It will also setup a fake windows drive inside .wine. It is neccessary to trick many Windows apps into thinking they are being run on a Windows machine or they will refuse to run. After these things are done you will get a neet little gui window where you can set lots of options. I'll come back to that later.

One additional step in setting up wine involves creating a config file inside .wine. You can generate one manually if you wish, but I recomend you try this one (especially if you're new to Wine):
http://ds80-237-203-29.dedicated.hosteurope.de/wt/config.212
Download it to your .wine directory and rename it to config. This is a pretty good way to get started.

Installing and running Windows software

Once you have all of this done you will want to install your first Windows program. The way to use wine to run a Windows executable is done on the command line. I will give Photoshop as an example. I have a cd with Photoshop7.0, which is mounted at /mnt/cdrom. I'll type:

Code:

wine '/mnt/cdrom/Photoshop 7.0/Setup.exe'

In this case the quotes are important, as Windows allows spaces in file and folder names. This version of Photoshop is one of the programs that has been well tested under Wine, so the installation wizard will come up and run much as it does with Windows. Some windows will pop up in wierd places, be incomplete, or possibly illegible. This is to be expected, but on the whole the installation should go smoothly.

Once installed I'd call it from the command line by typing:

Code:

wine /mnt/home/photoshop/photoshop.exe

/mnt/home/photoshop is the directory where I chose to install Photoshop under during the installation. Most programs will default to drive C under Program Files, which is in this case /root/.wine/drive_c/Program Files. However, most programs will let you decide where to put them. The command to run your program can be made into a script, making the job easier. I'd open a rox window and navigate to /root/my-applications/bin. Then right click and choose from the menu new/script. Choose a name for your script, in this case photoshop. Open the script and add the appropriate lines.

Code:

! bin sh

wine /mnt/home/photoshop

Since /root/my-applications/bin is in your path, you can now call Photoshop from the command line simply by typing:

Code:

photoshop

This script can also be dragged to the desktop where you can now simply click to open it.

You may find that some programs will simply fail to open. In that case you can use the winelauncher command in place of simply wine to get a debugging output. Other programs will run, but they will run erratically or have frequent crashes. This is where winecfg comes in again. Some programs don't integrate well into your desktop (Photoshop is notorious for this). You can use winecfg to give them their own virtual windows desktop and they will then behave better. Sometimes this is enought to make a program that is crashing start to run smoothly. You will also want to make sure that the sound is set to the correct module, as wine defaults to Alsa which is not in Puppy. Another thing to try if you are having problems with a particular program is to change the version of windows that wine emulates (I know, Wine Is Not an Emulator). Some programs will not even allow you to install unless Wine reports itself as WindowsXP, wile others will run better as Windows98. If you are having problems with fonts that look messy, or don't display at all, then install the MS core fonts. I'll provide a link here once I track it down.

I recomend that you stick to programs known to work at first. Some programs that install relatively easily are Photoshop7.0, MS office (various versions), and Macromedia Dreamweaver (which won't install unless you set your Windows version to WindowsXP). Internet Explorer can be installed and it's quite handy to have it available for web development so that you can test how your pages will display in the worlds most common browser. However, it's one of the harder programs to get running.

Many will ask the question of whether it's worth it to go through all of this in order to run a few Windows apps. Just learn to use the native Linux alternatives! In most regards I agree wholeheartedly with that assumtion. However, if you can't live without some certain program then it may very well be woth it to you. In that case I'd say this. WindowsXP takes up several GB's of space on your hard drive, runs slowly in many cases, and is a huge security risk unless you patch it dailly. Compare that to 53mb for the Puppy live cd plus around 400mb for wine. You now have a rock solid Linux system that is much more difficult to exploit, will run circles around ANY version of Windows, and now has the ability to run many of the same programs.

You may prefer Puppy without Wine and for good reason, but Puppy with Wine is much nicer than Windows. Plus, Wine decreases the need for Windows promoting competition. The more people run Wine, the more MS will have to start being nice to their customers and the more they will realize that they will have to play fair. Bit by bit the Monopoly is being torn down. Plus, I get a real kick out of running Internet Explorer using a tiny Linux Distro. The cuteness factor goes up even higher.

Have fun and good luck. If you have any questions I'll try to provide some answers. Keep in mind that I'm not an expert, just persistent.

I have tried to follow your instruction to compile Wine for Puppy but failed already in the very first steps. I still get the message when trying to compile wine
# ./configure
checking build system type... i686-pc-linux-gnuoldld
checking host system type... i686-pc-linux-gnuoldld
checking whether make sets $(MAKE)... no
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

I understand that the compiler should be installed with Puppy if I add usr_devx.sfs to Puppu and reboot. I have added, as recommended to, it to the drive /mnt/home and rebooted the machine, but the outcome is still the same. Puppy is installed on a CF card and I wonder if this is causing the problem and the usr_devx.sfs file has to be installed in a different folder. any suggestions?
thanks Henny

Try putting the usr_devx.sfs file in the main directory of the card, not mounted as /mnt/home. Or see if it is currently resident there.

I wonder though, if how the card boots and when the filles are recognized/ how Puppy looks for them.

I just tried compiling Wine on a hard drive install and it worked fine. The compile seemed even faster than in most other distros that i have tried._________________I love it when a plan comes together

I compiled Wine for the first time ever and thanks to Nathan's instructions everything went fine.

Also successfully installed and run my first 'Wine' application that I daily use in Windows, my favorite archiver and file manager 7-zip.

But after installing Wine, I noticed some weird change about free pup001 disk space. Before first Wine installation I resized pup001 to 1 GB. After Wine installation Puppy Resize PFILE utility reported that only about 28 MB free space left in /root. I uninstalled Wine with 'make uninstall' and resized pup001 to 1,5 GB. Installed Wine again. But this time Wine left even less!?...

Leon,
There is a bug in the script which re-sizes the pupfile. This goes back a couple of versions and was supposedly fixed. Anyway, what happens is that occasionally the pupfile physically gets resized but then upon reboot the new size is not recognized by Puppy. According to the rxvt window you posted, your /root directory is around 700mb, but you said that you had already re-sized it to 1.5gb. This leads me to believe that this is what is going on. I had the same problem a couple of times recently trying to resize the pupfile, so I know for a fact that it's still going on.

I will do a forum search when I get the time to see if I can find out how this was resolved when it came up before. In the meantime I'd suggest backing up everything in /root as it's likely that you may need to start with a fresh pupfile.

I'm still learning myself, and recently was given some good information on how to get the size down on these binaries. I may post updated instructions at some point and I also haven't ruled out the possibility of packaging up Wine myself if I can get the size down. Right now, though, I just have too much on my plate.

Hen,
usr_devx.sfs must be on the same hd as your pupfile. In the case of a USB install pup001 is on the flash card, so I believe that that is where you must place it. I don't really know for sure how this would all work with a flash setup.

Quote:

Please note also that these instructione are for running Puppy from the live cd and the methods would have to change in order to apply to Puppy from usb or hd.

I'm sure there is a way to do this, even if it requires mounting the file manually. Try searching the forum archives for anything on usr_devx.sfs.

Incidentally, if you do get it compiled will there be enough room on the flash card to hold it all?

1. Botted to Windows and renamed the old improperly resized 1,5 GB pup001 with all my programs and Wine installed on it to pup001_old.
2. Rebooted to Puppy and made fresh pup001. With Puppy Resize PFILE utility first resized it by +512M, then by +128M, then by +64M to a total size 983040 Kbytes in /root.
3. Rebooted to Windows and renamed pup001 to pup001_new.
4. Renamed pup001_old to pup001.
5. Rebooted to Puppy and in Rxvt mounted pup001_new:

mount -t ext2 -o loop /mnt/home/pup001_new /mnt/pupxxx

6. With Xfe file manager deleted all directories and files in pup001_new.
7. With Xfe file manager copied all pup001 directories and files from /root to pup001_new and dismounted pup001_new:

umount /mnt/pupxxx

8. Rebooted to Windows and renamed pup001 to pup001_old and pup001_new to pup001.
9. Rebooted to Puppy. Everything works fine.

It seems that in Puppy 1.0.5 the pupfile can be properly resized only to less then 1 GB.

My computer is Windows 98/P4/256 MB RAM/80 GB HDD.

On the Main News page I founded these Barry's instructions about squashfs files like usr_devx.sfs or usr_more.sfs file:

29July05
...
The PC that you test this on must have a Linux swap partition, or failing that heaps of RAM, as the C/C++ compiler needs a lot of space for transient storage.
...
At bootup, if Puppy finds /mnt/home/usr_devx.sfs exists (same place as the pupxxx file), it gets mounted on /.usr (invisible directory) and by unionfs gets mounted on /usr. So, you can see exactly what is in usr_devx.sfs by looking in /.usr (read only). You could also copy it elsewhere to experiment with modifying it and then create another usr_devx.sfs file. Say that you have copied /.usr to /mnt/home/tmp/.usr, and edited it, then you can turn that into a squashfs file like this:

i copied the usr_devx.sfs file into / and rebooted the pc board but i am still not able to run /configure. I wonder however, if it did not mount the usr_devx.sfs file properly in the boot up. I there anyway of mounting / installing the usr_devx.sfs manually, so i can be sure that puppy has recognised it?
The CF card is rather large and hopefully should let me compile wine on it.
Henny

Much of what I mentioned above can be disregarded now unless you really want to DIY. I've gotten wine stripped down as much as possible and made an unleashed package. Most users seem to be happy with the results so far. See this thread:
http://www.murga.org/~puppy/viewtopic.php?t=2988

Now that I have read the article instructing how to compile wine, I am wondering how I am able to use wine without compiling it. I just pasted the usr devx file onto the directory where my pup file was located. Now, I can run windows apps by just typing "wine" followed by the windows exe file._________________linux newbie

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum