杉宫竹苑工作室

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2027|回复: 0

带水波特效的软件补丁脚本

[复制链接]
发表于 2017-5-30 05:24:35 | 显示全部楼层 |阅读模式

正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!

您需要 登录 才可以下载或查看,没有账号?立即注册

x

  1. [Setup]
  2. AppName=我的程序
  3. AppVerName=我的程序 版本 1.5
  4. DefaultDirName={pf}\我的程序
  5. DefaultGroupName=我的程序
  6. UninstallDisplayIcon={app}\MyProg.exe
  7. Compression=lzma
  8. OutputDir=userdocs:Inno Setup Examples Output

  9. [Files]
  10. Source: "compiler:\Examples\MyProg.exe"; DestDir: "{app}"
  11. Source: "compiler:\Examples\Readme.txt"; DestDir: "{app}"; Flags: isreadme
  12. Source: "{#PluginDir}\waterctrl.dll"; Flags: dontcopy
  13. Source: "WizModernImage-Is.bmp"; Flags: dontcopy

  14. [Icons]
  15. Name: "{group}\我的程序"; Filename: "{app}\MyProg.exe"


  16. [code]
  17. function enablewater(ParentWnd: HWND; Left, Top: integer; Bmp: HBITMAP;
  18.      WaterRadius, WaterHeight: integer): BOOL; external 'enablewater@files:waterctrl.dll stdcall';
  19. function waterblob(x, y: integer; radius, height: integer): BOOL; external 'waterblob@files:waterctrl.dll stdcall';
  20. function flattenwater(): BOOL; external 'flattenwater@files:waterctrl.dll stdcall';
  21. function disablewater(): BOOL; external 'disablewater@files:waterctrl.dll stdcall';
  22. function setwaterparent(ParentWnd: HWND): BOOL; external 'setwaterparent@files:waterctrl.dll stdcall';
  23. //v2 新增,设置水纹插件的父句柄

  24. var
  25.   bmp: TBitmap;
  26. var
  27.   MyKeyExist: boolean;

  28. function InitializeSetup(): boolean;
  29. begin
  30. MyKeyExist:= true;
  31. if Not RegValueExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Adobe\Audition\3.0', 'ApplicationPath') then
  32.   begin
  33.   MyKeyExist:= false;
  34.   MsgBox('安装程序检测到您的系统内没有安装Adobe Audition 3.0,请先安装软件在运行此补丁。', mbInformation, MB_OK);
  35.   end;
  36. Result:= MyKeyExist;
  37. end;

  38. procedure InitializeWizard();
  39. begin
  40.   ExtractTemporaryFile('WizModernImage-Is.bmp');
  41.   bmp := TBitmap.create;
  42.   bmp.LoadFromFile(ExpandConstant('{tmp}\WizModernImage-Is.bmp'));
  43.   enablewater(WizardForm.WelcomePage.Handle, 0, 0, bmp.Handle, 3, 50);
  44. end;


  45. procedure CurPageChanged(CurPageID: Integer);
  46. begin
  47.   if CurPageID = wpWelcome then
  48.   begin
  49.     setwaterparent(WizardForm.WelcomePage.Handle);
  50.     waterblob(70, 198, 10, 1000);
  51.   end else
  52.   if CurPageID = wpFinished then
  53.   begin
  54.     setwaterparent(WizardForm.FinishedPage.Handle);
  55.     waterblob(70, 198, 10, 1000);
  56.   end else
  57.     flattenwater();
  58. end;

  59. procedure DeinitializeSetup();
  60. begin
  61.   if MyKeyExist then
  62.   begin
  63.   disablewater();
  64.   bmp.Free;
  65.   end;
  66. end;
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SgzyStudio

GMT+8, 2024-5-17 13:51 , Processed in 0.115323 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表