/*
Script writing: ZHFI
Special thanks: Restools,x-star
*/
! Addplugindir "."
! Addincludedir "."
!include Mui2.nsh
; --------------------------------------------------
; General settings.
Name "Waterctrl_test Example"
OutFile "Waterctrl_test.exe"
Setcompressor/solid Lzma
Reservefile "${nsisdir}pluginssystem.dll"
Reservefile Waterctrl.dll
; SetFont Tahoma 8
; --------------------------------------------------
; 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
!insertmacro Mui_page_welcome
!insertmacro Mui_page_instfiles
!define Mui_page_customfunction_pre Pre
!define Mui_page_customfunction_leave LEAVE
!insertmacro Mui_page_finish
; --------------------------------------------------
; Languages.
!insertmacro mui_language "Simpchinese"
Function. Onguiend
Setpluginunload Manual
Waterctrl::d isablewater
System::free
FunctionEnd
Function. OnInit
Initpluginsdir
Setoutpath $PLUGINSDIR
File Waterctrl.dll
Setoutpath $TEMP
FunctionEnd
Function Pre
System::call ' User32::loadimage (i,t,i,i,i,i,) I (0, "$PLUGINSDIRmodern-wizard.bmp", 0,0,0,0x2010). S '
Pop $R 0
System::call ' $PLUGINSDIRwaterctrl:: Enablewater (I,i,i,i,i,i) I ($HWNDPARENT, 0,0, $R 0,3,50) '
System::call ' $PLUGINSDIRwaterctrl:: Setwaterparent (i $HWNDPARENT) '
System::call ' $PLUGINSDIRwaterctrl:: Flattenwater () '
System::call ' $PLUGINSDIRwaterctrl:: Waterblob (I,i,i,i) I (70,198,10,1000) '
FunctionEnd
Function leave
System::call ' $PLUGINSDIRwaterctrl::d isablewater ()
FunctionEnd
section "Dummy" Secdummy
Sectionend