initial: nsSplashPNG plugin 1.0.0
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
; nsSplashPNG Advanced Example
|
||||
; Shows how to use nsSplashPNG in a real installer with progress updates
|
||||
|
||||
Name "nsSplashPNG Advanced Test"
|
||||
OutFile "nsSplashPNG_Advanced.exe"
|
||||
InstallDir "$PROGRAMFILES\TestApp"
|
||||
RequestExecutionLevel admin
|
||||
|
||||
!addplugindir "..\plugins\x86-unicode"
|
||||
|
||||
Page instfiles
|
||||
|
||||
Section "Main Installation"
|
||||
; Copy splash image to temp directory
|
||||
SetOutPath $TEMP
|
||||
File "images\splash.png"
|
||||
|
||||
; Show splash with fade in, no cancel button
|
||||
; CRITICAL: /NOUNLOAD required since we call stop() later
|
||||
nsSplashPNG::show /NOUNLOAD 0 /NOCANCEL /FADEIN "$TEMP\splash.png"
|
||||
|
||||
; Simulate installation steps
|
||||
DetailPrint "Installing files..."
|
||||
SetOutPath "$INSTDIR"
|
||||
Sleep 1000
|
||||
|
||||
DetailPrint "Configuring application..."
|
||||
Sleep 1000
|
||||
|
||||
DetailPrint "Creating shortcuts..."
|
||||
Sleep 1000
|
||||
|
||||
DetailPrint "Finalizing installation..."
|
||||
Sleep 1000
|
||||
|
||||
; Close splash with fade out
|
||||
nsSplashPNG::stop /FADEOUT
|
||||
|
||||
; Clean up
|
||||
Delete "$TEMP\splash.png"
|
||||
|
||||
DetailPrint "Installation complete!"
|
||||
SectionEnd
|
||||
|
||||
Section "Uninstall"
|
||||
RMDir /r "$INSTDIR"
|
||||
SectionEnd
|
||||
@@ -0,0 +1,39 @@
|
||||
; nsSplashPNG Example Script
|
||||
; Demonstrates the usage of the nsSplashPNG plugin with various options
|
||||
|
||||
Name "nsSplashPNG Test"
|
||||
OutFile "nsSplashPNG_Example.exe"
|
||||
SilentInstall silent
|
||||
RequestExecutionLevel user
|
||||
|
||||
!addplugindir "..\plugins\x86-unicode"
|
||||
|
||||
Section
|
||||
; Copy splash image to temp directory
|
||||
SetOutPath $TEMP
|
||||
File "images\splash.png"
|
||||
|
||||
; Example 1: Simple splash with auto-close after 3 seconds
|
||||
; nsSplashPNG::show 3000 "test_image.png"
|
||||
|
||||
; Example 2: Splash with fade in effect, auto-close after 3 seconds
|
||||
; nsSplashPNG::show /FADEIN 3000 "test_image.png"
|
||||
|
||||
; Example 3: Splash with fade out effect, auto-close after 3 seconds
|
||||
; nsSplashPNG::show /FADEOUT 3000 "test_image.png"
|
||||
|
||||
; Example 4: Splash with fade in, manual close (no auto-close)
|
||||
; CRITICAL: /NOUNLOAD required since we call stop() later
|
||||
nsSplashPNG::show /NOUNLOAD 0 /FADEIN "$TEMP\splash.png"
|
||||
|
||||
; Simulate some installation work
|
||||
Sleep 2000
|
||||
|
||||
; Example 5: Manual close with fade out
|
||||
nsSplashPNG::stop /FADEOUT
|
||||
|
||||
; Clean up
|
||||
Delete "$TEMP\splash.png"
|
||||
|
||||
MessageBox MB_OK "Installation complete!"
|
||||
SectionEnd
|
||||
@@ -0,0 +1,50 @@
|
||||
; Test fade speed customization
|
||||
Unicode true
|
||||
!addplugindir "N:\Code\Workspace\Launchers\plugins\x86-unicode"
|
||||
|
||||
Name "Fade Speed Test"
|
||||
OutFile "test_fade_speed.exe"
|
||||
SilentInstall silent
|
||||
RequestExecutionLevel user
|
||||
|
||||
Function .onInit
|
||||
SetOutPath $TEMP
|
||||
File "images\splash.png"
|
||||
|
||||
; Test 1: Default speed (step 15, ~510ms fade)
|
||||
MessageBox MB_OK "Test 1: Default fade speed (step 15)$\n$\nFade duration: ~510ms"
|
||||
nssplashpng::show /NOUNLOAD 60000 /FADEIN "$TEMP\splash.png"
|
||||
Pop $0
|
||||
Sleep 3000
|
||||
nssplashpng::stop /FADEOUT
|
||||
; No need to sleep - stop now waits for fade-out internally
|
||||
|
||||
; Test 2: Fast fade (step 51, ~150ms fade)
|
||||
MessageBox MB_OK "Test 2: Fast fade (step 51)$\n$\nFade duration: ~150ms"
|
||||
nssplashpng::show /NOUNLOAD 60000 /FADEIN 51 "$TEMP\splash.png"
|
||||
Pop $0
|
||||
Sleep 3000
|
||||
nssplashpng::stop /FADEOUT 51
|
||||
; No need to sleep - stop now waits for fade-out internally
|
||||
|
||||
; Test 3: Slow fade (step 5, ~1530ms fade)
|
||||
MessageBox MB_OK "Test 3: Slow fade (step 5)$\n$\nFade duration: ~1530ms"
|
||||
nssplashpng::show /NOUNLOAD 60000 /FADEIN 5 "$TEMP\splash.png"
|
||||
Pop $0
|
||||
Sleep 5000
|
||||
nssplashpng::stop /FADEOUT 5
|
||||
; No need to sleep - stop now waits for fade-out internally
|
||||
|
||||
; Test 4: Instant (step 255, ~30ms fade)
|
||||
MessageBox MB_OK "Test 4: Instant fade (step 255)$\n$\nFade duration: ~30ms"
|
||||
nssplashpng::show /NOUNLOAD 60000 /FADEIN 255 "$TEMP\splash.png"
|
||||
Pop $0
|
||||
Sleep 2000
|
||||
nssplashpng::stop /FADEOUT 255
|
||||
; No need to sleep - stop now waits for fade-out internally Delete "$TEMP\splash.png"
|
||||
MessageBox MB_OK "All fade speed tests completed!"
|
||||
Quit
|
||||
FunctionEnd
|
||||
|
||||
Section
|
||||
SectionEnd
|
||||
@@ -0,0 +1,43 @@
|
||||
; Test different image formats with nsSplashPNG
|
||||
Unicode true
|
||||
|
||||
Name "Format Test"
|
||||
OutFile "test_formats.exe"
|
||||
InstallDir "$TEMP\test"
|
||||
|
||||
!addplugindir "N:\Code\Workspace\Launchers\plugins\x86-unicode"
|
||||
|
||||
Section
|
||||
SetOutPath $TEMP
|
||||
File "images\splash.png"
|
||||
File "images\splash.jpg"
|
||||
File "images\splash.bmp"
|
||||
File "images\splash.gif"
|
||||
|
||||
; Test PNG (with alpha)
|
||||
MessageBox MB_OK "Testing PNG format (with alpha transparency)"
|
||||
nssplashpng::show /NOUNLOAD 2000 /FADEIN /FADEOUT "$TEMP\splash.png"
|
||||
Pop $0
|
||||
|
||||
; Test JPEG (no alpha)
|
||||
MessageBox MB_OK "Testing JPEG format (no transparency)"
|
||||
nssplashpng::show /NOUNLOAD 2000 /FADEIN /FADEOUT "$TEMP\splash.jpg"
|
||||
Pop $0
|
||||
|
||||
; Test BMP (no alpha)
|
||||
MessageBox MB_OK "Testing BMP format (no transparency)"
|
||||
nssplashpng::show /NOUNLOAD 2000 /FADEIN /FADEOUT "$TEMP\splash.bmp"
|
||||
Pop $0
|
||||
|
||||
; Test GIF (with transparency)
|
||||
MessageBox MB_OK "Testing GIF format (basic transparency)"
|
||||
nssplashpng::show /NOUNLOAD 2000 /FADEIN /FADEOUT "$TEMP\splash.gif"
|
||||
Pop $0
|
||||
|
||||
Delete "$TEMP\splash.png"
|
||||
Delete "$TEMP\splash.jpg"
|
||||
Delete "$TEMP\splash.bmp"
|
||||
Delete "$TEMP\splash.gif"
|
||||
|
||||
MessageBox MB_OK "All format tests completed!"
|
||||
SectionEnd
|
||||
@@ -0,0 +1,34 @@
|
||||
; Test non-blocking behavior
|
||||
Unicode true
|
||||
!addplugindir "N:\Code\Workspace\Launchers\plugins\x86-unicode"
|
||||
|
||||
Name "Non-Blocking Test"
|
||||
OutFile "test_nonblocking.exe"
|
||||
SilentInstall silent
|
||||
RequestExecutionLevel user
|
||||
|
||||
Function .onInit
|
||||
SetOutPath $TEMP
|
||||
File "images\splash.png"
|
||||
|
||||
; Show splash with fade-in, manual close (0 timeout)
|
||||
; CRITICAL: /NOUNLOAD required since we call stop() later
|
||||
MessageBox MB_OK "Showing splash with fade-in. Script should continue immediately after fade-in completes."
|
||||
nssplashpng::show /NOUNLOAD 0 /FADEIN "$TEMP\splash.png"
|
||||
Pop $0
|
||||
|
||||
; This should appear right after fade-in, while splash is still visible
|
||||
MessageBox MB_OK "Splash is visible! Result: $0$\n$\nNow doing some work..."
|
||||
Sleep 2000
|
||||
|
||||
MessageBox MB_OK "Work done. Now closing splash with fade-out..."
|
||||
nssplashpng::stop /FADEOUT
|
||||
Pop $0
|
||||
|
||||
MessageBox MB_OK "Splash closed! Stop result: $0"
|
||||
Delete "$TEMP\splash.png"
|
||||
Quit
|
||||
FunctionEnd
|
||||
|
||||
Section
|
||||
SectionEnd
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 256 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user