正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- [Setup]
- AppName=我的程序
- AppVerName=我的程序 版本 1.5
- DefaultDirName={pf}\我的程序
- DefaultGroupName=我的程序
- UninstallDisplayIcon={app}\MyProg.exe
- Compression=lzma
- OutputDir=userdocs:Inno Setup Examples Output
- [Files]
- Source: "compiler:\Examples\MyProg.exe"; DestDir: "{app}"
- Source: "compiler:\Examples\Readme.txt"; DestDir: "{app}"; Flags: isreadme
- Source: "{#PluginDir}\waterctrl.dll"; Flags: dontcopy
- Source: "WizModernImage-Is.bmp"; Flags: dontcopy
- [Icons]
- Name: "{group}\我的程序"; Filename: "{app}\MyProg.exe"
- [code]
- function enablewater(ParentWnd: HWND; Left, Top: integer; Bmp: HBITMAP;
- WaterRadius, WaterHeight: integer): BOOL; external 'enablewater@files:waterctrl.dll stdcall';
- function waterblob(x, y: integer; radius, height: integer): BOOL; external 'waterblob@files:waterctrl.dll stdcall';
- function flattenwater(): BOOL; external 'flattenwater@files:waterctrl.dll stdcall';
- function disablewater(): BOOL; external 'disablewater@files:waterctrl.dll stdcall';
- function setwaterparent(ParentWnd: HWND): BOOL; external 'setwaterparent@files:waterctrl.dll stdcall';
- //v2 新增,设置水纹插件的父句柄
- var
- bmp: TBitmap;
- var
- MyKeyExist: boolean;
- function InitializeSetup(): boolean;
- begin
- MyKeyExist:= true;
- if Not RegValueExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Adobe\Audition\3.0', 'ApplicationPath') then
- begin
- MyKeyExist:= false;
- MsgBox('安装程序检测到您的系统内没有安装Adobe Audition 3.0,请先安装软件在运行此补丁。', mbInformation, MB_OK);
- end;
- Result:= MyKeyExist;
- end;
- procedure InitializeWizard();
- begin
- ExtractTemporaryFile('WizModernImage-Is.bmp');
- bmp := TBitmap.create;
- bmp.LoadFromFile(ExpandConstant('{tmp}\WizModernImage-Is.bmp'));
- enablewater(WizardForm.WelcomePage.Handle, 0, 0, bmp.Handle, 3, 50);
- end;
- procedure CurPageChanged(CurPageID: Integer);
- begin
- if CurPageID = wpWelcome then
- begin
- setwaterparent(WizardForm.WelcomePage.Handle);
- waterblob(70, 198, 10, 1000);
- end else
- if CurPageID = wpFinished then
- begin
- setwaterparent(WizardForm.FinishedPage.Handle);
- waterblob(70, 198, 10, 1000);
- end else
- flattenwater();
- end;
- procedure DeinitializeSetup();
- begin
- if MyKeyExist then
- begin
- disablewater();
- bmp.Free;
- end;
- end;
复制代码
|