【转载】inno setup 水波纹效果,检测安装vcredist_x86.exe等
以下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等的更多相关文章
- 以前编写的inno setup脚本,涵盖了自定义安装界面,调用dll等等应用 (转)
以前编写的inno setup脚本,涵盖了自定义安装界面,调用dll等等应用 (转) ; Script generated by the Inno Setup 脚本向导. ; SEE THE DOCU ...
- 在Unicode版Inno Setup中使用ISSkin给安装程序添加皮肤
原文 http://www.cnblogs.com/2356/archive/2009/10/27/1590565.html 在Unicode版Inno Setup中使用ISSkin给安装程序添加皮肤 ...
- Android自己定义控件系列五:自己定义绚丽水波纹效果
尊重原创!转载请注明出处:http://blog.csdn.net/cyp331203/article/details/41114551 今天我们来利用Android自己定义控件实现一个比較有趣的效果 ...
- jquery ripples水波纹效果( 涟漪效果)
这个效果是我从bootstrap-material-design上面分离下来的,bootstrap-material-design的一些组件样式我不太不喜欢,但是非常喜欢这个水波纹效果,所以就有了这篇 ...
- 如何使用 HTML5 Canvas 制作水波纹效果
今天,我们继续分享 JavaScript 实现的效果例子,这篇文章会介绍使用 JavaScript 实现水波纹效果.水波效果以图片为背景,点击图片任意位置都会触发.有时候,我们使用普通的 Javasc ...
- 兼容Android的水波纹效果
Android的水波纹效果只有高版本才有,我们希望自己的应用在低版本用低版本的阴影,高版本用水波纹,这怎么做呢?其实,只要分drawable和drawablev21两个文件夹就好了. 普通情况下的se ...
- android自定义控件(4)-自定义水波纹效果
一.实现单击出现水波纹单圈效果: 照例来说,还是一个自定义控件,观察这个效果,发现应该需要重写onTouchEvent和onDraw方法,通过在onTouchEvent中获取触摸的坐标,然后以这个坐标 ...
- 自定义view实现水波纹效果
水波纹效果: 1.标准正余弦水波纹: 2.非标准圆形液柱水波纹: 虽说都是水波纹,但两者在实现上差异是比较大的,一个通过正余弦函数模拟水波纹效果,另外一个会运用到图像的混合模式(PorterDuffX ...
- Android 颜色渲染(七) RadialGradient 环形渲染实现水波纹效果
利用环形渲染我们可以做到什么? 其实很多都是非常常见的,比如上一篇实现的帮帮糖效果, 彩色的热气球,比如这里要讲到的水波纹效果,或者也可以理解为扩散色渲染效果 首先看一下效果图: 轻触屏幕,即可看到对 ...
随机推荐
- PAT Basic 1043 输出PATest (20 分)
给定一个长度不超过 的.仅由英文字母构成的字符串.请将字符重新调整顺序,按 PATestPATest.... 这样的顺序输出,并忽略其它字符.当然,六种字符的个数不一定是一样多的,若某种字符 ...
- java面试(进程和线程)04
1.并行和并发有什么区别? 并行:多个处理器或多核处理器同时处理多个任务. 并发:多个任务在同一个 CPU 核上,按细分的时间片轮流(交替)执行,从逻辑上来看那些任务是同时执行. 2.线程和进程的区别 ...
- Windows如何下载nginx软件包到linux系统虚拟机上
1.打开浏览器,输入“nginx下载官网” 2.点击nginx:download 3.找到你想下载的nginx软件包 4.点击你所需要的版本之后(我点击的是nginx-1.12.2版本,根据自己的需要 ...
- SpringMVC @ModelAttribute详解
被@ModelAttribute注释的方法会在此controller每个方法执行前被执行,因此对于一个controller映射多个URL的用法来说,要谨慎使用. 我们编写控制器代码时,会将保存方法独立 ...
- Spring的概述
1 Spring是什么? Spring是分层的Java SE/EE应用的full-stack的轻量级开源框架,以IOC(控制反转)和AOP(面向切面编程)为内核,提供了展现层SpringMVC和持久层 ...
- POJ-2552-The Bottom of a Graph 强连通分量
链接: https://vjudge.net/problem/POJ-2553 题意: We will use the following (standard) definitions from gr ...
- luoguP1025+codevs 1039 数的划分 x
luoguP1025 + codevs1039 数的划分 2001年NOIP全国联赛提高组 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题目描述 Des ...
- zookeeper3.5.5集群部署
ZooKeeper是一个为分布式应用所设计的分布的.开源的协调服务,它主要是用来解决分布式应用中经常遇到的一些数据管理问题,简化分布式应用协调及其管理的难度,提供高性能的分布式服务.ZooKeeper ...
- PCL智能指针疑云 <三> 智能指针作为函数的传值参数和传引用参数
一 函数的参数传递可以简单分类为“传值”和“传引用”. 声明函数时,形参带引用“&”,则函数调用时,是把实参所在的内存直接传给函数所开辟的栈内存.在函数内对形参的修改相当于对实参也进行修改. ...
- windows与ubuntu双系统的安装
将ubuntu镜像烧录至U盘,从U盘启动电脑 选择自定义安装,不要选择它本身的双系统选项. 我的方案分区: 1. 挂载点/:主分区:安装系统和软件:大小为30G:分区格式为ext4:2. 挂载点/ho ...