File: INSTALL_Win32.txt

package info (click to toggle)
libopenobex 1.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, stretch
  • size: 972 kB
  • ctags: 1,552
  • sloc: ansic: 9,988; xml: 407; makefile: 96
file content (102 lines) | stat: -rw-r--r-- 2,956 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
How to compile OpenObex on Windows platform
===========================================

You should read INSTALL.txt before continuing reading this file.

1 Requirements
==============

The requirements to compile OpenObex on Windows are fairly low:
1. a compiler
2. the Platform SDK (now also called Windows SDK)
3. LibUSB-Win32[1]
4. CMake(>= 2.8.5)[2]

The supported compilers are:
 * Microsoft Visual Studio 2010 (10)
 * Microsoft Visual Studio 2008 (9)
 * Microsoft Visual Studio 2005 (8)
 * Microsoft Visual Studio .NET 2003 (7.1)
 * MinGW gcc
 * Cygwin gcc

Visual Studio 2008 and 2010 already include the SDK.

[1]: at http://libusb-win32.sf.net (if not compiling for cygwin)
[2]: at http://www.cmake.org


2 Compilation
=============

Visual Studio
-------------

Using Visual Studio >= 2008 (Express versions are sufficient) is the
recommended way of compiling under Windows. You must open the console link that
runs the proper vcvars.bat (see Start menu).
Then, you _MUST_ add the directories of the platform SDK include files,
libraries and executables to the environment variables INCLUDE, LIB and PATH.
Now, your build environment is set up. You can now call cmake with the proper
generator (see "cmake --help"). Using the "NMake Makefiles" generator, OpenObex
can be compiled directly in the command prompt window:
  > mkdir build
  > cd build
  > cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ..
  > nmake


MinGW
-----

Install MinGW, including core and mingw32-make, to e.g. C:\mingw.
To get Bluetooth and Irda support, you must copy the following files from the
Platform SDK include directory to usr/local/include in the MinGW installation
directory:
  ws2bth.h
  bthdef.h
  bthsdpdef.h
  af_irda.h

Either you add MinGW bin directory to PATH, or you call the mingw32-make with
full path, both variations work.
Then, at the command prompt:
  > set PATH=%PATH%;C:\mingw\bin
  > mkdir build
  > cd build
  > cmake -G"MinGW Makefiles" ..
  > mingw32-make

You can also use MSYS as environment:
  > mkdir build
  > cd build
  > cmake -G"MSYS Makefiles" ..
  > make


Cygwin
------

You must not use the Windows version of CMake but a version compiled specially
for cygwin. You may also install cygwin version of libusb. Copy the same files
as for the MinGW case to /usr/local/include. Then cou can run in the cygwin
shell command window:
  $ mkdir build
  $ cd build
  $ cmake -G"Unix Makefiles" ..
  $ make



3 Installation
==============

You can run the installation directly by calling the "install" make target.
With the DESTDIR variable, you can add an additional prefix:
  $ make install DESTDIR=/some/directory

Additionally, when you used CMake, you can create installation packages but a
few steps are needed:
  * install NSIS
  * install a ZIP program (e.g. info-zip)
Now you are ready to run the "package" make target.