【问题标题】:cant compile right msp with wix无法使用 wix 编译正确的 msp
【发布时间】:2018-08-26 08:44:58
【问题描述】:

我正在尝试在空设置和使用 1 个文件的设置之间编译 msp: 空.wsx:

    <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="71478e9e-07b8-4ccf-b46c-ac42d34cb439"
        Name="AproductClient"
        Language="1033"
        Version="4.0.0"
        Manufacturer="Aproduct(c)"
        UpgradeCode="71478e9e-07b8-4ccf-b46c-ac42d34cb439">
        <Package InstallerVersion="405" Compressed="yes" Platform="x64" SummaryCodepage="Windows-1252" Languages="1033" InstallScope="perMachine" />
        <MediaTemplate CompressionLevel="high" EmbedCab="no" MaximumUncompressedMediaSize="512" />
        <FeatureRef Id="Complete"/>
    </Product>

    <Fragment>
        <Feature Id="Complete" Title="Complete" Level="1">
        </Feature>
    </Fragment>

    <Fragment>
    </Fragment>


</Wix>

设置 1 个文件:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="71478e9e-07b8-4ccf-b46c-ac42d34cb439" Name="AproductClient" Language="1033" Version="4.0.0" Manufacturer="Aproduct(c)" UpgradeCode="71478e9e-07b8-4ccf-b46c-ac42d34cb439">
        <Package InstallerVersion="405" Compressed="yes" Platform="x64" SummaryCodepage="Windows-1252" Languages="1033" InstallScope="perMachine" />
        <MediaTemplate CompressionLevel="high" EmbedCab="no" MaximumUncompressedMediaSize="512" />
        <FeatureRef Id="Complete" />
    </Product>
    <Fragment>
        <Feature Id="Complete" Title="Complete" Level="1">
            <ComponentRef Id="Component_ProgramFiles64Folder.Aproduct.AproductPlus.bin" />
        </Feature>
    </Fragment>
    <Fragment>
        <DirectoryRef Id="ProgramFiles64Folder.Aproduct.AproductPlus.bin">
            <Component Id="Component_ProgramFiles64Folder.Aproduct.AproductPlus.bin" Guid="12df9f76-78a1-45fd-985d-9792ad0ebd85" Win64="yes">
                <File Id="_test.txt" Source="C:\tmp\patch1\test.txt" />
            </Component>
        </DirectoryRef>
    </Fragment>
    <Fragment>
        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="ProgramFiles64Folder" Name="ProgramFiles64Folder">
                <Directory Id="ProgramFiles64Folder.Aproduct" Name="Aproduct">
                    <Directory Id="ProgramFiles64Folder.Aproduct.AproductPlus" Name="AproductPlus">
                        <Directory Id="ProgramFiles64Folder.Aproduct.AproductPlus.bin" Name="bin">
                            <Directory Id="ProgramFiles64Folder.Aproduct.AproductPlus.bin.plugins" Name="Plugins"></Directory>
                        </Directory>
                    </Directory>
                </Directory>
            </Directory>
        </Directory>
    </Fragment>
</Wix>

补丁定义:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Patch Manufacturer="Aproduct(c)" MoreInfoURL="http://www.Aproduct.com" DisplayName="MF 4.0.111.222 05" Description="2018.02.01.05: Manual number 5 of 2018.02 SP 1" Classification="Update" AllowRemoval="yes">
        <Media Id="5000" Cabinet="RTM.cab">
            <PatchBaseline Id="RTM" />
        </Media>
        <PatchFamilyRef Id="PatchFamily01" />
    </Patch>
    <Fragment>
        <PatchFamily Id="PatchFamily01" Version="18.2.1.122" Supersede="yes">
            <ComponentRef Id="Component_ProgramFiles64Folder.Aproduct.AproductPlus.bin" />
        </PatchFamily>
    </Fragment>
</Wix>

msp 未安装 test.txt。不清楚为什么: 构建日志:

C:\sample\roman\manualfix>call candle.exe .\empty.wxs -out .\gen\empty.wixobj
Windows Installer XML Toolset Compiler version 3.10.3.3007
Copyright (c) .NET Foundation and contributors. All rights reserved.

empty.wxs

C:\sample\roman\manualfix>call light.exe .\gen\empty.wixobj -out gen\empty.msi
Windows Installer XML Toolset Linker version 3.10.3.3007
Copyright (c) .NET Foundation and contributors. All rights reserved.

C:\Users\rbelinsky\AppData\Local\Temp\olmptr31\empty.msi : warning LGHT1076 : ICE71: The Media table has no entries.

C:\sample\roman\manualfix>call candle.exe .\manualfix.wxs -out .\gen\manualfix.wixobj
Windows Installer XML Toolset Compiler version 3.10.3.3007
Copyright (c) .NET Foundation and contributors. All rights reserved.

manualfix.wxs

C:\sample\roman\manualfix>call light.exe .\gen\manualfix.wixobj -out gen\manualfix.msi
Windows Installer XML Toolset Linker version 3.10.3.3007
Copyright (c) .NET Foundation and contributors. All rights reserved.


C:\sample\roman\manualfix>torch.exe -p -xi gen\empty.wixpdb gen\manualfix.wixpdb -out gen\diff.wixmst
Windows Installer XML Toolset Transform Builder version 3.10.3.3007
Copyright (c) .NET Foundation and contributors. All rights reserved.


C:\sample\roman\manualfix>candle.exe manualfix-msp.wxs -out gen\manualfix-msp.wixobj
Windows Installer XML Toolset Compiler version 3.10.3.3007
Copyright (c) .NET Foundation and contributors. All rights reserved.

manualfix-msp.wxs

C:\sample\roman\manualfix>light.exe gen\manualfix-msp.wixobj -out gen\manualfix-msp.wixmsp
Windows Installer XML Toolset Linker version 3.10.3.3007
Copyright (c) .NET Foundation and contributors. All rights reserved.


C:\sample\roman\manualfix>pyro.exe gen\manualfix-msp.wixmsp -t RTM gen\diff.wixmst -out out\manualfix.msp
Windows Installer XML Toolset Patch Builder version 3.10.3.3007
Copyright (c) .NET Foundation and contributors. All rights reserved.

pyro.exe : warning PYRO1110 : Component 'Component_ProgramFiles64Folder.Dalet.DaletPlus.bin' was added to feature 'Complete' in the transform 'C:\sample\roman\manualfix\gen\diff.wixmst'. If you cannot guarantee that this feature will always be installed, you should consider adding new components to new top-level features to prevent prompts for source when installing this patch.

C:\sample\roman\manualfix>del /q/f install.log

C:\sample\roman\manualfix>msiexec /p out\manualfix.msp /qb /l*vx install.log

安装日志: https://gist.github.com/kain64/9f58f8680dd49ad94d6db3831d65eb42 任何想法

【问题讨论】:

    标签: wix windows-installer patch wix3.5


    【解决方案1】:

    克隆人的攻击:Did you put dummy GUIDs in place before posting online? 看起来你已经设置了 product code 与 upgrade code 相同。哦人类! :-) 如果实际编译,我会感到困惑。老实说,我真的不知道会发生什么,但这绝对是错误的。

    建议:1)确保产品代码和升级代码不同。 2) 在测试之前清理系统中的旧补丁 再次,或者更好的是设置一个虚拟机进行测试。 3) 讨论 与您的经理一起了解您的设置的确切要求 - 您必须 在技​​术限制的情况下工作(这是不幸的、不可否认的和具有挑战性的 - 并且,我可以补充一点,这不是我的错 - 仅仅是一个具有足够实践经验的信使,能够自信地说出这些)。


    以前的测试补丁:看看日志,我想知道您是否已经制作了很多补丁,这些补丁仍然存在于您的测试盒中。您是否使用干净的虚拟机进行此测试?我认为你应该这样做。我认为通常你自己的所有部署测试都应该在虚拟机上完成。

    修补,一种交付机制:要理解的重要一点是,补丁只是一种交付机制,用于已经必须工作的升级。换句话说,您需要测试您为其创建补丁的次要或主要升级在作为 MSI 安装时是否实际工作,然后再打包为 MSP。如果没有,那么补丁也永远不会起作用。

    打补丁:打补丁很复杂,而且容易出错。 主要升级补丁特别笨重,不推荐使用 - 我只有在旧版本的卸载被推迟到安装过程结束时才设法使它们工作。 次要升级补丁只有在您仔细规划和管理发布过程时才有可能。 I wrote up this answer earlier on the limitations of minor upgrades(推荐阅读——请阅读不要略读这一篇——这对你的流程和发布很重要)。

    Product-, Package- & UpgradeCode:这是另一个答案:On the differences between package-, product- and upgrade codes(只是第一部分 - 了解升级代码的用途 - 忽略其余的答案)。

    Installshield 的帮助文件:我将直接链接到 Installshield 的帮助文件,因为内容非常好。 This is a table which shows you what separates the different types of Windows Installer upgrades。 Pay particular attention to the fact that for a minor upgrade you need to use the same file name for the MSI file for both releases! 我总是偶然发现这个要求。诸如此类的更多重要细节可以在有关小升级的链接答案中找到。请阅读。

    【讨论】:

      猜你喜欢
      • 2013-02-08
      • 1970-01-01
      • 2019-10-25
      • 1970-01-01
      • 2018-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-20
      相关资源
      最近更新 更多