我正在创建一个也使用Kinect 2的WPF应用程序。现在是时候发布我的应用程序了,我想创建一个安装应用程序和Kinect SDK的独特安装文件。我有Kinect .exe,我想将它包含在我使用Visual Studio中的发布选项创建的标准设置中(顺便说一句,我使用的是Visual Studio 2017)。 阅读一些东西我发现正确的方法可能是在我的应用程序的先决条件中插入Kinect SDK。对? 因此,我正在尝试按照以下指南添加文件:
How to: Create a Package Manifest
How to: Create a Product Manifest
我在C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ SDK \ Bootstrapper \ Packages中创建了一个文件夹,我添加了产品xml文件:
<?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>
然后在名为“en”的子文件夹中添加了包xml文件:
<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>`
我还添加了rtf文件。所以对我来说几乎可以。但是当我回到VS时,我没有在先决条件列表中看到这个新包。 你能帮我添加Kinect SDK安装程序吗? 非常感谢你, 亚历
答案 0 :(得分:0)
解决。我认为该文件夹是正确的,但相反,在关键的GenericBootstrapper中,我发现包裹&#39;路径是C:\ Program Files(x86)\ Microsoft SDKs \ ClickOnce Bootstrapper。将产品和包xml的新包添加到文件夹中,我可以在先决条件中看到Kinect安装程序。发布APP一切正常