最新消息:

RealProgress是NSIS操作安装进度条位置的插件

nsis 永恒心锁 1943浏览 0评论
/*
RealProgress是NSIS操作安装进度条位置的插件
RealProgress对于进度条的控制值得参考,在nsis中进度条的处理是比较关键的一个问题.
*/
!AddPluginDir "../../Plugins"
!include MUI2.nsh
!include WinMessages.nsh
## Basic stuff here
Name `RealProgress Example`
OutFile `RealProgress GradualProgress.exe`
## Pages and languages
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE English
Section
 ## Start progress bar on 5%.
 #RealProgress::AddProgress /NOUNLOAD 5
 SetOutPath $EXEDIR
 ## Increase by 5% per second until "Finished large process!" is added to the list (with DetailPrint),
 ## increasing the progress bar by a total of 25%!
 DetailPrint "Going to Sleep for 7 seconds sorry..."
 ## The progress bar will increase by 5% each second for the first 5 of the 7 seconds.
 RealProgress::GradualProgress /NOUNLOAD 1 5 25 "Finished large process!"
 Sleep 7000 ## 7 seconds.
 DetailPrint "Finished large process!"
 ## Increase by 5% per second until something new is added to the list,
 ## increasing the progress bar by a total of 25%!
 DetailPrint "Going to Sleep for 3 more seconds sorry..."
 RealProgress::GradualProgress /NOUNLOAD 1 5 25
 Sleep 3000 ## 3 seconds.
 DetailPrint "Finished another large process!"
SectionEnd
## Unload the plugin so that it can be deleted!
Function .onGUIEnd
 RealProgress::Unload
FunctionEnd
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » RealProgress是NSIS操作安装进度条位置的插件

您必须 登录 才能发表评论!