正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- ; --------------------------------------------------------------------------------
- ; 极点中文输入平台集成版安装脚本
- ; ---------------------------------------------------------------------------------
- ; 编译器要求: Inno Setup 5 与 ISPP.
- ;#define debugmode
- ; 最近更新:
- #define LastUpdate "2005.03.10"
- #define SetupPackMajorVersion "4"
- #define SetupPackVersion SetupPackMajorVersion + "." + LastUpdate
- #define hasMutex
- #define MajorVersion "4"
- #define DateVersion ".2.3.8"
- #define AppName "极点中文输入平台"
- #define AppShortName "极点中文"
- #define ReleaseType "4.2正式版"
- #define AboutInfo "秋枫 @ [五笔爱好者]"
- #define SupportURL "http://www.freewb.net/"
- #define SetupPackType "集成版"
- #define OutputBase "Freewb.42Final.Deluxe"
- ;; 码表宏处理
- ;; 下面的一些预处理定义方便增减集成版中的mb组件以减少代码修改
- ;; 如需要增减码表只需修改mbcount并增加相应的数组元素
- #define i
- #define mbcount 6
- #dim mbIDArray[mbcount] ;码表的英文唯一标识符,用于脚本内部,不应与其它重复
- #dim mbNameArray[mbcount] ;码表中文名称, 也是码表在mb目录下的文件夹名
- #dim mbVerArray[mbcount] ;码表版本
- #dim mbSizeArray[mbcount] ;码表词条数大小
- #expr i=0
- #define mbIDArray[i] "add_wozy"
- #define mbNameArray[i] "五笔86[窝子极爽词库]"
- #define mbVerArray[i] "5.0版"
- #define mbSizeArray[i] "约6.0万词"
- #expr i++
- #define mbIDArray[i] "add_mb86wonderland"
- #define mbNameArray[i] "五笔86[奇境简优词库]"
- #define mbVerArray[i] "1.3版"
- #define mbSizeArray[i] "约1.7万词"
- #expr i++
- #define mbIDArray[i] "add_mb86jyj"
- #define mbNameArray[i] "五笔86[晋一剑词库]"
- #define mbVerArray[i] "1.2版"
- #define mbSizeArray[i] "约4.2万词"
- #expr i++
- #define mbIDArray[i] "add_mb86wm"
- #define mbNameArray[i] "标准王码86"
- #define mbVerArray[i] "原版"
- #define mbSizeArray[i] "约1.4万词"
- #expr i++
- #define mbIDArray[i] "add_mb98"
- #define mbNameArray[i] "五笔98[沧海词库]"
- #define mbVerArray[i] "SeaLaugh-1.0版"
- #define mbSizeArray[i] "约4.5万词"
- #expr i++
- #define mbIDArray[i] "add_mb2b"
- #define mbNameArray[i] "二笔标版"
- #define mbVerArray[i] "0425版"
- #define mbSizeArray[i] "约5.1万词"
- [Setup]
- OutputBaseFilename={#OutputBase}.{#SetupPackVersion}
- VersionInfoVersion={#SetupPackVersion}
- VersionInfoDescri ption={#AppName} {#SetupPackType}
- VersionInfoTextVersion=极点内核版本: {#MajorVersion}{#DateVersion}
- AppPublisher={#AboutInfo}
- AppVersion={#SetupPackVersion}
- AppPublisherURL={#SupportURL}
- AppContact=秋枫<arcqiufeng@hotmail.com>
- #if defined(debugmode)
- Compression=none
- #else
- Compression=lzma/ultra
- SolidCompression=true
- #endif
- AppName={#AppName}
- AppVerName={#AppName} {#ReleaseType} {#MajorVersion}{#DateVersion}
- DefaultDirName={pf}\freewb
- PrivilegesRequired=admin
- DefaultGroupName=极点中文
- LicenseFile=license.rtf
- RestartIfNeededByRun=true
- WizardImageFile=side5.bmp
- WizardSmallImageFile=WizModernSmallImage10.bmp
- WizardImageStretch=true
- ShowTasksTreeLines=true
- ; AppMutex=mutex_freeime,Global\mutex_freeime
- InfoBeforeFile=info.txt
- AllowNoIcons=yes
- [Files]
- ;;; ***** main *****
- Source: freewb\*.*; DestDir: {app}; Flags: restartreplace uninsrestartdelete ignoreversion; Components: Main
- Source: freewb\freewb.ime; DestDir: {sys}; Flags: restartreplace uninsrestartdelete ignoreversion; Components: Main
- Source: freewb\freewb.htm; DestDir: {app}; Flags: isreadme ignoreversion; Components: Main
- Source: freewb\skin\*.*; DestDir: {app}\skin; Flags: recursesubdirs restartreplace; Components: Main
- Source: freewb\background\*.*; DestDir: {app}\background; Flags: recursesubdirs restartreplace; Components: Main
- Source: freewb\Internet Shortcuts\*.*; DestDir: {app}\Internet Shortcuts; Components: Main
- ;;; 安装程序中用的图标
- Source: freewb\ui_icon\*.*; DestDir: {tmp}; flags: dontcopy
- ;;; ***** 码表 *****
- ;;; ~~~~~~~ 标准码表
- Source: freewb\mb\default\attach.mb; DestDir: {app}\mb\default; Components: Main
- Source: freewb\mb\default\freewb.dat; DestDir: {app}\mb\default; Components: Main
- Source: freewb\mb\default\freewb.mb; DestDir: {app}\mb\default; Components: Main
- Source: freewb\mb\default\freewb.usr; DestDir: {app}\mb\default; Components: Main; Flags: onlyifdoesntexist
- Source: freewb\mb\default\freewbcht.mb; DestDir: {app}\mb\default; Components: Main
- Source: freewb\mb\default\quick.mb; DestDir: {app}\mb\default; Components: Main
- Source: freewb\mb\default\smart.mb; DestDir: {app}\mb\default; Components: Main
- Source: freewb\mb\default\user.ini; DestDir: {app}\mb\default; Components: Main
- ;;; ~~~~~~~ 扩展码表
- #sub AddMbFiles
- Source: freewb\add_mb\{#mbNameArray[i]}\attach.mb; DestDir: {app}\mb\{#mbNameArray[i]}; Components: add_mb\{#mbIDArray[i]}; Flags: skipifsourcedoesntexist
- Source: freewb\add_mb\{#mbNameArray[i]}\freewb.dat; DestDir: {app}\mb\{#mbNameArray[i]}; Components: add_mb\{#mbIDArray[i]}
- Source: freewb\add_mb\{#mbNameArray[i]}\freewb.mb; DestDir: {app}\mb\{#mbNameArray[i]}; Components: add_mb\{#mbIDArray[i]}
- Source: freewb\add_mb\{#mbNameArray[i]}\freewb.usr; DestDir: {app}\mb\{#mbNameArray[i]}; Components: add_mb\{#mbIDArray[i]}; Flags: onlyifdoesntexist
- Source: freewb\add_mb\{#mbNameArray[i]}\freewbcht.mb; DestDir: {app}\mb\{#mbNameArray[i]}; Components: add_mb\{#mbIDArray[i]}; Flags: skipifsourcedoesntexist
- Source: freewb\add_mb\{#mbNameArray[i]}\quick.mb; DestDir: {app}\mb\{#mbNameArray[i]}; Components: add_mb\{#mbIDArray[i]}; Flags: skipifsourcedoesntexist
- Source: freewb\add_mb\{#mbNameArray[i]}\smart.mb; DestDir: {app}\mb\{#mbNameArray[i]}; Components: add_mb\{#mbIDArray[i]}; Flags: skipifsourcedoesntexist
- Source: freewb\add_mb\{#mbNameArray[i]}\user.ini; DestDir: {app}\mb\{#mbNameArray[i]}; Components: add_mb\{#mbIDArray[i]}; Flags: onlyifdoesntexist
- #endsub
- #for {i = 0; i < mbcount; i++} AddMbFiles
- ;;; ***** 拼音词库 *****
- Source: freewb\attach\attach.mb; DestDir: {app}\mb\default; Components: pinyin
- #sub AddPymbFiles
- Source: freewb\attach\attach.mb; DestDir: {app}\mb\{#mbNameArray[i]}; Components: add_mb\{#mbIDArray[i]} and pinyin
- #endsub
- #for {i = 0; i < mbcount; i++} AddPymbFiles
- ;;; ***** 扩充皮肤与背景图 *****
- Source: freewb\add_skin\*.*; DestDir: {app}\skin; Components: add_skin; Flags: recursesubdirs
- Source: freewb\add_background\*.*; DestDir: {app}\background; Components: add_skin; Flags: recursesubdirs
- ;;; ***** dtool *******
- Source: freewb\dtool\dtool.exe; DestDir: {app}\dtool; Flags: restartreplace; Components: dtool
- ;;; ***** diy setup *******
- Source: freewb\diysetup\Jd_DIY_Setup_Wizard.exe; DestDir: {app}; Flags: ignoreversion; Components: diysetup
- ;;; ***** BigPayne’s jdtools *****
- Source: freewb\BigPayne\*.*; DestDir: {app}\BigPayne; Components: BigPayne; Flags: ignoreversion
- ;;; ***** Silence’s imetools *****
- Source: freewb\imetool\*.*; DestDir: {app}\imetool; Components: imetools
- Source: freewb\imetool\imetool.exe; DestDir: {sys}; Components: imetools
- [Icons]
- Name: {group}\极点目录; Filename: {app}
- Name: {group}\极点配置文件; Filename: {app}\freewb.ini
- Name: {group}\卸载{#AppName}; Filename: {uninstallexe}
- Name: {group}\快速入门\极点中文快速入门; Filename: {app}\freewb.htm
- Name: {group}\快速入门\快捷键位表; Filename: {app}\Internet shortcuts\ShortcutKeys.url
- Name: {group}\快速入门\快捷命令表; Filename: {app}\Internet shortcuts\ShortcutCommands.url
- Name: {group}\快速入门\极点常见问题及解答; Filename: {app}\Internet shortcuts\FAQ.url
- Name: {group}\快速入门\极点应用技巧; Filename: {app}\Internet shortcuts\Skill.url
- Name: {group}\快速入门\极点帮助文档; Filename: {app}\freewb.chm
- Name: {group}\链接\访问极点中文主页; Filename: {app}\Internet shortcuts\极点中文主页.url
- Name: {group}\链接\访问五笔爱好者论坛; Filename: {app}\Internet shortcuts\五笔爱好者论坛.url
- Name: {group}\极点工具箱2.2; Filename: {app}\dtool\dtool.exe; Components: dtool
- Name: {group}\输入法调整工具; Filename: {app}\imetool\imetool.exe; WorkingDir: {app}\imetool; Components: imetools
- Name: {group}\极点便携定制向导; Filename: {app}\Jd_DIY_Setup_Wizard.exe; Components: diysetup
- Name: {group}\词库信息统计工具; Filename: {app}\BigPayne\mbInfo.xls; Components: BigPayne
- [InstallDelete]
- Name: {sys}\freewb.ime; Type: files
- [UninstallDelete]
- Name: {app}\Info.ini; Type: files
- Name: {sys}\freewb.ime; Type: files
- Name: {sys}\freewbcode.dll; Type: files
- Name: {app}\Internet shortcuts; Type: filesandordirs
- Name: {app}\background\Thumbs.db; Type: files
- Name: {app}\background; Type: dirifempty
- [Run]
- ;Filename: {app}\registry.exe
- Filename: {app}\imetool\imetool.exe; Workingdir: {app}\imetool; Descri ption: 运行输入法调整工具; Flags: postinstall nowait; Components: imetools
- [UninstallRun]
- Filename: {app}\unInstallIME.exe; Parameters: " /c freewb.ime"; RunOnceId: UnloadKeyboardLayout
- [Types]
- Name: typical; Descri ption: 典型安装
- Name: full; Descri ption: 完全安装
- Name: compact; Descri ption: 最小安装
- Name: custom; Descri ption: 自定义安装; Flags: iscustom
- [Components]
- Name: Main; Descri ption: 主程序文件(含默认五笔86码表及皮肤背景); Flags: fixed; Types: custom compact full typical
- Name: dtool; Descri ption: 极点工具箱2.2; Types: full typical
- Name: diysetup; Descri ption: 极点便携定制向导; Types: full typical
- Name: add_mb; Descri ption: 词库与码表; Types: full
- #sub AddmbComponents
- Name: add_mb\{#mbIDArray[i]}; Descri ption: {#mbNameArray[i]}-{#mbVerArray[i]}({#mbSizeArray[i]}); Types: full
- #endsub
- #for {i = 0; i < mbcount; i++} AddmbComponents
- Name: add_skin; Descri ption: 附加的背景图与皮肤; Types: full typical
- Name: imetools; Descri ption: 输入法调整工具[Silence]; Types: full typical
- Name: pinyin; Descri ption: 22万词条拼音词库; Types: full
- Name: BigPayne; Descri ption: 词库信息统计工具[BigPayne]; Types: full
- [Languages]
- Name: Simplified_Chinese; MessagesFile: Simple Chinese.isl
- [Tasks]
- Name: SetDefaultMB; Descri ption: 指定默认码表与词库,如果不指定默认码表及词库将使用极点默认码表; Components: add_mb; Flags: unchecked
- #sub AddMbTasks ; 此处借用码表文件夹名作为Task名
- Name: SetDefaultMB\{#mbIDArray[i]}; Descri ption: {#mbNameArray[i]}-{#mbVerArray[i]}({#mbSizeArray[i]}); Components: add_mb\{#mbIDArray[i]}; Flags: unchecked exclusive
- #endsub
- ; 循环加入任务
- #for {i = 0; i < mbcount; i++} AddMbTasks
- [Messages]
- WelcomeLabel2=本程序将安装 [name/ver] 到您的计算机中。%n%n强烈建议您在继续安装之前关闭其他所有正在运行的程序,以避免安装过程中可能产生的相互冲突。%n%n★ 安装包版本: {#SetupPackType} {#SetupPackVersion}%n★ {#AppShortName}版本: {#ReleaseType} {#MajorVersion}{#DateVersion}
- BeveledLabel={#AppShortName}{#SetupPackType}
- FinishedRestartLabel=由于原来版本的部分 [name] 核心文件正在使用中,需要重启计算机才能完成更新。要最后完成 [name] 的安装,必须重新启动计算机。%n%n是否立即重新启动?
- FinishedRestartMessage=由于原来版本的部分 [name] 核心文件正在使用中,需要重启计算机才能完成更新。要最后完成 [name] 的安装,必须重新启动计算机。%n%n是否立即重新启动?
- AboutSetupNote={#AppName} 主页: http://www.freewb.net/%n五笔爱好者 主页: http://www.wbfans.com/ %n%n秋枫@[五笔爱好者]: arcqiufeng@hotmail.com
- [Registry]
- Root: HKLM; Subkey: SOFTWARE\极点中文; ValueType: string; ValueName: 系统目录; ValueData: {app}\; Flags: uninsdeletekeyifempty uninsdeletevalue
- [code]
- const
- DI_NORMAL = 3;
- var
- InstalledWarningPage, RunningWarningPage: TWizardPage;
- InstalledCheckBox, RunningCheckBox: TCheckBox;
- function ImmInstallIME(lpszIMEFileName, lpszLayoutText: String): LongInt;
- external ’ImmInstallIMEA@imm32.dll stdcall’;
- function GetModuleHandle(lpModuleName: LongInt): LongInt;
- external ’GetModuleHandleA@kernel32.dll stdcall’;
- function ExtractIcon(hInst: LongInt; lpszExeFileName: PChar; nIconIndex: LongInt): LongInt;
- external ’ExtractIconA@shell32.dll stdcall’;
- function DrawIconEx(hdc: LongInt; xLeft, yTop: Integer; hIcon: LongInt; cxWidth, cyWidth: Integer; istepIfAniCur: LongInt; hbrFlickerFreeDraw, diFlags: LongInt): LongInt;
- external ’DrawIconEx@user32.dll stdcall’;
- function DestroyIcon(hIcon: LongInt): LongInt;
- external ’DestroyIcon@user32.dll stdcall’;
- procedure CurPageChanged(CurPageID: Integer);
- var i: LongInt;
- begin
- if (CurPageID = InstalledWarningPage.ID) then
- WizardForm.NextButton.Enabled := InstalledCheckBox.Checked;
- if (CurPageID = RunningWarningPage.ID) then
- WizardForm.NextButton.Enabled := RunningCheckBox.Checked;
- if (CurPageID = wpFinished) then
- begin
- // 注册输入法
- // ------------------------------------------
- if usingWinNT then
- i:=ImmInstallIME(expandConstant(’{sys}\freewb.ime’),’中文 (简体) - 极点中文’)
- else
- i:=ImmInstallIME(expandConstant(’{sys}\freewb.ime’),’极点中文’);
- if i<>0 then
- // SetIniInt(’General’, ’KeyboardLayout’, i, ExpandConstant(’{app}\Info.ini’))
- else
- MsgBox(’输入法加载失败’, mbCriticalError, mb_Ok);
- end;
- end;
- procedure CurStepChanged(CurStep: TSetupStep);
- begin
- if CurStep = ssDone then
- begin
- // 设置默认码表
- // -------------------------------------------
- #sub SetDefaultMB
- if IsTaskSelected(’SetDefaultMB\{#mbIDArray[i]}’) then
- SetIniString(’系统设置’, ’当前输入方案’, ’{#mbNameArray[i]}’, ExpandConstant(’{app}\freewb.ini’));
- #endsub
- #for {i = 0; i < mbcount; i++} SetDefaultMB
- // 创建快捷方式
- // --------------------------------------------
- // 快捷键位表; Filename: {app}\Internet shortcuts\ShortcutKeys.url
- SetIniString(’InternetShortcut’, ’url’,
- ExpandConstant(’mk:@MSITStore:{app}\freewb.chm::/6_1_shortcut.htm’),
- ExpandConstant(’{app}\Internet shortcuts\ShortcutKeys.url’));
- // 快捷命令表; Filename: {app}\Internet shortcuts\ShortcutCommands.url
- SetIniString(’InternetShortcut’, ’url’,
- ExpandConstant(’mk:@MSITStore:{app}\freewb.chm::/6_3_command.htm’),
- ExpandConstant(’{app}\Internet shortcuts\ShortcutCommands.url’));
- // FAQ
- SetIniString(’InternetShortcut’, ’url’,
- ExpandConstant(’mk:@MSITStore:{app}\FREEWB.CHM::/7_1_introduction.htm’),
- ExpandConstant(’{app}\Internet shortcuts\FAQ.url’));
- // 极点应用技巧; Filename: {app}\Internet shortcuts\Skill.url
- SetIniString(’InternetShortcut’, ’url’,
- ExpandConstant(’mk:@MSITStore:{app}\freewb.chm::/0_1_skill.htm’),
- ExpandConstant(’{app}\Internet shortcuts\Skill.url’));
- end; //end if ssDone
- end;
- function FreewbAlreadyInstalled: boolean;
- begin
- result := RegValueExists(HKLM, ’Software\极点中文’, ’系统目录’);
- end;
- #ifndef hasMutex
- // 4.0(2004.2.27)公测版及其以前的极点内核代码
- function FreewbUsing: boolean;
- var FreewbName, TempFileName: string;
- begin
- result := false;
- TempFileName := ExpandConstant(’{sys}\freewb_tempRenamed.ime.tmp’);
- FreewbName := ExpandConstant(’{sys}\freewb.ime’);
- if fileexists(FreewbName) then
- begin
- FileCopy(FreewbName, TempFileName, false); // make a backup copy of freewb.ime
- if DeleteFile(FreewbName) then
- RenameFile(TempFileName, FreewbName) // revert to origin name
- else
- begin
- DeleteFile(TempFileName);
- result := true;
- end;
- end;
- result := result or (0 <> FindWindowByClassName(’JDCLASS_UI’)); //双保险.
- end;
- #endif
- #ifdef hasMutex
- // 4.0B2 (2004.3.2)内测版及以后的极点内核代码
- function FreewbUsing(): boolean;
- begin
- result := CheckForMutexes(’mutex_freeime,Global\mutex_freeime’) // For Freewb4.0b2 and later.
- or (0 <> FindWindowByClassName(’JDCLASS_UI’)); //This line is for old version compatible reason.
- end;
- #endif
- function CreateCustomOptionPage(AAfterId: Integer; ACaption, ASubCaption, AIconFileName, ALabel1Caption, ALabel2Caption,
- ACheckCaption: String; var CheckBox: TCheckBox): TWizardPage;
- var
- Page: TWizardPage;
- Rect: TRect;
- hIcon: LongInt;
- Label1, Label2: TNewStaticText;
- begin
- Page := CreateCustomPage(AAfterID, ACaption, ASubCaption);
- AIconFileName := ExpandConstant(’{tmp}\’ + AIconFileName);
- if not FileExists(AIconFileName) then
- ExtractTemporaryFile(ExtractFileName(AIconFileName));
- Rect.Left := 0;
- Rect.Top := 0;
- Rect.Right := 32;
- Rect.Bottom := 32;
- hIcon := ExtractIcon(GetModuleHandle(0), AIconFileName, 0);
- try
- with TBitmapImage.Create(Page) do begin
- with Bitmap do begin
- Width := 32;
- Height := 32;
- Canvas.Brush.Color := WizardForm.Color;
- Canvas.FillRect(Rect);
- DrawIconEx(Canvas.Handle, 0, 0, hIcon, 32, 32, 0, 0, DI_NORMAL);
- end;
- Parent := Page.Surface;
- end;
- finally
- DestroyIcon(hIcon);
- end;
- Label1 := TNewStaticText.Create(Page);
- with Label1 do begin
- AutoSize := False;
- Left := WizardForm.SelectDirLabel.Left;
- Width := Page.SurfaceWidth - Left;
- WordWrap := True;
- Caption := ALabel1Caption;
- Parent := Page.Surface;
- end;
- WizardForm.AdjustLabelHeight(Label1);
- Label2 := TNewStaticText.Create(Page);
- with Label2 do begin
- Top := Label1.Top + Label1.Height + ScaleY(12);
- Caption := ALabel2Caption;
- Parent := Page.Surface;
- end;
- WizardForm.AdjustLabelHeight(Label2);
- CheckBox := TCheckBox.Create(Page);
- with CheckBox do begin
- Top := Label2.Top + Label2.Height + ScaleY(12);
- Width := Page.SurfaceWidth;
- Caption := ACheckCaption;
- Parent := Page.Surface;
- end;
- Result := Page;
- end;
- procedure CreateCustomPages;
- var
- Caption, SubCaption1, IconFileName, Label1Caption, Label2Caption, CheckCaption: String;
- begin
- //极点已经安装
- Caption := ’提示’;
- SubCaption1 := ’系统中已经安装有{#AppName}’;
- IconFileName := ’info.ico’;
- Label1Caption :=
- ’您的系统中已经安装有{#AppName}。’#13#10#13#10 +
- ’尽管安装程序将尽量保存你的原来的设置,但仍然建议您备份好自己的词库,安装新版本之前最好先卸载原来的版本。’ ;
- Label2Caption := ’请选择是否继续安装。选择[下一步]继续安装,或[取消]退出安装程序。’;
- CheckCaption := ’继续安装’;
- InstalledWarningPage := CreateCustomOptionPage(wpWelcome, Caption, SubCaption1, IconFileName, Label1Caption, Label2Caption, CheckCaption, InstalledCheckBox);
- //极点正在运行
- Caption := ’警告’;
- SubCaption1 := ’旧版的{#AppName}正在使用中’;
- IconFileName := ’confirm.ico’;
- Label1Caption :=
- ’您的系统中已经安装有{#AppName}并且正在使用中。’#13#10#13#10 +
- ’尽管安装程序将尽量保存你的原来的设置,但仍然建议您备份好自己的词库,安装新版本之前最好先卸载原来的版本。’#13#10#13#10 +
- ’如果您要强制覆盖安装,建议您关闭所有正在使用{#AppName}的程序。否则安装完后将需要重启计算机。’;
- Label2Caption := ’请选择是否强制安装。选择[下一步]继续安装,或[取消]退出安装程序。’;
- CheckCaption := ’强制覆盖安装,安装完后重启计算机’;
- RunningWarningPage := CreateCustomOptionPage(InstalledWarningPage.ID, Caption, SubCaption1, IconFileName, Label1Caption, Label2Caption, CheckCaption, RunningCheckBox);
- end;
- procedure RunningCheckBoxOnClick(Sender: TObject);
- begin
- WizardForm.NextButton.Enabled := RunningCheckBox.Checked;
- end;
- procedure InstalledCheckBoxOnClick(Sender: TObject);
- begin
- WizardForm.NextButton.Enabled := InstalledCheckBox.Checked;
- end;
- procedure InitializeWizard();
- begin
- CreateCustomPages;
- InstalledCheckBox.Checked := true;
- RunningCheckBox.Checked := false;
- InstalledCheckBox.OnClick := @InstalledCheckBoxOnClick;
- RunningCheckBox.OnClick := @RunningCheckBoxOnClick;
- // 默认按钮:我同意
- // WizardForm.LICENSEACCEPTEDRADIO.Checked := true;
- // 更新 ReaMe 日期信息
- WizardForm.InfoBeforeMemo.Lines.Insert(0, ’秋枫 <arcqiufeng@163.com> {#LastUpdate}’);
- WizardForm.InfoBeforeMemo.Lines.Insert(0, ’******************************************’);
- WizardForm.InfoBeforeMemo.Lines.Insert(0, ’安装包信息及历史更新’);
- end;
- function ShouldSkipPage(PageID: Integer): Boolean;
- begin
- Result := false;
- if (PageID = InstalledWarningPage.ID) then //已经安装警告页跳过的情况:极点没有安装 或 极点正在使用(用另一个警告页)
- begin
- Result := (not FreewbAlreadyInstalled)
- or FreewbUsing;
- end;
- if (PageID = RunningWarningPage.ID) then //正在使用警告页跳过的情况:极点没有安装 或 极点装了但没有在用(只需显示已经安装警告框就行)
- begin
- Result := (not FreewbAlreadyInstalled)
- or (FreewbAlreadyInstalled and (not FreewbUsing));
- end;
- end;
- function InitializeSetup(): Boolean;
- var
- SplashImage : TBitmapImage;
- SplashForm : TForm;
- SplashFileName : String;
- Splash_x : integer;
- Splash_y : integer;
- Splash_t : double;
- begin
- // -------------------------
- // Create Start Splash
- // -------------------------
- Splash_x := 450;
- Splash_y := 200;
- Splash_t := 3; // in seconds
- SplashFileName := ExpandConstant(’{tmp}\splash.bmp’);
- ExtractTemporaryFile(’Splash.bmp’);
- SplashForm := TForm.create(nil);
- with SplashForm do
- begin
- BorderStyle := bsNone;
- Position := poScreenCenter;
- ClientWidth := Splash_x;
- ClientHeight := Splash_y;
- end;
- SplashImage := TBitmapImage.Create(SplashForm);
- with SplashImage do
- begin
- Bitmap.LoadFromFile(SplashFileName);
- Stretch := true;
- Align := alClient;
- Parent := SplashForm;
- end;
- with SplashForm do
- begin
- Show;
- Repaint;
- Sleep(round(Splash_t*1000));
- Close;
- Free;
- end;
- // ------- end splash ----------------
- result := true;
- end;
复制代码
|