zoukankan      html  css  js  c++  java
  • [WiX]我的第一个WiX安装脚本

    我的第一个WiX安装脚本

     

    WiXWiki

    WiX 代表 Windows Installer Xml (WiX) toolset  它是建立Windows InstallerXML toolset (MSI) 包裹从XML 文件。它支持开发商集成他们的发布过程建立MSI MSM 设定包裹的命令行环境。

    内部结构

    Wix 由四份组成: 蜡烛、光、Lit 和黑暗。

    蜡烛

    蜡烛, 编译器, 叫蜡烛。

     

    点燃, 连接器作为一个或更多目标文件和链接参考在目标文件在适当的标志在其它目标文件。光负责还对适当地收集所有binaries, 包装他们, 和组建最后的MSI MSM 文件。

     

    Lit

    Lit, 解放工具, 叫点燃了, 是可能被使用结合多份目标文件入图书馆可能由光解析的一个任意工具。

     

    黑暗

    黑暗, Decompiler 采取现有的代表包裹的MSI MSM 文件和组建XML 文件。

     

    我的例子示范如下,脚本指示安装Windows Service以及一些dll:

    <?xmlversion="1.0"encoding="GB2312"?>

    <Wixxmlns="http://schemas.microsoft.com/wix/2003/01/wi">

        <ProductId="E4A63349-xxxx-4268-9633-B746461FC007"Name="Presence Collector"

            Language="1033"Version="1.0.1.0"Manufacturer="UltraPower">

            <PackageId="71A692D5-BE19-42e0-986D-AE17B98E93B1"

                Description="……."

                Comments="++++++++"

                InstallerVersion="200"

                Compressed="yes"/>

     

            <MediaId="1"Cabinet="Proxy.cab"EmbedCab="yes"/>

            <MediaId="2"Cabinet="Proxy2.cab"EmbedCab="yes"/>

           

     

            <DirectoryId="TARGETDIR"Name="SourceDir">

                <DirectoryId="ProgramMenuFolder"/>

                <DirectoryId="ProgramFilesFolder">

                    <DirectoryId="INSTALLLOCATION"Name="Proxy"LongName=" Proxy">

                       

                        <ComponentId='CommandListenerEXE'Guid="E06C2F1B-xxxx-4862-A2B2-DFF5A7B3BF16">

                            <FileId='UltraPower..CommandListener.exe'

                                Name='CL.exe'LongName="UltraPower..CommandListener.exe"

                                src='C:\ZhengYun\ SetupDemo\CommandListener\bin\Debug\UltraPower..CommandListener.exe'

                                DiskId="1"/>

                            <ServiceInstallId='$(var.CommandListener.TargetFileName)'

                                Name='CommandListener'DisplayName=' Command Listener'

                                Type='ownProcess'Interactive='yes'Start='auto'Vital='yes'

                                ErrorControl='normal'/>

     

                            <ServiceControlId='CommandListenerEXE'

                            Name='CommandListener'Start='install'Stop='both'Remove='uninstall'

                            Wait='yes'/>

     

                        </Component>

                       

                        <ComponentId="RequestHandlerCOM"Guid="379D059A-xxxx-460f-83D9-90300D2C10D8">

                            <FileId='UltraPower..RequestHandler.dll'

                                Name="ReqHand.dll"LongName="UltraPower..RequestHandler.dll"

                                src='C:\ZhengYun\SetupDemo\UltraPower..RequestHandler\
    bin\Debug\UltraPower..RequestHandler.dll'

                                DiskId="2">

                               

                                <ShortcutId="Proxy.RequestHanlder.Shortcut"Name="MyApp"

                                LongName="Proxy RequestHanlder Shortcut"Description="A glorious expanse of battleship grey"

                                Directory="ProgramMenuFolder"/>

                            </File>

                        </Component>

                       

                        <ComponentId="CachingCOM"Guid="479D059A-xxxx-460f-83D9-90300D2C10D8">

                            <FileId='Microsoft.Practices.EnterpriseLibrary.Caching.dll'

                                Name="Caching1.dll"LongName="Microsoft.Practices.EnterpriseLibrary.Caching.dll"

                                src='C:\ZhengYun\SetupDemo\CommandListener\bin\Debug\
    Microsoft.Practices.EnterpriseLibrary.Caching.dll'

                                DiskId="1">

                            </File>

                        </Component>

                       

                    </Directory>

                </Directory>

            </Directory>

     

            <FeatureId="ProductFeature"Title=" Collector Feature"Level="1">

                <ComponentRefId="RequestHandlerCOM"/>

                <ComponentRefId="CachingCOM"/>

                <ComponentRefId="CommandListenerEXE"/>

            </Feature>

        </Product>

    </Wix>

     

     

  • 相关阅读:
    mongodb管理命令
    面试阿里巴巴前端开发工程师电话面试部分
    前端常用性能优化方法
    面试阿里巴巴前端开发工程师笔试部分
    javascript 实现无重复字符的最长子串
    自定义 Flutter 插件(flutter_3des_plugin)步骤,以及上传插件的那些坑。
    Flutter 实现 3des 加密
    flutter 优雅的版本更新处理
    flutter_blue 蓝牙插件实战及那些坑
    Flutter 总结apk打包上架问题(keystore,依赖包下载报错,apk文件项目请求报错等)
  • 原文地址:https://www.cnblogs.com/zhengyun_ustc/p/141508.html
Copyright © 2011-2022 走看看