Difference between revisions of "Running Continuum under Wine"
I88gerbils (talk | contribs) m (→Patching Wine: 0.9.12 line changes (necessary?)) |
(copyedit) |
||
Line 1: | Line 1: | ||
== Patching Wine == | == Patching Wine == | ||
− | To run [[Continuum]] under [http://www.winehq.com/ Wine], you | + | To run [[Continuum]] under [http://www.winehq.com/ Wine], you need to apply a patch to Wine's source code. Copy the text block below into a file, such as <tt style="color: navy;">cont.diff</tt>, and follow the patching instructions below. |
− | <pre>diff --git a/dlls/kernel/process.c b/dlls/kernel/process.c | + | <pre style="color: navy;">diff --git a/dlls/kernel/process.c b/dlls/kernel/process.c |
index 33f9ee1..d50cb7d 100644 | index 33f9ee1..d50cb7d 100644 | ||
--- a/dlls/kernel/process.c | --- a/dlls/kernel/process.c | ||
Line 15: | Line 15: | ||
cid.UniqueThread = 0; /* FIXME ? */</pre> | cid.UniqueThread = 0; /* FIXME ? */</pre> | ||
− | Alternatively, in | + | Alternatively, in Wine 0.9.12: <tt style="color: navy;">@@ -2325,6 +2325,7 @@</tt> |
− | + | Place your new <tt style="color: navy;">cont.diff</tt> file inside the topmost directory of Wine's source code (that which includes the <tt style="color: navy;">LICENSE</tt> file), and run <tt style="color: navy;">cat cont.diff | patch -p1</tt> to apply the patch. Follow with the usual <tt style="color: navy;">./configure && make depend && make</tt> to build Wine. If you'd wish to have this replace your current Wine installation or to install it globally, run <tt style="color: navy;">make install</tt> as <tt style="color: navy;">root</tt>. | |
− | It is important to run | + | It is important to run <tt style="color: navy;">winecfg</tt>, select the <tt style="color: navy;">Drives</tt> tab, click <tt style="color: navy;">C:</tt>, <tt style="color: navy;">Show Advanced</tt>, and set the <tt style="color: navy;">Serial:</tt> value to a random number higher than <tt style="color: navy;">2000</tt>. If you do not, you cannot connect to catid billers, or may cause other issues on the SSC biller. |
− | == Common | + | == Common problems == |
− | If you have a binary version of | + | If you have a binary version of Wine installed from a <tt style="color: navy;">.rpm</tt>, <tt style="color: navy;">.deb</tt>, etc., it's recommended to remove it before installing and setting up Wine from source, so as not to cause confusion. |
− | Make sure you are running Continuum | + | Make sure you are running Continuum in a color depth of at least <tt style="color: navy;">16</tt> ( <tt style="color: navy;">View</tt> > <tt style="color: navy;">Options</tt> > <tt style="color: navy;">Graphics</tt> > <tt style="color: navy;">Color Depth:</tt> ). Using 8-bit color depth is possible, but you have to check your <tt style="color: navy;">/etc/X11/xorg.conf</tt> (etc.) file to make sure you have 8-bit Depth/Modes configured. Usually, a simple way to verify if you can safely use 8-bit color depth is to check whether you can set your desktop environment to use it. |
− | + | If having problems with sound, use <tt style="color: navy;">winecfg</tt> to enable (check) <tt style="color: navy;">ALSA Driver</tt> (<tt style="color: navy;">Audio</tt> tab) and set <tt style="color: navy;">Hardware Acceleration:</tt> to <tt style="color: navy;">Emulation</tt>. | |
− | + | Chat window will not appear when you task out. This is because Continuum under Wine doesn't understand that it is minimized, so it will never start the chat window. | |
− | + | If you get a <tt style="color: navy;">libwine.so.1</tt> error when trying to run Wine globally (instead of running the application from its source directory), add the following lines to your <tt style="color: navy;">/etc/ld.so.conf</tt> file: <tt style="color: navy;">/usr/local/lib</tt> and <tt style="color: navy;">/usr/local/lib/wine</tt>. If problems still occur, copy <tt style="color: navy;">libwin.so.1</tt> to those locations from the <tt style="color: navy;"><i>winesource</i>/libs</tt> directory. | |
− | + | <tt style="color: navy;">ALT</tt> key does not function properly if it is bound to another XIM like kinput2 (e.g. tried to bring up map). | |
− | == | + | If connecting to a zone causes you to login as <tt style="color: navy;">^Banned</tt>, please run <tt style="color: navy;">winecfg</tt>, select the <tt style="color: navy;">Drives</tt> tab, select <tt style="color: navy;">C:</tt>, <tt style="color: navy;">Show Advanced</tt>, and make sure the <tt style="color: navy;">Serial:</tt> value is set to a random number greater than <tt style="color: navy;">2000</tt>. |
− | When Continuum runs, one of the first things it does is create another process of itself with some | + | == Why it works == |
+ | |||
+ | When Continuum runs, one of the first things it does is create another process of itself with some privileges restricted, such as the ability to call <tt style="color: navy;">OpenProcess</tt>. When the child process attempts to repeat this step, it receives an error that <tt style="color: navy;">OpenProcess</tt> failed, which tells the process that it is the child. The child process then proceeds to run the game. | ||
Since Wine does not properly emulate this parent-child security, this source modification is necessary to get Continuum to run under Wine. | Since Wine does not properly emulate this parent-child security, this source modification is necessary to get Continuum to run under Wine. |
Revision as of 10:28, 22 June 2006
Patching Wine
To run Continuum under Wine, you need to apply a patch to Wine's source code. Copy the text block below into a file, such as cont.diff, and follow the patching instructions below.
diff --git a/dlls/kernel/process.c b/dlls/kernel/process.c index 33f9ee1..d50cb7d 100644 --- a/dlls/kernel/process.c +++ b/dlls/kernel/process.c @@ -2460,6 +2464,7 @@ HANDLE WINAPI OpenProcess( DWORD access, OBJECT_ATTRIBUTES attr; CLIENT_ID cid; +if (access & PROCESS_VM_WRITE) return NULL; cid.UniqueProcess = (HANDLE)id; cid.UniqueThread = 0; /* FIXME ? */
Alternatively, in Wine 0.9.12: @@ -2325,6 +2325,7 @@
Place your new cont.diff file inside the topmost directory of Wine's source code (that which includes the LICENSE file), and run cat cont.diff | patch -p1 to apply the patch. Follow with the usual ./configure && make depend && make to build Wine. If you'd wish to have this replace your current Wine installation or to install it globally, run make install as root.
It is important to run winecfg, select the Drives tab, click C:, Show Advanced, and set the Serial: value to a random number higher than 2000. If you do not, you cannot connect to catid billers, or may cause other issues on the SSC biller.
Common problems
If you have a binary version of Wine installed from a .rpm, .deb, etc., it's recommended to remove it before installing and setting up Wine from source, so as not to cause confusion.
Make sure you are running Continuum in a color depth of at least 16 ( View > Options > Graphics > Color Depth: ). Using 8-bit color depth is possible, but you have to check your /etc/X11/xorg.conf (etc.) file to make sure you have 8-bit Depth/Modes configured. Usually, a simple way to verify if you can safely use 8-bit color depth is to check whether you can set your desktop environment to use it.
If having problems with sound, use winecfg to enable (check) ALSA Driver (Audio tab) and set Hardware Acceleration: to Emulation.
Chat window will not appear when you task out. This is because Continuum under Wine doesn't understand that it is minimized, so it will never start the chat window.
If you get a libwine.so.1 error when trying to run Wine globally (instead of running the application from its source directory), add the following lines to your /etc/ld.so.conf file: /usr/local/lib and /usr/local/lib/wine. If problems still occur, copy libwin.so.1 to those locations from the winesource/libs directory.
ALT key does not function properly if it is bound to another XIM like kinput2 (e.g. tried to bring up map).
If connecting to a zone causes you to login as ^Banned, please run winecfg, select the Drives tab, select C:, Show Advanced, and make sure the Serial: value is set to a random number greater than 2000.
Why it works
When Continuum runs, one of the first things it does is create another process of itself with some privileges restricted, such as the ability to call OpenProcess. When the child process attempts to repeat this step, it receives an error that OpenProcess failed, which tells the process that it is the child. The child process then proceeds to run the game.
Since Wine does not properly emulate this parent-child security, this source modification is necessary to get Continuum to run under Wine.