0
votes

I'm creating a WPF application that uses also the Kinect 2. Now it's time to publish my application and I would like to create a unique setup file that installs the application and the Kinect SDK. I have the Kinect .exe and I would like to include it in the standard setup I create with the publish option in Visual studio (btw I'm using Visual Studio 2017). Reading some stuff I figure out that the right way could be to insert the Kinect SDK in the prerequisites of my application. Right? Thus I'm trying to add the file, following these guides:

How to: Create a Package Manifest

How to: Create a Product Manifest

I have created a folder in C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages, I have added the product xml file:

<?xml version="1.0" encoding="utf-8" ?>
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
ProductCode="Custom.Bootstrapper.Package">  
<PackageFiles>  
   <PackageFile Name="KinectRuntime-v2.0_1409-Setup.exe"/>  
</PackageFiles>
<Commands>  
<Command PackageFile="KinectRuntime-v2.0_1409-Setup.exe" Arguments="">  
<InstallConditions>  
    <BypassIf Property="IsMsiInstalled"  
      Compare="ValueGreaterThan" Value="0"/>  
    <FailIf Property="AdminUser"   
      Compare="ValueNotEqualTo" Value="True"  
     String="NotAnAdmin"/>  
  </InstallConditions>  

  <ExitCodes>  
    <ExitCode Value="0" Result="Success"/>  
    <ExitCode Value="1641" Result="SuccessReboot"/>  
    <ExitCode Value="3010" Result="SuccessReboot"/>  
    <DefaultExitCode Result="Fail" String="GeneralFailure"/>  
  </ExitCodes>  
</Command>  


Then in a subfolder called "en" I added the package xml file:

<Package xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
    Name="DisplayName"  
    Culture="Culture"  
    LicenseAgreement="SDKEula.rtf">  
<PackageFiles>  
   <PackageFile Name="SDKEula.rtf"/>  
</PackageFiles>  

 <!-- Defines a localizable string table for error messages. -->  
 <Strings>  
     <String Name="DisplayName">Update Consent Dialog</String>  
     <String Name="Culture">en</String>  
     <String Name="AU_Unaccepted">The automatic update agreement is not accepted.
     </String>  
<String Name="GeneralFailure">A failure occurred attempting to launch the setup.</String>  
</Strings>  
</Package>`

I also added the rtf file. So for me should be almost ok. But when I go back to VS I don't see this new package in the prerequisites list. Can you help me to add the Kinect SDK installer? Thank you very much, Alex

1
Solved. I thought that the folder was right but instead looking in the key GenericBootstrapper I found that the packages' path was C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\. Adding the new package with the product and package xml in the folder I'm able to see the Kinect Installer in the prerequisites. Publishing the APP everything worksAlex Gimondi

1 Answers

0
votes

Solved. I thought that the folder was right but instead looking in the key GenericBootstrapper I found that the packages' path was C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper. Adding the new package with the product and package xml in the folder I'm able to see the Kinect Installer in the prerequisites. Publishing the APP everything works