Following content is reprinted from here, please go to the original website for more information.

Author: Bob Arnson

Paying for upgrades

No, this isn’t a post on the costs of proprietary software but an amplification/clarification to my previous post. On wix-users, there’s a thread on the pains of automating upgrades.

If your product consists of a large number of files and the file set changes regularly – files being added and removed during the product lifetime – it’s only natural to want to avoid the cost of hand-authoring setup changes to match. (A little over a year ago, I shipped a product with over 7000 files, so I’m familiar with the pain and desire for automation.)

Unfortunately, our frenemy the component rules makes such automation difficult. The closest we-the-WiX-team has gotten to a complete solution is to create components with one file each, which makes the component eligible to have its component GUID automatically generated (using an asterisk in the Component element’s Guid attribute value).

What doesn’t work is when files are removed. Windows Installer doesn’t let you remove components in a minor upgrade, so using one file per component doesn’t immediately solve the automation problem: Your automatically-generated minor upgrade will be missing a component, which is a mortal component-rule sin.

Nor can you avoid the problem by using multiple files per component because component rules say that components must be immutable: You can’t add or remove resources from a component.

So automating the creation of minor upgrades has additional costs:

  • Additional tooling to try to support removing files without blatantly violating component rules.
  • Additional coding in your product to tolerate “obsolete” files without being able to remove them.

For many types of apps, but especially Web apps with many content files, that’s a huge cost. Being able to ship minor-upgrade patches from an automated build might be a benefit worth the cost. It’s really a decision your team needs to make.

I’ll add that if you don’t anticipate shipping patches on a regular schedule, you might just automate the authoring of your RTM product and pay the price of manually tweaking your setup authoring when you need to ship a patch. Again, it’s a cost-benefit decision your team needs to think about.

Cheap and easy

If you don’t absolutely need to ship patches, you can avoid the costs of minor upgrades by simply using major upgrades. You can remove files without worrying about component-rule violations if you use an “early” scheduling of theRemoveExistingProducts standard action – before or immediately after theInstallInitialize action.

The MSI SDK notes that scheduling RemoveExistingProducts early is “inefficient” because the files that are same between the two product versions are removed and then reinstalled. But that inefficiency is what lets you remove files and components. If you schedule RemoveExistingProducts immediately before or afterInstallFinalize, MSI implements the major upgrade by installing the new version of the product “on top of” the previous version, upgrading files with newer versions, then removing the previous version. MSI increments the reference count of components in both packages during the installation of the newer version, then decrements it during the removal of the previous version. Component reference counting works only if component rules are followed, so it’s pretty much the same as minor upgrades.

If you have a large product, the size and install-time benefits of minor upgrade patches might be worth the development effort. Otherwise, major upgrades scheduled early are a great solution. Your call.

Paying for upgrades, by Bob Arnson的更多相关文章

  1. The Top 50 Proprietary Programs that Drive You Crazy — and Their Open Source Alternatives

    The Top 50 Proprietary Programs that Drive You Crazy — and Their Open Source Alternatives 01 / 22 / ...

  2. 一起了解 .Net Foundation 项目 No.22

    .Net 基金会中包含有很多优秀的项目,今天就和笔者一起了解一下其中的一些优秀作品吧. 中文介绍 中文介绍内容翻译自英文介绍,主要采用意译.如与原文存在出入,请以原文为准. Windows Templ ...

  3. 25 highest paying companies: Which tech co outranks Google, Facebook and Microsoft?

    Tech companies dominate Glassdoor’s ranking of the highest paying companies in the U.S., snagging 20 ...

  4. POJ1704 Georgia and Bob

    Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 9771   Accepted: 3220 Description Georg ...

  5. 2016中国大学生程序设计竞赛 - 网络选拔赛 J. Alice and Bob

    Alice and Bob Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) ...

  6. bzoj4730: Alice和Bob又在玩游戏

    Description Alice和Bob在玩游戏.有n个节点,m条边(0<=m<=n-1),构成若干棵有根树,每棵树的根节点是该连通块内编号最 小的点.Alice和Bob轮流操作,每回合 ...

  7. Alice and Bob(2013年山东省第四届ACM大学生程序设计竞赛)

    Alice and Bob Time Limit: 1000ms   Memory limit: 65536K 题目描述 Alice and Bob like playing games very m ...

  8. Alice and Bob 要用到辗转相减

    Alice and BobTime Limit: 1 Sec  Memory Limit: 64 MBSubmit: 255  Solved: 43 Description Alice is a be ...

  9. sdutoj 2608 Alice and Bob

    http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2608 Alice and Bob Time L ...

随机推荐

  1. mmc生产运输问题

    本题目结合生产和运输,增加了约束, 其实,比较生产,运输问题,大同小异, 解法基本相同.

  2. 使用命令xrandr设置当前系统的显示分辨率及显示的旋转脚本

    /*********************************************************************  * Author  : Samson  * Date   ...

  3. Android数据的四种存储方式之SQLite数据库

    Test.java: /** * 本例解决的问题: * 核心问题:通过SQLiteOpenHelper类创建数据库对象 * 通过数据库对象对数据库的数据的操作 * 1.sql语句方式操作SQLite数 ...

  4. windows 下的命令行工具。。

    1.powershell window自带..右下角搜索..powershell 2.conemu https://code.google.com/p/conemu-maximus5/wiki/Dow ...

  5. C 高级编程 1

    内存管理层次: 硬件层次: 内存结构管理 内核算层次: 内存映射 堆扩展 数据结构层次: 智能指针: stl :在多线程,共享内存有问题 SGI公司实现了STL ,开发了OPENGL库 语言层次:C: ...

  6. [ZZ]C++中,引用和指针的区别

    (1) 引用总是指向一个对象,没有所谓的 null reference .所有当有可能指向一个对象也由可能不指向对象则必须使用 指针. 由于C++ 要求 reference 总是指向一个对象所以 re ...

  7. cocos2d-x3.2在xcode6.1下的 环境搭建

    由于最近需要给CP开发游戏SDK,顺便又重新接触了下cocos2d-x,自己曾在2011年的时候用过cocos2d-x早起的版本,现发现3.2版于原来的差距还是蛮大的,环境搭建流程如下: 1.xcod ...

  8. Linux内核--网络栈实现分析(二)--数据包的传递过程--转

    转载地址http://blog.csdn.net/yming0221/article/details/7492423 作者:闫明 本文分析基于Linux Kernel 1.2.13 注:标题中的”(上 ...

  9. Stupid Tower Defense

    Problem Description FSF is addicted to a stupid tower defense game. The goal of tower defense games ...

  10. The Romantic Hero

    Problem Description There is an old country and the king fell in love with a devil. The devil always ...