initial: nsAdvsplash plugin 1.0.0

This commit is contained in:
2026-04-29 23:19:37 +02:00
commit 889289e5a0
36 changed files with 3329 additions and 0 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

+51
View File
@@ -0,0 +1,51 @@
;-----------------------------
; Requires AnimGif plug-in
Name "NewAdvSplash AnimBanner test"
OutFile "animbanner.exe"
!define IMG_NAME aist.gif
!include "MUI.nsh"
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE anb
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE bna
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
Function anb
SetOutPath "$PLUGINSDIR"
File ${IMG_NAME}
newadvsplash::show /NOUNLOAD 2000 1000 500 -1 /BANNER "$PLUGINSDIR\${IMG_NAME}"
newadvsplash::hwnd /NOUNLOAD
Pop $0
AnimGif::play /NOUNLOAD /hwnd=$0 /bgcol=0xffffff "$PLUGINSDIR\${IMG_NAME}"
FunctionEnd
Function bna
newadvsplash::stop
AnimGif::stop
Delete "$PLUGINSDIR\${IMG_NAME}"
SetOutPath "$EXEDIR"
FunctionEnd
Section
newadvsplash::stop /wait
AnimGif::stop
Sleep 1000
newadvsplash::show /NOUNLOAD 2000 1000 500 -1 /BANNER "$PLUGINSDIR\${IMG_NAME}"
newadvsplash::hwnd /NOUNLOAD
Pop $0
AnimGif::play /NOUNLOAD /hwnd=$0 /bgcol=0xffffff "$PLUGINSDIR\${IMG_NAME}"
Sleep 1000
SectionEnd
+55
View File
@@ -0,0 +1,55 @@
;-----------------------------
; Requires AnimGif plug-in
Name "NewAdvSplash AnimSplash test"
OutFile "animsplash.exe"
!define IMG_NAME aist.gif
!include "MUI.nsh"
!define MUI_CUSTOMFUNCTION_GUIINIT begin
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_LANGUAGE "English"
Function .onInit
; following 2 lines can minimize all other desktop windows
; FindWindow $0 "Shell_TrayWnd"
; SendMessage $0 ${WM_COMMAND} 415 0
; the plugins dir is automatically deleted when the installer exits
InitPluginsDir
SetOutPath "$PLUGINSDIR"
; Modeless banner sample: show + wait
File "aist.gif"
newadvsplash::show /NOUNLOAD 2000 1000 500 -1 /BANNER "$PLUGINSDIR\${IMG_NAME}"
newadvsplash::hwnd /NOUNLOAD
Pop $0
AnimGif::play /NOUNLOAD /hwnd=$0 /bgcol=0xffffff "$PLUGINSDIR\${IMG_NAME}"
; you can add some background initialization code here (3.5 sec - aist.gif play time)
; wait & stop code also may be placed here, I moved them to .onGUIInit
; as a /BANNER (modeless) sample only.
FunctionEnd
Function begin
newadvsplash::stop /wait ; waits or exits immediately if 'show' already finished
AnimGif::stop
Delete "$PLUGINSDIR\${IMG_NAME}"
SetOutPath "$EXEDIR"
; plug-in requires this to be called in .onGUIInit in the BANNER mode only
ShowWindow $HWNDPARENT ${SW_RESTORE}
FunctionEnd
Section
SectionEnd
+43
View File
@@ -0,0 +1,43 @@
Name "NewAdvSplash BannerMUI test"
OutFile "bannermui.exe"
!include "MUI.nsh"
!define MUI_CUSTOMFUNCTION_GUIINIT MUIGUIInit
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_LANGUAGE "English"
!define IMG_NAME aist.gif
Function .onInit
; the plugins dir is automatically deleted when the installer exits
InitPluginsDir
SetOutPath "$PLUGINSDIR"
; Modeless banner sample: show + wait
File ${IMG_NAME}
newadvsplash::show /NOUNLOAD 2000 1000 500 -2 /BANNER "$PLUGINSDIR\${IMG_NAME}"
Sleep 2000 ; not changes 3.5 sec of 'show time'. add your code instead of sleep
FunctionEnd
; MUI requires custom function definition
Function MUIGUIInit
newadvsplash::stop /wait ; waits or exits immediately if finished, use just 'stop' to terminate
Delete "$PLUGINSDIR\${IMG_NAME}"
SetOutPath "$EXEDIR"
; plug-in requires this to be called in .onGUIInit
; if you use 'show' in the .onInit function with /BANNER key.
ShowWindow $HWNDPARENT ${SW_RESTORE}
FunctionEnd
Section
SectionEnd
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

+51
View File
@@ -0,0 +1,51 @@
Name "NewAdvSplash.dll test"
OutFile "newadvsplash.exe"
!define IMG_NAME1 splash.bmp
!define IMG_NAME2 aist.gif
!include WinMessages.nsh
Function .onInit
; the plugins dir is automatically deleted when the installer exits
InitPluginsDir
SetOutPath "$PLUGINSDIR"
; optional - mp3, use /LOOP key for 'non-stop'
# File "09.mp3"
# newadvsplash::play /NOUNLOAD "$PLUGINSDIR\09.mp3"
; Modal banner sample: show
File "/oname=$PLUGINSDIR\${IMG_NAME1}" "${NSISDIR}\Contrib\Graphics\Wizard\llama.bmp"
newadvsplash::show 1000 100 500 0x04025C /NOCANCEL "$PLUGINSDIR\${IMG_NAME1}"
Delete "$PLUGINSDIR\${IMG_NAME1}"
Sleep 500 ; optional
; Modeless banner sample: show + wait
File ${IMG_NAME2}
newadvsplash::show /NOUNLOAD 2000 1000 500 -2 /BANNER "$PLUGINSDIR\${IMG_NAME2}"
Sleep 2000 ; not changes 3.5 sec of 'show time'. add your code instead of sleep
FunctionEnd
; MUI requires custom function definition
Function .onGUIInit
newadvsplash::stop /wait ; waits or exits immediately if finished, remove /wait to terminate now
Delete "$PLUGINSDIR\${IMG_NAME2}"
SetOutPath "$EXEDIR"
; plug-in requires this to be called in .onGUIInit
; if you use 'show' in the .onInit function with /BANNER key.
ShowWindow $HWNDPARENT ${SW_RESTORE}
FunctionEnd
Section
SectionEnd
+34
View File
@@ -0,0 +1,34 @@
Name "NewAdvSplash.dll StopFade test"
OutFile "stopfade.exe"
!define IMG_NAME2 aist.gif
!include WinMessages.nsh
; MUI requires custom function definition
Function .onGUIInit
InitPluginsDir
SetOutPath "$PLUGINSDIR"
; Modeless banner with variable initialization time - up to 10 sec
; uses 'soft' stop() with fade out
File ${IMG_NAME2}
newadvsplash::show /NOUNLOAD 10000 1000 500 -2 /BANNER "$PLUGINSDIR\${IMG_NAME2}"
Sleep 2000 ; add here your initialization code (up to 11 sec) instead of sleep
newadvsplash::stop /fadeout
# newadvsplash::stop /wait
# newadvsplash::stop
Delete "$PLUGINSDIR\${IMG_NAME2}"
SetOutPath "$EXEDIR"
FunctionEnd
Section
SectionEnd
+38
View File
@@ -0,0 +1,38 @@
; Requires marquee plug-in
; Displays text on the splash window
!define IMG_NAME catch.ver.gif
Name "NewAdvSplash Version test"
OutFile "version.exe"
!include WinMessages.nsh
Function .onInit
InitPluginsDir
SetOutPath "$PLUGINSDIR"
File "${IMG_NAME}"
newadvsplash::show /NOUNLOAD 3000 1000 500 -2 /BANNER /NOCANCEL "$PLUGINSDIR\${IMG_NAME}"
newadvsplash::hwnd /NOUNLOAD
Pop $0
Sleep 100 ; to make window visible - this case you can skip /GCOL=00ff00 parameter
marquee::start /NOUNLOAD /left=73 /right=2 /COLOR=ff0000 /hwnd=$0 /step=0 /interval=100 /top=15 /height=35 /width=17 /start=right "v. 3.17"
FunctionEnd
Function .onGUIInit
newadvsplash::stop /wait
marquee::stop
Delete "$PLUGINSDIR\${IMG_NAME}"
SetOutPath "$EXEDIR" ; after this system can remove PLUGINSDIR
ShowWindow $HWNDPARENT ${SW_RESTORE}
FunctionEnd
Section
SectionEnd