1 Cross-compiling kinect_upload_fw for Windows under Linux
 
   2 ========================================================
 
   4 Adapted from http://www.tinc-vpn.org/examples/cross-compiling-windows-binary/
 
   6 Installing the prerequisites for cross-compilation
 
   7 --------------------------------------------------
 
   9   sudo apt-get install mingw32 wine git-core
 
  11 Setting up the build directory and getting the dependencies:
 
  15   wget http://kinect.dashhacks.com/sites/kinect-hacks.com/files/libusb-win32-bin-1.2.2.0.zip
 
  16   unzip libusb-win32-bin-1.2.2.0.zip
 
  17   git clone git://github.com/OpenKinect/libfreenect.git --branch unstable
 
  20 Compiling kinect_upload_fw
 
  21 --------------------------
 
  24   git clone git://git.ao2.it/kinect-audio-setup.git
 
  26   cd kinect-audio-setup/kinect_upload_fw
 
  27   CC=i586-mingw32msvc-gcc make endian LDFLAGS=
 
  28   wine ./endian > endian.h
 
  29   i586-mingw32msvc-g++ kinect_upload_fw.c -o kinect_upload_fw.exe \
 
  30     $HOME/mingw/libfreenect/platform/windows/libusb10emu/libusb-1.0/failguard.cpp \
 
  31     $HOME/mingw/libfreenect/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp \
 
  32     -I$HOME/mingw/libfreenect/platform/windows/libusb10emu/libusb-1.0 \
 
  33     -I$HOME/mingw/libfreenect/platform/windows/libusb10emu \
 
  34     -I$HOME/mingw/libusb-win32-bin-1.2.2.0/include \
 
  35     -I$HOME/mingw/libfreenect/include \
 
  36     -I$HOME/mingw/libfreenect/src \
 
  37     $HOME/mingw/libusb-win32-bin-1.2.2.0/lib/gcc/libusb.a
 
  40 Using kinect_upload_fw.exe on Windows
 
  41 -------------------------------------
 
  43 First of all, make sure the drivers from ''libfreenect'' are installed, they are
 
  44 under ''platform/windows/inf''.
 
  46 Download the MSR Kinect SDK from:
 
  47 http://download.microsoft.com/download/8/4/C/84C9EF40-EE49-42C2-AE26-C6E30921182F/KinectSDK32.msi
 
  49 Explore ''KinectSDK32.msi'' using 7-zip from http://www.7-zip.org, extract the
 
  50 ''media1.cab'' file in it and extract the firmware file from ''media1.cab'', the
 
  51 firmware file is named ''UACFirmware.*''.
 
  53 Put ''kinect_upload_fw.exe'', the firmware file and ''kinect_upload_fw.bat''
 
  54 file in the same directory and double_click on the ''kinect_upload_fw.bat''