Add info about building kinect_upload_fw for MS Windows
authorAntonio Ospite <ospite@studenti.unina.it>
Fri, 4 Nov 2011 23:10:30 +0000 (00:10 +0100)
committerAntonio Ospite <ospite@studenti.unina.it>
Fri, 4 Nov 2011 23:10:30 +0000 (00:10 +0100)
windows/README.asciidoc [new file with mode: 0644]
windows/kinect_upload_fw.bat [new file with mode: 0644]

diff --git a/windows/README.asciidoc b/windows/README.asciidoc
new file mode 100644 (file)
index 0000000..00ec5e4
--- /dev/null
@@ -0,0 +1,55 @@
+Cross-compiling kinect_upload_fw for Windows under Linux
+========================================================
+
+Adapted from http://www.tinc-vpn.org/examples/cross-compiling-windows-binary/
+
+Installing the prerequisites for cross-compilation
+--------------------------------------------------
+
+  sudo apt-get install mingw32 wine git-core
+
+Setting up the build directory and getting the dependencies:
+
+  mkdir $HOME/mingw
+  cd $HOME/mingw
+  wget http://kinect.dashhacks.com/sites/kinect-hacks.com/files/libusb-win32-bin-1.2.2.0.zip
+  unzip libusb-win32-bin-1.2.2.0.zip
+  git clone git://github.com/OpenKinect/libfreenect.git --branch unstable
+
+
+Compiling kinect_upload_fw
+--------------------------
+
+  cd $HOME/mingw
+  git clone git://git.ao2.it/kinect-audio-setup.git
+
+  cd kinect-audio-setup/kinect_upload_fw
+  CC=i586-mingw32msvc-gcc make endian LDFLAGS=
+  wine ./endian > endian.h
+  i586-mingw32msvc-g++ kinect_upload_fw.c -o kinect_upload_fw.exe \
+    $HOME/mingw/libfreenect/platform/windows/libusb10emu/libusb-1.0/failguard.cpp \
+    $HOME/mingw/libfreenect/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp \
+    -I$HOME/mingw/libfreenect/platform/windows/libusb10emu/libusb-1.0 \
+    -I$HOME/mingw/libfreenect/platform/windows/libusb10emu \
+    -I$HOME/mingw/libusb-win32-bin-1.2.2.0/include \
+    -I$HOME/mingw/libfreenect/include \
+    -I$HOME/mingw/libfreenect/src \
+    $HOME/mingw/libusb-win32-bin-1.2.2.0/lib/gcc/libusb.a
+
+
+Using kinect_upload_fw.exe on Windows
+-------------------------------------
+
+First of all, make sure the drivers from ''libfreenect'' are installed, they are 
+under ''platform/windows/inf''.
+
+Download the MSR Kinect SDK from:
+http://download.microsoft.com/download/8/4/C/84C9EF40-EE49-42C2-AE26-C6E30921182F/KinectSDK32.msi
+
+Explore ''KinectSDK32.msi'' using 7-zip from http://www.7-zip.org, extract the 
+''media1.cab'' file in it and extract the firmware file from ''media1.cab'', the 
+firmware file is named ''UACFirmware.*''.
+
+Put ''kinect_upload_fw.exe'', the firmware file and ''kinect_upload_fw.bat'' 
+file in the same directory and double_click on the ''kinect_upload_fw.bat'' 
+file.
diff --git a/windows/kinect_upload_fw.bat b/windows/kinect_upload_fw.bat
new file mode 100644 (file)
index 0000000..3757670
--- /dev/null
@@ -0,0 +1,17 @@
+REM First of all, make sure the drivers from ''libfreenect'' are installed, \r
+REM they are in ''platform/windows/inf'' in the libfreenect code base..\r
+REM \r
+REM Download the MSR Kinect SDK from:\r
+REM http://download.microsoft.com/download/8/4/C/84C9EF40-EE49-42C2-AE26-C6E30921182F/KinectSDK32.msi\r
+REM \r
+REM Explore ''KinectSDK32.msi'' using 7-zip from http://www.7-zip.org, extract the \r
+REM ''media1.cab'' file in it and get the firmware file, named ''UACFirmware.*''\r
+REM \r
+REM Put ''kinect_upload_fw.exe'', the firmware file and ''kinect_upload_fw.bat'' \r
+REM file in the same directory and double_click on the ''kinect_upload_fw.bat'' \r
+REM file.\r
+\r
+Set FIRMWARE="UACFirmware.C9C6E852_35A3_41DC_A57D_BDDEB43DFD04"\r
+\r
+kinect_upload_fw.exe %FIRMWARE%\r
+@PAUSE\r