ObexWin32

Questions about programming languages and debugging
Post Reply
User avatar
caisher
On the way to fame!
On the way to fame!
Posts: 46
Joined: 04 Oct 2007, 16:00
16
Location: Texas,USA
Contact:

ObexWin32

Post by caisher »

it's a nice tool
= OpenOBEX on Win32 =

[[TracNav(TOC)]]

The question wether/how OpenOBEX compiles/runs on win32 pops up now and then. Here is a general overview and a short checklist.

Please note: '''There is a complete prebuilt win32 package available. See [wiki:ObexDownloads]'''

== Does OpenOBEX compile on win32? ==

Yes. It has been tested with various native compilers and MinGW32 as cross-compiler. For a quick guide see the steps below.

The following compile environment for Windows (32bit) are at your options:
- Microsoft Visual Studio 9 .NET 2008 ([http://www.microsoft.com/express Express Edition] is sufficient)
- Microsoft Visual Studio 8 .NET 2005 ([http://www.microsoft.com/express/2005/ Express Edition] is sufficient)
- Microsoft Visual Studio 7.1 .NET 2003
- [http://www.mingw.org MinGW32]
- [http://www.cygwin.com Cygwin]

The proper Makefiles and Visual Studion project can be created with the not-yet-available
CMake support. With the current autotools, only the last two are supported.

== Does OpenOBEX run on win32? Is it useable? ==

OpenOBEX requires backends for each transport. Your options include:
- USB: libusb-win32, ''works''
- BT: MS BT stack, ''should work (Windows XP SP2)''
- IrDA: native winsock2, ''should work''
- Tcp/Ip: native winsock2 , ''should work (IPv6-only on Windows XP, IPv4/IPv6 with Windows Vista)''
- Serial: native, ''custom transport code needed''

== Quick guide to compile OpenOBEX native on win32 ==

- Install one of the supported compilers
- Install libusb-win32
- Install the Platform SDK (for MinGW and Cygwin, you need to copy some .h files)
- Get OpenOBEX from SVN ''(release 1.3 will not work)''
- Read the [attachment:ticket:9:INSTALL.Win32 INSTALL.Win32] that comes with the [ticket:9 win32 patch set]



1 How to compile with MinGW32
2 ===========================
3
4 Requirements
5 ------------
6
7 From Microsoft:
8 the Microsoft Platform SDK
9
10 From http://www.mingw.org:
11 MinGW32
12 MSys
13 msysDTK
14
15 From http://libusb-win32.sf.net:
16 libusb-win32 (version from August 2006 or later)
17
18 From http://www.gimp.org/win32:
19 pkg-config
20 glib-2.x
21 libiconv
22 gettext
23
24 If you use msysDTK <= 1.0.1, you also neeed
25 from http://gnuwin32.sf.net:
26 File
27
28
29
30 Preparing the build environment
31 -------------------------------
32
33 Install all the requirements in the above order. The instructions
34 below use seperate directories but you can also copy everything to
35 /mingw (NOT to /).
36
37 Unpack glib-2.x, libiconv, gettext and pkg-config to /glib in the MSys
38 root directory or use /etc/fstab to mount it.
39
40 To include the libusb-win32 into MSys, you add an entry to /etc/fstab:
41 C:/Programs/LibUSB-Win32/ /libusb
42 and restart MSys.
43
44 To get the bluetooth header files, you need to install the Platform SDK.
45 You only neeed the Build Environment for x86 32bit from the Core SDK.
46 Create a directory /psdk/include in the MSys root directoy and copy the
47 following files from the Platform SDK:
48 ws2bth.h
49 bthdef.h
50 bthsdpdef.h
51 af_irda.h
52
53 If necessary (see above), unpack the file utility into the /mingw directory.
54 You must NOT use the Msys root. To make sure it works, TEST IT!.
55 Example output is ($ is the MSys command line prompt):
56 $ file INSTALL.Win32
57 INSTALL.Win32: ASCII English text
58
59
60
61 Bootstrapping the CVS version
62 -----------------------------
63
64 Run:
65 $ export ACLOCAL="aclocal -I /glib/share/aclocal"
66 $ autoreconf -v --install
67
68
69
70 Building OpenOBEX
71 -----------------
72
73 Now export some variables:
74 $ export CFLAGS="-I/libusb/include -I/psdk/include"
75 $ export LDFLAGS="-L/libusb/lib/gcc"
76 $ export PKG_CONFIG_PATH="/glib/lib/pkgconfig"
77
78 If you installed pkg-config to /glib:
79 $ export PATH="$PATH:/glib/bin"
80
81 $ ./configure --prefix=/mingw --enable-apps --enable-glib --disable-static
82
83 pkg-config, glib, bluetooth and USB should be detected now.
84 You MUST disable building the static library due to a broken libtool.
85 However, you can build it later and manually merge the two libopenobex.la
86 files that get created by libtool.
87
88 Now run:
89 $ make
90 $ make install DESTDIR=$(pwd)/local
91
92 Take a look at the file list to install:
93 $ find local
94
95 If you want to install all of these files, run:
96 $ make install
The barrier to change is not too little caring; it is too much complexity.
改变世界的阻碍,并非人类的冷漠,而是这个世界太复杂

Post Reply