NSI打包(IfFileExists的使用出发的一些常用语法)

我使用的NSIS (可能不是正规的,记不清到底是不是这个了)

1、基础

(1)页面(页面详细使用的  nsis page页面学习笔记

控制这些页面的次序, 外观, 作用,默认为白色。

安装页面 Page 、卸载页面 UninstPage 

 Page license           ;许可协议页面
 Page components        ;组件选择页面
 Page directory         ;安装目录选择页面
 Page instfiles              ;显示区段被执行的安装记录页面
 UninstPage uninstConfirm    ;卸载确认页面
 UninstPage instfiles        ;卸载执行页面

(2)区段(sectiong语法的应用

 安装区段,SectionIn 该区段和安装类型之间的关系


Section "SectionName"

 SectionIn RO ;RO修饰符表示不可修改

SectionEnd

 卸载区段

Section "un.sectiongName1"

SectionEn

(3)函数

自定义函数

Function functionName

# some commands

FunctionEn

     调用方式

call functionName

回调函数 NSIS常用的回调函数 )

安装逻辑回调函数

.onGUIInit、.onInit、.onInstFailed、.onInstSuccess、.onGUIEnd、.onMouseOverSection、.onRebootFailed、.onSelChange、.onUserAbort、.onVerifyInstDir 

卸载逻辑回调函数

un.onGUIInit、un.onInit、un.onUninstFailed、un.onUninstSuccess、un.onGUIEnd、un.onRebootFailed、un.onUserAbort

在工作中看到的 脚本就一个(onGUIEnd ,还是自定义的函数。。。所以想看的话点进去上面链接就行)

推荐几个网站:

轻志狂 (比较齐全,链接是 IfFileExists 使用)

静默虚空 (最通俗易懂的,真的是基础)

豆丁的一片文章

yejian(很通俗的一些东西)

西西软件盒

猜你喜欢

转载自blog.csdn.net/Ma_Hong_Kai/article/details/83001007