Add "PrivServer" test which exercises DBusServer and dbus_shutdown
[platform/upstream/dbus.git] / README.win
1 ----------------------------------------
2 Windows port of the freedesktop.org D-Bus
3 ----------------------------------------
4
5 Requirements 
6 ------------
7 - cmake version >= 2.4.4 see http://www.cmake.org 
8 - installed libxml2 or libexpat from http://82.149.170.66/kde-windows/win32libs
9
10 Build
11 -----
12
13 unix
14 1. install cmake and libxml or libexpat 
15 2. get dbus sources 
16 3. mkdir dbus-build 
17 4. cd dbus-build 
18 5. cmake <dbus-src-root>/cmake or cmake -DDBUS_USE_EXPAT=on <dbus-src-root>/cmake in case libexpat should de used
19 5. make 
20 6. make install
21
22 win32
23 1. Install your prefered compiler
24         - Mingw from www.mingw.org 
25         - Visual C++ 2005 Express/Studio
26         
27 2. Install libxml2 or libexpat packages from 
28      http://82.149.170.66/kde-windows/win32libs
29    into a subdir win32libs in your program installation eg 
30      - german  => "c:\Programme\win32libs"
31      - english => "c:\Program Files\win32libs" 
32      
33 3. download and install the most recent CMake version from http://www.cmake.org/files/
34
35 4. apply dbus-win.patch: 'patch -p0 -i dbus-win.patch'
36
37 5. open command shell and run in the created build folder which resides side by side 
38    to the D-Bus sources:
39         - for mingw: 
40                 cmake -G "MinGW Makefiles" <options> ..\<dbus-source-root>\cmake
41         - for Visual C++
42                 cmake ..\<dbus-source-root>\cmake
43
44 7. build
45
46
47 Tests
48 -----
49 (when build with the Visual C++ IDE the *.exe files are 
50 in the bin/Debug and bin/Release folder)
51
52  - dbus library check 
53                 bin\dbus-test.exe .\test\data
54         
55  - bus daemon check 
56                 bin\bus-test.exe .\test\data
57
58  - check available names 
59                 bin\test_names.exe 
60
61  - check if dbus-daemon is accessable 
62                 bin\dbus-send.exe --session --type=method_call --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.ListNames method return sender=org.freedesktop.DBus -> dest=:1.4 array [              string "org.freedesktop.DBus"string ":1.4"] 
63                 
64  - start dbus-daemon
65                 * set DBUS_VERBOSE=0  (=1 for getting debug infos)
66                 * start bin\dbus-daemon --session
67                 * bin\dbus-send.exe  --dest=org.freedesktop.DBus --print-reply --type=method_call / org.freedesktop.DBus.StartServiceByName string:org.freedesktop.DBus.TestSuiteEchoService  uint32:455 method return sender=org.freedesktop.DBus -> dest=:1.8 uint32 2
68
69
70
71 Some build options
72 -------------
73     key                        description                            default value
74     ---                        -----------                            -------------
75 DBUS_USE_EXPAT              "Use expat (== ON) or libxml2 (==OFF)         OFF
76 DBUS_DISABLE_ASSERTS        "Disable assertion checking"                  OFF
77 DBUS_BUILD_TESTS            "enable unit test code"                       ON
78 DBUS_ENABLE_ANSI            "enable -ansi -pedantic gcc flags"            OFF
79 DBUS_ENABLE_GCOV            "compile with coverage profiling 
80                              instrumentation (gcc only)"                  OFF
81 DBUS_ENABLE_VERBOSE_MODE    "support verbose debug mode"                  ON
82 DBUS_DISABLE_CHECKS         "Disable public API sanity checking"          OFF
83 DBUS_INSTALL_SYSTEM_LIBS    "install required system libraries 
84                              (mingw: libxml2, libiconv, mingw10)"         OFF
85 CMAKE_BUILD_TYPE            "build type (== debug) or (== release)        release
86
87
88
89 Developers
90 ----------
91
92 Running the tests in Visual Studio:
93
94  To successfully run the tests by the IDE you must add
95  the FULL patch to test\data in your build directory
96  (e.g. c:\dbus\build\test\data)  
97  in something like 
98   -> Project Settings
99     -> Debugging
100        -> Command line arguments
101     
102     
103        
104 FAQ
105 ---
106
107 - How much work remains till DBUS win32 can be merged with the main project?
108
109 There are some patches outstanding and the most effort is required in
110 discussions with the main dbus team how to implement some parts. One of
111 the main dbus team estimated the open work to one fulltime week.
112 http://lists.freedesktop.org/archives/dbus/2006-November/006264.html
113
114 I assume they will answer ALL your questions, and they are very
115 interested in fully supporting win32.
116
117 - How far is WinDBus from being usable for production ?
118 dbus comes with a test suite which is used on unix to guarantate
119 production quality and this test suite runs mostly. There are some 
120 test not running and we need help to get them running.
121
122 In the pratice I and some other people are using dbus for at least more
123 than a half year in conjunction with kde on windows without any problems.
124
125
126 - On UNIX D-Bus uses UNIX sockets to communicate (correct me if I'm wrong). 
127   What is used on Windows ?
128   
129 tcp sockets, there are some efforts to get named pipe running, but some
130 design problems of the win32 api, we are not able to solve without
131 bigger changes to the dbus code base let us stop this effort.
132
133
134 - Do you have any clue if dbus-win32 can run in a Windows CE environment?
135
136 I was told that windows ce does not have posix function
137 open/close/select/... and dbus code uses such function in some area.
138
139
140 - Do you know if the C++ binding made by OpenWengo will be easily portable to Windows?
141
142 We have already ported the OpenWengo dbus-c++ binding, see in WinDBus svn  (http://sf.net/projects/windbus)
143 The related test applicationa are running well.
144
145
146 TODO
147 ----
148
149 February 2007:
150
151 - all changes of dbus-win.patch should become part of the official D-Bus code
152   
153 - all code currently disabled by DBUS_WIN_FIXME should work
154   
155 - clean up:
156     * bus/bus-service-win.c
157     * bus/dir-watch.c
158     * dbus/dbus-spawn-win.c
159     * dbus/dbus-sysdeps-util-win.c
160     * dbus/dbus-sysdeps-win.c
161
162
163 see also:
164 http://lists.freedesktop.org/archives/dbus/2006-July/005076.html