Winelib Guide: remove obsolete info
Dimitrie O. Paun
dpaun at rogers.com
Mon Jan 26 22:21:14 CST 2004
ChangeLog
Remove obsolete info about wrapper, they are no
longer necessary.
Index: documentation/winelib-porting.sgml
===================================================================
RCS file: /var/cvs/wine/documentation/winelib-porting.sgml,v
retrieving revision 1.10
diff -u -r1.10 winelib-porting.sgml
--- documentation/winelib-porting.sgml 26 Nov 2003 03:55:01 -0000 1.10
+++ documentation/winelib-porting.sgml 26 Jan 2004 01:24:29 -0000
@@ -149,84 +149,6 @@
</para>
</sect1>
- <sect1 id="init-problems">
- <title id="init-problems.title">Initialization problems</title>
- <para>
- Initialization problems occur when the application calls the Win32 API
- before Winelib has been initialized. How can this happen?
- </para>
- <para>
- Winelib is initialized by the application's <function>main</function>
- before it calls the regular <function>WinMain</function>. But, in C++,
- the constructors of static class variables are called before the
- <function>main</function> (by the module's initializer). So if such
- a constructor makes calls to the Win32 API, Winelib will not be
- initialized at the time of the call and you may get a crash. This
- problem is much more frequent in C++ because of these class
- constructors but could also, at least in theory, happen in C if you
- were to specify an initializer making calls to Winelib. But of
- course, now that you are aware of this problem you won't do it :-).
- </para>
- <para>
- Further compounding the problem is the fact that Linux's (GNU's?)
- current dynamic library loader does not call the module
- initializers in their dependency order. So even if Winelib were to
- have its own initializer there would be no guarantee that it would be
- called before the initializer of the library containing this static
- variable. Finally even if the variable is in a library that your
- application links with, that library's initializer may be called
- before Winelib has been initialized. One such library is the MFC.
- </para>
- <para>
- The current workaround is to move all the application's code in a
- library and to use a small Winelib application to dynamically load
- this library. Tus the initialization sequence becomes:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- the wrapper application starts.
- </para>
- </listitem>
- <listitem>
- <para>
- its empty initializer is run.
- </para>
- </listitem>
- <listitem>
- <para>
- its <function>main</function> is run. Its first task is to
- initialize Winelib.
- </para>
- </listitem>
- <listitem>
- <para>
- it then loads the application's main library, plus all its
- dependent libraries.
- </para>
- </listitem>
- <listitem>
- <para>
- which triggers the execution of all these libraries initializers
- in some unknown order. But all is fine because Winelib has
- already been initialized anyway.
- </para>
- </listitem>
- <listitem>
- <para>
- finally the main function calls the <function>WinMain</function>
- of the application's library.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- This may sound complex but Winemaker makes it simple. Just specify
- <option>--wrap</option> or <option>--mfc</option> on the command line
- and it will adapt its makefiles to build the wrapper and the
- application library.
- </para>
- </sect1>
-
<sect1 id="com-support">
<title id="com-support.title">VC's native COM support</title>
<para>
Index: documentation/winelib-user.sgml
===================================================================
RCS file: /var/cvs/wine/documentation/winelib-user.sgml,v
retrieving revision 1.4
diff -u -r1.4 winelib-user.sgml
--- documentation/winelib-user.sgml 2 Oct 2003 04:25:44 -0000 1.4
+++ documentation/winelib-user.sgml 26 Jan 2004 01:23:58 -0000
@@ -13,7 +13,7 @@
<bookinfo>
<title>Winelib User's Guide</title>
<!-- Until we learn how to format this thing nicely,
- we can't really incude it -->
+ we can't really include it -->
<!--authorgroup>
<author>
<firstname>Wilbur</firstname>
--
Dimi.
More information about the wine-patches
mailing list