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