Wix制作安装包
Wix制作安装包,找起资料来很费劲,记录一下:
Product.wxs,该文件只能制作出msi形式的安装包,不能做到自动检测framework。
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<Product Id="{1F471579-CF71-4375-96ED-065093700642}" Name="云互通" Language='2052' Codepage='936'
Version="1.0.0.0" Manufacturer="Winway" UpgradeCode="DBAD34E4-EA8B-4DF6-970F-170E8011956F">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<WixVariable Id="WixUIBannerBmp" Value="banner.bmp"/>
<WixVariable Id="WixUIDialogBmp" Value="dialog.bmp"/>
<WixVariable Id="WixUILicenseRtf" Value="licence.rtf"/> <Property Id="ARPNOREPAIR" Value="yes" Secure="yes"/> <!--TARGETDIR这是一个虚拟的dir,用于包含其它的Directory-->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="DesktopFolder" Name="Desktop" /> <Directory Id="ProgramMenuFolder" Name="Programs">
<Directory Id="ProgramMenuDir" Name="云互通" ></Directory>
</Directory> <Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="Winway">
<Directory Id="Resource" Name="Resource"></Directory>
</Directory>
</Directory> </Directory> <ComponentGroup Id="help">
<Component Id="uninstall" Guid="{6886685C-E1B1-48d9-B6A7-548175BD8F17}" Directory="ProgramMenuDir">
<Condition>
<![CDATA[Installed OR NETFRAMEWORK40FULL]]>
</Condition>
<Shortcut Id="UninstallProduct" Name="卸载云互通" Directory="ProgramMenuDir" Target="[SystemFolder]msiexec.exe" Arguments="/x [ProductCode]" Description="Uninstall" Icon="uninstall.ico">
<Icon Id="uninstall.ico" SourceFile="$(var.FCS.UI.TargetDir)Resource\uninstall.ico" />
</Shortcut>
<RemoveFolder Id='rmvProgramMenuDir' On='uninstall' />
<RegistryValue Root='HKCU' Key='Software/[Manufacturer]/[ProductName]' Type='string' Value='' KeyPath='yes' />
</Component> <Component Id="FCS.Service" Guid="{53E2898A-6BBB-4EC9-8455-E56200CD0A17}" Directory="INSTALLLOCATION">
<File Source="$(var.FCS.Service.TargetPath)" KeyPath="yes" DiskId="1" />
<File Source="$(var.FCS.Service.TargetDir)setting.config" />
<File Source="$(var.FCS.Service.TargetDir)log4net.dll" />
<File Source="$(var.FCS.Service.TargetDir)log4net.config" />
<File Source="$(var.FCS.Service.TargetDir)FCS.BLL.dll" />
<File Source="$(var.FCS.Service.TargetDir)FCS.Model.dll" />
<File Source="$(var.FCS.Service.TargetDir)FCS.Util.dll" />
<File Source="$(var.FCS.Service.TargetDir)Newtonsoft.Json.dll" />
<File Source="$(var.FCS.Service.TargetDir)Ionic.Zip.dll" />
<File Source="$(var.FCS.Service.TargetDir)Oracle.ManagedDataAccess.dll" />
<File Source="$(var.FCS.Update.TargetPath)" />
<ServiceInstall Id="ServiceInstaller"
Type="ownProcess"
Vital="yes"
Name="FCS"
DisplayName="FCS 2.0"
Description="深圳万威科技有限公司云互通 V2.0"
Start="auto"
Account="LocalSystem"
ErrorControl="ignore"
Interactive="no" />
<ServiceControl Id="StartService"
Start="install"
Stop="both"
Remove="uninstall"
Name="FCS"
Wait="yes" />
</Component> <Component Id="FCS.UI" Guid="{D61B7439-25A8-4C28-8F74-64ADE3AC183B}" Directory="INSTALLLOCATION">
<File Source="$(var.FCS.UI.TargetPath)">
<Shortcut Id="startmenu" Directory="ProgramMenuDir" Name="参数设置" WorkingDirectory='INSTALLLOCATION' Advertise="yes" Icon="start.ico">
<Icon Id="start.ico" SourceFile="$(var.FCS.UI.TargetDir)Resource\FCS.UI.ico" />
</Shortcut>
<Shortcut Id="desktop" Directory="DesktopFolder" Name="云互通" WorkingDirectory='INSTALLLOCATION' Advertise="yes" Icon="start.ico" />
</File>
</Component> </ComponentGroup> <Feature Id="ProductFeature" Level="1">
<ComponentRef Id="FCS.Service" />
<ComponentRef Id="FCS.UI" />
<ComponentRef Id="uninstall" />
</Feature> <PropertyRef Id="NETFRAMEWORK40FULL"/> <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" /> <UI>
<UIRef Id="WixUI_InstallDir" />
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="2">1</Publish> <!--隐藏license界面-->
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">1</Publish>
</UI>
</Product>
</Wix>
界面定义文件,需要它的原因是界面整个用图片替代,所以要隐藏掉一些。
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="zh-cn" Language='2052' Codepage='936' xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="WelcomeDlgTitle" Overridable="yes"></String>
<String Id="WelcomeDlgDescription" Overridable="yes"></String>
<String Id="FatalErrorTitle" Overridable="yes"></String>
<String Id="FatalErrorDescription1" Overridable="yes"></String>
<String Id="FatalErrorDescription2" Overridable="yes"></String>
<String Id="UserExitTitle" Overridable="yes"></String>
<String Id="UserExitDescription1" Overridable="yes"></String>
<String Id="UserExitDescription2" Overridable="yes"></String>
<String Id="MaintenanceWelcomeDlgDescription" Overridable="yes"></String>
<String Id="MaintenanceWelcomeDlgTitle" Overridable="yes"></String>
<String Id="ExitDialogDescription" Overridable="yes"></String>
<String Id="ExitDialogTitle" Overridable="yes"></String>
</WixLocalization>
制作启动文件
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="云互通" Version="1.0.0.0" Manufacturer="Winway" UpgradeCode="7742af6f-d4a6-4d28-84d2-ec42fb1b220d"
IconSourceFile="FCS.UI.ico"> <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication LicenseFile="E:\FCS\Client\Source\FCS2.0\FCS.Install\licence.rtf"
LocalizationFile="MyLocalize.wxl" LogoFile="FCS.Logo.jpg" />
</BootstrapperApplicationRef> <Chain>
<PackageGroupRef Id="NetFx40Web"/>
<MsiPackage Id="FCS" SourceFile="E:\FCS\Client\Source\FCS2.0\FCS.Install\bin\Release\zh-cn\FCS.msi" DisplayInternalUI="yes"></MsiPackage>
</Chain>
</Bundle>
</Wix>
语言文件
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="zh-cn" Language='2052' Codepage='936' xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Caption">安装 [WixBundleName]</String>
<String Id="Title">[WixBundleName]</String>
<String Id="ConfirmCancelMessage">你想取消安装吗?</String>
<String Id="HelpHeader">安装帮助</String>
<String Id="HelpText">
/install | /repair | /uninstall | /layout [directory] - 安装,修复,卸载或. 默认为安装操作.
/passive | /quiet - 不显示任何界面和提示,默认状况下,用户和所有提示都会被显示出来。
/norestart - 安装过程中禁止启动。 默认情况下,界面会提示重新启动。
/log log.txt - 日志记录成一个特殊的文件. 默认情况下,日志文件存在在系统TEMP文件夹中。
</String>
<String Id="HelpCloseButton">Close</String>
<String Id="InstallAcceptCheckbox">我同意许可条款和条件</String>
<String Id="InstallOptionsButton">选择项</String>
<String Id="InstallInstallButton">安装</String>
<String Id="InstallCloseButton">关闭</String>
<String Id="OptionsHeader">安装选择项</String>
<String Id="OptionsLocationLabel">安装位置 (不推荐安装在硬盘根目录):</String>
<String Id="OptionsBrowseButton">浏览</String>
<String Id="OptionsOkButton">确定</String>
<String Id="OptionsCancelButton">取消</String>
<String Id="ProgressHeader">安装进度</String>
<String Id="ProgressLabel">进度:</String>
<String Id="OverallProgressPackageText">初始化...</String>
<String Id="ProgressCancelButton">取消</String>
<String Id="ModifyHeader">选择安装类型</String>
<String Id="ModifyRepairButton">修复</String>
<String Id="ModifyUninstallButton">卸载</String>
<String Id="ModifyCloseButton">关闭</String>
<String Id="SuccessHeader">安装成功</String>
<String Id="SuccessLaunchButton">运行</String>
<String Id="SuccessRestartText">在使用软件之前,请先重启电脑。</String>
<String Id="SuccessRestartButton">重启</String>
<String Id="SuccessCloseButton">关闭</String>
<String Id="FailureHeader">安装失败</String>
<String Id="FailureHyperlinkLogText">一个或多个原因导致安装失败,请修复安装包或重试,更多原因请查看日志。</String>
<String Id="FailureRestartText">你必须重启计算机才能完成软件的回滚操作</String>
<String Id="FailureRestartButton">重启</String>
<String Id="FailureCloseButton">关闭</String>
</WixLocalization>
Wix制作安装包的更多相关文章
- 利用WIX制作安装包(3)
原文 利用WIX制作安装包(3) 利用WIX安装服务非常简单.只需要短短几句话就可以.当我们创建好一个Windows服务之后.我们在项目中创建一个Service.wxs 文件来安装服务,并且编辑代码如 ...
- 利用WIX制作安装包(2)
原文 利用WIX制作安装包(2) 这一篇文章将为大家介绍如何使用WIX自定义UI.上一篇文章我们讲过WIX为我们提供了五种安装界面.每种安装界面都是由不同的Dialog组成.在这里我们挑选一种比较常用 ...
- 利用WIX制作安装包(1)
原文 利用WIX制作安装包(1) #installation 下载最新版本的WIX toolset 并安装DOWNLOAD Wix toolset V3.5之后的版本已经可以集成到visual stu ...
- 循序渐进做项目系列(5):制作安装包,谁人都可以!——VS制作安装包简明教程
一开始让我做安装包的时候,其实我是拒绝的.因为我根本就不会做安装包.查了资料之后,我很懵,很晕,很乱,因为不清晰,不简明,不直白.然而经过一番彷徨的挣扎,我终于发现:制作安装包,谁人都可以!故挥狼毫, ...
- 使用Qt installer framework制作安装包
一.介绍 使用Qt库开发的应用程序,一般有两种发布方式:(1)静态编译发布.这种方式使得程序在编译的时候会将Qt核心库全部编译到一个可执行文件中.其优势是简单单一,所有的依赖库都集中在一起,其缺点也很 ...
- 【原创】VB6.0应用程序安装包的生成(Setup Factory 9.0制作安装包的方法)
VB6.0应用程序安装包的生成,利用其自带的打包工具生成的安装程序很简陋,一点不美观:如果想让自己的应用程序安装的时候显得高大上一点,本教程提供使用Setup Factory 9.0制作安装包的方法. ...
- VS 制作安装包小窥
难得忙里偷闲,看到有关VS制作安装包,按下文小试一把,还行,比不上Installshield. 首先在打开 VS2010 > 文件 >新建项目 创建一个安装项目 XXX 在“目 ...
- vs2015 制作安装包额外需要安装的软件VSI_bundle
vs2015 制作安装包额外需要安装的软件VSI_bundle 下载地址:http://files.cnblogs.com/files/sdner/VSI_bundle.rar
- [转载]如何用Visual Studio制作安装包
原文地址:如何用Visual Studio制作安装包作者:蓝羽幽游 环境:Microsoft Visual Studio 2010 语言:C# 构架:.NET Framework 2.0 解决方案名称 ...
随机推荐
- 微信小游戏 RES版本控制+缓存策略 (resplugin和ResSplitPlugin插件使用)
参考: RES版本控制 使用 AssetsManager 灵活定制微信小游戏的缓存策略 一.我们的目标 目标就是让玩家快速进入游戏,然后根据游戏的进度加载相应的资源,并可对资源进行版本控制.本地缓存. ...
- day_5.26python面试重点
列表生成式: ''' 2018-5-26 19:40:58 生成器(generator):在Python中,这种⼀边循环⼀边计算的机制. ''' # 第一种实现 :只要把⼀个列表⽣成式的[ ]改成( ...
- Solr7.4.0的API(Solrj)操作及项目中的使用
一.SolrJ的概念 solr单机版服务搭建:https://www.cnblogs.com/frankdeng/p/9615253.html solr集群版服务搭建:https://www.cnbl ...
- centos7 LANMP 安装
没有开头语. 操作系统:CentOs7.6 64位. Nginx:系统自带 nginx1.12.2包. Mysql:系统自带 MariaDB 5.6 ,更换为 Mysql5.6 PHP:系统php5. ...
- 堆的C语言实现
在C++中,可以通过std::priority_queue来使用堆. 堆的C语言实现: heap.c /** @file heap.c * @brief 堆,默认为小根堆,即堆顶为最小. */ #in ...
- 跳石头|河中跳房子|NOIP2015提高组T4|二分法
喵 提交地址:http://codevs.cn/problem/4768/ 题目: 题意:自己看 思路: 1.读入各个石头数据 2.直接二分答案: 枚举一个石头i和一个石头j,要求i和j之间的距离为m ...
- Eonasdan bootstrap datetimepicker 使用记录
开始用的 bootstrap日期选择控件是 bootstrap-datepicker : $('#visit_date').datepicker({ todayHighlight: true, sta ...
- 泡泡一分钟:Automatic Parameter Tuning of Motion Planning Algorithms
Automatic Parameter Tuning of Motion Planning Algorithms 运动规划算法的自动参数整定 Jos´e Cano, Yiming Yang, Brun ...
- [No0000157].net core项目中拼音,excel,pdf处理库
汉字转拼音 1. HxfPinYin public static class Pinyin { public static string ConvertEncoding(string text, En ...
- iOS引用类型
强引用, 默认引用类型.被强引用指向的内存不被释放.强引用会对被引用对象的引用计数器+1,从而扩展对象的生命周期. 弱引用, 弱引用是医用特殊的引用类型.它不会增加引用计数器,因而不会扩展对象的生命周 ...