Wine Solaris Port


Notes for Wine Patch Kit - Port by Robert Lunnon

Dependencies

libaudioio
libaudioio if you want Solaris Audio, get the latest CVS version from SourceForge

XFree86
XFree86 Client Libraries, Solaris X Libraries should work but I get a segfault in keyboard input. Patched X Libraries may work better - I Havent tested recently)

Open GL
OpenGL Wine can use openGL for Direct 3d acceleration if you have it, either the Mesa variety or utah glx

GCC
Wine builds with gcc 3.x with gnu binutils, your gcc must be compiled to use the gnu assembler to compile wine. Portions of wine are in assembly code and are not compatible with solaris AS. GCC may be compiled to use either gnu or Solaris ld

Patch
To use the maintain script you will need gnu patch installed in /usr/local/bin, look for it on http://www.sunfreeware.com Depending on the version of patch in your distribution the default patch may work, but you will need to modify the patchit script.

Building


Unpack the patch kit in a place of your choosing.
To Build wine change to the base directory for your wine source tree noting where you unpacked the patch kit
execute the following substituting the relevant paths
{path to patch kit}/bin/maintain download {path to patch kit} $PWD
For example, if you unpacked the patch kit in your home directory and you want to place your wine source tree in /usr/src/wine2004, the following commands should work

cd /usr/src/wine2004
$HOME/wine-patchkit/bin/maintain download $HOME/wine-patchkit $PWD

The maintain script will log into the wine CVS and retreive the latest sources, patch them and build wine configured to install in /opt/cfw/wine. The script does not actually install wine.
Note the cvs password is "cvs"
To install wine change to the wine directory (cd wine) become root and execute:
make install

To run wine you will need to set up a path to /opt/cfw/wine/bin so the loader can find the wine executables and you may need to add /opt/cfw/wine/lib to LD_LIBRARY_PATH.


Setting up

I have provided a basic setup script located in /opt/cfw/wine/INSTALL directory, This will set up a basic wine per user configuration assuming you don't have any native windows installations to use

The script calls winecfg at the end to allow you to customise the installation

You can also customise wine by editing $HOME/.wine/config

The install script places the root of your C: drive at $HOME/.wine/c



Special (Non Standard) Features.

Threading Model
This port also features a run-time configurable threading model. This is set using the WINE_THREADMODE environment variable. It can be set to

SYSV   = Use the thr_* functions. This is the default
LWP     = Use Native LWP (Light Weight Processes)
PTHREAD = Use pthreads library - Disabled for this version

NONE  = Single Threaded, Deny all requests for thread creation

Some programs work better using different threading models. I find Direct X Applications fail with the LWP threading but some work using Solaris threads.
Simple scripts can be used to encapsulate this functionality
eg you could create a script call "winelwp" to start using the LWP threading model

WINE_THREADMODE=LWP
export WINE_THREADMODE
wine $*


Memory Top
Windows has the Top of user memory at 0xC0000000 while Solaris has the top of user memory at 0xE0000000. Memory objects allocated under this port of Wine may be located above the expected top of user memory for windows. Apparently there are some applications sensitive to this.

Debugger
The Wine Debugger does not work due to linuxisms present in the implementation

Need Help
Try http://www.winehq.com

If that doesn't help I may be able to respond to small volumes of requests for help at bobl@N-O-S-P-A-M-optushome.com.au (Remove the N-O-S-P-A-M-)

Source Code
Base Source code can be retreived from the wine cvs see http://www.winehq.com for instructions