Inno Setup-透明启动画面 [英] Inno Setup - Transparent Splash Screen
问题描述
我遇到了问题,需要您的帮助.我想找到一种不同的方式来放置透明的初始屏幕或更正我的代码.这里的代码可以工作...但是有一个问题,有些人在安装结束时会出错.
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
我检查了我的代码中的其他行,发现问题出在启动画面的代码上,如果删除它,则安装程序运行正常,我看到我需要的是procedure DeinitializeSetup();
,但我不知道怎么把它放在启动画面部分中,如果我删除其他代码(如皮肤,徽标等)中的procedure DeinitializeSetup();
,则会出现这种错误.进入Windows临时文件夹的文件...那我需要的是启动屏幕代码中的procedure DeinitializeSetup();
来解决此问题... :(这是任何人都可以测试的
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;
推荐答案
环顾互联网后,我得到了以下解决方案:
After looking all around the internet, I got this solution:
这是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 '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;
这篇关于Inno Setup-透明启动画面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!