-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.win32
45 lines (36 loc) · 1.31 KB
/
README.win32
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
Windows binaries can be built in a MinGW environment, on a Windows computer or cross-hosted in another OS.
Libusbx is patched to get composite interface devices with HID interface working.
To build it on a Ubuntu 12.04 host, follow this instruction:
- Install build dependencies:
sudo apt-get build-dep libusb-1.0-0 dfu-util
sudo apt-get install mingw32
- Prepare environment:
export BUILD_DIR=/tmp/mingw
export MINGW_VERSION=i586-mingw32msvc
cd $BUILD_DIR
- Get libusbx:
git clone https://github.com/blackyblack/libusbx
cd libusbx
- Build libusbx:
./autogen.sh
PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig ./configure --host=$MINGW_VERSION --prefix=$BUILD_DIR
make
make install
cd ..
- Get dfu-util:
git clone https://github.com/blackyblack/dfu-util
cd dfu-util
- Build dfu-util:
./autogen.sh
PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig ./configure --host=$MINGW_VERSION --prefix=$BUILD_DIR
make
make install
Now you have dfu-util.exe, dfu-suffix.exe and libusb-1.0.dll in /tmp/mingw/bin.
You can optionally build static executable (without libusb*.dll):
- Build dfu-util-static:
./autogen.sh
export LDFLAGS=-static
PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig ./configure --host=$MINGW_VERSION --prefix=$BUILD_DIR
make
make install
mv $BUILD_DIR/bin/dfu-util.exe $BUILD_DIR/bin/dfu-util-static.exe