Wine Solaris Port


Notes for Wine 20030618 Port by Robert Lunnon

Dependencies

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

XFree86 Client Libraries, Solaris X Libraries should work but I get a segfault in keyboard input. Patched X Libraries may work better - I Haven't tested recently). There is a package o several essential Xfree libs on the distribution site

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

Unpacking


Wine is linked to be installed in /opt/cfw/wine and should be unpacked to there, you will need to set up a path to /opt/cfw/wine/bin so the loader can find the wine executables.


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.

Memory Protection Disabled

This version of wine has an environment variable setting which allows it to ignores page faults occuring within the wine process (It will still fault if unmapped memory regions are accessed). This is not the behaviour expected in Windows 32 bit subsystems, It will let programs  trounceover each others memory much like Win-16 did, (Windows Programs are notoriously Ill-behaved). But it does allow a wider variety of programs to run. In particular Installshield works. export WINE_PROTECTION=off will activate it (in bash) the default is protection on


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
LWP     = Use Native LWP (Light Weight Processes) This is the default
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. Note that wine DOES NOT link libthread when using the thread library so it may help to preload the threads library using the LD_PRELOAD environment variable, you may also find this leads to mysterious crashes.
I find Direct X Applications fail with the LWP threading but some work using libc Solaris threads emulation. Linking explicitly with libthread.so also results in a segfault  (The cause of this is under investigation) hence I have not explicitly linked libthread.so

Simple scripts can be used to encapsulate this functionality
eg you could create a script call "winethr" to start using the thr threading model

WINE_THREADMODE=THR
export WINE_THREADMODE
wine $*

or perhaps (If it works for you)

LD_PRELOAD=/usr/lib/libthread.so
export LD_PRELOAD

WINE_THREADMODE=THR
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. I suspect this sensitivity might be deliberate in some cases as an attempt to detect and fail on emulators like wine.

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 retrieved from the wine cvs see http://www.winehq.com for instructions
To comply with the LGPL wine is distributed under, the changes I have made are distributed as diffs to CVS wine under /opt/cfw/wine/diffs