Skip to content

Commit

Permalink
Applied kinect support patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
avin2 committed May 16, 2012
1 parent 68450d0 commit 2f1416c
Show file tree
Hide file tree
Showing 40 changed files with 1,793 additions and 146 deletions.
File renamed without changes.
66 changes: 66 additions & 0 deletions OpenNI/Data/SamplesConfig.xml
@@ -0,0 +1,66 @@
<OpenNI>
<Licenses>
<!-- Add licenses here
<License vendor="vendor" key="key"/>
-->
</Licenses>
<Log writeToConsole="false" writeToFile="false">
<!-- 0 - Verbose, 1 - Info, 2 - Warning, 3 - Error (default) -->
<LogLevel value="3"/>
<Masks>
<Mask name="ALL" on="true"/>
</Masks>
<Dumps>
</Dumps>
</Log>
<ProductionNodes>
<!-- Normal Depth -->
<Node type="Depth" name="Depth1">
<Configuration>
<Mirror on="true"/>
</Configuration>
</Node>

<!-- Normal Image -->
<Node type="Image" name="Image1" stopOnError="false">
<Configuration>
<Mirror on="true"/>
</Configuration>
</Node>

<!-- HighRes Image -->
<!--
<Node type="Image" name="Image1" stopOnError="false">
<Configuration>
<MapOutputMode xRes="1280" yRes="1024" FPS="15"/>
<Mirror on="true"/>
</Configuration>
</Node>
-->

<!-- Normal IR -->
<!--
<Node type="IR" name="IR1">
<Configuration>
<MapOutputMode xRes="640" yRes="480" FPS="30"/>
<Mirror on="true"/>
</Configuration>
</Node>
-->

<!-- HighRes IR -->
<!--
<Node type="IR" name="IR1">
<Configuration>
<MapOutputMode xRes="1280" yRes="1024" FPS="15"/>
<Mirror on="true"/>
</Configuration>
</Node>
-->

<!--
<Node type="Audio" name="Audio1">
</Node>
-->
</ProductionNodes>
</OpenNI>
3 changes: 2 additions & 1 deletion Platform/Linux/Build/Utils/XnSensorServer/Makefile
@@ -1,7 +1,8 @@
SRC_FILES = ../../../../../Source/Utils/XnSensorServer/*.cpp

EXE_NAME = XnSensorServer
USED_LIBS = OpenNI XnCore XnFormats XnDDK XnDeviceSensorV2
#--avin mod--
USED_LIBS = OpenNI XnCore XnFormats XnDDK XnDeviceSensorV2KM

include ../EngineUtilMakefile

4 changes: 2 additions & 2 deletions Platform/Linux/Build/XnDeviceSensorV2/Makefile
@@ -1,7 +1,7 @@
SRC_FILES = \
../../../../Source/XnDeviceSensorV2/*.cpp

LIB_NAME = XnDeviceSensorV2
#--avin mod--
LIB_NAME = XnDeviceSensorV2KM
USED_LIBS = XnCore XnFormats XnDDK OpenNI
DEFINES = XN_DEVICE_EXPORTS

Expand Down
6 changes: 4 additions & 2 deletions Platform/Linux/CreateRedist/RedistMaker
Expand Up @@ -80,7 +80,8 @@ mkdir -p ../$REDIST_DIR/Config
# copy files to redist
cp ../../../GPL.txt ../$REDIST_DIR
cp ../../../LGPL.txt ../$REDIST_DIR
cp ../Bin/$PLATFORM-Release/libXnDeviceSensorV2.* ../$REDIST_DIR/Lib
#--avin mod--
cp ../Bin/$PLATFORM-Release/libXnDeviceSensorV2KM.* ../$REDIST_DIR/Lib
cp ../Bin/$PLATFORM-Release/libXnDeviceFile.* ../$REDIST_DIR/Lib
cp ../Bin/$PLATFORM-Release/libXnDDK.* ../$REDIST_DIR/Lib
cp ../Bin/$PLATFORM-Release/libXnFormats.* ../$REDIST_DIR/Lib
Expand All @@ -89,7 +90,8 @@ cp ../Bin/$PLATFORM-Release/XnSensorServer ../$REDIST_DIR/Bin
cp ../Install/* ../$REDIST_DIR/Install
cp install.sh ../$REDIST_DIR

cp ../../../Data/GlobalDefaults.ini ../$REDIST_DIR/Config
#--avin mod--
cp ../../../Data/GlobalDefaultsKinect.ini ../$REDIST_DIR/Config

# create tar
echo "Creating tar..."
Expand Down
20 changes: 17 additions & 3 deletions Platform/Linux/CreateRedist/install.sh
Expand Up @@ -16,16 +16,19 @@ Installs PrimeSense Sensor Driver to current machine.

OS_NAME=`uname -s`

#--avin mod--
case $OS_NAME in
Darwin)
MODULES="libXnDeviceSensorV2.dylib libXnDeviceFile.dylib"
MODULES="libXnDeviceSensorV2KM.dylib libXnDeviceFile.dylib"
;;
*)
MODULES="libXnDeviceSensorV2.so libXnDeviceFile.so"
MODULES="libXnDeviceSensorV2KM.so libXnDeviceFile.so"
;;
esac

RULES_FILE="55-primesense-usb.rules"
#--avin mod--
MODPROBE_BLACKLIST="blacklist-gspca-kinect.conf"

# create file list
SCRIPT_DIR=`pwd`/`dirname $0`
Expand Down Expand Up @@ -75,6 +78,8 @@ INSTALL_BIN=$rootfs/usr/bin
INSTALL_ETC=$rootfs/usr/etc/primesense
INSTALL_RULES=$rootfs/etc/udev/rules.d
SERVER_LOGS_DIR=$rootfs/var/log/primesense/XnSensorServer
#--avin mod--
MODPROBE_CONF_DIR=$rootfs/etc/modprobe.d

# make all calls into OpenNI run in this filesystem
export OPEN_NI_INSTALL_PATH=$rootfs
Expand Down Expand Up @@ -109,7 +114,8 @@ if [ "$install" = yes ]; then

# copy config file
printf "copying server config file..."
cp Config/GlobalDefaults.ini $INSTALL_ETC
#--avin mod--
cp Config/GlobalDefaultsKinect.ini $INSTALL_ETC
printf "OK\n"

# make server run as root
Expand All @@ -129,6 +135,10 @@ if [ "$install" = yes ]; then
# install USB rules (so that PrimeSense sensors will be mounted with write permissions)
printf "installing usb rules..."
cp Install/$RULES_FILE $INSTALL_RULES
printf "OK\n"
#--avin mod--
printf "installing modprobe blacklist..."
cp Install/$MODPROBE_BLACKLIST $MODPROBE_CONF_DIR
printf "OK\n"
fi

Expand Down Expand Up @@ -170,6 +180,10 @@ elif [ "$uninstall" = yes ]; then
# remove USB rules
printf "removing usb rules..."
rm -f $INSTALL_RULES/$RULES_FILE
printf "OK\n"
#--avin mod--
printf "removing modprobe blacklist..."
rm -f $MODPROBE_CONF_DIR/$MODPROBE_BLACKLIST
printf "OK\n"
fi

Expand Down
4 changes: 4 additions & 0 deletions Platform/Linux/Install/55-primesense-usb.rules
Expand Up @@ -5,4 +5,8 @@ SYSFS{idProduct}=="0400",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="u
SYSFS{idProduct}=="0500",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users"
SYSFS{idProduct}=="0600",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users"
SYSFS{idProduct}=="0601",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users"
#--avin mod--
SYSFS{idProduct}=="02AE",SYSFS{idVendor}=="045E",MODE="666",OWNER="xxx",GROUP="users"
SYSFS{idProduct}=="02AD",SYSFS{idVendor}=="045E",MODE="666",OWNER="xxx",GROUP="users"
SYSFS{idProduct}=="02B0",SYSFS{idVendor}=="045E",MODE="666",OWNER="xxx",GROUP="users"

2 changes: 2 additions & 0 deletions Platform/Linux/Install/blacklist-gspca-kinect.conf
@@ -0,0 +1,2 @@
blacklist gspca_kinect

Expand Up @@ -66,7 +66,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="openNI.lib XnDDK.lib XnDeviceSensorV2.lib XnFormats.lib "
AdditionalDependencies="openNI.lib XnDDK.lib XnDeviceSensorV2KM.lib XnFormats.lib "
OutputFile="../../../Bin/$(ConfigurationName)/$(ProjectName).exe"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(OPEN_NI_LIB)&quot;;../../../Lib/$(ConfigurationName)"
Expand Down Expand Up @@ -145,7 +145,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="openNI64.lib XnDDK64.lib XnDeviceSensorV264.lib XnFormats64.lib "
AdditionalDependencies="openNI64.lib XnDDK64.lib XnDeviceSensorV2KM64.lib XnFormats64.lib "
OutputFile="../../../Bin64/$(ConfigurationName)/$(ProjectName)64.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(OPEN_NI_LIB64)&quot;;../../../Lib64/$(ConfigurationName)"
Expand Down Expand Up @@ -232,7 +232,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="openNI.lib XnDDK.lib XnDeviceSensorV2.lib XnFormats.lib "
AdditionalDependencies="openNI.lib XnDDK.lib XnDeviceSensorV2KM.lib XnFormats.lib "
OutputFile="../../../Bin/$(ConfigurationName)/$(ProjectName).exe"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(OPEN_NI_LIB)&quot;;../../../Lib/$(ConfigurationName)"
Expand Down Expand Up @@ -320,7 +320,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="openNI64.lib XnDDK64.lib XnDeviceSensorV264.lib XnFormats64.lib "
AdditionalDependencies="openNI64.lib XnDDK64.lib XnDeviceSensorV2KM64.lib XnFormats64.lib "
OutputFile="../../../Bin64/$(ConfigurationName)/$(ProjectName)64.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(OPEN_NI_LIB64)&quot;;../../../Lib64/$(ConfigurationName)"
Expand Down
4 changes: 2 additions & 2 deletions Platform/Win32/Build/XnDeviceSensorV2/XnDeviceSensorV2.vcproj
Expand Up @@ -2,9 +2,9 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="XnDeviceSensorV2"
Name="XnDeviceSensorV2KM"
ProjectGUID="{1653839A-ABA5-4c0e-9EA2-2640B0275894}"
RootNamespace="XnDeviceSensorV2"
RootNamespace="XnDeviceSensorV2KM"
Keyword="Win32Proj"
TargetFrameworkVersion="0"
>
Expand Down
39 changes: 29 additions & 10 deletions Platform/Win32/CreateRedist/EE_NI/EE_NI.wxs
Expand Up @@ -30,7 +30,8 @@
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.PlatformProgramFilesFolder)">
<Directory Id="PrimeSenseFolder" Name="PrimeSense">
<Directory Id="INSTALLLOCATION" Name="Sensor">
<!-- avin mod -->
<Directory Id="INSTALLLOCATION" Name="SensorKinect">
<Directory Id="INSTALLLOCATIONSAMPLES" Name="Samples">
<Directory Id="INSTALLLOCATIONSAMPLESBIN" Name="Bin$(var.PlatformSuffix)">
<Directory Id="INSTALLLOCATIONSAMPLESBINRELEASE" Name="Release">
Expand All @@ -45,7 +46,8 @@
<Directory Id="INSTALLLOCATIONBinLog" Name="Log"/>
</Directory>
<Directory Id="INSTALLLOCATIONData" Name="Data"/>

<!-- avin mod -->
<Directory Id="INSTALLLOCATIONDriver" Name="Driver"/>
</Directory>
</Directory>
</Directory>
Expand Down Expand Up @@ -203,16 +205,24 @@

<Binary Id='CheckScript' SourceFile ='checkVersion.vbs' />
<CustomAction Id="CheckOpenNIVersion" BinaryKey='CheckScript' VBScriptCall='CheckVersionNI' Execute="immediate" Return="check" />


<!-- avin mod -->
<!-- Install the USB Driver -->
<CustomAction Id='drivex86Install' Directory="INSTALLLOCATIONDriver" Return="ignore" Impersonate="no" Execute="deferred"
ExeCommand="&quot;[INSTALLLOCATIONDriver]dpinst-x86.exe&quot; /sw /el" />
<CustomAction Id='driveamd64Install' Directory="INSTALLLOCATIONDriver" Return="ignore" Impersonate="no" Execute="deferred"
ExeCommand="&quot;[INSTALLLOCATIONDriver]dpinst-amd64.exe&quot; /sw /el"/>

<!-- Register XnDeviceFile-->
<CustomAction Id="QtExecRegXnDeviceFile" Property="SetRegXnDeviceFileProperty" Execute="immediate"
Value="&quot;[OPENNIINSTALLDIR]bin$(var.PlatformSuffix)\niReg$(var.PlatformSuffix).exe&quot; &quot;[INSTALLLOCATIONBin]XnDeviceFile$(var.PlatformSuffix).dll&quot;"/>
<CustomAction Id="SetRegXnDeviceFileProperty" BinaryKey="WixCA" DllEntry="CAQuietExec$(var.PlatformSuffix)"
Execute="deferred" Return="check" Impersonate="no"/>

<!-- Register XnDeviceSensorV2-->

<!-- avin mod -->
<!-- Register XnDeviceSensorV2KM-->
<CustomAction Id="QtExecRegXnDeviceSensorV2" Property="SetRegXnDeviceSensorV2Property" Execute="immediate"
Value="&quot;[OPENNIINSTALLDIR]bin$(var.PlatformSuffix)\niReg$(var.PlatformSuffix).exe&quot; &quot;[INSTALLLOCATIONBin]XnDeviceSensorV2$(var.PlatformSuffix).dll&quot; &quot;[INSTALLLOCATION]Data&quot;"/>
Value="&quot;[OPENNIINSTALLDIR]bin$(var.PlatformSuffix)\niReg$(var.PlatformSuffix).exe&quot; &quot;[INSTALLLOCATIONBin]XnDeviceSensorV2KM$(var.PlatformSuffix).dll&quot; &quot;[INSTALLLOCATION]Data&quot;"/>
<CustomAction Id="SetRegXnDeviceSensorV2Property" BinaryKey="WixCA" DllEntry="CAQuietExec$(var.PlatformSuffix)"
Execute="deferred" Return="check" Impersonate="no"/>

Expand All @@ -222,26 +232,29 @@
<CustomAction Id="SetUnRegXnDeviceFileProperty" BinaryKey="WixCA" DllEntry="CAQuietExec$(var.PlatformSuffix)"
Execute="deferred" Return="ignore" Impersonate="no"/>-->

<!-- UnRegister XnDeviceSensorV2
<!-- avin mod -->
<!-- UnRegister XnDeviceSensorV2KM
<CustomAction Id="QtExecUnRegXnDeviceSensorV2" Property="SetUnRegXnDeviceSensorV2Property" Execute="immediate"
Value="&quot;[OPENNIINSTALLDIR]bin$(var.PlatformSuffix)\niReg$(var.PlatformSuffix).exe&quot; -u &quot;[INSTALLLOCATIONBin]XnDeviceSensorV2$(var.PlatformSuffix).dll&quot; &quot;[INSTALLLOCATION]Data&quot;" />
Value="&quot;[OPENNIINSTALLDIR]bin$(var.PlatformSuffix)\niReg$(var.PlatformSuffix).exe&quot; -u &quot;[INSTALLLOCATIONBin]XnDeviceSensorV2KM$(var.PlatformSuffix).dll&quot; &quot;[INSTALLLOCATION]Data&quot;" />
<CustomAction Id="SetUnRegXnDeviceSensorV2Property" BinaryKey="WixCA" DllEntry="CAQuietExec$(var.PlatformSuffix)"
Execute="deferred" Return="ignore" Impersonate="no"/>-->

<!-- avin mod -->
<!--
<CustomAction Id='RegXnDeviceFile' Directory="INSTALLLOCATIONBin" ExeCommand="&quot;[OPENNIINSTALLDIR]bin\niReg$(var.PlatformSuffix).exe&quot; &quot;[INSTALLLOCATIONBin]XnDeviceFile$(var.PlatformSuffix).dll&quot;" Return="check" />
<CustomAction Id='RegXnDeviceSensorV2' Directory="INSTALLLOCATIONBin" ExeCommand="&quot;[OPENNIINSTALLDIR]bin\niReg$(var.PlatformSuffix).exe&quot; &quot;[INSTALLLOCATIONBin]XnDeviceSensorV2$(var.PlatformSuffix).dll&quot; &quot;[INSTALLLOCATION]Data&quot;" Return="check" />
<CustomAction Id='RegXnDeviceSensorV2' Directory="INSTALLLOCATIONBin" ExeCommand="&quot;[OPENNIINSTALLDIR]bin\niReg$(var.PlatformSuffix).exe&quot; &quot;[INSTALLLOCATIONBin]XnDeviceSensorV2KM$(var.PlatformSuffix).dll&quot; &quot;[INSTALLLOCATION]Data&quot;" Return="check" />
-->

<CustomAction Id='UnRegXnDeviceFile' Directory="INSTALLLOCATIONBin" Return="ignore" Impersonate="no" Execute="deferred"
ExeCommand="&quot;[OPENNIINSTALLDIR]bin$(var.PlatformSuffix)\niReg$(var.PlatformSuffix).exe&quot; -u &quot;[INSTALLLOCATIONBin]XnDeviceFile$(var.PlatformSuffix).dll&quot;" />


<!-- avin mod -->
<CustomAction Id='UnRegXnDeviceSensorV2' Directory="INSTALLLOCATIONBin" Return="ignore" Impersonate="no" Execute="deferred"
ExeCommand="&quot;[OPENNIINSTALLDIR]bin$(var.PlatformSuffix)\niReg$(var.PlatformSuffix).exe&quot; -u &quot;[INSTALLLOCATIONBin]XnDeviceSensorV2$(var.PlatformSuffix).dll&quot; &quot;[INSTALLLOCATION]Data&quot;"/>
ExeCommand="&quot;[OPENNIINSTALLDIR]bin$(var.PlatformSuffix)\niReg$(var.PlatformSuffix).exe&quot; -u &quot;[INSTALLLOCATIONBin]XnDeviceSensorV2KM$(var.PlatformSuffix).dll&quot; &quot;[INSTALLLOCATION]Data&quot;"/>

<!-- Register the .xns file type -->
<DirectoryRef Id="TARGETDIR">
Expand Down Expand Up @@ -335,6 +348,12 @@
<Custom Action='UnRegXnDeviceFile' Before="RemoveFiles"> REMOVE ~= "ALL" </Custom>
<Custom Action='UnRegXnDeviceSensorV2' Before="RemoveFiles"> REMOVE ~= "ALL" </Custom>

<!-- avin mod -->
<Custom Action='driveamd64Install' After='PublishProduct'><![CDATA[NOT Installed AND VersionNT64]]></Custom>

<Custom Action='drivex86Install' After='PublishProduct'><![CDATA[NOT Installed AND NOT VersionNT64]]></Custom>


</InstallExecuteSequence>
</Product>

Expand Down

0 comments on commit 2f1416c

Please sign in to comment.