安装程序制作(转)

 

源安装工具

前段时间做一个产品的安装程序,试用了几个开源的安装打包工具,感觉不错,总结一下。
1、NSIS
关于 NSIS关于 NSIS在用户使用你的应用程序之前首先会体验到你的安装程序。慢慢悠悠的或不成功的软件安装是很恼人的问题。一个快速友好的安装程序是展示你的软件产品品质的一部分。
NSIS (Nullsoft Scriptable Install System) 是 Windows 下的一个工具,它允许程序员来创建这样的安装程序。它发布于一个开源的协议并且对于[url=AppendixG.html#G]任何使用来说都是完全免 费的[/url]。
NSIS 创建的安装程序能够安装、卸载、设置系统设置、解压文件等等。因为它基于脚本文件,你可以完全的控制安装程序的每一部分。脚本语言支持变量、函数、字串操 作,就像一个普通的程序语言一样 - 但是设计来创建安装程序。即使有那么多的特性,NSIS 仍然是最小的安装程序系统。在默认选项下,它仅增加了 34 KB 的开销。

特性列表特性列表
  • 生成包含可执行安装程序的外壳
  • 支持 ZLIB, BZIP2 和 LZMA 数据压缩(文件可个别压缩或同时)
  • 支持卸载(安装程序可以生成卸载程序)
  • 可自定义的用户界面(对话、字体、背景、文本、检测标记、图像等等)
  • 典型和新式向导界面
  • 完整的多语言,支持一个安装程序有多个语言。自带超过 35 种语言翻译,但是你也可以建立你自己的
  • 页面系统: 你可以添加标准向导页面或自定义页面
  • 用户可以选择安装组件,树形组件列表
  • 多个安装配置(通常 最小、典型、完全)和自定义配置
  • 安装程序自我验证使用 CRC32 校验和
  • 除了压缩的安装数据大小只需要很小的程序头(默认为 34 KB)
  • 可以显示文本或 RTF 格式的许可协议
  • 可以通过注册表检测目标目录
  • 易用的插件系统(大多数插件用于创建自定义对话、因特网连接、HTTP 下载、文件打补丁、调用 Win32 API 等等)已经包含
  • 安装程序可以达到 2 GB 最高限制
  • 可选性的静默安装模式用于自动安装
  • 预处理器支持定义符号、宏、条件编辑、标准预定义
  • 有意思的类似于 PHP 和汇编的编程体验(包含用户变量、堆栈、流程控制等等)
  • 安装程序有它们自己的 VM,使你书写的代码可以支持:
    • 文件解压(可配置的覆盖参数)
    • 文件、目录复制、重命名、删除、搜索
    • 调用插件 DLL
    • DLL/ActiveX 控件注册、解注册
    • 可执行外部程序(外部执行并带有等待选项)
    • 创建快捷方式
    • 注册表读取、设置、查询、删除
    • INI 文件读取、写入
    • 常规文本文件读取、写入
    • 强大的字串和整数处理
    • 基于类名或标题判断窗口
    • 用户界面操作(字体、文本设置)
    • 发送 Window 消息
    • 通过消息框或自定义页面与用户交流
    • 分支、比较等等
    • 错误检测
    • 支持重启,包括重启后删除或重命名文件
    • 安装程序行为命令(比如显示、隐藏、等待等等)
    • 在脚本可以使用用户函数
    • 对用户的动作回调函数
  • 对任何用户完全免费。

2、Inno Setup
Inno Setup is a free installer for Windows programs. First introduced in 1997, Inno Setup today rivals and even surpasses many commercial installers in feature set and stability.

Key features:
  • Support for all versions of Windows in use today: Vista, XP, 2003, 2000, Me, 98, 95, and NT 4.0. (No service packs are required.)
  • Extensive support for installation of 64-bit applications on the 64-bit editions of Windows Vista, Windows XP, and Windows Server 2003. Both the x64 and Itanium architectures are supported. (On the Itanium architecture, Service Pack 1 is required to install in 64-bit mode.)
  • Supports creation of a single EXE to install your program for easy online distribution. Disk spanning is also supported.
  • Standard Windows 2000/XP-style wizard interface.
  • Customizable setup types, e.g. Full, Minimal, Custom.
  • Complete uninstall capabilities.
  • Installation of files:
    Includes integrated support for "deflate", bzip2, and 7-Zip LZMA file compression. The installer has the ability to compare file version info, replace in-use files, use shared file counting, register DLL/OCX's and type libraries, and install fonts.
  • Creation of shortcuts anywhere, including in the Start Menu and on the desktop.
  • Creation of registry and .INI entries.
  • Integrated Pascal scripting engine.
  • Support for multilingual installs.
  • Support for passworded and encrypted installs.
  • Silent install and silent uninstall.
  • Full source code is available (Borland Delphi 2.0-5.0).

Is it really free of charge, even for commercial use?
Yes, it may be used completely free of charge, even when deploying commercial applications.

3、Wix
The Windows Installer XML (WiX) is a toolset that builds Windows installation packages from XML source code. The toolset provides a command line environment that developers may integrate into their build processes to build MSI and MSM setup packages.
To summarize the features and advantages of the toolset:
  • declarative approach
  • unrestricted access to Windows Installer functionality
  • source code instead of GUI-based assembly of information
  • complete integration into application build processes
  • possible integration with application development
  • support for team development, both in-house and third-party
  • free, open source
You might wonder if WiX is already mature enough for the installation of large, complex applications with a large number of files to be deployed. Well, Microsoft itself is switching to WiX with all its major software packages. Just as an example, the setup of Microsoft Office 2007 was developed entirely with WiX.


比较
个人感觉 NSIS 最容易上手,脚本也比较简单,复杂操作可以编写和调用插件来完成,甚至可以直接调用 WinAPI;
Inno 大体和 NSIS 差不多,格式稍微有点变化,可以直接嵌入 Pascal 代码,很适合熟悉 Delphi 同学;
Wix 最复杂,3.0也还没正式推出,UI和多语言还没出来(2.0可以),好处是可以集成到 VS,貌似获得了 MS 的官方支持。
NSIS脚本有点 VB 的感觉,Inno 就是 INI 格式的,Wix 纯粹的 XML。

顺便说下商业的: Installshield 太过庞大,价格不菲; Wise Installation Studio 和 Setup Factory 易用很多,价格还过得去; Smart Install Maker 小巧玲珑相对便宜很多。
开源的完全满足目前需求:打包程序、生成安装向导、注册 OCX、生成快捷方式

From

http://blog.csdn.net/coldljy/archive/2008/07/21/2687316.aspx 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值