How to Write a scripting language to achieve the flame effect
(If you are interested, copy the following code to the NSIS plug-in and run it)
/*
If you have this effects, please keep!
Writer: [Mr. Z_production · JUAN]
Http://blog.163.com/53_54
Thanks: Restools, zhfi, X-Star
*/
! AddPluginDir "."
! AddIncludeDir "."
! Include MUI2.nsh
;--------------------------------------------------
; General settings.
Name "Flame_Effects Example"
OutFile "NSIS_fire.exe"
SetCompressor/SOLID lzma
ReserveFile "$ {NSISDIR} Pluginssystem. dll"
ReserveFile firectrl. dll
;--------------------------------------------------
; MUI interface settings.
! Define MUI_FINISHPAGE_NOAUTOCLOSE
;--------------------------------------------------
; Insert MUI pages.
! Define MUI_WELCOMEFINISHPAGE_BITMAP WizModernImage-Is.bmp
; Installer pages
! Define MUI_PAGE_CUSTOMFUNCTION_PRE pre
! Define MUI_PAGE_CUSTOMFUNCTION_LEAVE leave
! Define MUI_WELCOMEPAGE_TEXT "flame effect"
! Insertmacro MUI_PAGE_WELCOME
! Insertmacro MUI_PAGE_INSTFILES
! Define MUI_PAGE_CUSTOMFUNCTION_Pre pre
! Define MUI_PAGE_CUSTOMFUNCTION_LEAVE leave
! Insertmacro MUI_PAGE_FINISH
;--------------------------------------------------
; Ages.
! Insertmacro MUI_LANGUAGE "english"
Function. onGUIEnd
SetPluginUnload manual
Firectrl: disablefire
System: Free
FunctionEnd
Function. onInit
InitPluginsDir
SetOutPath $ PLUGINSDIR
File firectrl. dll
SetOutPath $ TEMP
FunctionEnd
Function Pre
System: Call 'user32: LoadImage (I, t, I,) I (0, "$PLUGINSDIRmodern-wizard.bmp", 0, 0, 0, 0, 0x10). s'
Pop $ R0
System: Call '$ PLUGINSDIRfirectrl: enablefire (I, I) I ($ HWNDPARENT, $ R0, 50 )'
FunctionEnd
Function leave
System: Call '$ PLUGINSDIRfirectrl: disablefire ()'
FunctionEnd
Section "Dummy" SecDummy
SectionEnd