Inno Setup - Transparent Splash Screen

廉价感情. 提交于 2019-12-09 23:07:49

问题


I have a problem and I need your help..I want to find a differente way to put a transparent splash screen or the correction of my code. The code here works... but there is a problem, some people get an error at the end of the installation.

This is how look the error at the end of the installation

I check another lines in my code and I found that the problem was the code of the splash screen, if I delete it the installer works perfect, I see that what I need is a procedure DeinitializeSetup(); but I don't know how tu put it in the splash screen section, I get this kind of error if I delete the procedure DeinitializeSetup(); in another codes, like skin, logo, etc.. the files that goes to temp folder of windows... then what I need is the procedure DeinitializeSetup(); in the splash screen code to solve this... :( here is the dll file for anyone to test IsUtilsHb.dll

then...please if anybody know a different way to put a transparent splash screen... ill be grateful.. or better.. to fix this code section :)

[setup]
AppName=Slash PNG
AppVerName=1.0
DefaultDirName={pf}\program

[Languages]
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"

[Files]
Source: IsUtilsHb.dll; DestDir: {app}; Flags: dontcopy
Source: SplashScreen.png; DestDir: {app}; Flags: dontcopy

[Code]
function SplashScreen(hWnd: Integer; pathPng: String; nSleep: Integer): Integer;
external 'SplashScreen@files:IsUtilsHb.dll stdcall';

procedure InitializeWizard();
var 
  SplashFileName: string;
begin
  SplashFileName := ExpandConstant('{tmp}\SplashScreen.png');
  ExtractTemporaryFile('SplashScreen.png');
  SplashScreen(StrToInt(ExpandConstant('{hwnd}')), SplashFileName, 5000);
end;

回答1:


Just added:

ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'),1000,3000,1000,0,255,True,$FFFFFF,10);

Interpretation:

ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'),1000(appear time),3000(show time),1000(disappear time),0(like a intermittent reload time),255(transparency 0..255),True,$FFFFFF (transparency color if not png transp),10); 

like a intermittent reload time = use 9999999 and you see like a thunder image




回答2:


After looking all around the internet, I got this solution:

This is the DLL am using: isgsg.dll

[setup]
AppName=Slash PNG
AppVerName=1.0
DefaultDirName={pf}\program

[Languages]
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"

Source: "Splash.png"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: isgsg.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression

[Code]
procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';

procedure InitializeWizard();
begin
  ExtractTemporaryFile('Splash.png');
  ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'),1000,3000,1000,0,255,True,$FFFFFF,10);
end;


来源:https://stackoverflow.com/questions/13212559/inno-setup-transparent-splash-screen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!