wix 生成新的升级代码 [英] wix generating new upgrade code

查看:26
本文介绍了wix 生成新的升级代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目需要能够同时安装 2 个或更多版本.据我所知,我找到的解决方案是更改安装程序的每个版本的升级代码.

My project needs to have the ability to install 2 versions or more simultaneously. as far as i can find, the solution i have found is changing the upgrade code for each build of the installer.

但是我想自动执行此操作.在常规 GUID 中,我只使用*",但这不适用于升级代码.有没有办法在每个 wix 预构建或任何其他解决方案中生成新的升级代码?

however i want to do this automatically. in regular GUID i just use "*" but this won't work for upgradecode. is there a way to generate new upgradecode in every wix prebuild or any other solution?

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
  <Bundle Name="Prog" Version="1.2.1.16" Manufacturer="Gilad Corporation" UpgradeCode="{7E71F945-BA46-4872-A6B2-AF992FFDF2D0}">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
      <bal:WixStandardBootstrapperApplication LicenseFile="..\SetupProject\Gilad.rtf" />
    </BootstrapperApplicationRef>
    <Chain>
      <!-- TODO: Define the list of chained packages. -->
      <PackageGroupRef Id="Netfx45FullPackage" />
    </Chain>
  </Bundle>

推荐答案

我不是 100% 确定您是要交付不同版本/语言版本的应用程序,还是要多次安装相同的设置-旁边.听起来你想要实现后者.让我试着简要解释这两种情况.

I am not 100% sure if you want to deliver different editions / language versions of your application, or if you want to install the same setup several times side-by-side. It sounds like you want to achive the latter. Let me try to briefly explain both scenarios.

首先是基础知识:

  • Package Code:标识唯一的 MSI 文件(因此每次重新编译时都应更改)
  • 产品代码:标识唯一的产品版本.同一产品的不同口味(例如英文版、德文版、法文版)往往具有不同的产品代码.
  • 升级代码:标识一系列相关产品.本质上是一组产品代码.
  • Package Code: identifies a unique MSI file (hence it should always change for each recompile)
  • Product Code: identifies a unique product edition. Different flavors of the same product (such as english, german, french editions) tend to have different product codes.
  • Upgrade Code: identifies a family of related products. In essence a group of product codes.

不同的应用程序版本/语言:如果您想要安装不同语言版本的设置 - 假设您提供英语、法语和德语版本,您可以通过保持所有这些版本的升级代码相同,但使用不同的产品代码和包代码来实现每个设置.这允许每个安装程序轻松卸载计算机上已经存在的另一个安装程序.

Different applications editions / languages: If what you want is to install a different language version of your setup - say you deliver English, French and German versions, you can do that by keeping the upgrade code the same for all of them, but use different product codes and package codes for each setup. This allows each setup to easily uninstall another if it is already present on the machine.

并排安装:我不喜欢这个概念,因为在我看来它往往表明设置设计中存在错误,但实例转换"的概念应该能够以实现您可能指的内容.

Side-By-Side installations: I don't like this concept since it tends to indicate an error in the setup design in my opinion, but the concept of "instance transforms" should be able to achieve what you probably refer to.

<InstanceTransforms Property="INSTANCEID">
   <Instance Id="Install2" ProductCode="*" 
             UpgradeCode="guid-goes-here" ProductName="Product" />
</InstanceTransforms>

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