默认主题优化 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 #define MyAppId "" #define MyAppName "星火云鸽智慧课堂测试版" #define MyAppDir "xhschool_test" #define MyAppVersion "3.8 .18 " #define MyAppPublisher "河南星火燎原软件科技有限公司" #define MyAppURL "http: #define MySourcePath "D:\Project\CSharp\schoolclient\bin\x86\Debug\" #define MyIcoName "D:\Project\CSharp\schoolclient\bin\x86\Debug\favicon256.ico" #define MyExcludes "\XHCLASS,\xhschool.exe.WebView2,\db,\temp,\Log,\wwwroot\school,\wwwroot\tongping,\app_service.xml,\app_service_test.xml" #define MyAppExeName "xhschool.exe" #define MyTargetPath "D:\程序打包\星火云鸽-智慧课堂-测试版\" [Setup] AppId= AppName= AppVersion= AppPublisher= AppPublisherURL= AppSupportURL= AppUpdatesURL= DefaultDirName=\ DisableProgramGroupPage=yes UsedUserAreasWarning=no OutputDir= OutputBaseFilename="v" SetupIconFile="" Compression=lzma SolidCompression=yes WizardStyle=modern [Languages] Name : "chinesesimp"; MessagesFile: "compiler:Default .isl"[Tasks] Name : "desktopicon"; Description: ""; GroupDescription: ""; Flags: checkablealoneName : "quicklaunchicon"; Description: ""; GroupDescription: ""; Flags: checkablealone; OnlyBelowVersion: 6.1 ; Check: not IsAdminInstallMode[Files] Source: "D:\Tools\runtime\NDP452-KB2901954-Web.exe"; DestDir: "\runtime"; Source: ""; DestDir: ""; Flags: ignoreversion Source: "*"; Excludes: "";DestDir: ""; Flags: ignoreversion recursesubdirs createallsubdirs [Icons] Name : "\"; Filename: "\"Name : "\"; Filename: "\"; Tasks: desktopiconName : "\Microsoft\Internet Explorer\Quick Launch\"; Filename: "\"; Tasks: quicklaunchicon[Run] Filename: "\runtime\NDP452-KB2901954-Web.exe"; WorkingDir: ; Flags: skipifdoesntexist; StatusMsg: "Install .Net Framework ..."; Check: NeedInstallDotNet Filename: "\"; Description: "}"; Flags: nowait postinstall skipifsilent [Code] procedure CurPageChanged (CurPage: Integer) ;begin if CurPage=wpFinished then Wizardform.WizardBitmapImage2.Visible := False; Wizardform.FinishedHeadingLabel.Visible := True; Wizardform.FinishedHeadingLabel.Width := WizardForm.ClientWidth - 100 ; Wizardform.FinishedHeadingLabel.Top := 20 ; Wizardform.FinishedHeadingLabel.Left := 50 ; WizardForm.FinishedHeadingLabel.Color:=$ffffff ; Wizardform.FinishedLabel.Visible := True; Wizardform.FinishedLabel.Width := WizardForm.ClientWidth - 100 ; Wizardform.FinishedLabel.Top := Wizardform.FinishedHeadingLabel.Top+Wizardform.FinishedHeadingLabel.ClientHeight+20 ; Wizardform.FinishedLabel.Left := 50 ; WizardForm.FinishedLabel.Color:=$ffffff ; Wizardform.RunList.Width := WizardForm.ClientWidth - 100 Wizardform.RunList.Top := Wizardform.FinishedLabel.Top+Wizardform.FinishedLabel.ClientHeight+20 ;; Wizardform.RunList.Left := 50 ; WizardForm.RunList.Color:=$ffffff ; end ;function IsInstallDotNet (version: string ; service: cardinal) : boolean;var key, versionKey: string ; install, release, serviceCount, versionRelease: cardinal; success: boolean; begin versionKey := version; versionRelease := 0 ; if version = 'v1.1' then begin versionKey := 'v1.1.4322' ; end else if version = 'v2.0' then begin versionKey := 'v2.0.50727' ; end else if Pos('v4.' , version) = 1 then begin versionKey := 'v4\Full' ; case version of 'v4.5' : versionRelease := 378389 ; 'v4.5.1' : versionRelease := 378675 ; 'v4.5.2' : versionRelease := 379893 ; 'v4.6' : versionRelease := 393295 ; 'v4.6.1' : versionRelease := 394254 ; 'v4.6.2' : versionRelease := 394802 ; 'v4.7' : versionRelease := 460798 ; 'v4.7.1' : versionRelease := 461308 ; 'v4.7.2' : versionRelease := 461808 ; 'v4.8' : versionRelease := 528040 ; end ; end ; key := 'SOFTWARE\Microsoft\NET Framework Setup\NDP\' + versionKey; if Pos('v3.0' , version) = 1 then begin success := RegQueryDWordValue(HKLM, key + '\Setup' , 'InstallSuccess' , install); end else begin success := RegQueryDWordValue(HKLM, key, 'Install' , install); end ; if Pos('v4' , version) = 1 then begin success := success and RegQueryDWordValue(HKLM, key, 'Servicing' , serviceCount); end else begin success := success and RegQueryDWordValue(HKLM, key, 'SP' , serviceCount); end ; if versionRelease > 0 then begin success := success and RegQueryDWordValue(HKLM, key, 'Release' , release); success := success and (release >= versionRelease); end ; result := success and (install = 1 ) and (serviceCount >= service); end ;function NeedInstallDotNet : Boolean;begin if IsInstallDotNet('v4.5.2' , 0 ) then begin Result := false; end else begin Result := true; end end ;
引用DLL整体配置 整体配置大致如下,方便复制修改:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 ; 该执行目录为 setup.iss 所在的目录,请注意拼接相对目录 #define MyAppId "" #define MyAppName "xhschool_test" #define MyAppNameZh "星火云鸽智慧课堂测试版" #define MyAppVersion "3.8 .1 " #define MyAppPublisher "河南星火燎原" #define MyAppURL "www.xhkjedu.com" ; 打包文件 #define MyAppExeName "xhschool.exe" #define SourceMain "D:\Project\CSharp\schoolclient\bin\x86\Debug\xhschool.exe" #define SourceFolder "D:\Project\CSharp\schoolclient\bin\x86\Debug\*" #define SetupIconFilePath "D:\Project\CSharp\schoolclient\bin\x86\Debug\favicon256.ico" #define MyExcludes "\XHCLASS,\db,\temp,\Log,\wwwroot\school,\wwwroot\tongping,app.config,app_service.xml,app_service_test.xml" ; 打包生成位置 #define OutputPath "D:\程序打包\星火云鸽-智慧课堂-测试版\" #define OutputFileName "星火云鸽课堂-测试版" ; license文件 #define LicenseFilePath "..\setup_resources\license.txt" ; 美化资源文件 #define ResourcesPath "..\setup_resources\*" [setup] AppId= AppName= AppVersion= AppVerName= AppPublisher= AppPublisherURL= AppSupportURL= AppUpdatesURL= DefaultDirName=\ LicenseFile= OutputDir= OutputBaseFilename=v SetupIconFile= Compression=lzma/normal SolidCompression=yes PrivilegesRequired=admin Uninstallable=yes UninstallDisplayName= UninstallDisplayIcon=,0 DefaultGroupName= Versioninfodescription= Install versioninfocopyright=Copyright(c) 2022 VersionInfoProductName= DisableReadyPage=yes DisableProgramGroupPage=yes DirExistsWarning=no DisableDirPage=yes [Tasks] Name : "desktopicon"; Description: ""; GroupDescription: ""; Flags: checkablealoneName : "quicklaunchicon"; Description: ""; GroupDescription: ""; Flags: checkablealone; OnlyBelowVersion: 6.1 ; Check: not IsAdminInstallMode[Files] Source: ; DestDir: ; Flags: dontcopy solidbreak ; Attribs: hidden system Source: ; DestDir: ""; Flags: ignoreversion Source: ;Excludes: "";DestDir: ""; Flags: ignoreversion recursesubdirs createallsubdirs [Icons] Name : "\"; Filename: "\"Name : "\"; Filename: "\"; Tasks: desktopiconName : "\"; Filename: "\"Name : "\卸载"; Filename: ""[Code] #include "..\include\code.iss"
常见问题 请求的操作需要提升
Inno Setup CreateProcess failed;code 740 请求的操作需要提升
这是因为打包的程序默认需要以管理员身份运行
下载之后打开Resource Hacker,然后打开Inno Setup的安装目录,找到SetupLdr.e32文件,打开。
SetupLdr.e32在InnoSetup的根目录
找到Manifest下的文件打开
找到
1 <requestedExecutionLevel level ="asInvoker" uiAccess ="false" />
改为
1 <requestedExecutionLevel level ="requireAdministrator" uiAccess ="false" />
点击F5编译脚本,重新打包运行发现已经不再报错了。
生成快捷方式
新版本6.0.5已经没有该问题了
默认生成的打包的代码是不会生成桌面快捷方式的,所以要想生成桌面快捷方式
Tasks配置段中修改为如下:
1 2 3 [Tasks] Name : "desktopicon"; Description: ""; GroupDescription: ""; Flags: checkablealoneName : "quicklaunchicon"; Description: ""; GroupDescription: ""; Flags: checkablealone
其中Flags: checkablealone,会在桌面没有快捷方式时自动勾选创建桌面快捷方式。
文件排除 https://jrsoftware.org/ishelp/index.php?topic=filessection
示例:
1 2 Source: "*"; Excludes: "*.~*" Source: "*"; Excludes: "*.~*,\Temp\*"; Flags: recursesubdirs
忽略配置
1 2 3 [Files] Source: ""; DestDir: ""; Flags: ignoreversion Source: "*"; Excludes: "\db,\temp,\Log,\nginx\html\school,\nginx\html\tongping,app.config,app_service.xml";DestDir: ""; Flags: ignoreversion recursesubdirs createallsubdirs
注意
多个路径之间用,分割
控制面板卸载不显示图标 1 2 3 [Setup] UninstallDisplayName= UninstallDisplayIcon=,0
删除旧的快捷方式 删除旧的快捷方式
1 2 [InstallDelete] Type : files; Name : "\星火智慧校园.lnk"
删除安装目录下的文件
1 2 3 [InstallDelete] Type : files; Name : "\User's Manual (PDF)" Type: files; Name: "{app}\test.pdf"
其中
{autodesktop} 桌面
{app} 安装目录
{group} 开始菜单
清空图标缓存 如果我们打包时图标设置错了,就算更换了图标重新打包,桌面上的图标还是之前的,这是因为系统图标缓存导致,清空一下图标缓存就行了。
新建 清空图标缓存.bat,用管理员运行即可。
1 2 3 4 5 6 cd /d %userprofile%\AppData\Local\Microsoft\Windows\Explorer taskkill /f /im explorer.exe attrib -h iconcache_*.db del iconcache_*.db /a start explorer pause
常用技巧 脚本引用 1 #include ".\include\code.iss"
生命周期 inno setup基本的过程和函数。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 procedure InitializeWizard () ;function InitializeSetup () : Boolean;procedure CurStepChanged (CurStep: TSetupStep) ;function NextButtonClick (CurPageID: Integer) : Boolean;function ShouldSkipPage (PageID: Integer) : Boolean;procedure CurPageChanged (CurPageID: Integer) ;
代码注释
注释符号均在英文输入法状态下输入
换行符号 在 [Messages] 换行符号为%n 在 MsgBox 中换行符号为 #13#10 ,#13 为回车字符
颜色代码 (1)一个值形如 $bbggrr, 这里的 rr, gg 和 bb 指定了两位的亮度值(以十六进制表示)分别为红色,绿色和蓝色。 (2)预定义的颜色名称:
clBlack(黑色),clMaroon(暗红),clGreen(绿色),clOlive(橄榄绿), clNavy(深蓝),clPurple(紫色),clTeal(深青),clGray(灰色), clSilver(浅灰),clRed(红色),clLime(浅绿),clYellow(黄色), clBlue(蓝色),clFuchsia(紫红),clAqua(青绿),clWhite(白色)。
安装 CurStepChanged所对应的全部状态:3种
CurStep=ssInstall –是在程序实际安装前(所有配置都准备好了)*
CurStep=ssPostInstall –是实际安装完成后*
CurStep=ssDone–是在一次成功的安装完成后、安装程序终止前(即点击*finish按钮后执行)
这些状态可以通过InnoSetup自带的过程(一种跟函数差不多的东西)来判断,然后执行一些自定义的动作:
用法如下:
1 2 3 4 5 6 7 procedure CurStepChanged (CurStep: TSetupStep) ;begin if (CurStep=ssInstall) then begin end ; end ;
卸载 CurUninstallStep 所对应的所有状态 4种
CurStep=usAppMutexCheck 在卸载前判断是否已经运行了实例
CurStep=usUninstall 卸载前的准备
CurStep=usPostUninstall 卸载完成后,
CurStep=usDone 卸载完成后,卸载程序终止前,也是点击finish之后执行的
同理:卸载的时候也有对应的过程来处理
1 2 3 4 5 6 7 8 procedure CurUninstallStepChanged (CurUninstallStep: TUninstallStep) ;begin if (CurUnintallStep=usInstall) then begin end ; end ;
向导 0、 向导页面
Innosetup的预定义向导页(就是安装时让我们点下一步的那些页面)
3.1.wpWelcome –欢迎页面
3.2. wpLicense –协议页面
3.3. wpPassword –密码页面
3.4. wpInfoBefore
3.5. wpUserInfo
3.6. wpSelectDir –选择目录页面
3.7. wpSelectComponents –选择组件页面
3.8. wpSelectProgramGroup –选择程序组页面
3.9. wpSelectTasks
3.10. wpReady
3.11. wpPreparing
3.12. wpInstalling –估计是安装中的进度条页面
3.13. wpInfoAfter
3.14. wpFinished –finish页面
向导变更时执行
1 2 3 4 5 6 [Code] procedure CurPageChanged (CurPage: Integer) ;begin if CurPage=wpFinished then Wizardform.WizardBitmapImage.Visible := False; end ;
1 、如何让协议许可页面默认选中我同意按钮
1 2 3 4 5 [code] procedure InitializeWizard () ;begin WizardForm.LICENSEACCEPTEDRADIO.Checked := true; end ;
2、自定义安装程序右上角图片大小
1 2 3 4 5 6 7 8 [code] procedure InitializeWizard () ;begin WizardForm.WizardSmallBitmapImage.width:=150 ; WizardForm.WizardSmallBitmapImage.left:=WizardForm.width-150 ; WizardForm.PAGENAMELABEL.width:=0 ; WizardForm.PAGEDESCRIPTIONLABEL.width:=0 ; end ;
或者
1 2 3 4 5 6 7 8 9 [code] procedure InitializeWizard () ;begin Wizardform.WizardSmallBitmapImage.left:= WizardForm.width-164 ; WizardForm.WizardSmallBitmapImage.width:=164 ; Wizardform.PageNameLabel.width:= 495 - 164 -36 ; Wizardform.PageDescriptionLabel.width:= 495 - 164 -42 ; end ;
3、自定义BeveledLabel显示
1 2 3 4 5 6 7 8 [code] procedure InitializeWizard () ;begin WizardForm.BeveledLabel.Enabled:=true; WizardForm.BeveledLabel.Font.Color:=$00058451 ;; WizardForm.BeveledLabel.Font.Style := WizardForm.BeveledLabel.Font.Style + [fsBold]; WizardForm.BeveledLabel.Left:=5 ; end ;
4、自定义安装向导图片
1 2 3 4 5 6 7 [code] procedure InitializeWizard () ;begin Wizardform.WELCOMELABEL1.left:= 18 ; Wizardform.WELCOMELABEL2.left:= 18 ; Wizardform.WizardBitmapImage.left:= WizardForm.width-164 end ;
5、显示出组件选择框
1 2 3 4 5 [Types] Name : full; Description: 推荐Name : default ; Description: 典型Name : custom; Description: 自定义; Flags: iscustom;告诉安装程序这个类型是自定义类型。必须定义iscustom这个参数,才能显示出组件选择框
6、定义[Messages]的颜色
1 2 3 4 5 6 [code] procedure InitializeWizard () ;begin WizardForm.BeveledLabel.Enabled:= True; WizardForm.BeveledLabel.Font.Color:= clblue; end ;
7、不显示一些特定的安装界面
1 2 3 4 5 6 7 [code] function ShouldSkipPage (PageID: Integer) : Boolean;begin if PageID=wpReady then result := true; end ;
wpReady 是准备安装界面 PageID查询 INNO帮助中的 Pascal 脚本: 事件函数常量 预定义向导页 CurPageID 值 wpWelcome, wpLicense, wpPassword, wpInfoBefore, wpUserInfo, wpSelectDir, wpSelectComponents, wpSelectProgramGroup, wpSelectTasks, wpReady, wpPreparing, wpInstalling, wpInfoAfter, wpFinished
8、在运行卸载程序前显示弹出式消息
1 2 3 4 5 6 7 8 [code] function InitializeUninstall () : Boolean;begin if MsgBox('' , mbConfirmation, MB_YESNO) = IDYES then result:=true else result:=false; end ;
9、安装、卸载时判断是否程序正在运行,卸载完成时自动打开网页
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 [code] var ErrorCode: Integer; IsRunning: Integer; function InitializeSetup () : Boolean; begin Result :=true; IsRunning:=FindWindowByWindowName('腾讯视频' ); while IsRunning<>0 do begin if Msgbox('安装程序检测到客户端正在运行。' #13 #13 '您必须先关闭它然后单击“是”继续安装,或按“否”退出!' , mbConfirmation, MB_YESNO) = idNO then begin Result :=false; IsRunning :=0 ; end else begin Result :=true; IsRunning:=FindWindowByWindowName('腾讯视频' ); end ; end ; end ; function InitializeUninstall () : Boolean; begin Result :=true; IsRunning:=FindWindowByWindowName('腾讯视频' ); while IsRunning<>0 do begin if Msgbox('安装程序检测到客户端正在运行。' #13 #13 '您必须先关闭它然后单击“是”继续安装,或按“否”退出!' , mbConfirmation, MB_YESNO) = idNO then begin Result :=false; IsRunning :=0 ; end else begin Result :=true; IsRunning:=FindWindowByWindowName('腾讯视频' ); end ; end ; end ; procedure CurUninstallStepChanged (CurUninstallStep: TUninstallStep) ; begin case CurUninstallStep of usUninstall: begin end ; usPostUninstall: begin ShellExec('open' , 'http://www.psvmc.cn' , '' , '' , SW_SHOWNORMAL, ewNoWait, ErrorCode); end ; end ; end ;
10、 删除文件和删除文件夹
1 2 3 4 DeleteFile(ExpandConstant('{app}\abc.exe' )); DelTree(ExpandConstant('{app}' ), True, True, False);
11、BorderStyle
1 TFormBorderStyle = (bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin);
无边界式(bsNone) ,单边固定式(bsSingle),双边可变式(bsSizeable),对话框式(bsDialog)
12、if else
1 2 3 4 5 6 7 8 9 10 11 12 13 14 function NextButtonClick (CurPageID: Integer) : Boolean;var ResultCode: Integer; begin Result := True; if (CurPageID = wpSelectDir) then begin MsgBox('AAAA' , mbInformation, MB_OK); end else begin MsgBox('BBBB' , mbInformation, MB_OK); end ; end ;
13、安装结束界面增加“设为首页”选项
1 2 3 4 [Tasks] Name : changestartpage; Description: "设置百度默认主页"[Registry] Root: HKCU; Subkey: "Software\Microsoft\Internet Explorer\Main"; ValueType: string ; ValueName: "Start Page"; ValueData: "http:
14、添加“关于”和网站链接按钮
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 [Code] procedure URLLabelOnClick (Sender: TObject) ;var ErrorCode: Integer; begin ShellExec('open' , 'http://www.psvmc.cn' , '' , '' , SW_SHOWNORMAL, ewNoWait, ErrorCode); end ;procedure AboutButtonOnClick (Sender: TObject) ;begin MsgBox(#13 '本软件由码客说制作!' #13 #13 '版权所有 (C) 码客说工作室' , mbInformation, MB_OK); end ;var AboutButton, CancelButton: TButton; URLLabel: TNewStaticText; procedure InitializeWizard () ;begin WizardForm.PAGENAMELABEL.Font.Color:= clred; WizardForm.PAGEDESCRIPTIONLABEL.Font.Color:= clBlue; WizardForm.WELCOMELABEL1.Font.Color:= clGreen; WizardForm.WELCOMELABEL2.Font.Color:= clblack; CancelButton := WizardForm.CancelButton; AboutButton := TButton.Create(WizardForm); AboutButton.Left := WizardForm.ClientWidth - CancelButton.Left - CancelButton.Width; AboutButton.Top := CancelButton.Top; AboutButton.Width := CancelButton.Width; AboutButton.Height := CancelButton.Height; AboutButton.Caption := '&About' ; AboutButton.OnClick := @AboutButtonOnClick; AboutButton.Parent := WizardForm; URLLabel := TNewStaticText.Create(WizardForm); URLLabel.Caption := '码客说' ; URLLabel.Cursor := crHand; URLLabel.OnClick := @URLLabelOnClick; URLLabel.Parent := WizardForm; URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline]; URLLabel.Font.Color := clBlue; URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2 ; URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20 ); end ;
15、去掉安装程序左上角“关于安装程序”的代码
1 2 3 4 5 6 7 8 9 10 procedure InitializeWizard () ;begin WizardForm.BorderIcons:= [biMinimize]; end ;procedure CurPageChanged (CurPage: Integer) ;begin if CurPage=wpWelcome then WizardForm.BorderIcons:= [biSystemMenu, biMinimize]; end ;
或者
1 2 3 4 procedure InitializeWizard () ;begin WizardForm.BORDERICONS := [biHelp, biSystemMenu, biMinimize]; end ;
16、自定义BeveledLabel文字
1 2 [Messages] BeveledLabel=码客说
17、自定义安装程序界面左上角“安装”文字
1 2 3 [message ] SetupAppTitle=需要的字 SetupWindowTitle=需要的字
18、自定义安装程序版本号
1 2 VersionInfoVersion=1.1 VersionInfoTextVersion=1.1
默认主题修改方法 首先我们看一下属性 方便修改页面
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 TWizardForm = class (TSetupForm) property CancelButton: TNewButton; read ; property NextButton: TNewButton; read ; property BackButton: TNewButton; read ; property OuterNotebook: TNotebook; read ; property InnerNotebook: TNotebook; read ; property WelcomePage: TNewNotebookPage; read ; property InnerPage: TNewNotebookPage; read ; property FinishedPage: TNewNotebookPage; read ; property LicensePage: TNewNotebookPage; read ; property PasswordPage: TNewNotebookPage; read ; property InfoBeforePage: TNewNotebookPage; read ; property UserInfoPage: TNewNotebookPage; read ; property SelectDirPage: TNewNotebookPage; read ; property SelectComponentsPage: TNewNotebookPage; read ; property SelectProgramGroupPage: TNewNotebookPage; read ; property SelectTasksPage: TNewNotebookPage; read ; property ReadyPage: TNewNotebookPage; read ; property PreparingPage: TNewNotebookPage; read ; property InstallingPage: TNewNotebookPage; read ; property InfoAfterPage: TNewNotebookPage; read ; property DiskSpaceLabel: TNewStaticText; read ; property DirEdit: TEdit; read ; property GroupEdit: TNewEdit; read ; property NoIconsCheck: TNewCheckBox; read ; property PasswordLabel: TNewStaticText; read ; property PasswordEdit: TPasswordEdit; read ; property PasswordEditLabel: TNewStaticText; read ; property ReadyMemo: TNewMemo; read ; property TypesCombo: TNewComboBox; read ; property Bevel: TBevel; read ; property WizardBitmapImage: TBitmapImage; read ; property WelcomeLabel1: TNewStaticText; read ; property InfoBeforeMemo: TRichEditViewer; read ; property InfoBeforeClickLabel: TNewStaticText; read ; property MainPanel: TPanel; read ; property Bevel1: TBevel; read ; property PageNameLabel: TNewStaticText; read ; property PageDescriptionLabel: TNewStaticText; read ; property WizardSmallBitmapImage: TBitmapImage; read ; property ReadyLabel: TNewStaticText; read ; property FinishedLabel: TNewStaticText; read ; property YesRadio: TNewRadioButton; read ; property NoRadio: TNewRadioButton; read ; property WizardBitmapImage2: TBitmapImage; read ; property WelcomeLabel2: TNewStaticText; read ; property LicenseLabel1: TNewStaticText; read ; property LicenseMemo: TRichEditViewer; read ; property InfoAfterMemo: TRichEditViewer; read ; property InfoAfterClickLabel: TNewStaticText; read ; property ComponentsList: TNewCheckListBox; read ; property ComponentsDiskSpaceLabel: TNewStaticText; read ; property BeveledLabel: TNewStaticText; read ; property StatusLabel: TNewStaticText; read ; property FilenameLabel: TNewStaticText; read ; property ProgressGauge: TNewProgressBar; read ; property SelectDirLabel: TNewStaticText; read ; property SelectStartMenuFolderLabel: TNewStaticText; read ; property SelectComponentsLabel: TNewStaticText; read ; property SelectTasksLabel: TNewStaticText; read ; property LicenseAcceptedRadio: TNewRadioButton; read ; property LicenseNotAcceptedRadio: TNewRadioButton; read ; property UserInfoNameLabel: TNewStaticText; read ; property UserInfoNameEdit: TNewEdit; read ; property UserInfoOrgLabel: TNewStaticText; read ; property UserInfoOrgEdit: TNewEdit; read ; property PreparingErrorBitmapImage: TBitmapImage; read ; property PreparingLabel: TNewStaticText; read ; property FinishedHeadingLabel: TNewStaticText; read ; property UserInfoSerialLabel: TNewStaticText; read ; property UserInfoSerialEdit: TNewEdit; read ; property TasksList: TNewCheckListBox; read ; property RunList: TNewCheckListBox; read ; property DirBrowseButton: TNewButton; read ; property GroupBrowseButton: TNewButton; read ; property SelectDirBitmapImage: TBitmapImage; read ; property SelectGroupBitmapImage: TBitmapImage; read ; property SelectDirBrowseLabel: TNewStaticText; read ; property SelectStartMenuFolderBrowseLabel: TNewStaticText; read ; property PreparingYesRadio: TNewRadioButton; read ; property PreparingNoRadio: TNewRadioButton; read ; property PreparingMemo: TNewMemo; read ; property CurPageID: Integer; read ; function AdjustLabelHeight (ALabel: TNewStaticText) : Integer; procedure IncTopDecHeight (AControl: TControl; Amount: Integer) ; property PrevAppDir: String ; read ; end ;
页面组件图
注意
6.0.5版本已经去掉了完成页面的图片,不需要添加下面的配置
去除默认完成页面的图片
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 [Code] procedure CurPageChanged (CurPage: Integer) ;begin if CurPage=wpFinished then Wizardform.WizardBitmapImage2.Visible := False; Wizardform.FinishedHeadingLabel.Visible := True; Wizardform.FinishedHeadingLabel.Width := WizardForm.ClientWidth - 100 ; Wizardform.FinishedHeadingLabel.Top := 20 ; Wizardform.FinishedHeadingLabel.Left := 50 ; WizardForm.FinishedHeadingLabel.Color:=$ffffff ; Wizardform.FinishedLabel.Visible := True; Wizardform.FinishedLabel.Width := WizardForm.ClientWidth - 100 ; Wizardform.FinishedLabel.Top := Wizardform.FinishedHeadingLabel.Top+Wizardform.FinishedHeadingLabel.ClientHeight+20 ; Wizardform.FinishedLabel.Left := 50 ; WizardForm.FinishedLabel.Color:=$ffffff ; Wizardform.RunList.Width := WizardForm.ClientWidth - 100 Wizardform.RunList.Top := Wizardform.FinishedLabel.Top+Wizardform.FinishedLabel.ClientHeight+20 ;; Wizardform.RunList.Left := 50 ; WizardForm.RunList.Color:=$ffffff ; end ;
注意
组件的高度不能设置为固定的值,在高分辨率的屏幕上会显示异常。