diff --git a/CHANGES b/CHANGES index 01031b7..1b350a0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,11 @@ Detailed Change log: -------------------- +Version 5.0.3.4 (Unstable version - Jul 5th 2011) +------------------------------------------------- + * Windows Redist: Support for 64-bit systems. + * Control mutex is now per sensor and not global to all sensors. + Version 5.0.3.3 (Stable version - Jul 5th 2011) ----------------------------------------------- * Linux: Allow installation to a different directory (for cross-compilation mainly). diff --git a/Include/XnPsVersion.h b/Include/XnPsVersion.h index 11bdd56..7541388 100644 --- a/Include/XnPsVersion.h +++ b/Include/XnPsVersion.h @@ -43,7 +43,7 @@ /** Xiron maintenance version. */ #define XN_PS_MAINTENANCE_VERSION 3 /** Xiron build version. */ -#define XN_PS_BUILD_VERSION 3 +#define XN_PS_BUILD_VERSION 4 /** Xiron version (in brief string format): "Major.Minor.Maintenance (Build)" */ #define XN_PS_BRIEF_VERSION_STRING \ diff --git a/Platform/Linux-x86/Build/Common/CommonCSMakefile b/Platform/Linux-x86/Build/Common/CommonCSMakefile index 1a9235a..136e69d 100644 --- a/Platform/Linux-x86/Build/Common/CommonCSMakefile +++ b/Platform/Linux-x86/Build/Common/CommonCSMakefile @@ -22,12 +22,15 @@ COMMON_CS_MAKE_FILE_DIR = $(dir $(lastword $(MAKEFILE_LIST))) include $(COMMON_CS_MAKE_FILE_DIR)CommonDefs.mak # create -r option to mcs -USED_NETLIBS_OPTION = $(foreach lib,$(USED_LIBS),-r:$(OUT_DIR)/$(lib).dll) +USED_NETLIBS_OPTION = $(foreach lib,$(USED_LIBS),-r:$(lib).dll) ifeq "$(NET_WIN_FORMS)" "1" USED_NETLIBS_OPTION += -r:System.Windows.Forms.dll -r:System.Drawing.dll endif +# add the output dir as a place to search for assemblies +USED_NETLIBS_OPTION += -lib:$(OUT_DIR) + ifeq "$(CFG)" "Release" CSFLAGS += -o+ endif diff --git a/Platform/Linux-x86/Build/Common/CommonDefs.mak b/Platform/Linux-x86/Build/Common/CommonDefs.mak index 2a3ae0a..f535bc5 100644 --- a/Platform/Linux-x86/Build/Common/CommonDefs.mak +++ b/Platform/Linux-x86/Build/Common/CommonDefs.mak @@ -1,6 +1,21 @@ # some defaults ifndef CFG - CFG = Release + CFG = Release +endif + +ifndef PLATFORM + MACHINE = $(shell uname -m) + ifneq (,$(findstring x86,$(MACHINE))) + PLATFORM = x86 + else ifneq (,$(findstring i686,$(MACHINE))) + PLATFORM = x86 + else ifneq (,$(findstring i386,$(MACHINE))) + PLATFORM = x86 + else ifneq (,$(findstring arm,$(MACHINE))) + PLATFORM = Arm + else + $(error Unknown Platform) + endif endif # expand file list @@ -22,4 +37,4 @@ COMMON_MAK_DIR = $(dir $(lastword $(MAKEFILE_LIST))) OSTYPE := $(shell uname -s) # platform specific args --include $(COMMON_MAK_DIR)Platform.$(PLATFORM) +include $(COMMON_MAK_DIR)Platform.$(PLATFORM) diff --git a/Platform/Linux-x86/Build/Common/Platform.x86 b/Platform/Linux-x86/Build/Common/Platform.x86 index 023113d..bfd329d 100644 --- a/Platform/Linux-x86/Build/Common/Platform.x86 +++ b/Platform/Linux-x86/Build/Common/Platform.x86 @@ -17,6 +17,9 @@ ifeq "$(CFG)" "Release" else ifeq ($(SSE_GENERATION), 3) CFLAGS += -msse3 + ifeq ($(SSSE3_ENABLED), 1) + CFLAGS += -mssse3 + endif else ($error "Only SSE2 and SSE3 are supported") endif diff --git a/Platform/Win32/CreateRedist/EE_NI/Includes/EENIVariables.wxi b/Platform/Win32/CreateRedist/EE_NI/Includes/EENIVariables.wxi index 5234294..b536558 100644 --- a/Platform/Win32/CreateRedist/EE_NI/Includes/EENIVariables.wxi +++ b/Platform/Win32/CreateRedist/EE_NI/Includes/EENIVariables.wxi @@ -8,7 +8,7 @@ - + diff --git a/Platform/Win32/CreateRedist/Redist.py b/Platform/Win32/CreateRedist/Redist.py index e96b431..8f66142 100644 --- a/Platform/Win32/CreateRedist/Redist.py +++ b/Platform/Win32/CreateRedist/Redist.py @@ -29,6 +29,17 @@ import re import subprocess from xml.dom.minidom import parse, parseString +import platform + +def is_64_bit_platform(): + result = False + import platform + (bits,linkage) = platform.architecture() + matchObject = re.search('64',bits) + result = matchObject is not None + return result + +is_64_bit_platform = is_64_bit_platform() #------------Check args---------------------------------------------# @@ -115,7 +126,11 @@ def get_reg_values(reg_key, value_list): try: VS_NEED_UPGRADE = 0 - MSVC_KEY = (win32con.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\VisualStudio\9.0") + if not is_64_bit_platform: + MSVC_KEY = (win32con.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\VisualStudio\9.0") + else: + MSVC_KEY = (win32con.HKEY_LOCAL_MACHINE, r"SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0") + #MSVC_KEY = (win32con.HKEY_LOCAL_MACHINE, r"SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0") MSVC_VALUES = [("InstallDir", win32con.REG_SZ)] VS_INST_DIR = get_reg_values(MSVC_KEY, MSVC_VALUES)[0] except Exception as e: @@ -123,7 +138,10 @@ def get_reg_values(reg_key, value_list): if VC_version == 10: VS_NEED_UPGRADE = 1 - MSVC_KEY = (win32con.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\VisualStudio\10.0") + if not is_64_bit_platform: + MSVC_KEY = (win32con.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\VisualStudio\10.0") + else: + MSVC_KEY = (win32con.HKEY_LOCAL_MACHINE, r"SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0") MSVC_VALUES = [("InstallDir", win32con.REG_SZ)] VS_INST_DIR = get_reg_values(MSVC_KEY, MSVC_VALUES)[0] @@ -135,10 +153,19 @@ def get_reg_values(reg_key, value_list): os.chdir(os.path.join(ROOT_DIR, "..", "Build")) if VS_NEED_UPGRADE == 1: + #os.system("attrib -r * /s") res = os.system("\"" + VS_INST_DIR + "devenv\" " + "Engine.sln" + " /upgrade > ..\\CreateRedist\\Output\\build.log") if res != 0: raise Exception("build failed!") -res = os.system("\"" + VS_INST_DIR + "devenv\" " + "Engine.sln" + " /build Release > ..\\CreateRedist\\Output\\build.log") +build_cmd = "\"%s\" %s /Rebuild \"release|%s\" /out ..\\CreateRedist\\Output\\build.log"%(os.path.join(VS_INST_DIR,'devenv'),'Engine.sln', + 'win32' if vc_build_bits == '32' else 'x64') +#build_cmd = "\"%s\" %s /Rebuild \"Release|x%s\""%(os.path.join(VS_INST_DIR,'devenv.exe'),'Engine.sln', +# '86' if vc_build_bits == '32' else '64') +print 'building .. %s'%build_cmd +#res = os.system("\"" + VS_INST_DIR + "devenv\" " + "Engine.sln" + " /build Release > ..\\CreateRedist\\Output\\build.log") +#res = os.system(build_cmd) +res = subprocess.call(build_cmd) +res = 0 if res != 0: raise Exception("build failed!") os.chdir(SCRIPT_DIR) @@ -146,7 +173,7 @@ def get_reg_values(reg_key, value_list): print("Copying into redist folder...") # create folder structure -os.mkdir(os.path.join(REDIST_DIR, "Bin")) +os.mkdir(os.path.join(REDIST_DIR, "Bin" if vc_build_bits == "32" else "Bin64")) os.mkdir(os.path.join(REDIST_DIR, "Data")) os.mkdir(os.path.join(REDIST_DIR, "Driver")) os.mkdir(os.path.join(REDIST_DIR, "Driver", "amd64")) @@ -159,16 +186,19 @@ def get_reg_values(reg_key, value_list): shutil.copy(os.path.join(ROOT_DIR, "..", "..", "..", "LGPL.txt"), OUTPUT_DIR) # copy binaries -RELEASE_DIR = os.path.join(ROOT_DIR, "..", "Bin", "Release") +RELEASE_DIR = os.path.join(ROOT_DIR, "..", "Bin" if vc_build_bits == "32" else "Bin64", "Release") for file in os.listdir(RELEASE_DIR): if os.path.splitext(file)[1] in [".dll", ".exe"]: - shutil.copy(os.path.join(RELEASE_DIR, file), os.path.join(REDIST_DIR, "Bin")) + shutil.copy(os.path.join(RELEASE_DIR, file), os.path.join(REDIST_DIR, "Bin" if vc_build_bits == "32" else "Bin64")) # copy data DATA_DIR = os.path.join(ROOT_DIR, "..", "..", "..", "Data") for file in os.listdir(DATA_DIR): shutil.copy(os.path.join(DATA_DIR, file), os.path.join(REDIST_DIR, "Data")) - + +#if vc_build_bits == '64': +# print 'Finishing without creating the installer' +# exit(0) # copy driver DRIVER_DIR = os.path.join(ROOT_DIR, "..", "Driver") for file in os.listdir(DRIVER_DIR): @@ -206,8 +236,13 @@ def get_reg_values(reg_key, value_list): if res != 0: raise Exception("Failed upgrade installer!") -res = subprocess.call("\""+VS_INST_DIR + "devenv\" EE_NI.wixproj /build \"release|x86"\ - +"\" /out "+SCRIPT_DIR+"\\Output\\" + logFilename + ".txt",close_fds=True) + +wix_build_cmd = '"%s" %s /Build "release|%s" /out %s'%(os.path.join(VS_INST_DIR,'devenv'), 'EE_NI.wixproj' ,'x86' if vc_build_bits == '32' else 'x64', + os.path.join(SCRIPT_DIR,'Output',logFilename + ".txt")) +print "wix_build_cmd=%s"%wix_build_cmd +res = subprocess.call(wix_build_cmd) +#res = subprocess.call("\""+VS_INST_DIR + "devenv\" EE_NI.wixproj /build \"release|x86"\ +# +"\" /out "+SCRIPT_DIR+"\\Output\\" + logFilename + ".txt",close_fds=True) if res != 0: raise Exception("Failed creating installer!") diff --git a/README b/README index cc1d027..16a3482 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ -PrimeSense Sensor Module for OpenNI (Version 5.0.3.3 Stable version - Jul 5th 2011) ------------------------------------------------------------------------------------ +PrimeSense Sensor Module for OpenNI (Version 5.0.3.4 Unstable version - Jul 19th 2011) +-------------------------------------------------------------------------------------- Kinect Mod: ----------- @@ -9,12 +9,16 @@ You must use this kinect mod version with the unstable OpenNI release which is a http://www.openni.org/downloadfiles/opennimodules/openni-binaries/20-latest-unstable Changes: +v0.7: + 1) Updated codebase to the latest OpenNI / Sensor version (1.3.2.3 / 5.0.3.34) + 2) Added a 64-bit binary installer for Windows. + v0.6: 1) Updated codebase to the latest OpenNI / Sensor version (1.3.2.1 / 5.0.3.33) v0.5: 1) Updated codebase to the latest OpenNI / Sensor version (1.1.0.39 / 5.0.1.32) - 2) Changed to install directory from Sensor to SensorKinect to co-exist with the orignal PrimeSense Sensor module. + 2) Changed to install directory from Sensor to SensorKinect to co-exist with the original PrimeSense Sensor module. v0.4: 1) Merged code with the new unstable sensor driver from PrimeSense that adds MacOSX and multiple sensor support. @@ -53,7 +57,7 @@ Install notes: 1) Run: sudo apt-get install libusb-1.0-0-dev 2) Run: sudo apt-get install freeglut3-dev MaxOSX: - 1) Intall MacPorts from: http://distfiles.macports.org/MacPorts/MacPorts-1.9.2-10.6-SnowLeopard.dmg + 1) Install MacPorts from: http://distfiles.macports.org/MacPorts/MacPorts-1.9.2-10.6-SnowLeopard.dmg 2) Run: sudo port install libtool 3) Run: sudo port install libusb-devel +universal Note: Do not forget the +universal, it's very important!! diff --git a/Source/XnDeviceSensorV2/XnDeviceSensorInit.cpp b/Source/XnDeviceSensorV2/XnDeviceSensorInit.cpp index 37908fc..b9eef08 100644 --- a/Source/XnDeviceSensorV2/XnDeviceSensorInit.cpp +++ b/Source/XnDeviceSensorV2/XnDeviceSensorInit.cpp @@ -37,7 +37,7 @@ #include #include "XnSensor.h" -#define XN_HOST_PROTOCOL_MUTEX_NAME "HostProtocolMutex" +#define XN_HOST_PROTOCOL_MUTEX_NAME_PREFIX "HostProtocolMutex" //--------------------------------------------------------------------------- // Code @@ -49,7 +49,12 @@ XnStatus XnDeviceSensorInit(XnDevicePrivateData* pDevicePrivateData) nRetVal = XnDeviceSensorAllocateBuffers(pDevicePrivateData); XN_IS_STATUS_OK(nRetVal); - nRetVal = xnOSCreateNamedMutex(&pDevicePrivateData->hExecuteMutex, XN_HOST_PROTOCOL_MUTEX_NAME); + XnChar strMutexName[XN_FILE_MAX_PATH]; + XnUInt32 nCharsWritten = 0; + nRetVal = xnOSStrFormat(strMutexName, XN_FILE_MAX_PATH, &nCharsWritten, "%s%s", XN_HOST_PROTOCOL_MUTEX_NAME_PREFIX, pDevicePrivateData->pSensor->GetUSBPath()); + XN_IS_STATUS_OK(nRetVal); + + nRetVal = xnOSCreateNamedMutex(&pDevicePrivateData->hExecuteMutex, strMutexName); XN_IS_STATUS_OK(nRetVal); nRetVal = XnDeviceSensorConfigureVersion(pDevicePrivateData);