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