引导程序,同步框架2.1 - 先决条件 [英] Bootstrapper, Sync Framework 2.1 - Prerequisites

查看:548
本文介绍了引导程序,同步框架2.1 - 先决条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编辑:后更加搜索我找到了一种方法来完成这一点。
我用该预览页面改变我的Product.xml
然后,我复制了一些我现有的Product.xml的检查,如果已经安装了。

After even more searching I found a way to complete this. I used This preview page to alter my Product.xml then I copied some of my existing Product.xml to Check if it is installed already.

所以我成功地实施了同步框架2.1我的系统上,并在我的C#应用​​程序。然而,当我发布并测试它在未安装同步框架另一台PC,它有错误
来了所以我尝试包括安装SyncSDK-V2.1-X 86 ENU.MSI。

So I successfully implemented the Sync Framework 2.1 on my system and in my C# Application. However when I publish it and test it on another pc where Sync Framework is not installed, it comes up with errors So I try to include the SyncSDK-v2.1-x86-ENU.msi on install.

搜索,我发现,我需要将其添加到先决条件列表后(项目 - >属性 - >发布 - >先决条件)

After searching I found out that I need to add it to the prerequisites list (Project -> Properties -> Publish -> prerequisites)

我试过以下有关此链接创建自定义包的。然而,它仍然指向不存在了的BMG(引导程序清单生成器)文件。

I've tried following this link about Creating Custom Packages. However it still points to the BMG (Bootstrapper Manifest Generator) file which does not exists anymore.

接下来的解决办法是手动创建它,我觉得我的权利路径,但就是无法完成它。我所做的:

Next solution was to create it manually, I think I'm on the right path but just can't complete it. What I did:


  • 下载dotNetFx45_Full_x86_x64.exe,放入:C:\Program文件(x86)\Microsoft SDKs\ Windows\v8.1A\Bootstrapper\Packages\DotNetFX45

  • 做了一个名为SyncFrame新的文件夹内C:\Program文件(x86)\Microsoft SDKs\Windows\\ \\v8.1A\Bootstrapper\Packages\

  • 增加了一个Product.xml和复制SyncSDK-V2.1-X 86 ENU.MSI到SyncFrame文件夹。还新增了子文件夹恩,在那里做了一个package.xml中和Eula.rtf文件。

  • 在VS2013,项目 - >属性 - >发布 - >先决条件,我选择从下载相同的位置,因为我的应用程序的先决条件。

  • 公布时,它成功地增加了一个dotnetfx45文件夹包含.exe文件的文件夹公布。这ofcourse,因为我在前提条件选择框选中Microsoft .NET框架4.5(x86和x64)。

  • Downloaded dotNetFx45_Full_x86_x64.exe and put it into: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages\DotNetFX45
  • Made a new folder called SyncFrame inside C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages\
  • Added a Product.xml and copied the SyncSDK-v2.1-x86-ENU.msi to the SyncFrame folder. Also added a subfolder "en", in there made a Package.xml and a Eula.rtf file.
  • In VS2013, Project->Properties->Publish->Prerequisites I've chosen "Download prerequisites from same the location as my application".
  • When published, it successfully adds a 'dotnetfx45' folder to the published folder containing the .exe file. This ofcourse because I checked "Microsoft .NET Framework 4.5 (x86 and x64) in the Prerequisites selection box.

不过,我仍然可以 :T设法得到同步框架2.1到先决条件选择框

However I still can't manage to get the Sync Framework 2.1 into the Prerequisites selection box.

下面是我的(可能是垃圾)Product.xml:
修改这是现在Product.xml是固定我的问题:

Here is my (probably rubbish) Product.xml: This is now Product.xml that fixed my problem:

 <?xml version="1.0" encoding="utf-8" ?>
<Product
xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
 ProductCode="Microsoft.Sample.EULA">
 <!-- Defines the list of files to be copied on build. -->
<PackageFiles CopyAllPackageFiles="false">
<PackageFile Name="SyncSDK-v2.1-x86-ENU.msi"/>
 </PackageFiles>

<InstallChecks>
  <MsiProductCheck Product="IsMsiInstalled"
   Property="{{4A3EAF2F-F950-4BF2-B0C7-857E0E970E5A}}"/>
 </InstallChecks>

<!-- Defines how to run the Setup package.-->
 <Commands >
  <Command PackageFile = "SyncSDK-v2.1-x86-ENU.msi" 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="-1" Result="Fail" String="AU_Unaccepted" />
    <DefaultExitCode Result="Fail" 
      FormatMessageFromSystem="true" String="GeneralFailure" />
  </ExitCodes>
  </Command>
</Commands>



我用<一个HREF =htt​​p://msdn.microsoft.com/en-us/library/ee335701(v=vs.100).aspx相对=nofollow>如何创建产品清单使这个..

这是我的package.xml中

And here is my Package.xml

<?xml version="1.0" encoding="utf-8" ?>
<Package
 xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
 Name="DisplayName"
 Culture="Culture"
  LicenseAgreement="Eula.rtf">

  <PackageFiles>
<PackageFile Name="Eula.rtf"/>
 </PackageFiles>

  <Strings>
<String Name="DisplayName">Sync Framework 2.1</String>
<String Name="Culture">en</String>
<String Name="NotAnAdmin">You must be an administrator to install this package.       </String>
  <String Name="GeneralFailure">
  A general error has occurred while
  installing this package.
   </String>
  </Strings>
 </Package>

一个副作用小的问题,但不是问题都在那一刻,我还利用SQL数据库,本地包含在项目和在线数据库,我需要选择的先决条件选择框更多的先决条件。像SQL Server Express的2012的LocalDB?
修改

A little side question but not the problem at all at the moment, I also make use of SQL databases, locally included in the project and online databases, Do I need to select more Prerequisites in the Prerequisites selection box. like SQL server express 2012 localDB? Yes

这工作不错,但我还是想创建一个product.xml所以它会自动从下载网站,而不是把它安装文件夹中。它那种会让安装文件夹,大的小的应用程序。

This works ok, but I would still like to create a product.xml so it automatically downloads from the website instead of putting it within the install folder. It kind of makes the install folder to big for a small app.

推荐答案

最后我完成了基于bootstrappers的同步框架引导程序2.0

Finally I finished the bootstrapper based on bootstrappers for sync framework 2.0

下面是封装和产品XML分别为:

here is the package and product xml respectively:

product.xml为SyncFX20Core(64)

product.xml for SyncFX20Core(x64)

<?xml version="1.0" encoding="UTF-8"?>
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="SyncFX20Core(x64)"/>



package.xml中的SyncFX20Core(64)

package.xml for SyncFX20Core(x64)

<?xml version="1.0" encoding="utf-8"?>
<Package Name="DisplayName" LicenseAgreement="synchronizationeula_english.rtf" Culture="Culture" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
  <PackageFiles CopyAllPackageFiles="false">
    <PackageFile Name="synchronizationeula_english.rtf" />
    <PackageFile Name="Synchronization-v2.1-x64-ENU.msi" HomeSite="SyncFX21_64" PublicKey="3082010A0282010100BD72B489E71C9F85C774B8605C03363D9CFD997A9A294622B0A78753EDEE463AC75B050B57A8B7CA05CCD34C77477085B3E5CBDF67E7A3FD742793679FD78A034430C6F7C9BAC93A1D0856444F17080DF9B41968AA241CFB055785E9C54E072137A7EBCE2C2FB642CD2105A7D6E6D32857C71B7ACE293607CD9E55CCBBF122EBA823A40D29C2FBD0C35A3E633DC72C490B7B7985F088EF71BD435AE3A3B30DF355FB25E0E220D3E79A5E94A5332D287F571B556A0C3244EF666C6FF0389CEF02AD9AA1DD9807100E3C1869E2794E4614E0B98CD0756D9CAC009C2D42F551B85AF4784583E92E7C2BBB5DCD196128AD94430AC56A42FFB532AEA42922DE16E8D30203010001" />
  </PackageFiles>
  <Commands Reboot="Defer">
    <Command PackageFile="Synchronization-v2.1-x64-ENU.msi" Arguments="/quiet" EstimatedInstallSeconds="80" EstimatedTempBytes="20000000">
      <ExitCodes>
        <ExitCode Value="0" Result="Success" />
        <ExitCode Value="112" Result="Fail" String="DiskFull" />
        <DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" />
      </ExitCodes>
    </Command>
  </Commands>
  <Strings>
    <String Name="Culture">en</String>
    <String Name="DisplayName">SyncFX21Core (x64)</String>
    <String Name="SyncFX21_64">http://download.microsoft.com/download/E/1/E/E1E636E6-AA5C-4052-9927-D722312DB564/Synchronization-v2.1-x64-ENU.msi</String>
    <String Name="DiskFull">DiskFull</String>
    <String Name="Anunexpectedexitcodewasr">An unexpected exit code was returned from the installer. The installation failed.</String>
  </Strings>
</Package>



product.xml为SyncFX20DatabaseProviders(64)

product.xml for SyncFX20DatabaseProviders(x64)

<?xml version="1.0" encoding="utf-8"?>
<Product ProductCode="SyncFX20DatabaseProviders(x64)" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
  <RelatedProducts>
    <DependsOnProduct Code="SyncFX20Core(x64)" />
  </RelatedProducts>
</Product>



封装为SyncFX20DatabaseProviders(64)

package for for SyncFX20DatabaseProviders(x64)

<?xml version="1.0" encoding="utf-8"?>
<Package Name="DisplayName" LicenseAgreement="databaseproviderseula_english.rtf" Culture="Culture" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
  <PackageFiles CopyAllPackageFiles="false">
    <PackageFile Name="databaseproviderseula_english.rtf" />
    <PackageFile Name="DatabaseProviders-v3.1-x64-ENU.msi" HomeSite="SyncFX21DatabaseProviders_64" PublicKey="3082010A0282010100BD72B489E71C9F85C774B8605C03363D9CFD997A9A294622B0A78753EDEE463AC75B050B57A8B7CA05CCD34C77477085B3E5CBDF67E7A3FD742793679FD78A034430C6F7C9BAC93A1D0856444F17080DF9B41968AA241CFB055785E9C54E072137A7EBCE2C2FB642CD2105A7D6E6D32857C71B7ACE293607CD9E55CCBBF122EBA823A40D29C2FBD0C35A3E633DC72C490B7B7985F088EF71BD435AE3A3B30DF355FB25E0E220D3E79A5E94A5332D287F571B556A0C3244EF666C6FF0389CEF02AD9AA1DD9807100E3C1869E2794E4614E0B98CD0756D9CAC009C2D42F551B85AF4784583E92E7C2BBB5DCD196128AD94430AC56A42FFB532AEA42922DE16E8D30203010001" />
  </PackageFiles>
  <Commands Reboot="Defer">
    <Command PackageFile="DatabaseProviders-v3.1-x64-ENU.msi" Arguments="/quiet" EstimatedInstallSeconds="80" EstimatedTempBytes="20000000">
      <ExitCodes>
        <ExitCode Value="0" Result="Success" />
        <ExitCode Value="112" Result="Fail" String="DiskFull" />
        <DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" />
      </ExitCodes>
    </Command>
  </Commands>
  <Strings>
    <String Name="Culture">en</String>
    <String Name="DisplayName">SyncFX21DatabaseProviders (x64)</String>
    <String Name="SyncFX21DatabaseProviders_64">http://download.microsoft.com/download/E/1/E/E1E636E6-AA5C-4052-9927-D722312DB564/DatabaseProviders-v3.1-x64-ENU.msi</String>
    <String Name="DiskFull">DiskFull</String>
    <String Name="Anunexpectedexitcodewasr">An unexpected exit code was returned from the installer. The installation failed.</String>
  </Strings>
</Package>

请随意,如果您需要了解更多信息或源文件与我联系...... ameser @ gmail的.COM

Please Feel free to contact me if you need more details or the source files... ameser@gmail.com

干杯!

这篇关于引导程序,同步框架2.1 - 先决条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆