【问题标题】:Inno Setup - Transparent Splash ScreenInno Setup - 透明闪屏
【发布时间】:2012-11-03 19:14:09
【问题描述】:

我有一个问题,我需要你的帮助..我想找到一种不同的方式来放置一个透明的启动屏幕或更正我的代码。这里的代码可以运行...但是有一个问题,有些人在安装结束时会报错。

这是安装结束时的错误

我检查了代码中的另一行,发现问题出在启动屏幕的代码上,如果我删除它,安装程序可以完美运行,我看到我需要的是 procedure DeinitializeSetup(); 但我不知道如何将它放在启动画面部分,如果我删除其他代码中的procedure DeinitializeSetup();,如皮肤、徽标等,我会收到这种错误。进入 windows 临时文件夹的文件......然后我需要的是启动屏幕代码中的procedure DeinitializeSetup(); 来解决这个问题... :( 这是任何人都可以测试的 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 '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;

【问题讨论】:

  • 如果你想要透明的PNG动画幻灯片,你可以看看Inno Image Animator。但是,如果您愿意,我可以很容易地将其修改为一个图像(作为一个新的 FOS 项目),其中包含您指定的规格;-)

标签: inno-setup splash-screen


【解决方案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 '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;

【讨论】:

    【解决方案2】:

    刚刚添加:

    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 一样,你会看到像雷声一样的图像

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-09-29
      • 1970-01-01
      • 1970-01-01
      • 2017-04-04
      • 2016-09-24
      • 1970-01-01
      • 2014-05-23
      • 1970-01-01
      相关资源
      最近更新 更多