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

All x.org libraries including libXrandr

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. If you have the Companion CD wine version loaded you may have to include /opt/cfw/wine/lib before the existing LD_LIBRARY_PATH to ensure wine finds the correct library versions. If all thing are correct running wine --version should emit the correct version number as indicated by the package name you downloaded.

$wine --version
Wine 20050419

Matches the package wine-20050419-solaris-5.10-i86pc-cfw.pkg.bz2 

Setting up

You can use the installer script supplied with the wine version included on the Solaris Companion CD, but I recommend the sidenet install script hostsed at  http://sidenet.ddo.jp/winetips/config.html

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 Now the default threading mode.
LWP     = Use Native LWP (Light Weight Processes) This is only available on Solaris 9
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.

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 $*

Stack
Under windows the amount of stack space a program needs is either 1 MB or what is declared in the executables header, because of the extra indirection through wine's abstraction layers and X,  I have found that some programs overrun their stack space. You can increase stack allocation with the WINE_STACK environment variable. This variable honours B K or M notation eg 2M = 2 Megabytes, 4048K = 4 Megabytes.  The value given is used as the minimum stack allocation, programs which have a stack larger than this allocated in the header will have 25% of this value added to their stack to account for wInes greater stack usage WRT Windows.

EG
WINE_STACK=2048K
export WINE_STACK
wine <args>

This will ensure that this program and any spawned subprograms get a minimum of a 2 MB stack and any programs with a declared stack size in their headers will get 512 KB extra stack space allocated.

Memory Top
Windows sets the Top of user memory at 0xC0000000 while Solaris sets the top 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 using the maintain script in the bin directory of the patchkit.
To comply with the LGPL wine is distributed under, the changes I have made are all available in the patchkit