以下inno setup脚本,实现了:1.水波纹效果 2.安装时检测是否安装其他版本,并在欢迎页面添加文字提示 4.检测安装vcredist_x86.exe  3.卸载时添加提示

; 脚本由 Inno Setup 脚本向导 生成!
; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档! #define MyAppName "GX_Standardizeddrawing_X64"
#define MyAppVersion "2.5"
#define MyAppPublisher "ZWSOFT"
#define MyAppURL "www.zwcad.com"
#define MyAppExeName "Gx_standardizeddrawing"
#define shortCutName "广西通信标准化制图" [Setup]
; 注: AppId的值为单独标识该应用程序。
; 不要为其他安装程序使用相同的AppId值。
; (生成新的GUID,点击 工具|在IDE中生成GUID。)
AppId={{904DF7AD-D92A-4E81-A8ED-F0EB51701FFC}
AppName={#shortCutName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultGroupName={#shortCutName}
OutputBaseFilename=广西通信插件_V2.
DefaultDirName=D:\{#MyAppName}
Compression=lzma
SolidCompression=yes
UseSetupLdr=yes
DisableWelcomePage=no
;WindowVisible=yes
;LicenseFile=E:\GitHub\SVN\Project\ZwRQY\ZWRQY_ZWCAD\license.txt
WizardImageFile=.\WizardImage.bmp
WizardSmallImageFile=.\WizardSmallImage.bmp
AppPublisher=ZWSOFT
AppPublisherURL=http://www.zwcad.com/
AppCopyright=Copyright (C) - zwsof, Inc.
OutputDir=.\
;管理员权限
PrivilegesRequired=admin
Uninstallable=yes
UninstallDisplayName={#shortCutName}
SetupIconFile = .\Setup\Setup\res\zwcad.ico ;覆盖安装
UsePreviousAppDir = yes [Messages]
BeveledLabel=广州中望龙腾软件股份有限公司 [Languages]
Name: "Chinese"; MessagesFile: "compiler:Default.isl" [Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone; OnlyBelowVersion: ,8.1
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files]
Source: "..\OUT\Bin\x64\Release\SysZw\Gx_standardizeddrawing.exe"; DestDir: "{app}\SysZw"; Flags: ignoreversion; Permissions: authusers-full
Source: "..\OUT\Bin\x64\Release\*.*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: authusers-full
Source: "waterctrl.dll"; Flags: dontcopy
Source: "WizardImage.bmp"; Flags: dontcopy
; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion” [Icons]
Name: "{group}\{#shortCutName}"; Filename: "{app}\SysZw\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#shortCutName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#shortCutName}"; Filename: "{app}\SysZw\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppExeName}"; Filename: "{app}\SysZw\{#MyAppExeName}"; Tasks: quicklaunchicon [Run]
Filename: "{app}\SysZw\vcredist_x86.exe"; Parameters: /q; WorkingDir: {tmp}; Flags: skipifdoesntexist;StatusMsg: "Installing Microsoft Visual C++ Runtime ..."; Check: NeedInstallVC9SP1
;Filename: "{app}\SysZw\AceRedist.msi"; Parameters: /q; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: "Installing Microsoft Access Database Engine Redistributable ...";
Filename: "{app}\SysZw\msiexec.exe"; Parameters: "/i ""{app}\SysZw\AceRedist.msi"" /quiet";StatusMsg:"Installing Microsoft Access Database Engine Redistributable ..."
Filename: "{app}\SysZw\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(shortCutName, "&", "&&")}}"; Flags: nowait postinstall skipifsilent [UninstallDelete]
Name: {app}; Type: filesandordirs; [code]
var
vc9SP1Missing: Boolean;
vc9SP2Missing: Boolean; function InitializeSetup():boolean;
var
// MykeynotExist:boolean;
//ResultCode: Integer;
// uicmd: String;
version: Cardinal; begin
{检测是否安装vcredist_x86.exe}
if RegQueryDWordValue(HKLM, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{196BB40D-1578-3D01-B289-BEFC77A11A1E}', 'Version', version) = false
then
begin
vc9SP1Missing := true;
end; //MykeynotExist:= true;
//if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{904DF7AD-D92A-4E81-A8ED-F0EB51701FFC}_is1', 'UninstallString', uicmd) then
//begin
{MyKeynotExist:= false;
Exec(RemoveQuotes(uicmd), '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode); }
// ResultCode := MsgBox('检测到本机已安装其他版本!继续安装将会覆盖本机已安装版本!是否继续安装?', mbConfirmation, MB_YESNO);
// if ResultCode = IDNO then
// begin
// MyKeynotExist:= false;
// end;
// if ResultCode = IDYES then
// begin
{Exec(RemoveQuotes(uicmd), '/silent /verysilent /suppressmsgboxes', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);}
// MyKeynotExist:= true;
// end;
//end;
// Result:= MykeynotExist Result:= true;
end; function InitializeUninstall(): Boolean;
begin
Result:= true;
if MsgBox('卸载将会清空安装目录,请确认已导出图元库!请确认已导出图元库!请确认已导出图元库!是否继续卸载?', mbConfirmation, MB_YESNO) = IDYES then
begin
Result:= true;
end
else
Result:= false;
end; function NeedInstallVC9SP1(): Boolean;
begin
Result := vc9SP1Missing;
end; function NeedInstallVC9SP2(): Boolean;
begin
Result := vc9SP2Missing;
end; {实现水波纹效果}
function enablewater(ParentWnd: HWND; Left, Top: integer; Bmp: HBITMAP;
WaterRadius, WaterHeight: integer): BOOL; external 'enablewater@files:waterctrl.dll stdcall';
//ParentWnd 放置特效窗口的父窗口句柄。
//Left 左位置
//Top 上位置
//Bmp 位图句柄。
//WaterRadius 水纹半径,会令到水纹看起来范围更广。
//WaterHeight 水纹高度,会令到水纹看起来更深。
//注意,水纹插件自动根据图片来设定高度和宽度,
//另外水纹底图必须是翻转的图片,显示的时候会翻转图片来显示。 function waterblob(x, y: integer; radius, height: integer): BOOL; external 'waterblob@files:waterctrl.dll stdcall';
// 在 x,y 点产生半径为radius, 高度为height 的水纹。 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; procedure InitializeWizard();
var
LabelDate: Tlabel;
uicmd: String;
begin
ExtractTemporaryFile('WizardImage.bmp');
bmp := TBitmap.create;
bmp.LoadFromFile(ExpandConstant('{tmp}\WizardImage.bmp')); enablewater(WizardForm.WelcomePage.Handle, , , bmp.Handle, , ); {欢迎页面添加文字}
WizardForm.WelcomeLabel2.Autosize := true; LabelDate := Tlabel.Create(WizardForm); LabelDate.Autosize := true; LabelDate.Caption := '本程序由中望应用研发制作!'####'了解更多ZWCAD信息请登录:https://www.zwcad.com/'; if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{904DF7AD-D92A-4E81-A8ED-F0EB51701FFC}_is1', 'UninstallString', uicmd) then
begin
LabelDate.Font.Color := clred; //修改文字颜色
LabelDate.Caption := '检测到本机已安装其他版本,继续安装将会覆盖原版本!' ####'请确认已导出相关图元库!'
end; LabelDate.Parent := WizardForm.WelcomePage; LabelDate.Left := WizardForm.WelcomeLabel2.Left; LabelDate.Top := WizardForm.WelcomeLabel2.Top +WizardForm.WelcomeLabel2.Height +;
end; procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpWelcome then
begin
setwaterparent(WizardForm.WelcomePage.Handle);
waterblob(, , , );
end else
if CurPageID = wpFinished then
begin
setwaterparent(WizardForm.FinishedPage.Handle);
waterblob(, , , );
end else
flattenwater();
end; procedure DeinitializeSetup();
begin
disablewater();
bmp.Free;
end;

————————————————
版权声明:本文为CSDN博主「wang161019」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wang161019/article/details/91491300

【转载】inno setup 水波纹效果,检测安装vcredist_x86.exe等的更多相关文章

  1. 以前编写的inno setup脚本,涵盖了自定义安装界面,调用dll等等应用 (转)

    以前编写的inno setup脚本,涵盖了自定义安装界面,调用dll等等应用 (转) ; Script generated by the Inno Setup 脚本向导. ; SEE THE DOCU ...

  2. 在Unicode版Inno Setup中使用ISSkin给安装程序添加皮肤

    原文 http://www.cnblogs.com/2356/archive/2009/10/27/1590565.html 在Unicode版Inno Setup中使用ISSkin给安装程序添加皮肤 ...

  3. Android自己定义控件系列五:自己定义绚丽水波纹效果

    尊重原创!转载请注明出处:http://blog.csdn.net/cyp331203/article/details/41114551 今天我们来利用Android自己定义控件实现一个比較有趣的效果 ...

  4. jquery ripples水波纹效果( 涟漪效果)

    这个效果是我从bootstrap-material-design上面分离下来的,bootstrap-material-design的一些组件样式我不太不喜欢,但是非常喜欢这个水波纹效果,所以就有了这篇 ...

  5. 如何使用 HTML5 Canvas 制作水波纹效果

    今天,我们继续分享 JavaScript 实现的效果例子,这篇文章会介绍使用 JavaScript 实现水波纹效果.水波效果以图片为背景,点击图片任意位置都会触发.有时候,我们使用普通的 Javasc ...

  6. 兼容Android的水波纹效果

    Android的水波纹效果只有高版本才有,我们希望自己的应用在低版本用低版本的阴影,高版本用水波纹,这怎么做呢?其实,只要分drawable和drawablev21两个文件夹就好了. 普通情况下的se ...

  7. android自定义控件(4)-自定义水波纹效果

    一.实现单击出现水波纹单圈效果: 照例来说,还是一个自定义控件,观察这个效果,发现应该需要重写onTouchEvent和onDraw方法,通过在onTouchEvent中获取触摸的坐标,然后以这个坐标 ...

  8. 自定义view实现水波纹效果

    水波纹效果: 1.标准正余弦水波纹: 2.非标准圆形液柱水波纹: 虽说都是水波纹,但两者在实现上差异是比较大的,一个通过正余弦函数模拟水波纹效果,另外一个会运用到图像的混合模式(PorterDuffX ...

  9. Android 颜色渲染(七) RadialGradient 环形渲染实现水波纹效果

    利用环形渲染我们可以做到什么? 其实很多都是非常常见的,比如上一篇实现的帮帮糖效果, 彩色的热气球,比如这里要讲到的水波纹效果,或者也可以理解为扩散色渲染效果 首先看一下效果图: 轻触屏幕,即可看到对 ...

随机推荐

  1. 第三小节之Java API

    1.String类和StringBuffer类 字符串中可以包含任意字符,这些字符必须包含在一对双引号” “之内 1.1String类 String a=null与String a="&qu ...

  2. java基础语法2-运算符与流程控制

    关键字-标识符-常量和变量-运算符-流程控制-方法-数组 5 运算符 算术运算符Arithmetic Operators 赋值运算符Assignment Operators 比较运算符Compare ...

  3. 《Head First 软件开发》阅读六

    软件错误:专业排错 你编写的代码,你的责任.处理错误的方法和其他流程一样,准备好白板.让客户参与.满怀信心的估计.重构与预构. 首先是与客户加强沟通,不管是谁的代码,在自己的系统里就是自己的代码.使代 ...

  4. 用class语法派生Enum并增加描述值的类属性来定义一个新枚举

    import enum class BugStatus(enum.Enum):        new = 7    incomplete = 6    invalid = 5    wont_fix ...

  5. eclipse中没有server选项无法配置Tomcat

    eclipse集成Tomcat: 打开eclipse - 窗口 - 首选项 - 服务器 - 运行时环境 找到Tomcat然后添加. eclipse添加插件: 开发WEB项目时要集成Tomcat可以并不 ...

  6. 原生js数组排序(封装方法)

    //两值互换 function Sort(arr, index){ //参数arr代表数组,index代表数组元素下标 arr[index] += arr[index + 1];  //a+=b; a ...

  7. Swiper 的引入

    1. 从官网下载必要资源 https://www.swiper.com.cn/download/index.html#file1 2. 在项目中<head>中引入swiper.min.cs ...

  8. IDEA mapping箭头要怎么样设置哈(Free MyBatis插件)

    效果如下图: 当我们点击箭头的时候,会快速切换到我们相关联的类位置,就不用再像以前一样还要去找 而 Free MyBatis是一款让我们操作更加方便的插件,你值得拥有哦~~~ idea 选择 File ...

  9. vue学习-day03(动画,组件)

    目录: 1.品牌列表-从数据库获取列表    2.品牌列表-完成添加功能    3.品牌列表-完成删除功能    4.品牌列表-全局配置数据接口的根域名    5.品牌列表-全局配置emulateJS ...

  10. SDRAM学习笔记

    摘自“开源骚客视频教程” 1.仲裁模块就是用来控制什么时候读.写.刷新 2.模块中的状态机 3.初始化时序图说明,来自“IS42S116160.pdf”文件 4.SDRAM写时序图,来自“IS42S1 ...