From ac5eb0f61ab9961c6828d78d56572395e61394b5 Mon Sep 17 00:00:00 2001 From: rainwater Date: Wed, 2 Oct 2002 19:54:16 +0000 Subject: [PATCH] Added AdvSplash plugin and remove UberSplash. NSIS installer updated. git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1283 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/AdvSplash/advsplash.c | 332 ++++++++++++++++++++++++++++++ Contrib/AdvSplash/advsplash.dsp | 114 ++++++++++ Contrib/AdvSplash/advsplash.dsw | 29 +++ Contrib/AdvSplash/advsplash.txt | 58 ++++++ Contrib/UberSplash/UberSplash.txt | 15 -- Contrib/UberSplash/splash.cfg | 40 ---- Contrib/UberSplash/splash.dcu | Bin 1898 -> 0 bytes Contrib/UberSplash/splash.dof | 96 --------- Contrib/UberSplash/splash.dpr | 138 ------------- Examples/makensis.nsi | 29 +-- Plugins/advsplash.dll | Bin 0 -> 6144 bytes 11 files changed, 549 insertions(+), 302 deletions(-) create mode 100644 Contrib/AdvSplash/advsplash.c create mode 100644 Contrib/AdvSplash/advsplash.dsp create mode 100644 Contrib/AdvSplash/advsplash.dsw create mode 100644 Contrib/AdvSplash/advsplash.txt delete mode 100644 Contrib/UberSplash/UberSplash.txt delete mode 100644 Contrib/UberSplash/splash.cfg delete mode 100644 Contrib/UberSplash/splash.dcu delete mode 100644 Contrib/UberSplash/splash.dof delete mode 100644 Contrib/UberSplash/splash.dpr create mode 100644 Plugins/advsplash.dll diff --git a/Contrib/AdvSplash/advsplash.c b/Contrib/AdvSplash/advsplash.c new file mode 100644 index 00000000..45b01424 --- /dev/null +++ b/Contrib/AdvSplash/advsplash.c @@ -0,0 +1,332 @@ +// For layered windows +#define _WIN32_WINNT 0x0500 + +#include +#include "../exdll/exdll.h" + +HINSTANCE g_hInstance; + +#define RESOLUTION 20 // 50 fps ;) +#define KEYCOLOR_8BIT_RGBSUPPORT 1 // Includes (1) code for + // specifing key color for 8bit images as RGB + +BITMAP bm; +HBITMAP g_hbm; +int g_rv=-1; +int resolution = RESOLUTION; +int sleep_val, fadein_val, fadeout_val, state, timeleft, keycolor, nt50, alphaparam; +int call = -1; + +BOOL (_stdcall *SetLayeredWindowAttributesProc)(HWND hwnd, // handle to the layered window + COLORREF crKey, // specifies the color key + BYTE bAlpha, // value for the blend function + DWORD dwFlags // action +); + +static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + if (uMsg == WM_CREATE) + { + RECT vp; + + SystemParametersInfo(SPI_GETWORKAREA, 0, &vp, 0); + SetWindowLong(hwnd,GWL_STYLE,0); + SetWindowPos(hwnd,NULL, + vp.left+(vp.right-vp.left-bm.bmWidth)/2, + vp.top+(vp.bottom-vp.top-bm.bmHeight)/2, + bm.bmWidth,bm.bmHeight, + SWP_NOZORDER); + ShowWindow(hwnd,SW_SHOW); + + return 0; + } + if (uMsg == WM_PAINT) + { + PAINTSTRUCT ps; + RECT r; + + HDC curdc=BeginPaint(hwnd,&ps); + HDC hdc=CreateCompatibleDC(curdc); + HBITMAP oldbm; + oldbm=(HBITMAP)SelectObject(hdc,g_hbm); + GetClientRect(hwnd,&r); + + BitBlt(curdc,r.left,r.top,r.right-r.left,r.bottom-r.top,hdc,0,0,SRCCOPY); + + SelectObject(hdc,oldbm); + DeleteDC(hdc); + EndPaint(hwnd,&ps); + return 0; + } + if (uMsg == WM_CLOSE) return 0; + if (uMsg == WM_TIMER || uMsg == WM_LBUTTONDOWN) + { + g_rv=(uMsg == WM_LBUTTONDOWN); + DestroyWindow(hwnd); + } + return DefWindowProc(hwnd,uMsg,wParam,lParam); +} + +BOOL WINAPI _DllMainCRTStartup(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) +{ + g_hInstance=hInst; + return TRUE; +} + +int myatoi(char *s) +{ + unsigned int v=0; + if (*s == '0' && (s[1] == 'x' || s[1] == 'X')) + { + s+=2; + for (;;) + { + int c=*s++; + if (c >= '0' && c <= '9') c-='0'; + else if (c >= 'a' && c <= 'f') c-='a'-10; + else if (c >= 'A' && c <= 'F') c-='A'-10; + else break; + v<<=4; + v+=c; + } + } + else if (*s == '0' && s[1] <= '7' && s[1] >= '0') + { + s++; + for (;;) + { + int c=*s++; + if (c >= '0' && c <= '7') c-='0'; + else break; + v<<=3; + v+=c; + } + } + else + { + int sign=0; + if (*s == '-') { s++; sign++; } + for (;;) + { + int c=*s++ - '0'; + if (c < 0 || c > 9) break; + v*=10; + v+=c; + } + if (sign) return -(int) v; + } + return (int)v; +} + +void CALLBACK TimeProc( + UINT uID, + UINT uMsg, + DWORD dwUser, + DWORD dw1, + DWORD dw2) +{ + switch (state) + { + // FadeIN + case 0: if (timeleft == 0) + { + timeleft = sleep_val; + state++; + if (nt50) call = 255; + } else { call = ((fadein_val-timeleft)*255)/fadein_val; break; } + // Sleep + case 1: if (timeleft == 0) + { + timeleft = fadeout_val; + state++; + } else break; + // FadeOUT + case 2: if (timeleft == 0) + { + PostMessage((HWND)dwUser, WM_TIMER, 0, 0); + return; + } else { call = ((timeleft)*255)/fadeout_val; break; } + } + // Transparency value aquired, and could be set... + if ((call >= 0) && nt50) + SetLayeredWindowAttributesProc((HWND)dwUser, keycolor, + call, + alphaparam); + call = -1; + // Time is running out... + timeleft--; +} + +void __declspec(dllexport) show(HWND hwndParent, int string_size, char *variables, stack_t **stacktop) +{ + char fn[MAX_PATH]; + char temp[64]; + char *sleep=temp; + + EXDLL_INIT(); + + popstring(temp); + sleep_val = myatoi(temp) / RESOLUTION; + popstring(temp); + fadein_val = myatoi(temp) / RESOLUTION; + popstring(temp); + fadeout_val = myatoi(temp) / RESOLUTION; + popstring(temp); + keycolor = myatoi(temp); + popstring(fn); + + // Check for winXP/2k + nt50 = (LOBYTE(LOWORD(GetVersion())) >= 5); + if (!nt50) + { + // Fading is unsupported at old windows versions... + resolution = (sleep_val + fadein_val + fadeout_val) * RESOLUTION; + fadeout_val = fadein_val = 0; + sleep_val = 1; + } else alphaparam = LWA_ALPHA | ((keycolor == -1)?(0):(LWA_COLORKEY)); + + if (fn[0] && sleep_val>0) + { + MSG msg; + char classname[4]="_sp"; + static WNDCLASS wc; + wc.lpfnWndProc = WndProc; + wc.hInstance = g_hInstance; + wc.hCursor = LoadCursor(NULL,IDC_ARROW); + wc.lpszClassName = classname; + if (RegisterClass(&wc)) + { + char fn2[MAX_PATH]; + lstrcpy(fn2,fn); + lstrcat(fn,".bmp"); + lstrcat(fn2,".wav"); + g_hbm=LoadImage(NULL,fn,IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION|LR_LOADFROMFILE); + if (g_hbm) + { + HWND myWnd; + UINT timerEvent; + + PlaySound(fn2,NULL,SND_ASYNC|SND_FILENAME|SND_NODEFAULT); + + // Get Bitmap Information + GetObject(g_hbm, sizeof(bm), (LPSTR)&bm); + + myWnd = CreateWindowEx(WS_EX_TOOLWINDOW | ((nt50)?(WS_EX_LAYERED):(0)),classname,classname, + 0,0,0,0,0,(HWND)hwndParent,NULL,g_hInstance,NULL); + + // Set transparency / key color + if (nt50) + { + // Get blending proc address + HANDLE user32 = GetModuleHandle("user32"); + SetLayeredWindowAttributesProc = GetProcAddress(user32, "SetLayeredWindowAttributes"); + // Use win2k method + SetLayeredWindowAttributesProc(myWnd, keycolor, + (fadein_val > 0)?(0):(255), + alphaparam); + } else + if (keycolor != -1) + { + // Use simpliest region method + int x, y, wdelta; + HRGN region, cutrgn; + BYTE *bmp = bm.bmBits; + + region = CreateRectRgn(0,0,bm.bmWidth,bm.bmHeight); + //region = CreateRectRgn(0,0,0,0); + + if (bm.bmBitsPixel == 8) + { +#if (KEYCOLOR_8BIT_RGBSUPPORT == 1) + HDC hMemDC; + HBITMAP hOldBitmap; + int rgb[256]; + int nColors; + + // Find out how many colors are in the color table + nColors = 1 << bm.bmBitsPixel; + // Create a memory DC and select the DIBSection into it + hMemDC = CreateCompatibleDC(NULL); + hOldBitmap = SelectObject(hMemDC,g_hbm); + // Get the DIBSection's color table + GetDIBColorTable(hMemDC,0,nColors,(RGBQUAD*)rgb); + + // Find our keycolor at palette + if (keycolor < 0x1000000) + { + for (x = 0; x < nColors; x++) + if (rgb[x] == keycolor) { keycolor = x; break; } + } else keycolor &= 0xff; + + // Free used objects + SelectObject(hMemDC,hOldBitmap); + DeleteDC(hMemDC); +#endif + + // Bitmap is DWORD aligned by width + //wdelta = (( bm.bmWidth + 3 ) & ~3) - bm.bmWidth; + wdelta = ((bm.bmWidth + 3) & 3) ^ 3; + // Search for transparent pixels + for (y = bm.bmHeight-1; y >= 0; y--, bmp += wdelta) + for (x = 0; x < bm.bmWidth; x++, bmp++) + if (*bmp == (BYTE) keycolor) + { + int j = x; + while ((x < bm.bmWidth) && (*bmp == (BYTE) keycolor)) x++, bmp++; + + // Cut transparent pixels from the original region + cutrgn = CreateRectRgn(j, y, x, y+1); + CombineRgn(region, region, cutrgn, RGN_XOR); + DeleteObject(cutrgn); + } + } else if (bm.bmBitsPixel == 24) + { + // Bitmap is DWORD aligned by width + wdelta = ((bm.bmWidth*3 + 3 ) & 3) ^ 3; + // Search for transparent pixels + for (y = bm.bmHeight-1; y >= 0; y--, bmp += wdelta) + for (x = 0; x < bm.bmWidth; bmp += 3, x++) + if ((*(int*)bmp & 0xFFFFFF) == keycolor) + { + int j = x; + while ((x < bm.bmWidth) && ((*(int*)bmp & 0xFFFFFF) == keycolor)) bmp+=3, x++; + + // Cut transparent pixels from the original region + cutrgn = CreateRectRgn(j, y, x, y+1); + CombineRgn(region, region, cutrgn, RGN_XOR); + DeleteObject(cutrgn); + } + } + + // Set resulting region. + SetWindowRgn(myWnd, region, TRUE); + } + + // Start up timer... + state = 0; timeleft = fadein_val; + timerEvent = timeSetEvent(resolution, RESOLUTION/4, TimeProc, (DWORD_PTR)myWnd, TIME_PERIODIC); + + while (IsWindow(myWnd) && GetMessage(&msg,myWnd,0,0)) + { + DispatchMessage(&msg); + } + + // Kill the timer... + timeKillEvent(timerEvent); + + // Stop currently playing wave, we want to exit + PlaySound(0,0,0); + + DeleteObject(g_hbm); + } + } + } + wsprintf(temp,"%d",g_rv); + pushstring(temp); +} + +#ifdef _DEBUG +void main() +{ +} +#endif \ No newline at end of file diff --git a/Contrib/AdvSplash/advsplash.dsp b/Contrib/AdvSplash/advsplash.dsp new file mode 100644 index 00000000..33cd4fdc --- /dev/null +++ b/Contrib/AdvSplash/advsplash.dsp @@ -0,0 +1,114 @@ +# Microsoft Developer Studio Project File - Name="advsplash" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=advsplash - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "advsplash.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "advsplash.mak" CFG="advsplash - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "advsplash - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "advsplash - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "advsplash - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /Og /Os /Oy /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /c +# SUBTRACT CPP /Ox /Ow /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winmm.lib /nologo /entry:"_DllMainCRTStartup" /subsystem:windows /dll /machine:I386 /nodefaultlib /out:"../../Plugins/advsplash.dll" /opt:nowin98 +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "advsplash - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "advsplash - Win32 Release" +# Name "advsplash - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\advsplash.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\ExDLL\exdll.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/Contrib/AdvSplash/advsplash.dsw b/Contrib/AdvSplash/advsplash.dsw new file mode 100644 index 00000000..6bbdc7ed --- /dev/null +++ b/Contrib/AdvSplash/advsplash.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "advsplash"=.\advsplash.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/Contrib/AdvSplash/advsplash.txt b/Contrib/AdvSplash/advsplash.txt new file mode 100644 index 00000000..6e45532d --- /dev/null +++ b/Contrib/AdvSplash/advsplash.txt @@ -0,0 +1,58 @@ +AdvSplash.exe - small (5.5k), simple plugin that lets you throw +up a splash screen in NSIS installers with cool fading effects (win2k/xp) +and transparency (24bit/8bit bitmaps). + +To use: + +Create a .BMP file of your splash screen. +(optional) Create a .WAV file to play while your splash screen shows. + +Add the following lines to your .NSI file: + +Function .onInit + SetOutPath $TEMP + File /oname=spltmp.bmp "my_splash.bmp" + +; optional +; File /oname=spltmp.wav "my_splashshit.wav" + + advsplash::show 1000 600 400 -1 $TEMP\spltmp + + Pop $0 ; $0 has '1' if the user closed the splash screen early, + ; '0' if everything closed normal, and '-1' if some error occured. + + Delete $TEMP\spltmp.bmp +; Delete $TEMP\spltmp.wav +FunctionEnd + +Calling format + advsplash::show Delay FadeIn FadeOut KeyColor FileName + +Delay - length to show the screen for (in milliseconds) +FadeIn - length to show the fadein scene (in ms) (not included in Delay) +FadeOut - length to show the fadeout scene (in ms) (not included in Delay) +KeyColor - color used for transparency. For 24 bit bitmaps could be any RGB + value (for ex. R=255 G=100 B=16 -> KeyColor=0xFF6410), for 8 bit bitmaps + could be either RGB value or index of the color at bitmap palette + (if such RGB color present in your image and you'd like to use palette + index, use (0x1000000+index) as KeyColor [you should calculate + this value by yourself]). Use KeyColor=-1 if there is now transparent + color at your image. +FileName - splash bitmap filename (without the .bmp). The BMP file used will be + this parameter.bmp, and the wave file used (if present) will be this + parameter.wav. + +(If you already have an .onInit function, put that in it) + +Note 1: fadein/fadeout supported only on win2k/winxp systems, all other systems +will show simple splash screen with Delay = Delay + FadeIn + FadeOut. + +Note 2: transparency supported only for 24bit and 8bit bitmaps. + +Note 3: the return value of splash is 1 if the user closed the splash +screen early (pop it from the stack) + +-Justin +Converted to a plugin DLL by Amir Szekely (kichik) +Fading and transparency by Nik Medved (brainsucker) + diff --git a/Contrib/UberSplash/UberSplash.txt b/Contrib/UberSplash/UberSplash.txt deleted file mode 100644 index f05a295b..00000000 --- a/Contrib/UberSplash/UberSplash.txt +++ /dev/null @@ -1,15 +0,0 @@ -File /oname=bitmap.bmp "C:\pathto\bitmap.bmp" -File /oname=splash.exe "${NSISDIR}\Bin\UberSplash.exe" -ExecWait '"$TEMP\splash.exe" bitmap.bmp FADEINSTEP MILLISECONDSHOW FADEOUTSTEP' - -FADEINSTEP and FADEOUTSTEP between 0 and 255 - -supports magiclime and the alpha fading -for a display and die.. [no fade] -ExecWait '"$TEMP\splash.exe" bitmap.bmp 0 MILLISECONDSHOW 0' -win95 and win98 just display for full length - -To compile you must use the KOL library. You can find it here at http://bonanzas.rinet.ru/ - -code by vince -idea by snowchyld \ No newline at end of file diff --git a/Contrib/UberSplash/splash.cfg b/Contrib/UberSplash/splash.cfg deleted file mode 100644 index 1d7cf9f9..00000000 --- a/Contrib/UberSplash/splash.cfg +++ /dev/null @@ -1,40 +0,0 @@ --$A8 --$B- --$C- --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J+ --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AClasses=;mirror= --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"f:\program files\borland\delphi6\Projects\Bpl" --LN"f:\program files\borland\delphi6\Projects\Bpl" --U"f:\kol;f:\kol\sys" --O"f:\kol;f:\kol\sys" --I"f:\kol;f:\kol\sys" --R"f:\kol;f:\kol\sys" --DKOL_MCK diff --git a/Contrib/UberSplash/splash.dcu b/Contrib/UberSplash/splash.dcu deleted file mode 100644 index 953b3963b41d28da543b48a9f3ee7e233c1e6984..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1898 zcma)6Uuaup6#wo?a(kP#x7RGove1>ZXenI{-BQLFbF@vCcGz}t$-1@cy4~dd?QZV9 zySZWO5G-^rB?y~}s1HK%!50;`i4PT|&+-)qxT%E922>C*NVZzW1 z3;l@UUG;Fr=I2l7S;Ooi70q}QchWtFN7m)m+SmzAHYDsi^tlH;Iiu^Fq^URTqrQP9%9p zPmWAHz8!fkc}9~7;^2hLeDS!h+BeQWdoM50II_h83GnM+;G-9}-v7|ZN9iHc)I|HqS@nE3M52sy zqr=7(7if>t_>mju%_sez#rAqTqRp=2ld}Hg>7Ie-{%90p`=uc2@tNdNSYTdXo<@Br z)aesSg~EJ@MV)jJzYwAo0_cQfBGlr|_p~@d)vLU%8u|i}i)K2bp?nYRehe1K`;U0K zlMCgOh(Wh#o5JZ1EZ#@c z`|kfwzIq>J58kazSMQ^|=Fa1eID2+#>f9QZjPJ2R<2B=a`M2ZTfmp6!B2*BNPvNLs z0Q`QR$x>#Rk|LDZ0+XE23Q)6tD%V0uVaj5mB>-#)I2HnZ5DY*l4B-Go0?;0S4wka~ z5M`l@g&se3fuj@_Vj=2+A9``fLMTZ5e#agN!$24gvT&G#BVBNag+UI6yWnUq_*qD@ zkea5g>jwuA^j@N7y+^$ IIn)pQzXkq7+yDRo diff --git a/Contrib/UberSplash/splash.dof b/Contrib/UberSplash/splash.dof deleted file mode 100644 index bae2b5f9..00000000 --- a/Contrib/UberSplash/splash.dof +++ /dev/null @@ -1,96 +0,0 @@ -[FileVersion] -Version=6.0 -[Compiler] -A=8 -B=0 -C=0 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=1 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=Classes=;mirror= -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription=_KOL_ mirror controls -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath=f:\kol;f:\kol\sys -Packages=Vcl50;Vclx50;VclSmp50 -Conditionals=KOL_MCK -DebugSourceDirs=f:\kol -UsePackages=0 -[Parameters] -RunParams=b2.bmp -HostApplication= -Launcher= -UseLauncher=0 -DebugCWD= -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1049 -CodePage=1251 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -[HistoryLists\hlDebugSourcePath] -Count=2 -Item0=f:\kol -Item1=e:\kol -[HistoryLists\hlConditionals] -Count=1 -Item0=KOL_MCK -[HistoryLists\hlUnitAliases] -Count=1 -Item0=Classes=;mirror= -[HistoryLists\hlSearchPath] -Count=2 -Item0=f:\kol;f:\kol\sys -Item1=e:\kol;e:\kol\sys diff --git a/Contrib/UberSplash/splash.dpr b/Contrib/UberSplash/splash.dpr deleted file mode 100644 index fa9a2dca..00000000 --- a/Contrib/UberSplash/splash.dpr +++ /dev/null @@ -1,138 +0,0 @@ -{****************************************} -Program splash; - -uses - Windows, - Kol; - -type - PByteArray = ^TByteArray; - TByteArray = array[0..32767] of Byte; -var - Applet, {A main form or application} - PaintBox : pControl; {A simple static paintbox} - BitMap : pBitmap; {A bitmap} - i,j,j2,wait,inSpd,outSpd : Word; {temp values...} - WindowRgn, RowRgn : HRGN; {Regions for transparency} - FadeIn,FadeOut : pTimer; {Timers...} - FadeInFlag : Boolean; {Switch Fade In/Out Flag} - ScannedLine : PByteArray; {Array for RGB data from BitMap} - - //This handles the OnPaint event from the Paintbox It draws the bitmap on the PaintBox's Canvas - procedure paint(dummy:pointer;sender:pcontrol;DC:HDC); - begin - Bitmap.Draw(DC,0,0); - end; - - procedure FadeInAlpha(Sender: PObj); - begin - if FadeInFlag then - if Applet.AlphaBlend < (255 - inSpd) then Applet.AlphaBlend := Applet.AlphaBlend + inSpd; - if not FadeInFlag then begin - if Applet.AlphaBlend > outSpd then Applet.AlphaBlend := Applet.AlphaBlend - outSpd; - if Applet.AlphaBlend < outSpd + 1 then begin - Applet.AlphaBlend := 0; - Applet.Close; - end; - end; - end; - - procedure FadeOutAlpha(Sender: PObj); - begin - if Applet.AlphaBlend > inSpd then - FadeInFlag := False - else begin - Applet.AlphaBlend := 0; - Applet.Close; - end; - end; - -begin - if ParamStr(1) <> '' then begin - if ParamStr(2) = '' then inSpd := 5 else inSpd := Str2Int(ParamStr(2)); - if ParamStr(3) = '' then wait := 2000 else wait := Str2Int(ParamStr(3)); - if ParamStr(4) = '' then outSpd := 25 else outSpd := Str2Int(ParamStr(4)); - end - else begin - if ParamStr(2) = '' then inSpd := 1 else inSpd := Str2Int(ParamStr(2)); - if ParamStr(3) = '' then wait := 1 else wait := Str2Int(ParamStr(3)); - if ParamStr(4) = '' then outSpd := 1 else outSpd := Str2Int(ParamStr(4)); - end; - - {Create the form} - Applet:=NewForm(nil,'').SetSize(0,0); - Applet.CenterOnParent; - Applet.Visible := False; - Applet.AlphaBlend := 0; - Applet.Style := WS_POPUP; - Applet.HasBorder := False; - Applet.Border := 0; - Applet.Color := clBlack; - - - {Create the bitmap itself} - BitMap:=NewBitMap(0,0); - BitMap.Clear; - //LoadFromFile has built in error checking... - if ParamStr(1) <> '' then BitMap.LoadFromFile(ParamStr(1)); - - {Create the Paintbox to draw the bitmap on} - PaintBox:=NewPaintbox(Applet).setalign(caClient); - PaintBox.Width:=BitMap.Width; - PaintBox.Height:=BitMap.Height; - PaintBox.OnPaint:=TOnPaint(MakeMethod(nil,@Paint)); - - {Do some housekeeping} - Applet.ClientHeight:=Bitmap.Height+10; - Applet.ClientWidth :=Bitmap.Width+10; - Applet.Top := Applet.Top - Applet.Height div 2; - Applet.Left := Applet.Left - Applet.Width div 2; - - - {Cut out magic color} - WindowRgn := CreateRectRgn(0,0,0,0); - for i:= 0 to BitMap.Height - 1 do begin - ScannedLine := BitMap.ScanLine[i]; - j := 0; - while (j < BitMap.Width - 1) do begin - if ((ScannedLine[j * 3 + 2]*256*256)+(ScannedLine[j * 3 + 1]*256)+ScannedLine[j * 3] = clLime) then j := j + 1 - else begin - j2 := j; - while (j2 < BitMap.Width - 1) and ((ScannedLine[j2 * 3 + 2]*256*256)+(ScannedLine[j2 * 3 + 1]*256)+ScannedLine[j2 * 3] <> clLime) do j2 := j2 + 1; - RowRgn := CreateRectRgn(j,i,j2,i+1); - CombineRgn(WindowRgn, WindowRgn, RowRgn, RGN_OR); - DeleteObject(RowRgn); - j := j2; - end; - end; - end; - SetWindowRgn(Applet.Handle,WindowRgn,true); - - //remove taskbar icon and get ready to rock... - ShowWindow(Applet.Handle, SW_HIDE); - SetWindowLong(Applet.Handle, GWL_EXSTYLE,GetWindowLong(Applet.Handle, GWL_EXSTYLE) or WS_EX_TOOLWINDOW); - ShowWindow(Applet.Handle, SW_SHOW); - ShowWindow(Applet.Handle, SW_SHOWDEFAULT); - BringWindowToTop(Applet.GetWindowHandle); - Applet.DoSetFocus; - Applet.StayOnTop := True; - Applet.Visible := True; - - {start timers} - FadeInFlag := True; - - FadeIn := NewTimer(2); - FadeIn.OnTimer := TOnEvent(MakeMethod(nil,@FadeInAlpha)); - FadeIn.Enabled := True; - - FadeOut := NewTimer(wait); - FadeOut.OnTimer := TOnEvent(MakeMethod(nil,@FadeOutAlpha)); - FadeOut.Enabled := True; - - {Run splash} - Run(Applet); - - {Free the bitmap:it has no parent} - Bitmap.free; - -end. diff --git a/Examples/makensis.nsi b/Examples/makensis.nsi index 9b9bcfa2..05f6edcc 100644 --- a/Examples/makensis.nsi +++ b/Examples/makensis.nsi @@ -179,12 +179,12 @@ Section "Splash" SecContribSplash File ..\Contrib\splash\splash.txt SectionEnd -Section "UberSplash w/transparency" SecContribSplashT +Section "AdvSplash w/transparency" SecContribSplashT SectionIn 1 2 - SetOutPath $INSTDIR\Bin - File ..\Bin\UberSplash.exe - SetOutPath $INSTDIR\Contrib\UberSplash - File ..\Contrib\UberSplash\*.txt + SetOutPath $INSTDIR\Plugins + File ..\Plugins\advsplash.dll + SetOutPath $INSTDIR\Contrib\AdvSplash + File ..\Contrib\AdvSplash\advsplash.txt SectionEnd Section "InstallOptions" SecContribIO @@ -315,11 +315,13 @@ Section "Splash Source" SecContribSplashS File ..\Contrib\splash\splash.txt SectionEnd -Section "UberSplash Source" SecContribSplashTS +Section "AdvSplash Source" SecContribSplashTS SectionIn 1 - SetOutPath $INSTDIR\Contrib\UberSplash - File ..\Contrib\UberSplash\splash.* - File ..\Contrib\UberSplash\*.txt + SetOutPath $INSTDIR\Contrib\AdvSplash + File ..\Contrib\AdvSplash\*.c + File ..\Contrib\AdvSplash\*.dsw + File ..\Contrib\AdvSplash\*.dsp + File ..\Contrib\AdvSplash\*.txt SectionEnd Section "InstallOptions Source" SecContribIOS @@ -452,14 +454,14 @@ Section -post CreateShortCut "$SMPROGRAMS\NSIS\Source\Contrib\Splash project workspace.lnk" "$INSTDIR\Contrib\splash\splash.dsw" NoSPLShortCutsS: - IfFileExists "$INSTDIR\Bin\ubersplash.exe" 0 NoUSPLShortCuts + IfFileExists "$INSTDIR\Plugins\advsplash.dll" 0 NoUSPLShortCuts CreateDirectory $SMPROGRAMS\NSIS\Contrib - CreateShortCut "$SMPROGRAMS\NSIS\Contrib\UberSplash Screen Help.lnk" "$INSTDIR\contrib\ubersplash\ubersplash.txt" + CreateShortCut "$SMPROGRAMS\NSIS\Contrib\AdvSplash Help.lnk" "$INSTDIR\contrib\advsplash\advsplash.txt" NoUSPLShortCuts: - IfFileExists "$INSTDIR\Contrib\UberSplash\*.dpr" 0 NoUSPLShortCutsS + IfFileExists "$INSTDIR\Contrib\AdvSplash\*.dsw" 0 NoUSPLShortCutsS CreateDirectory $SMPROGRAMS\NSIS\Source\Contrib - CreateShortCut "$SMPROGRAMS\NSIS\Source\Contrib\UberSplash project directory.lnk" "$INSTDIR\Contrib\ubersplash" + CreateShortCut "$SMPROGRAMS\NSIS\Source\Contrib\AdvSplash project directory.lnk" "$INSTDIR\Contrib\advsplash" NoUSPLShortCutsS: @@ -650,6 +652,7 @@ Section Uninstall Delete $INSTDIR\Bin\splash.exe Delete $INSTDIR\Plugins\splash.dll Delete $INSTDIR\Bin\UberSplash.exe + Delete $INSTDIR\Plugins\advsplash.dll Delete $INSTDIR\Plugins\nsisdl.dll Delete $INSTDIR\Bin\MakeLangID.exe Delete $INSTDIR\Plugins\LangDLL.dll diff --git a/Plugins/advsplash.dll b/Plugins/advsplash.dll new file mode 100644 index 0000000000000000000000000000000000000000..efad34c67336411e73f16fab8d1900ad538fa5f5 GIT binary patch literal 6144 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 literal 0 HcmV?d00001