遇到版本号问题。
我们曾经使用 Installshield 作为我们的客户端安装程序。自从切换到 WiX 后,我们已经“修复”了一些问题,例如版本编号方案。我们曾经使用 xxx-y,但 WiX 不允许“-”作为版本号的一部分。
当我尝试使用“虚线”版本#更新较旧的已安装产品时,安装停止(甚至在它开始之前):
[09A4:1908][2016-09-20T09:20:34]e000: Error 0x80070057: Failed to convert version: 5.3.0-7 to DWORD64 for ProductCode: {...}
[09A4:1908][2016-09-20T09:20:34]e151: Detect failed for package: Client_MSI, error: 0x80070057
该错误似乎导致引擎不触发 OnDetectMsiFeature,但是,引擎似乎确实以某种方式知道这些功能:
[09A4:1908][2016-09-20T09:20:34]i000: WixWPF: Enter Method: OnDetectPackageComplete
[09A4:1908][2016-09-20T09:20:34]i000: WixWPF: Leaving Method: OnDetectPackageComplete
[09A4:1908][2016-09-20T09:20:34]i101: Detected package: NetFx40Web, state: Present, cached: None
[09A4:1908][2016-09-20T09:20:34]i101: Detected package: vcredist2015x64, state: Present, cached: Complete
[09A4:1908][2016-09-20T09:20:34]i101: Detected package: vcredist2015x86, state: Present, cached: None
[09A4:1908][2016-09-20T09:20:34]i101: Detected package: Client_MSI, state: Unknown, cached: None
[09A4:1908][2016-09-20T09:20:34]i104: Detected package: Client_MSI, feature: FeatureA, state: Unknown
[09A4:1908][2016-09-20T09:20:34]i104: Detected package: Client_MSI, feature: FeatureB, state: Unknown
...
[09A4:1908][2016-09-20T09:20:34]i000: WixWPF: Enter Method: OnDetectComplete
更新:
我将版本号的问题跟踪到 dutil\fileutil.cpp。我将第 444 行的检查更改为:
while (wzPartEnd < wzEnd && ((L'.' != *wzPartEnd)
&& (L'-' != *wzPartEnd)))
soas 接受 '-' 作为版本分隔符。现在,新的引导程序加载,但在状态检测方面存在问题。虽然它“看到”了包和功能,但它“看到”所有这些都是“不存在的”。
[0280:1050][2016-09-20T12:36:05]i103: Detected related package: {...}, scope: PerMachine, version: 5.3.0.7, language: 0 operation: MajorUpgrade
[0280:1050][2016-09-20T12:36:05]i000: WixWPF: Enter Method: OnDetectRelatedMsiPackage
[0280:1050][2016-09-20T12:36:05]i000: WixWPF: Leaving Method: OnDetectRelatedMsiPackage
[0280:1050][2016-09-20T12:36:05]i000: WixWPF: Enter Method: OnDetectMsiFeature
[0280:1050][2016-09-20T12:40:42]i000: WixWPF: Leaving Method: OnDetectMsiFeature
...
[0280:1050][2016-09-20T12:41:04]i000: WixWPF: Enter Method: OnDetectPackageComplete
[0280:1050][2016-09-20T12:41:07]i000: WixWPF: Leaving Method: OnDetectPackageComplete
[0280:1050][2016-09-20T12:41:07]i101: Detected package: NetFx40Web, state: Present, cached: None
[0280:1050][2016-09-20T12:41:07]i101: Detected package: vcredist2015x64, state: Present, cached: Complete
[0280:1050][2016-09-20T12:41:07]i101: Detected package: vcredist2015x86, state: Present, cached: None
[0280:1050][2016-09-20T12:41:07]i101: Detected package: Client_MSI, state: Absent, cached: None
[0280:1050][2016-09-20T12:41:07]i104: Detected package: Client_MSI, feature: LunaClient, state: Absent
[0280:1050][2016-09-20T12:41:07]i104: Detected package: Client_MSI, feature: FeatureB, state: Absent
所以,我的新问题是:
- 为什么旧包和选定的功能列表都标记为缺席?
- 我可以从中恢复吗?