NSIS皮肤插件:vcl-styles-plugins

2022-11-10,,,,

vcl-styles-plugins简介

 
NSISVCLStyles
 plugin (dll)是一款应用于nsis安装程序的皮肤插件,插件大小约为1.6MB,实际应用在安装程序中压缩后约为550kb。

安装插件

插件安装程序内置30+各式皮肤文件以及一组nsis应用样本nsi,你只需遵循安装程序的设置点击下一步安装即可,前提是你本机安装有nsis。

皮肤插件应用


.onInit
函数中调用插件命令LoadVCLStyle 加载皮肤。

Function.onInit
  InitPluginsDir
  ;提取皮肤文件
  File /oname=$PLUGINSDIR\Amakrits.vsf"..\Styles\Amakrits.vsf"
  ;使用 LoadVCLStyle插件命令加载
  NSISVCLStyles::LoadVCLStyle $PLUGINSDIR\Amakrits.vsf
FunctionEnd


卸载皮肤插件

在un.onInit区段使用LoadVCLStyle插件命令卸载皮肤。

Functionun.onInit
  InitPluginsDir
  File /oname=$PLUGINSDIR\Amakrits.vsf"..\Styles\Amakrits.vsf"
  NSISVCLStyles::LoadVCLStyle $PLUGINSDIR\Amakrits.vsf
FunctionEnd


禁用非客户区皮肤特效

.onInit区段使用RemoveStyleNCArea命令

Function.onInit
  InitPluginsDir
  ;调用皮肤文件
  File /oname=$PLUGINSDIR\Amakrits.vsf"..\Styles\Amakrits.vsf"
  ;使用 LoadVCLStyle 函数加载皮肤
  NSISVCLStyles::LoadVCLStyle $PLUGINSDIR\Amakrits.vsf
  ;禁用非客户区皮肤特效
  NSISVCLStyles::RemoveStyleNCArea
FunctionEnd

禁用控件的皮肤风格

你使用自定义的控件设置自定义颜色

加载皮肤后你可能对控件皮肤感觉不满意

使用RemoveStyleControl插件命令,插件允许你禁用任何一个控件的皮肤风格

nsDialogs::CreateControl STATIC${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}0 120u 10u -130u 20u "Welcome to nsDialogs!"
Pop $HEADLINE
        ;移除自定义控件的皮肤特效
NSISVCLStyles::RemoveStyleControl $HEADLINE

nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}0 120u 32u -130u -32u"nsDialogs is the next generation of user interfaces in NSIS. It gives the developer full control over custom pages. Some of the features include control text containing variables, callbacks directly into script functions and creation of any type of control. Create boring old edit boxes or load some external library and create custom controls with no need of creating your own plug-in.$\r$\n$\r$\nUnlike InstallOptions, nsDialogs doesn't use INI files to communicate with the script. By interacting directly with the script, nsDialogs can perform much faster without the need of costly, old and inefficient INI operations. Direct interaction also allows direct calls to functions defined in the script and removes the need of conversion functions like Io2Nsis.$\r$\n$\r$\nHit the Next button to see how it all fits into a mock directory page."
Pop $TEXT
        ;移除自定义控件的皮肤特效

NSISVCLStyles::RemoveStyleControl $TEXT




下载皮肤插件vcl-styles-plugins加入NSIS爱好者群:97208217

NSIS皮肤插件:vcl-styles-plugins的相关教程结束。

《NSIS皮肤插件:vcl-styles-plugins.doc》

下载本文的Word格式文档,以方便收藏与打印。