2012-11-03 106 views
1

我有一个问题,我需要你的帮助..我想找到一种不同的方式来放置透明的启动画面或我的代码的更正。这里的代码工作...但有一个问题,有些人在安装结束时出现错误。Inno Setup - 透明闪屏

这是如何在安装 enter image description here

enter image description here

我检查另一线在我的代码的末尾查找错误,我发现这个问题是闪屏的代码,如果我删除它安装程序工作完美,我看到我需要的是一个procedure DeinitializeSetup();,但我不知道如何把它放在启动画面部分,我得到这种错误,如果我删除procedure DeinitializeSetup();在另一个代码,如皮肤,标志等..文件进入临时文件夹的窗口...然后我需要的是procedure DeinitializeSetup();在splas H屏幕代码来解决这个... :(这里是任何人测试的dll文件IsUtilsHb.dll

然后......请如果有人知道一种不同的方式来放置一个透明的启动画面...不胜感激..或更好。要解决这个代码段:)

[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 '[email protected]:IsUtilsHb.dll stdcall'; 

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

如果您想透明的PNG动画的幻灯片,你可以去看看['Inno Image Animator'](http://code.google.com/p/inno-image-animator/wiki/Introduction)。但如果你愿意,我可以很容易地修改它只是一个图像(作为一个新的FOS项目)与你说的规格;-) – TLama

回答

1

寻找所有在互联网之后,我得到了这个解决方案:

这是DLL正在使用: 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 '[email protected]: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; 
1

只是说:

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

解读:

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); 

intermittent reload time = use 9999999,你看像打雷图像