2 A: Access to the latest CVS development tree:
3 cvs -d :pserver:pserver@cvs.jankratochvil.net:/cvs login
4 Just hit ENTER (empty password)
5 cvs -d :pserver:pserver@cvs.jankratochvil.net:/cvs -z3 checkout -d captive priv/captive
7 cvs -d :pserver:pserver@cvs.jankratochvil.net:/cvs -z3 checkout -d reactos -r captive -kk priv/reactos
9 The final mapping of directories to CVS repository after the step above:
10 captive -> priv/captive
11 captive/macros -> macros
12 captive/reactos -> priv/reactos
14 Current diff of captive changes against reactos (it may have backlog):
15 cvs -d :pserver:pserver@cvs.jankratochvil.net:/cvs -z3 rdiff -u -R -r bp_captive -r captive priv/reactos
17 Official reactos website:
18 http://www.reactos.com/
20 Access to the original reactos source tree (mirrored to my "priv/reactos"):
21 cvs -d :pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS login
22 Type the password "cvsanon" (without quotes)
23 cvs -d :pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS -z3 checkout reactos
25 You may also like ViewCVS web access to the repository:
26 http://cvs.jankratochvil.net/viewcvs/priv/captive/
27 http://cvs.jankratochvil.net/viewcvs/priv/reactos/?only_with_tag=captive
28 http://cvs.jankratochvil.net/viewcvs/macros/
30 Finally you can compile the package from the "captive" directory:
34 The package gets preconfigured with --enable-maintainer-mode option
35 automatically by './autogen.pl'. You can later just update the "captive"
36 subdirectory if it is your currentdir:
41 Although './autogen.pl' should not be needed do not bugreport if it wan't
42 rerun as some dependencies may not be respected by the package.
44 Q: Why it is based on static structures, no multithreading possibility?
45 A: reactos has also static design therefore there would be no possibility
46 to use the whole libcaptive in multithreaded way.
47 Another question is whether to support multithreading in the scope of one
48 reactos machine - this would be possible but it is not yet implemented
49 in libcaptive. All such points should be marked by "TODO:thread"
51 Q: Prefer during libcaptive coding the GNU stylee or reactos (=W32) coding style?
52 A: Hard decision as captive connects these two worls together.
53 It was decided to prefer coding in GNU style in the Gnome specific way.
55 Full function replaces apparently must use the same calling conventions.
56 Coding of the full-replace should be done in GNU style if coded from scratch
57 although it is permitted to leave the original function code if only minor
58 modifications were performed (decide whether it is not better to patch
59 reactos source files instead to keep the code unified).
60 Any other code besides function replace should use GNU style calling conventions.
62 All the normal (GNU) world uses 32-bit wchar_t but reactos (=W32) uses
63 16-bit (unsigned short) wchar_t. This would need GCC -fshort-wchar option.
64 It has effect on L"literal-string" or L'c' character-constants.
65 Unfortunately they expect libc-named functions such as wcsrchr(3) to also
66 follow this broken 16-bit way. FIXME: reactos-compat-includes
68 Q: How is the libcaptive project trustworthy?
69 A: We have to run foreign native closed-source W32 code which is certainly NOT
70 trust trustworthy in any way. We could close it to some separate address
71 space and give it some safe gateways to invoce our code for the public world
72 (read "UNIX processes") interaction. It would be too much complicated
73 without any gain thus we choose to open our libcaptive-using process to any
74 attacks by W32 but the whole libcaptive process MUST be closed by a sandbox.
75 Of course all the communication with libcaptive must be taken with care by
78 Q: How to check valid input arguments? Invalid processing state assumptions?
79 A: libcaptive uses uses various Gnome macros out of <glib/gmessages.h>.
80 The common final still should run safely when all theses checks are disabled
81 as the bug-free code should never invoce them. This is the same for
82 libcaptive with a little excuse for foreign native closed-source W32 code
83 beign run which can <a href="FIXME:How is the libcaptive project trustworthy?"
84 >never be trusted</a>. As we glued all the libcaptive code
85 together with the W32 code we no longer can protect all the borders to the
86 enemy land inside the one tainted process. Therefore even fully trusted
87 libcaptive code can never safely run with <glib/gmessages.h> checks
88 disabled. YMMV if your trust W32 code. Be aware that W32 code has to also
89 handle correctly all the corrupted disk data structure to comply with such
90 trusted relationship. I really dunno if it complies but I don't care as
93 Q: Is it safe to captive_cleanup() the process and captive_init() it again?
94 A: It should be possible to fully cleanup the state of libcaptive even after
95 <a href="FIXME:How to check valid input arguments? Invalid processing state assumptions?"
96 ><glib/gmessages.h> failures</a>. It is currently not implemented and it
97 may get dropped at all in the future as libcaptive process MUST be sandboxed
98 anyway. You are recommended (currently required) to terminate the sandboxed
99 process and initialize the new one instead of captive_cleanup().
101 Q: I am missing symbol although it is already implemented by reactos.
102 A: First look at $(top_srcdir)/src/libcaptive/ke/exports.captivesym
103 where it may be enough to add such symbol to the list of exported symbols.
104 If it is not compiled at all find such symbol definition in reactos.
105 If such file or directory isn't listed in captive reactos compilation part
106 you may need to add it to $(top_srcdir)/src/libcaptive/reactos/ according
107 to the template files around - you will really only add the file to
108 Makefile.am, no real file gets copied there (just symlinked automatically).
110 Usuaully you will also like to edit the appended file and simplify it by lines
113 #endif /* LIBCAPTIVE */
114 as too much (useless for you now) code would have dependencies on other
115 missing code and you would get into never ending race of solving missing ones.
116 If the feature being implemented is some feature not needed or not suitable
117 for the emulation by libcaptive you should implement the emulation
118 below $(top_srcdir)/src/libcaptive/ directly. The filename should conform
119 to the reactos directory tree standard if applicable.
121 Always rather implement emply emulation function than patching the referring
122 code to prevent code development conflicts with the mainstream reactos.
124 Q: Why not Wine instead of ReactOS?
125 A: Although <a href="http://www.winehq.com/">Wine</a> has better development
126 activity than <a href="http://www.reactos.com/">ReactOS</a> the decision
127 is strictly technical. We need to run W32 file system driver which always
128 lives in kernel-land in W32 system design.
129 guest-OS host-OS implements core library correspondence
130 Wine GNU/Linux user ntdll
131 ReactOS i386 hardware kernel+user ntoskrnl
132 (ReactOS is going to reuse Wine for its 'user' part.)
133 FIXME: href in the table title:
134 host-OS: http://www.vmware.com/support/reference/common/glossary/#hostos
135 guest-OS: http://www.vmware.com/support/reference/common/glossary/#guestos
136 While ReactOS is nice to provide us the wanted kernel emulation we also
137 need to run the guest-OS in GNU/Linux. Initially I wanted to extend Wine
138 to the kernel emulation effort but fortunately
139 <a href="mailto:Steven_Ed4153@yahoo.com">Steven Edwards<a> pointed me to
140 the ReactOS project which better suits the needs of captive.
142 The host-OS problem unfortunately hits us on ReactOS but this isn't
143 much hard task. W32 is designed to be hardware-independent using its <code>hal.dll</code>.
144 Unfortunately ReactOS doesn't follow this design and thus we have to patch
145 and replace various parts of hardware-dependent code even inside <code>ntoskrnl.exe</code>.
147 Some functions are provided both by <code>ntdll.dll</code> and
148 <code>ntoskrnl.exe</code> in W32. Suggested by
149 <a href="mailto:chorns@users.sourceforge.net">Casper Hornstrup</a> this has
150 to be differentiated as <code>ntdll.dll</code> lives in the userland
151 (low addressspace) and <code>ntoskrnl.exe</code> in the kernelland
152 (high addressspace). Unfortunately these two guys are very far each other
153 and they would have serious problems to correctly hear themselves as the
154 addresspace differentiates at 0x80000000. For completeness it may also
155 differentiate at 0xC0000000 address instead depending on whether /3GB was
156 specified during startup. BTW reactos always uses 0xC0000000 point (macro
157 <code>KERNEL_BASE</code>) although this address doesn't apply in any way on
158 reactos running in host-OS GNU/Linux when compiled for libcaptive.
160 Q: What is Ordinal in the W32 library symbols import/export scope?
161 A: Each exported symbol has its Ordinal specified - this number specifies the offset
162 in the library symbol table. During the symbol import from a different module
163 it can specify either the full symbol name or just this number - Ordinal.
164 I dunno why it was ever created as the symbol name string size is very tiny.
165 Fortunately the current versions of W32 binaries no longer utilize this Ordinal
166 feature thus captive doesn't provide them in its export.
168 Q: Why I don't see debug info for imported binary W32 modules? Do you use W32 symbol files?
169 Q: W32 symbol files have different debugging info structure. We would have to
170 convert it and I am not aware Wine or ReactOS already done this task.
171 Not yet implemented and I currently do not plan to do it.
173 Q: Any competiting projects?
174 A: Depending on your demands you may be interested in one of:
175 <a href="http://www.powerquest.com/partitionmagic/">PowerQuest PartitionMagic</a>:
177 <a href="http://www.acronis.com/products/osselector/">Acronis OS Selector</a>:
181 Eric Kohl, reactos developer:
182 ..." and ReactOS cannot run on Linux!"
183 "ReactOS won't run on Linux because of direct hardware access!"