win7平台下QT软件的打包与发布 (利用NSIS脚本制作安装包)

本文详细介绍了如何使用NSIS脚本语言制作包含版本信息、安装文件拷贝、创建快捷方式及卸载功能的QT软件安装包。通过设置脚本,可以实现自定义安装路径,创建开始菜单和桌面快捷方式,并提供在Windows控制面板中卸载的选项。
摘要由CSDN通过智能技术生成

接上文:http://blog.csdn.net/shallen320/article/details/44915649

上文介绍了如何查找Qt程序依耐性,如何利用NSIS 和 .zip文件制作简单的压缩包。上文所用的方法制作的安装包十分简单,连创建桌面快捷方式都没有。本文介绍如何使用NSIS脚本语言制作一个略微复杂的安装包。

下面是我使用的NSIS脚本语言范例,含有简单全面的功能,包括:

  • 设置安装文件版本,公司,版权信息
  • 安装拷贝指定文件
  • 创建开始菜单,桌面快捷方式
  • 创建卸载程序,并能在windows控制面板添加删除程序里卸载程序

 

脚本语言如下,程序名为Terminal:


; Terminal.nsi
;
; This script is based on example2.nsi,  
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install Terminal.nsi into a directory that the user selects,

;--------------------------------

; The name of the installer
Name "Terminal"

; The file to write
OutFile "Installer\TerminalInstaller.exe"

; The default installation directory
InstallDir C:\Terminal

; Registry key to check for directory (so if you install again, it will 
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\NSIS_Terminal" "Install_Dir"

; Request application privileges for Windows Vista
RequestExec
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值