Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kinect SDK v2.x port #1414

Merged
merged 2 commits into from
Oct 4, 2017
Merged

Add Kinect SDK v2.x port #1414

merged 2 commits into from
Oct 4, 2017

Conversation

UnaNancyOwen
Copy link
Contributor

Add Kinect for Windows SDK v2.x port.

@UnaNancyOwen
Copy link
Contributor Author

UnaNancyOwen commented Jul 8, 2017

The core features of Kinect SDK v2 is no problem.
But, The check error of dynamic CRT is occurs, because the dependent files of Kinect SDK v2 extension features (face tracking, gesture recognition, etc.) depend on dynamic CRT (msvcp110.dll, msvcr110.dll) of Visual C++ 2012.

Detected outdated dynamic CRT in the following files:

    C:/vcpkg/packages/kinectsdk2_x86-windows/debug/bin/Kinect20.Face.dll: msvcp110.dll
    C:/vcpkg/packages/kinectsdk2_x86-windows/debug/bin/Kinect20.Fusion.dll: msvcp110.dll
    C:/vcpkg/packages/kinectsdk2_x86-windows/debug/bin/Kinect20.VisualGestureBuilder.dll: msvcp110.dll
    C:/vcpkg/packages/kinectsdk2_x86-windows/debug/bin/vgbtechs/RFRProgressTech.dll: msvcr110.dll
    C:/vcpkg/packages/kinectsdk2_x86-windows/debug/bin/vgbtechs/AdaBoostTech.dll: msvcp110.dll
    C:/vcpkg/packages/kinectsdk2_x86-windows/bin/Kinect20.Face.dll: msvcp110.dll
    C:/vcpkg/packages/kinectsdk2_x86-windows/bin/Kinect20.Fusion.dll: msvcp110.dll
    C:/vcpkg/packages/kinectsdk2_x86-windows/bin/Kinect20.VisualGestureBuilder.dll: msvcp110.dll
    C:/vcpkg/packages/kinectsdk2_x86-windows/bin/vgbtechs/RFRProgressTech.dll: msvcr110.dll
    C:/vcpkg/packages/kinectsdk2_x86-windows/bin/vgbtechs/AdaBoostTech.dll: msvcp110.dll

To inspect the dll files, use:
    dumpbin.exe /dependents mydllfile.dll

@ras0219-msft
Copy link
Contributor

Ok, I've modified our existing VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT policy to opt out of all CRT checking and set it in the kinectsdk2 portfile.

Could you try this out (make sure to re-bootstrap vcpkg from this branch!) and confirm it all works for you?

@UnaNancyOwen
Copy link
Contributor Author

@ras0219-msft I tried it. The following error was displayed.

Unknown setting for policy 'PolicyAllowObsoleteMsvcrt': TRUE

Add Kinect for Windows SDK v2.x port.
@UnaNancyOwen
Copy link
Contributor Author

@ras0219-msft It has already been a long time, but I could not fix it.
I changed to install only core features library of Kinect SDK v2.x.
(Removed application features libraries from libraries to be installed.)
Please merge this pull request. This is works normally.

Thanks,

Future Tasks: Add application features libraries of Kinect SDK v2. If it is possible, Please open new pull request.

@UnaNancyOwen
Copy link
Contributor Author

UnaNancyOwen commented Sep 20, 2017

Currently, This port can't be used unless Kinect SDK v2.x is installed in users system.
But, Kinect SDK v2.x will be able to extract using the WiX Toolset.
It can be standalone extract Kinect SDK v2.x and build Kinect v2.x application even if Kinect SDK v2.x is not installed in user system.

@ras0219-msft Which method do you think is better?

# If Vcpkg contains WiX Toolset, this block is unnecessary.
# Please see this request (https://github.com/Microsoft/vcpkg/issues/1849).
set(WIX_DIR "${CURRENT_BUILDTREES_DIR}/src/wix")
vcpkg_download_distfile(WIX_ARCHIVE 
    URLS "https://github.com/wixtoolset/wix3/releases/download/wix311rtm/wix311-binaries.zip"
    FILENAME "wix311-binaries.zip"
    SHA512 74f0fa29b5991ca655e34a9d1000d47d4272e071113fada86727ee943d913177ae96dc3d435eaf494d2158f37560cd4c2c5274176946ebdb17bf2354ced1c516
)
vcpkg_extract_source_archive(${WIX_ARCHIVE} ${WIX_DIR})

# Download Kinect SDK v2.x
set(KINECTSDK20_VERSION "v2.0_1409")
vcpkg_download_distfile(KINECTSDK20_INSTALLER
    URLS "https://download.microsoft.com/download/F/2/D/F2D1012E-3BC6-49C5-B8B3-5ACFF58AF7B8/KinectSDK-${KINECTSDK20_VERSION}-Setup.exe"
    FILENAME "KinectSDK-${KINECTSDK20_VERSION}-Setup.exe"
    SHA512 ae3b00f45282ab2ed6ea36c09e42e1b274074f41546ecfbe00facf1fffa2e5a762ffeffb9ba2194f716e8122e0fbd9a8ef63c62be68d2b50a40e4f8c5a821f5f
)

# Extract WiX Installer
set(KINECTSDK20_WIX_INSTALLER "${KINECTSDK20_INSTALLER}")
set(KINECTSDK20_WIX_EXTRACT_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/wix")
vcpkg_execute_required_process(
    COMMAND dark.exe -x ${KINECTSDK20_WIX_EXTRACT_DIR} ${KINECTSDK20_WIX_INSTALLER}
    WORKING_DIRECTORY "${WIX_DIR}"
    LOGNAME extract_wix_installer
)

# Extract MSI Installer
file(TO_NATIVE_PATH "${KINECTSDK20_WIX_EXTRACT_DIR}/AttachedContainer/KinectSDK-${KINECTSDK20_VERSION}-x64.msi" KINECTSDK20_MSI_INSTALLER)
file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/src/installer/msi" KINECTSDK20_MSI_EXTRACT_DIR)
file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/msiexec.log" MSIEXEC_LOG_PATH)
set(BATCH_FILE ${CURRENT_BUILDTREES_DIR}/msiextract-msmpi.bat)
file(WRITE ${BATCH_FILE} "msiexec.exe /a \"${KINECTSDK20_MSI_INSTALLER}\" /qn /log \"${MSIEXEC_LOG_PATH}\" TARGETDIR=\"${KINECTSDK20_MSI_EXTRACT_DIR}\"")
vcpkg_execute_required_process(
    COMMAND ${BATCH_FILE}
    WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}
    LOGNAME extract_msi_installer
)

# Set Kinect SDK v2.x Directory
set(KINECTSDK20_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/msi/Microsoft SDKs/Kinect/${KINECTSDK20_VERSION}")

# Install Kinect SDK v2.x ...

@UnaNancyOwen
Copy link
Contributor Author

Could you comment for this proposal? Thanks,

@microsoft microsoft deleted a comment from msftclas Sep 27, 2017
@alexkaratarakis
Copy link
Contributor

Related: #1904 (was merged).

Extract WiX installer using Dark.
It will be standalone extract files from installer of Kinect SDK 2.x
even if Kinect SDK 2.x is not installed in user system.
@UnaNancyOwen
Copy link
Contributor Author

UnaNancyOwen commented Oct 3, 2017

@alexkaratarakis @ras0219-msft Fixed to extract Kinect SDK 2.x installer using Dark.
I think ready to merge this pull request. Please review it. Thanks,

@alexkaratarakis alexkaratarakis merged commit 37c155d into microsoft:master Oct 4, 2017
@alexkaratarakis
Copy link
Contributor

Thanks a ton!
(And sorry for the huge delay).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants