This commit is contained in:
2023-11-13 20:31:14 +08:00
parent 570ac0c6b3
commit 6bf602b361
77 changed files with 2196 additions and 0 deletions

181
InnoSetupBeauty02/Main.iss Normal file
View File

@@ -0,0 +1,181 @@
;指定是否为64位安装程序
;#define x64Build
;指定是否只能在 Windows 7 SP1 及更新版本的操作系统上安装
;#define Windows7SP1AndNewer
;指定是否要注册相关后缀名
;#define RegisteAssociations
;指定是否为绿色版安装程序(仅释放文件,不写入注册表条目,也不生成卸载程序)
;#define PortableBuild
;是否安装前调用旧版本的卸载程序卸载(如果有的话)
;#define UninstallBefore
;指定是否只能安装新版本,而不能用旧版本覆盖新版本
;#define OnlyInstallNewVersion
;是否启用界面圆角
;#define EnableRoundRect
;是否启用圆角数值(越大越圆)
#define RoundRectData 8
#ifdef x64Build ;64位的
#define MyAppID "{D388FE9E-1F93-BFFA-CC14-AD638CC123BA}"
#else ;32位的(推荐)
#define MyAppID "{2895C600-B509-4A85-BB2F-EB88CBD75974}"
#endif
#define MyAppName "控制台"
#define MyAppExeName "cmd.exe"
#define MyAppMutex MyAppName
#define MyAppDir "cmd_test"
;若想开启禁止安装旧版本的功能,此处版本号请注意一定要是
;点分十进制的正整数,除数字和英文半角句点以外不允许出现任何其他字符,
;否则程序无法判断版本的高低。
#define MyAppVersion "1.0.0"
#define MyAppPublisher "码客说"
#define MyAppPublisherURL "http://www.psvmc.cn/"
#define MyAppSupportURL MyAppPublisherURL
#define MyAppUpdatesURL MyAppPublisherURL
#define MyAppComments MyAppName
#define MyAppContact MyAppPublisher
#define MyAppSupportPhone ""
#define MyAppReadmeURL "http://www.psvmc.cn/"
#define MyAppLicenseURL "http://www.psvmc.cn/"
#define MyAppCopyrightYear "2021"
#define MyAppCopyright "版权所有 © " + MyAppCopyrightYear + ", " + MyAppPublisher
#define IconFile ".\Setup.ico"
[Setup]
AppId={{#MyAppID}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppPublisherURL}
AppSupportURL={#MyAppSupportURL}
AppUpdatesURL={#MyAppUpdatesURL}
AppComments={#MyAppComments}
AppContact={#MyAppContact}
AppSupportPhone={#MyAppSupportPhone}
AppReadmeFile={#MyAppReadmeURL}
AppCopyright={#MyAppCopyright}
DefaultGroupName={#MyAppPublisher}\{#MyAppName}
VersionInfoDescription={#MyAppName} 安装程序
VersionInfoProductName={#MyAppName}
VersionInfoCompany={#MyAppPublisher}
VersionInfoCopyright={#MyAppCopyright}
VersionInfoProductVersion={#MyAppVersion}
VersionInfoProductTextVersion={#MyAppVersion}
VersionInfoTextVersion={#MyAppVersion}
VersionInfoVersion={#MyAppVersion}
OutputDir=.\Output\
SetupIconFile= {#IconFile}
Compression=lzma2/ultra64
InternalCompressLevel=ultra64
SolidCompression=yes
DisableProgramGroupPage=yes
DisableDirPage=yes
DisableReadyMemo=yes
DisableReadyPage=yes
TimeStampsInUTC=yes
SetupMutex={{#MyAppID}Installer,Global\{{#MyAppID}Installer
AppMutex={#MyAppMutex}
ShowLanguageDialog=no
AllowCancelDuringInstall=no
#ifdef x64Build
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
;64位版本的默认安装位置
DefaultDirName={autopf}\{#MyAppDir}
#else
ArchitecturesAllowed=x86 x64
;32位版本的默认安装位置
DefaultDirName={autopf}\{#MyAppDir}
#endif
#ifdef Windows7SP1AndNewer
MinVersion=0,6.1.7601
#else
MinVersion=0,6.0.2600
#endif
#ifdef RegisteAssociations
ChangesAssociations=yes
#else
ChangesAssociations=no
#endif
#ifdef PortableBuild
Uninstallable=no
PrivilegesRequired=lowest
OutputBaseFilename={#MyAppName}_{#MyAppVersion}_Portable
#else
Uninstallable=yes
PrivilegesRequired=admin
OutputBaseFilename={#MyAppName}_{#MyAppVersion}
UninstallDisplayName={#MyAppName}
UninstallDisplayIcon={uninstallexe},0
UninstallFilesDir={app}
#endif
[Languages]
;安装语言为简体中文,还需要其他语言请在此区段添加
Name: "zh_CN"; MessagesFile: ".\lang\ChineseSimplified.isl"
[Files]
;包含项目文件app目录下的全部文件
Source: ".\app\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
;包含所有临时资源文件(勿删)
Source: ".\tmp\*"; DestDir: "{tmp}"; Flags: dontcopy solidbreak nocompression; Attribs: hidden system
#ifndef PortableBuild
[Dirs]
;创建一个隐藏的系统文件夹存放卸载程序
;Name: "{app}\Uninstaller"; Attribs: hidden system
#endif
;若有写入INI条目的需要请取消此区段的注释并自行添加相关脚本
;[INI]
;Filename: "{app}\MyProg.ini"; Section: "InstallSettings"; Key: "InstallPath"; String: "{app}"; Flags: uninsdeleteentry
;若有写入注册表条目的需要,请取消此区段的注释并自行添加相关脚本
;[Registry]
;Root: HKCU; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
;Root: HKCU; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
;Root: HKLM; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
;Root: HKLM; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
;Root: HKLM; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"
;Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\jre-x64\bin"; \
Check: NeedsAddPath('{app}\jre-x64\bin')
;创建快捷方式
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename:"{app}\icon.ico"
;安装前删除原目录的内容
;[installDelete]
;Type: filesandordirs; Name:"{app}";
;安装完执行的任务
[Run]
;启动主程序,如不需要请注释
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
#ifdef RegisteAssociations
[UninstallRun]
;卸载时运行反注册程序
Filename: "{app}\{#MyAppExeName}"; Parameters: "--uninstall"; WorkingDir: "{app}"; Flags: waituntilterminated skipifdoesntexist
#endif
#ifndef PortableBuild
[UninstallDelete]
;卸载时删除安装目录下的所有文件及文件夹
;Type: filesandordirs; Name: "{app}"
#endif
[Code]
//引入脚本区段
#include ".\include\Code.iss"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
InnoSetupBeauty02/Setup.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

View File

@@ -0,0 +1,798 @@
//为了方便管理,就将[Code]区段单独拿出来了
//引入botva2的函数声明
#include ".\botva2.iss"
[Code]
CONST
PRODUCT_REGISTRY_KEY_32 = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppID}_is1';
PRODUCT_REGISTRY_KEY_64 = 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppID}_is1';
WM_SYSCOMMAND = $0112;
ID_BUTTON_ON_CLICK_EVENT = 1;
WIZARDFORM_WIDTH_NORMAL = 600;
WIZARDFORM_HEIGHT_NORMAL = 400;
WIZARDFORM_HEIGHT_MORE = 470;
VAR
label_wizardform_main, label_messagebox_main, label_wizardform_more_product_already_installed, label_messagebox_information, label_messagebox_title, label_wizardform_title, label_install_progress : TLabel;
image_wizardform_background, image_messagebox_background, image_progressbar_background, image_progressbar_foreground, PBOldProc : LONGINT;
button_license, button_minimize, button_close, button_browse, button_setup_or_next, button_customize_setup, button_uncustomize_setup, checkbox_license, checkbox_setdefault, button_messagebox_close, button_messagebox_ok, button_messagebox_cancel : HWND;
isFirst, is_wizardform_show_normal, is_installer_initialized, is_platform_windows_7, is_wizardform_released, can_exit_setup, need_to_change_associations : BOOLEAN;
edit_target_path : TEdit;
version_installed_before : STRING;
messagebox_close : TSetupForm;
//调用这个函数可以使矩形窗口转变为圆角矩形窗口
PROCEDURE shape_form_round(aForm : TForm; edgeSize : INTEGER);
VAR
FormRegion : LONGWORD;
BEGIN
FormRegion := CreateRoundRectRgn(0, 0, aForm.Width, aForm.Height, edgeSize, edgeSize);
SetWindowRgn(aForm.Handle, FormRegion, TRUE);
END;
//这个函数的作用是判断是否已经安装了将要安装的产品若已经安装则返回TRUE否则返回FALSE
FUNCTION is_installed_before() : BOOLEAN;
BEGIN
#ifndef x64Build
IF is_platform_windows_7 THEN
BEGIN
IF IsWin64 THEN
BEGIN
IF RegKeyExists(HKEY_LOCAL_MACHINE, PRODUCT_REGISTRY_KEY_64) THEN
BEGIN
RegQueryStringValue(HKEY_LOCAL_MACHINE, PRODUCT_REGISTRY_KEY_64, 'DisplayVersion', version_installed_before);
Result := TRUE;
END ELSE
BEGIN
version_installed_before := '0.0.0';
Result := FALSE;
END;
END ELSE
BEGIN
IF RegKeyExists(HKEY_LOCAL_MACHINE, PRODUCT_REGISTRY_KEY_32) THEN
BEGIN
RegQueryStringValue(HKEY_LOCAL_MACHINE, PRODUCT_REGISTRY_KEY_32, 'DisplayVersion', version_installed_before);
Result := TRUE;
END ELSE
BEGIN
version_installed_before := '0.0.0';
Result := FALSE;
END;
END;
END ELSE
BEGIN
IF RegKeyExists(HKEY_LOCAL_MACHINE, PRODUCT_REGISTRY_KEY_32) THEN
BEGIN
RegQueryStringValue(HKEY_LOCAL_MACHINE, PRODUCT_REGISTRY_KEY_32, 'DisplayVersion', version_installed_before);
Result := TRUE;
END ELSE
BEGIN
version_installed_before := '0.0.0';
Result := FALSE;
END;
END;
#else
IF RegKeyExists(HKEY_LOCAL_MACHINE, PRODUCT_REGISTRY_KEY_32) THEN
BEGIN
RegQueryStringValue(HKEY_LOCAL_MACHINE, PRODUCT_REGISTRY_KEY_32, 'DisplayVersion', version_installed_before);
Result := TRUE;
END ELSE
BEGIN
version_installed_before := '0.0.0';
Result := FALSE;
END;
#endif
END;
//这个函数的作用是判断是否正在安装旧版本若系统中已经安装了将要安装的产品是则返回TRUE否则返回FALSE
FUNCTION is_installing_older_version() : BOOLEAN;
VAR
installedVer : ARRAY[1..10] OF LONGINT;
installingVer : ARRAY[1..10] OF LONGINT;
oldVer, nowVer, version_installing_now : STRING;
i, oldTotal, nowTotal, total : INTEGER;
BEGIN
oldTotal := 1;
WHILE (Pos('.', version_installed_before) > 0) DO
BEGIN
oldVer := version_installed_before;
Delete(oldVer, Pos('.', oldVer), ((Length(oldVer) - Pos('.', oldVer)) + 1));
installedVer[oldTotal] := StrToIntDef(oldVer, 0);
oldTotal := oldTotal + 1;
version_installed_before := Copy(version_installed_before, (Pos('.', version_installed_before) + 1), (Length(version_installed_before) - Pos('.', version_installed_before)));
END;
IF (version_installed_before <> '') THEN
BEGIN
installedVer[oldTotal] := StrToIntDef(version_installed_before, 0);
END ELSE
BEGIN
oldTotal := oldTotal - 1;
END;
version_installing_now := '{#MyAppVersion}';
nowTotal := 1;
WHILE (Pos('.', version_installing_now) > 0) DO
BEGIN
nowVer := version_installing_now;
Delete(nowVer, Pos('.', nowVer), ((Length(nowVer) - Pos('.', nowVer)) + 1));
installingVer[nowTotal] := StrToIntDef(nowVer, 0);
nowTotal := nowTotal + 1;
version_installing_now := Copy(version_installing_now, (Pos('.', version_installing_now) + 1), (Length(version_installing_now) - Pos('.', version_installing_now)));
END;
IF (version_installing_now <> '') THEN
BEGIN
installingVer[nowTotal] := StrToIntDef(version_installing_now, 0);
END ELSE
BEGIN
nowTotal := nowTotal - 1;
END;
IF (oldTotal < nowTotal) THEN
BEGIN
FOR i := (oldTotal + 1) TO nowTotal DO
BEGIN
installedVer[i] := 0;
total := nowTotal;
END;
END ELSE IF (oldTotal > nowTotal) THEN
BEGIN
FOR i := (nowTotal + 1) TO oldTotal DO
BEGIN
installingVer[i] := 0;
total := oldTotal;
END;
END ELSE
BEGIN
total := nowTotal;
END;
FOR i := 1 TO total DO
BEGIN
IF (installedVer[i] > installingVer[i]) THEN
BEGIN
Result := TRUE;
Exit;
END ELSE IF (installedVer[i] < installingVer[i]) THEN
BEGIN
Result := FALSE;
Exit;
END ELSE
BEGIN
Continue;
END;
END;
Result := FALSE;
END;
//主界面关闭按钮按下时执行的脚本
PROCEDURE button_close_on_click(hBtn : HWND);
BEGIN
WizardForm.CancelButton.OnClick(WizardForm);
END;
//主界面最小化按钮按下时执行的脚本
PROCEDURE button_minimize_on_click(hBtn : HWND);
BEGIN
SendMessage(WizardForm.Handle, WM_SYSCOMMAND, 61472, 0);
END;
//主界面自定义安装按钮按下时执行的脚本
PROCEDURE button_customize_setup_on_click(hBtn : HWND);
BEGIN
IF is_wizardform_show_normal THEN
BEGIN
WizardForm.Height := WIZARDFORM_HEIGHT_MORE;
image_wizardform_background := ImgLoad(WizardForm.Handle, ExpandConstant('{tmp}\background_welcome_more.png'), 0, 0, WIZARDFORM_WIDTH_NORMAL, WIZARDFORM_HEIGHT_MORE, FALSE, TRUE);
#ifdef EnableRoundRect
shape_form_round(WizardForm,{#RoundRectData});
#endif
edit_target_path.Show();
edit_target_path.ReadOnly := TRUE;
BtnSetVisibility(button_browse, TRUE);
#ifdef RegisteAssociations
BtnSetVisibility(checkbox_setdefault, TRUE);
#endif
BtnSetVisibility(button_customize_setup, FALSE);
BtnSetVisibility(button_uncustomize_setup, TRUE);
#ifndef PortableBuild
//IF is_installed_before() THEN
//BEGIN
// edit_target_path.Enabled := FALSE;
// BtnSetEnabled(button_browse, FALSE);
//label_wizardform_more_product_already_installed.Show()
//END;
#endif
is_wizardform_show_normal := FALSE;
END ELSE
BEGIN
edit_target_path.Hide();
//label_wizardform_more_product_already_installed.Hide();
BtnSetVisibility(button_browse, FALSE);
#ifdef RegisteAssociations
BtnSetVisibility(checkbox_setdefault, FALSE);
#endif
WizardForm.Height := WIZARDFORM_HEIGHT_NORMAL;
image_wizardform_background := ImgLoad(WizardForm.Handle, ExpandConstant('{tmp}\background_welcome.png'), 0, 0, WIZARDFORM_WIDTH_NORMAL, WIZARDFORM_HEIGHT_NORMAL, FALSE, TRUE);
#ifdef EnableRoundRect
shape_form_round(WizardForm,{#RoundRectData});
#endif
BtnSetVisibility(button_customize_setup, TRUE);
BtnSetVisibility(button_uncustomize_setup, FALSE);
is_wizardform_show_normal := TRUE;
END;
ImgApplyChanges(WizardForm.Handle);
END;
//主界面浏览按钮按下时执行的脚本
PROCEDURE button_browse_on_click(hBtn : HWND);
BEGIN
WizardForm.DirBrowseButton.OnClick(WizardForm);
edit_target_path.Text := WizardForm.DirEdit.Text;
END;
//路径输入框文本变化时执行的脚本
PROCEDURE edit_target_path_on_change(Sender : TObject);
BEGIN
WizardForm.DirEdit.Text := edit_target_path.Text;
END;
//同意许可协议的复选框被点击时执行的脚本
PROCEDURE checkbox_license_on_click(hBtn : HWND);
BEGIN
IF BtnGetChecked(checkbox_license) THEN
BEGIN
BtnSetEnabled(button_setup_or_next, TRUE);
END ELSE
BEGIN
BtnSetEnabled(button_setup_or_next, FALSE);
END;
END;
//设为默认软件的复选框被点击时执行的脚本
PROCEDURE checkbox_setdefault_on_click(hBtn : HWND);
BEGIN
IF BtnGetChecked(checkbox_setdefault) THEN
BEGIN
need_to_change_associations := TRUE;
END ELSE
BEGIN
need_to_change_associations := FALSE;
END;
END;
//返回设为默认软件复选框的状态已勾选则返回TRUE否则返回FALSE
FUNCTION is_setdefault_checkbox_checked() : BOOLEAN;
BEGIN
Result := need_to_change_associations;
END;
//若设为默认软件的复选框被勾选,则会在文件复制结束时执行此段脚本
PROCEDURE check_if_need_change_associations();
BEGIN
IF is_setdefault_checkbox_checked() THEN
BEGIN
//TODO
//MsgBox('此处执行注册文件后缀名的操作。', mbInformation, MB_OK);
END;
END;
//主界面安装按钮按下时执行的脚本
PROCEDURE button_setup_or_next_on_click(hBtn : HWND);
var
ResultStr: String;
ResultCode: Integer;
BEGIN
#ifdef UninstallBefore
if isFirst then
begin
if RegQueryStringValue(HKLM, PRODUCT_REGISTRY_KEY_64, 'UninstallString', ResultStr) then
begin
ResultStr := RemoveQuotes(ResultStr);
Exec(ResultStr, '/SILENT', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
end;
end;
isFirst := FALSE;
#endif
WizardForm.NextButton.OnClick(WizardForm);
END;
//复制文件时执行的脚本每复制1%都会被调用一次,若要调整进度条或进度提示请在此段修改
FUNCTION PBProc(h : hWnd; Msg, wParam, lParam : LONGINT) : LONGINT;
VAR
pr, i1, i2 : EXTENDED;
w : INTEGER;
BEGIN
Result := CallWindowProc(PBOldProc, h, Msg, wParam, lParam);
IF ((Msg = $402) AND (WizardForm.ProgressGauge.Position > WizardForm.ProgressGauge.Min)) THEN
BEGIN
i1 := WizardForm.ProgressGauge.Position - WizardForm.ProgressGauge.Min;
i2 := WizardForm.ProgressGauge.Max - WizardForm.ProgressGauge.Min;
pr := (i1 * 100) / i2;
label_install_progress.Caption := Format('%d', [Round(pr)]) + '%';
w := Round((560 * pr) / 100);
ImgSetPosition(image_progressbar_foreground, 20, 374, w, 6);
ImgSetVisiblePart(image_progressbar_foreground, 0, 0, w, 6);
ImgApplyChanges(WizardForm.Handle);
#ifdef EnableRoundRect
shape_form_round(WizardForm,{#RoundRectData});
#endif
END;
END;
//阅读许可协议的按钮按下时执行的脚本
PROCEDURE button_license_on_click(hBtn : HWND);
VAR
ErrorCode : INTEGER;
BEGIN
ShellExec('', '{#MyAppLicenseURL}', '', '', SW_SHOW, ewNoWait, ErrorCode);
END;
//取消安装弹框的确定按钮按下时执行的脚本
PROCEDURE button_messagebox_ok_on_click(hBtn : HWND);
BEGIN
can_exit_setup := TRUE;
messagebox_close.Close();
END;
//取消安装弹框的取消按钮按下时执行的脚本
PROCEDURE button_messagebox_cancel_on_click(hBtn : HWND);
BEGIN
can_exit_setup := FALSE;
messagebox_close.Close();
END;
//主界面被点住就随鼠标移动的脚本
PROCEDURE wizardform_on_mouse_down(Sender : TObject; Button : TMouseButton; Shift : TShiftState; X, Y : INTEGER);
BEGIN
ReleaseCapture();
SendMessage(WizardForm.Handle, WM_SYSCOMMAND, $F012, 0);
END;
//取消弹框被点住就随鼠标移动的脚本
PROCEDURE messagebox_on_mouse_down(Sender : TObject; Button : TMouseButton; Shift : TShiftState; X, Y : INTEGER);
BEGIN
ReleaseCapture();
SendMessage(messagebox_close.Handle, WM_SYSCOMMAND, $F012, 0);
END;
//判断系统是否为Win7是则返回TRUE否则返回FALSE
PROCEDURE determine_wether_is_windows_7_or_not();
VAR
sysVersion : TWindowsVersion;
BEGIN
GetWindowsVersionEx(sysVersion);
IF sysVersion.NTPlatform AND (sysVersion.Major = 6) AND (sysVersion.Minor = 1) THEN
BEGIN
is_platform_windows_7 := TRUE;
END ELSE
BEGIN
is_platform_windows_7 := FALSE;
END;
END;
//创建取消弹框的脚本
PROCEDURE messagebox_close_create();
BEGIN
messagebox_close := CreateCustomForm();
WITH messagebox_close DO
BEGIN
BorderStyle := bsNone;
Width := 380;
Height := 190;
Color := clWhite;
Caption := '';
END;
label_messagebox_title := TLabel.Create(messagebox_close);
WITH label_messagebox_title DO
BEGIN
Parent := messagebox_close;
AutoSize := FALSE;
Left := 30;
Top := 5;
Width := 400;
Height := 20;
Font.Name := 'Microsoft YaHei';
Font.Size := 10;
Font.Color := clWhite;
Caption := '{#MyAppName} 安装';
Transparent := TRUE;
OnMouseDown := @messagebox_on_mouse_down;
END;
label_messagebox_information := TLabel.Create(messagebox_close);
WITH label_messagebox_information DO
BEGIN
Parent := messagebox_close;
AutoSize := FALSE;
Left := 70;
Top := 64;
Width := 400;
Height := 20;
Font.Name := 'Microsoft YaHei';
Font.Size := 10;
Font.Color := clBlack;
Caption := '您确定要退出“{#MyAppName}”安装程序?';
Transparent := TRUE;
OnMouseDown := @messagebox_on_mouse_down;
END;
label_messagebox_main := TLabel.Create(messagebox_close);
WITH label_messagebox_main DO
BEGIN
Parent := messagebox_close;
AutoSize := FALSE;
Left := 0;
Top := 0;
Width := messagebox_close.Width;
Height := messagebox_close.Height;
Caption := '';
Transparent := TRUE;
OnMouseDown := @messagebox_on_mouse_down;
END;
image_messagebox_background := ImgLoad(messagebox_close.Handle, ExpandConstant('{tmp}\background_messagebox.png'), 0, 0, 380, 190, FALSE, TRUE);
button_messagebox_close := BtnCreate(messagebox_close.Handle, 350, 0, 30, 30, ExpandConstant('{tmp}\button_close.png'), 0, FALSE);
BtnSetEvent(button_messagebox_close, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@button_messagebox_cancel_on_click, 1));
button_messagebox_ok := BtnCreate(messagebox_close.Handle, 206, 150, 76, 28, ExpandConstant('{tmp}\button_ok.png'), 0, FALSE);
BtnSetEvent(button_messagebox_ok, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@button_messagebox_ok_on_click, 1));
button_messagebox_cancel := BtnCreate(messagebox_close.Handle, 293, 150, 76, 28, ExpandConstant('{tmp}\button_cancel.png'), 0, FALSE);
BtnSetEvent(button_messagebox_cancel, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@button_messagebox_cancel_on_click, 1));
ImgApplyChanges(messagebox_close.Handle);
#ifdef EnableRoundRect
shape_form_round(messagebox_close,{#RoundRectData});
#endif
END;
//释放安装程序时调用的脚本
PROCEDURE release_installer();
BEGIN
gdipShutdown();
messagebox_close.Release();
WizardForm.Release();
END;
//在初始化之后释放安装程序的脚本
PROCEDURE release_installer_after_init();
BEGIN
messagebox_close.Release();
WizardForm.Release();
END;
//释放需要的临时资源文件
PROCEDURE extract_temp_files();
BEGIN
ExtractTemporaryFile('button_customize_setup.png');
ExtractTemporaryFile('button_uncustomize_setup.png');
ExtractTemporaryFile('button_finish.png');
ExtractTemporaryFile('button_setup_or_next.png');
ExtractTemporaryFile('background_welcome.png');
ExtractTemporaryFile('background_welcome_more.png');
ExtractTemporaryFile('button_browse.png');
ExtractTemporaryFile('progressbar_background.png');
ExtractTemporaryFile('progressbar_foreground.png');
ExtractTemporaryFile('button_license.png');
ExtractTemporaryFile('checkbox_license.png');
#ifdef RegisteAssociations
ExtractTemporaryFile('checkbox_setdefault.png');
#endif
ExtractTemporaryFile('background_installing.png');
ExtractTemporaryFile('background_finish.png');
ExtractTemporaryFile('button_close.png');
ExtractTemporaryFile('button_minimize.png');
ExtractTemporaryFile('background_messagebox.png');
ExtractTemporaryFile('button_cancel.png');
ExtractTemporaryFile('button_ok.png');
END;
//重载主界面取消按钮被按下后的处理过程
PROCEDURE CancelButtonClick(CurPageID : INTEGER; VAR Cancel, Confirm: BOOLEAN);
BEGIN
Confirm := FALSE;
//messagebox_close.Center();
messagebox_close.ShowModal();
IF can_exit_setup THEN
BEGIN
release_installer();
Cancel := TRUE;
END ELSE
BEGIN
Cancel := FALSE;
END;
END;
//重载安装程序初始化函数,判断是否已经安装新版本,是则禁止安装
FUNCTION InitializeSetup() : BOOLEAN;
BEGIN
#ifndef PortableBuild
#ifdef OnlyInstallNewVersion
IF is_installed_before() THEN
BEGIN
IF is_installing_older_version() THEN
BEGIN
MsgBox('您已安装更新版本的“{#MyAppName}”,不允许使用旧版本替换新版本,请单击“确定”按钮退出此安装程序。', mbInformation, MB_OK);
Result := FALSE;
END ELSE
BEGIN
Result := TRUE;
END;
END ELSE
BEGIN
Result := TRUE;
END;
#else
Result := TRUE;
#endif
#else
Result := TRUE;
#endif
END;
//重载安装程序初始化函数(和上边那个不一样),进行初始化操作
PROCEDURE InitializeWizard();
BEGIN
isFirst := TRUE;
is_installer_initialized := TRUE;
is_wizardform_show_normal := TRUE;
is_wizardform_released := FALSE;
need_to_change_associations := TRUE;
determine_wether_is_windows_7_or_not();
extract_temp_files();
WizardForm.InnerNotebook.Hide();
WizardForm.OuterNotebook.Hide();
WizardForm.Bevel.Hide();
WITH WizardForm DO
BEGIN
BorderStyle := bsNone;
Position := poScreenCenter;
Width := WIZARDFORM_WIDTH_NORMAL;
Height := WIZARDFORM_HEIGHT_MORE;
Color := clWhite;
NextButton.Height := 0;
CancelButton.Height := 0;
BackButton.Visible := FALSE;
END;
label_wizardform_title := TLabel.Create(WizardForm);
WITH label_wizardform_title DO
BEGIN
Parent := WizardForm;
AutoSize := FALSE;
Left := 10;
Top := 5;
Width := 200;
Height := 20;
Font.Name := 'Microsoft YaHei';
Font.Size := 9;
Font.Color := clWhite;
Caption := '{#MyAppName} V{#MyAppVersion} 安装';
Transparent := TRUE;
OnMouseDown := @wizardform_on_mouse_down;
END;
//label_wizardform_more_product_already_installed := TLabel.Create(WizardForm);
// WITH label_wizardform_more_product_already_installed DO
// BEGIN
// Parent := WizardForm;
// AutoSize := FALSE;
// Left := 85;
// Top := 449;
// Width := 200;
// Height := 20;
// Font.Name := 'Microsoft YaHei';
// Font.Size := 9;
// Font.Color := clGray;
// Caption := '软件已经安装,不允许更换目录。';
// Transparent := TRUE;
// OnMouseDown := @wizardform_on_mouse_down;
//END;
//label_wizardform_more_product_already_installed.Hide();
label_wizardform_main := TLabel.Create(WizardForm);
WITH label_wizardform_main DO
BEGIN
Parent := WizardForm;
AutoSize := FALSE;
Left := 0;
Top := 0;
Width := WizardForm.Width;
Height := WizardForm.Height;
Caption := '';
Transparent := TRUE;
OnMouseDown := @wizardform_on_mouse_down;
END;
edit_target_path:= TEdit.Create(WizardForm);
WITH edit_target_path DO
BEGIN
Parent := WizardForm;
Text := WizardForm.DirEdit.Text;
Font.Name := 'Microsoft YaHei';
Font.Size := 9;
BorderStyle := bsNone;
SetBounds(91,423,402,20);
OnChange := @edit_target_path_on_change;
Color := clWhite;
TabStop := FALSE;
END;
edit_target_path.Hide();
button_close := BtnCreate(WizardForm.Handle, 570, 0, 30, 30, ExpandConstant('{tmp}\button_close.png'), 0, FALSE);
BtnSetEvent(button_close, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@button_close_on_click, 1));
button_minimize := BtnCreate(WizardForm.Handle, 540, 0, 30, 30, ExpandConstant('{tmp}\button_minimize.png'), 0, FALSE);
BtnSetEvent(button_minimize, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@button_minimize_on_click, 1));
button_setup_or_next := BtnCreate(WizardForm.Handle, 211, 305, 178, 43, ExpandConstant('{tmp}\button_setup_or_next.png'), 0, FALSE);
BtnSetEvent(button_setup_or_next, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@button_setup_or_next_on_click, 1));
button_browse := BtnCreate(WizardForm.Handle, 506, 420, 75, 24, ExpandConstant('{tmp}\button_browse.png'), 0, FALSE);
BtnSetEvent(button_browse, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@button_browse_on_click, 1));
BtnSetVisibility(button_browse, FALSE);
button_customize_setup := BtnCreate(WizardForm.Handle, 511, 374, 78, 14, ExpandConstant('{tmp}\button_customize_setup.png'), 0, FALSE);
BtnSetEvent(button_customize_setup, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@button_customize_setup_on_click, 1));
button_uncustomize_setup := BtnCreate(WizardForm.Handle, 511, 374, 78, 14, ExpandConstant('{tmp}\button_uncustomize_setup.png'), 0, FALSE);
BtnSetEvent(button_uncustomize_setup, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@button_customize_setup_on_click, 1));
BtnSetVisibility(button_uncustomize_setup, FALSE);
PBOldProc := SetWindowLong(WizardForm.ProgressGauge.Handle, -4, PBCallBack(@PBProc, 4));
ImgApplyChanges(WizardForm.Handle);
messagebox_close_create();
#ifdef EnableRoundRect
shape_form_round(WizardForm,{#RoundRectData});
#endif
END;
//安装程序销毁时会调用这个函数
PROCEDURE DeinitializeSetup();
BEGIN
IF ((is_wizardform_released = FALSE) AND (can_exit_setup = FALSE)) THEN
BEGIN
gdipShutdown();
IF is_installer_initialized THEN
BEGIN
release_installer_after_init();
END;
END;
END;
//安装页面改变时会调用这个函数
PROCEDURE CurPageChanged(CurPageID : INTEGER);
BEGIN
IF (CurPageID = wpWelcome) THEN
BEGIN
image_wizardform_background := ImgLoad(WizardForm.Handle, ExpandConstant('{tmp}\background_welcome.png'), 0, 0, WIZARDFORM_WIDTH_NORMAL, WIZARDFORM_HEIGHT_NORMAL, FALSE, TRUE);
button_license := BtnCreate(WizardForm.Handle, 110, 376, 96, 12, ExpandConstant('{tmp}\button_license.png'), 0, FALSE);
BtnSetEvent(button_license, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@button_license_on_click, 1));
checkbox_license := BtnCreate(WizardForm.Handle, 11, 374, 93, 17, ExpandConstant('{tmp}\checkbox_license.png'), 0, TRUE);
BtnSetEvent(checkbox_license, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@checkbox_license_on_click, 1));
BtnSetChecked(checkbox_license, TRUE);
#ifdef RegisteAssociations
checkbox_setdefault := BtnCreate(WizardForm.Handle, 85, 470, 92, 17, ExpandConstant('{tmp}\checkbox_setdefault.png'), 0, TRUE);
BtnSetEvent(checkbox_setdefault, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@checkbox_setdefault_on_click, 1));
BtnSetChecked(checkbox_setdefault, TRUE);
BtnSetVisibility(checkbox_setdefault, FALSE);
#endif
WizardForm.Height := WIZARDFORM_HEIGHT_NORMAL;
ImgApplyChanges(WizardForm.Handle);
#ifdef EnableRoundRect
shape_form_round(WizardForm,{#RoundRectData});
#endif
END;
IF (CurPageID = wpInstalling) THEN
BEGIN
edit_target_path.Hide();
//label_wizardform_more_product_already_installed.Hide();
BtnSetVisibility(button_browse, FALSE);
WizardForm.Height := WIZARDFORM_HEIGHT_NORMAL;
is_wizardform_show_normal := TRUE;
BtnSetVisibility(button_customize_setup, FALSE);
BtnSetVisibility(button_uncustomize_setup, FALSE);
BtnSetVisibility(button_close, FALSE);
BtnSetPosition(button_minimize, 570, 0, 30, 30);
#ifdef RegisteAssociations
BtnSetVisibility(checkbox_setdefault, FALSE);
#endif
BtnSetVisibility(button_license, FALSE);
BtnSetVisibility(checkbox_license, FALSE);
label_install_progress := TLabel.Create(WizardForm);
WITH label_install_progress DO
BEGIN
Parent := WizardForm;
AutoSize := FALSE;
Left := 538;
Top := 349;
Width := 40;
Height := 30;
Font.Name := 'Microsoft YaHei';
Font.Size := 10;
Font.Color := clBlack;
Caption := '';
Transparent := TRUE;
Alignment := taRightJustify;
OnMouseDown := @wizardform_on_mouse_down;
END;
image_wizardform_background := ImgLoad(WizardForm.Handle, ExpandConstant('{tmp}\background_installing.png'), 0, 0, WIZARDFORM_WIDTH_NORMAL, WIZARDFORM_HEIGHT_NORMAL, FALSE, TRUE);
image_progressbar_background := ImgLoad(WizardForm.Handle, ExpandConstant('{tmp}\progressbar_background.png'), 20, 374, 560, 6, FALSE, TRUE);
image_progressbar_foreground := ImgLoad(WizardForm.Handle, ExpandConstant('{tmp}\progressbar_foreground.png'), 20, 374, 0, 0, TRUE, TRUE);
BtnSetVisibility(button_setup_or_next, FALSE);
ImgApplyChanges(WizardForm.Handle);
END;
IF (CurPageID = wpFinished) THEN
BEGIN
label_install_progress.Caption := '';
label_install_progress.Visible := FALSE;
ImgSetVisibility(image_progressbar_background, FALSE);
ImgSetVisibility(image_progressbar_foreground, FALSE);
BtnSetPosition(button_minimize, 540, 0, 30, 30);
BtnSetVisibility(button_close, TRUE);
button_setup_or_next := BtnCreate(WizardForm.Handle, 214, 305, 180, 44, ExpandConstant('{tmp}\button_finish.png'), 0, FALSE);
BtnSetEvent(button_setup_or_next, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@button_setup_or_next_on_click, 1));
BtnSetEvent(button_close, ID_BUTTON_ON_CLICK_EVENT, WrapBtnCallback(@button_setup_or_next_on_click, 1));
image_wizardform_background := ImgLoad(WizardForm.Handle, ExpandConstant('{tmp}\background_finish.png'), 0, 0, WIZARDFORM_WIDTH_NORMAL, WIZARDFORM_HEIGHT_NORMAL, FALSE, TRUE);
ImgApplyChanges(WizardForm.Handle);
END;
END;
//安装步骤改变时会调用这个函数
//PROCEDURE CurStepChanged(CurStep : TSetupStep);
//BEGIN
// IF (CurStep = ssPostInstall) THEN
// BEGIN
//#ifdef RegisteAssociations
// check_if_need_change_associations();
//#endif
// //AND DO OTHER THINGS
// END;
// IF (CurStep = ssDone) THEN
// BEGIN
// is_wizardform_released := TRUE;
// release_installer();
// END;
//END;
//指定跳过哪些标准页面
FUNCTION ShouldSkipPage(PageID : INTEGER) : BOOLEAN;
BEGIN
IF (PageID = wpLicense) THEN Result := TRUE;
IF (PageID = wpPassword) THEN Result := TRUE;
IF (PageID = wpInfoBefore) THEN Result := TRUE;
IF (PageID = wpUserInfo) THEN Result := TRUE;
IF (PageID = wpSelectDir) THEN Result := TRUE;
IF (PageID = wpSelectComponents) THEN Result := TRUE;
IF (PageID = wpSelectProgramGroup) THEN Result := TRUE;
IF (PageID = wpSelectTasks) THEN Result := TRUE;
IF (PageID = wpReady) THEN Result := TRUE;
IF (PageID = wpPreparing) THEN Result := TRUE;
IF (PageID = wpInfoAfter) THEN Result := TRUE;
END;
//卸载步骤改变时会调用此函数
PROCEDURE CurUninstallStepChanged(CurUninstallStep : TUninstallStep);
BEGIN
IF (CurUninstallStep = usAppMutexCheck) THEN
BEGIN
//此阶段为检查应用程序互斥的阶段,请在此进行互斥操作
END;
END;
procedure CurStepChanged(CurStep: TSetupStep);
var
uninspath, uninsname, NewUninsName : string;
begin
if CurStep=ssDone then
begin
// 指定新的卸载文件名(不包含扩展名),请相应修改!
NewUninsName := '卸载';
// 以下重命名卸载文件
uninspath:= ExtractFilePath(ExpandConstant('{uninstallexe}'));
uninsname:= Copy(ExtractFileName(ExpandConstant('{uninstallexe}')),1,8);
RenameFile(uninspath + uninsname + '.exe', uninspath + NewUninsName + '.exe');
RenameFile(uninspath + uninsname + '.dat', uninspath + NewUninsName + '.dat');
// 以下修改相应的注册表内容
if RegKeyExists(HKEY_LOCAL_MACHINE, PRODUCT_REGISTRY_KEY_64) then
begin
RegWriteStringValue(HKEY_LOCAL_MACHINE, PRODUCT_REGISTRY_KEY_64, 'UninstallString', '"' + uninspath + NewUninsName + '.exe"');
RegWriteStringValue(HKEY_LOCAL_MACHINE, PRODUCT_REGISTRY_KEY_64, 'QuietUninstallString', '"' + uninspath + NewUninsName + '.exe" /SILENT');
end;
end;
IF (CurStep = ssPostInstall) THEN
BEGIN
#ifdef RegisteAssociations
check_if_need_change_associations();
#endif
//AND DO OTHER THINGS
END;
IF (CurStep = ssDone) THEN
BEGIN
is_wizardform_released := TRUE;
release_installer();
END;
end;

View File

@@ -0,0 +1,29 @@
//这里存放的是botva2的函数声明
[Code]
TYPE
TBtnEventProc = PROCEDURE(h : HWND);
TPBProc = FUNCTION(h : hWnd; Msg, wParam, lParam : LONGINT) : LONGINT;
FUNCTION ImgLoad(h : HWND; FileName : PAnsiChar; Left, Top, Width, Height : INTEGER; Stretch, IsBkg : BOOLEAN) : LONGINT; EXTERNAL 'ImgLoad@files:botva2.dll STDCALL DELAYLOAD';
PROCEDURE ImgSetVisibility(img : LONGINT; Visible : BOOLEAN); EXTERNAL 'ImgSetVisibility@files:botva2.dll STDCALL DELAYLOAD';
PROCEDURE ImgApplyChanges(h : HWND); EXTERNAL 'ImgApplyChanges@files:botva2.dll STDCALL DELAYLOAD';
PROCEDURE ImgSetPosition(img : LONGINT; NewLeft, NewTop, NewWidth, NewHeight : INTEGER); EXTERNAL 'ImgSetPosition@files:botva2.dll STDCALL DELAYLOAD';
PROCEDURE ImgRelease(img : LONGINT); EXTERNAL 'ImgRelease@files:botva2.dll STDCALL DELAYLOAD';
PROCEDURE CreateFormFromImage(h : HWND; FileName : PAnsiChar); EXTERNAL 'CreateFormFromImage@files:botva2.dll STDCALL DELAYLOAD';
PROCEDURE gdipShutdown(); EXTERNAL 'gdipShutdown@files:botva2.dll STDCALL DELAYLOAD';
FUNCTION WrapBtnCallback(Callback : TBtnEventProc; ParamCount : INTEGER) : LONGWORD; EXTERNAL 'wrapcallback@files:innocallback.dll STDCALL DELAYLOAD';
FUNCTION BtnCreate(hParent : HWND; Left, Top, Width, Height : INTEGER; FileName : PAnsiChar; ShadowWidth : INTEGER; IsCheckBtn : BOOLEAN) : HWND; EXTERNAL 'BtnCreate@files:botva2.dll STDCALL DELAYLOAD';
PROCEDURE BtnSetVisibility(h : HWND; Value : BOOLEAN); EXTERNAL 'BtnSetVisibility@files:botva2.dll STDCALL DELAYLOAD';
PROCEDURE BtnSetEvent(h : HWND; EventID : INTEGER; Event : LONGWORD); EXTERNAL 'BtnSetEvent@files:botva2.dll STDCALL DELAYLOAD';
PROCEDURE BtnSetEnabled(h : HWND; Value : BOOLEAN); EXTERNAL 'BtnSetEnabled@files:botva2.dll STDCALL DELAYLOAD';
FUNCTION BtnGetChecked(h : HWND) : BOOLEAN; EXTERNAL 'BtnGetChecked@files:botva2.dll STDCALL DELAYLOAD';
PROCEDURE BtnSetChecked(h : HWND; Value : BOOLEAN); EXTERNAL 'BtnSetChecked@files:botva2.dll STDCALL DELAYLOAD';
PROCEDURE BtnSetPosition(h : HWND; NewLeft, NewTop, NewWidth, NewHeight : INTEGER); EXTERNAL 'BtnSetPosition@files:botva2.dll STDCALL DELAYLOAD';
FUNCTION SetWindowLong(h : HWnd; Index : INTEGER; NewLong : LONGINT) : LONGINT; EXTERNAL 'SetWindowLongA@user32.dll STDCALL';
FUNCTION PBCallBack(P : TPBProc; ParamCount : INTEGER) : LONGWORD; EXTERNAL 'wrapcallback@files:innocallback.dll STDCALL DELAYLOAD';
FUNCTION CallWindowProc(lpPrevWndFunc : LONGINT; h : HWND; Msg : UINT; wParam, lParam : LONGINT) : LONGINT; EXTERNAL 'CallWindowProcA@user32.dll STDCALL';
PROCEDURE ImgSetVisiblePart(img : LONGINT; NewLeft, NewTop, NewWidth, NewHeight : INTEGER); EXTERNAL 'ImgSetVisiblePart@files:botva2.dll STDCALL DELAYLOAD';
FUNCTION ReleaseCapture() : LONGINT; EXTERNAL 'ReleaseCapture@user32.dll STDCALL';
FUNCTION CreateRoundRectRgn(p1, p2, p3, p4, p5, p6 : INTEGER) : THandle; EXTERNAL 'CreateRoundRectRgn@gdi32.dll STDCALL';
FUNCTION SetWindowRgn(h : HWND; hRgn : THandle; bRedraw : BOOLEAN) : INTEGER; EXTERNAL 'SetWindowRgn@user32.dll STDCALL';

View File

@@ -0,0 +1,365 @@
; *** Inno Setup version 6.0.3+ Chinese Simplified messages ***
;
; Maintained by Zhenghan Yang
; Email: 847320916@QQ.com
; Translation based on network resource
; The latest Translation is on https://github.com/kira-96/Inno-Setup-Chinese-Simplified-Translation
;
[LangOptions]
; The following three entries are very important. Be sure to read and
; understand the '[LangOptions] section' topic in the help file.
LanguageName=简体中文
; If Language Name display incorrect, uncomment next line
; LanguageName=<7B80><4F53><4E2D><6587>
LanguageID=$0804
LanguageCodePage=936
; If the language you are translating to requires special font faces or
; sizes, uncomment any of the following entries and change them accordingly.
;DialogFontName=
;DialogFontSize=8
;WelcomeFontName=Verdana
;WelcomeFontSize=12
;TitleFontName=Arial
;TitleFontSize=29
;CopyrightFontName=Arial
;CopyrightFontSize=8
[Messages]
; *** 应用程序标题
SetupAppTitle=安装
SetupWindowTitle=安装 - %1
UninstallAppTitle=卸载
UninstallAppFullTitle=%1 卸载
; *** Misc. common
InformationTitle=信息
ConfirmTitle=确认
ErrorTitle=错误
; *** SetupLdr messages
SetupLdrStartupMessage=现在将安装 %1。您想要继续吗
LdrCannotCreateTemp=不能创建临时文件。安装中断。
LdrCannotExecTemp=不能执行临时目录中的文件。安装中断。
HelpTextNote=
; *** 启动错误消息
LastErrorMessage=%1.%n%n错误 %2: %3
SetupFileMissing=安装目录中的文件 %1 丢失。请修正这个问题或获取一个新的程序副本。
SetupFileCorrupt=安装文件已损坏。请获取一个新的程序副本。
SetupFileCorruptOrWrongVer=安装文件已损坏,或是与这个安装程序的版本不兼容。请修正这个问题或获取新的程序副本。
InvalidParameter=无效的命令行参数: %n%n%1
SetupAlreadyRunning=安装程序正在运行。
WindowsVersionNotSupported=这个程序不支持该版本的计算机运行。
WindowsServicePackRequired=这个程序要求%1服务包%1或更高。
NotOnThisPlatform=这个程序将不能运行于 %1。
OnlyOnThisPlatform=这个程序必须运行于 %1。
OnlyOnTheseArchitectures=这个程序只能在为下列处理器结构设计的 Windows 版本中进行安装:%n%n%1
WinVersionTooLowError=这个程序需要 %1 版本 %2 或更高。
WinVersionTooHighError=这个程序不能安装于 %1 版本 %2 或更高。
AdminPrivilegesRequired=在安装这个程序时您必须以管理员身份登录。
PowerUserPrivilegesRequired=在安装这个程序时您必须以管理员身份或有权限的用户组身份登录。
SetupAppRunningError=安装程序发现 %1 当前正在运行。%n%n请先关闭所有运行的窗口然后单击“确定”继续或按“取消”退出。
UninstallAppRunningError=卸载程序发现 %1 当前正在运行。%n%n请先关闭所有运行的窗口然后单击“确定”继续或按“取消”退出。
; *** 启动问题
PrivilegesRequiredOverrideTitle=选择安装程序模式
PrivilegesRequiredOverrideInstruction=选择安装模式
PrivilegesRequiredOverrideText1=%1 可以为所有用户安装(需要管理员权限),或仅为您安装。
PrivilegesRequiredOverrideText2=%1 只能为您安装,或为所有用户安装(需要管理员权限)。
PrivilegesRequiredOverrideAllUsers=为所有用户安装(&A)
PrivilegesRequiredOverrideAllUsersRecommended=为所有用户安装(建议选项)(&A)
PrivilegesRequiredOverrideCurrentUser=只为我安装(&M)
PrivilegesRequiredOverrideCurrentUserRecommended=只为我安装(建议选项)(&M)
; *** 其它错误
ErrorCreatingDir=安装程序不能创建目录“%1”。
ErrorTooManyFilesInDir=不能在目录“%1”中创建文件因为里面的文件太多
; *** 安装程序公共消息
ExitSetupTitle=退出安装程序
ExitSetupMessage=安装程序未完成安装。如果您现在退出,您的程序将不能安装。%n%n您可以以后再运行安装程序完成安装。%n%n退出安装程序吗
AboutSetupMenuItem=关于安装程序(&A)...
AboutSetupTitle=关于安装程序
AboutSetupMessage=%1 版本 %2%n%3%n%n%1 主页:%n%4
AboutSetupNote=
TranslatorNote=
; *** 按钮
ButtonBack=< 上一步(&B)
ButtonNext=下一步(&N) >
ButtonInstall=安装(&I)
ButtonOK=确定
ButtonCancel=取消
ButtonYes=是(&Y)
ButtonYesToAll=全是(&A)
ButtonNo=否(&N)
ButtonNoToAll=全否(&O)
ButtonFinish=完成(&F)
ButtonBrowse=浏览(&B)...
ButtonWizardBrowse=浏览(&R)...
ButtonNewFolder=新建文件夹(&M)
; *** “选择语言”对话框消息
SelectLanguageTitle=选择安装语言
SelectLanguageLabel=选择安装时要使用的语言。
; *** 公共向导文字
ClickNext=单击“下一步”继续,或单击“取消”退出安装程序。
BeveledLabel=
BrowseDialogTitle=浏览文件夹
BrowseDialogLabel=在下列列表中选择一个文件夹,然后单击“确定”。
NewFolderName=新建文件夹
; *** “欢迎”向导页
WelcomeLabel1=欢迎使用 [name] 安装向导
WelcomeLabel2=现在将安装 [name/ver] 到您的电脑中。%n%n推荐您在继续安装前关闭所有其它应用程序。
; *** “密码”向导页
WizardPassword=密码
PasswordLabel1=这个安装程序有密码保护。
PasswordLabel3=请输入密码,然后单击“下一步”继续。密码区分大小写。
PasswordEditLabel=密码(&P):
IncorrectPassword=您输入的密码不正确,请重试。
; *** “许可协议”向导页
WizardLicense=许可协议
LicenseLabel=继续安装前请阅读下列重要信息。
LicenseLabel3=请仔细阅读下列许可协议。您在继续安装前必须同意这些协议条款。
LicenseAccepted=我同意此协议(&A)
LicenseNotAccepted=我不同意此协议(&D)
; *** “信息”向导页
WizardInfoBefore=信息
InfoBeforeLabel=请在继续安装前阅读下列重要信息。
InfoBeforeClickLabel=如果您想继续安装,单击“下一步”。
WizardInfoAfter=信息
InfoAfterLabel=请在继续安装前阅读下列重要信息。
InfoAfterClickLabel=如果您想继续安装,单击“下一步”。
; *** “用户信息”向导页
WizardUserInfo=用户信息
UserInfoDesc=请输入您的信息。
UserInfoName=用户名(&U):
UserInfoOrg=组织(&O):
UserInfoSerial=序列号(&S):
UserInfoNameRequired=您必须输入名字。
; *** “选择目标目录”向导面
WizardSelectDir=选择目标位置
SelectDirDesc=您想将 [name] 安装在什么地方?
SelectDirLabel3=安装程序将安装 [name] 到下列文件夹中。
SelectDirBrowseLabel=单击“下一步”继续。如果您想选择其它文件夹,单击“浏览”。
DiskSpaceGBLabel=至少需要有 [gb] GB 的可用磁盘空间。
DiskSpaceMBLabel=至少需要有 [mb] MB 的可用磁盘空间。
CannotInstallToNetworkDrive=安装程序无法安装到一个网络驱动器。
CannotInstallToUNCPath=安装程序无法安装到一个UNC路径。
InvalidPath=您必须输入一个带驱动器卷标的完整路径,例如:%n%nC:\APP%n%n或下列形式的 UNC 路径:%n%n\\server\share
InvalidDrive=您选定的驱动器或 UNC 共享不存在或不能访问。请选选择其它位置。
DiskSpaceWarningTitle=没有足够的磁盘空间
DiskSpaceWarning=安装程序至少需要 %1 KB 的可用空间才能安装,但选定驱动器只有 %2 KB 的可用空间。%n%n您一定要继续吗
DirNameTooLong=文件夹名或路径太长。
InvalidDirName=文件夹名是无效的。
BadDirName32=文件夹名不能包含下列任何字符:%n%n%1
DirExistsTitle=文件夹存在
DirExists=文件夹:%n%n%1%n%n已经存在。您一定要安装到这个文件夹中吗
DirDoesntExistTitle=文件夹不存在
DirDoesntExist=文件夹:%n%n%1%n%n不存在。您想要创建此目录吗
; *** “选择组件”向导页
WizardSelectComponents=选择组件
SelectComponentsDesc=您想安装哪些程序的组件?
SelectComponentsLabel2=选择您想要安装的组件;清除您不想安装的组件。然后单击“下一步”继续。
FullInstallation=完全安装
; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language)
CompactInstallation=简洁安装
CustomInstallation=自定义安装
NoUninstallWarningTitle=组件存在
NoUninstallWarning=安装程序侦测到下列组件已在您的电脑中安装。:%n%n%1%n%n取消选定这些组件将不能卸载它们。%n%n您一定要继续吗
ComponentSize1=%1 KB
ComponentSize2=%1 MB
ComponentsDiskSpaceGBLabel=当前选择的组件至少需要 [gb] GB 的磁盘空间。
ComponentsDiskSpaceMBLabel=当前选择的组件至少需要 [mb] MB 的磁盘空间。
; *** “选择附加任务”向导页
WizardSelectTasks=选择附加任务
SelectTasksDesc=您想要安装程序执行哪些附加任务?
SelectTasksLabel2=选择您想要安装程序在安装 [name] 时执行的附加任务,然后单击“下一步”。
; *** “选择开始菜单文件夹”向导页
WizardSelectProgramGroup=选择开始菜单文件夹
SelectStartMenuFolderDesc=您想在哪里放置程序的快捷方式?
SelectStartMenuFolderLabel3=安装程序现在将在下列开始菜单文件夹中创建程序的快捷方式。
SelectStartMenuFolderBrowseLabel=单击“下一步”继续。如果您想选择其它文件夹,单击“浏览”。
MustEnterGroupName=您必须输入一个文件夹名。
GroupNameTooLong=文件夹名或路径太长。
InvalidGroupName=文件夹名是无效的。
BadGroupName=文件夹名不能包含下列任何字符:%n%n%1
NoProgramGroupCheck2=不创建开始菜单文件夹(&D)
; *** “准备安装”向导页
WizardReady=准备安装
ReadyLabel1=安装程序现在准备开始安装 [name] 到您的电脑中。
ReadyLabel2a=单击“安装”继续此安装程序。如果您想要回顾或改变设置,请单击“上一步”。
ReadyLabel2b=单击“安装”继续此安装程序?
ReadyMemoUserInfo=用户信息:
ReadyMemoDir=目标位置:
ReadyMemoType=安装类型:
ReadyMemoComponents=选定组件:
ReadyMemoGroup=开始菜单文件夹:
ReadyMemoTasks=附加任务:
; *** “正在准备安装”向导页
WizardPreparing=正在准备安装
PreparingDesc=安装程序正在准备安装 [name] 到您的电脑中。
PreviousInstallNotCompleted=先前程序的安装/卸载未完成。您需要重新启动您的电脑才能完成安装。%n%n在重新启动电脑后再运行安装完成 [name] 的安装。
CannotContinue=安装程序不能继续。请单击“取消”退出。
ApplicationsFound=下列应用程序正在使用的文件需要更新设置。它是建议您允许安装程序自动关闭这些应用程序。
ApplicationsFound2=下列应用程序正在使用的文件需要更新设置。它是建议您允许安装程序自动关闭这些应用程序。安装完成后,安装程序将尝试重新启动应用程序。
CloseApplications=自动关闭该应用程序(&A)
DontCloseApplications=不要关闭该应用程序(D)
ErrorCloseApplications=安装程序无法自动关闭所有应用程序。在继续之前,我们建议您关闭所有使用需要更新的安装程序文件。
PrepareToInstallNeedsRestart=安装程序必须重新启动计算机。重新启动计算机后,请再次运行安装程序以完成 [name] 的安装。%n%n是否立即重新启动
; *** “正在安装”向导页
WizardInstalling=正在安装
InstallingLabel=安装程序正在安装 [name] 到您的电脑中,请稍等。
; *** “安装完成”向导页
FinishedHeadingLabel=[name] 安装完成
FinishedLabelNoIcons=安装程序已在您的电脑中安装了 [name]。
FinishedLabel=安装程序已在您的电脑中安装了 [name]。此应用程序可以通过选择安装的快捷方式运行。
ClickFinish=单击“完成”退出安装程序。
FinishedRestartLabel=要完成 [name] 的安装,安装程序必须重新启动您的电脑。您想现在重新启动吗?
FinishedRestartMessage=要完成 [name] 的安装,安装程序必须重新启动您的电脑。%n%n您想现在重新启动吗
ShowReadmeCheck=是,您想查阅自述文件
YesRadio=是,立即重新启动电脑(&Y)
NoRadio=否,稍后重新启动电脑(&N)
; 用于象“运行 MyProg.exe”
RunEntryExec=运行 %1
; 用于象“查阅 Readme.txt”
RunEntryShellExec=查阅 %1
; *** “安装程序需要下一张磁盘”提示
ChangeDiskTitle=安装程序需要下一张磁盘
SelectDiskLabel2=请插入磁盘 %1 并单击“确定”。%n%n如果这个磁盘中的文件不能在不同于下列显示的文件夹中找到输入正确的路径或单击“浏览”。
PathLabel=路径(&P):
FileNotInDir2=文件“%1”不能在“%2”定位。请插入正确的磁盘或选择其它文件夹。
SelectDirectoryLabel=请指定下一张磁盘的位置。
; *** 安装状态消息
SetupAborted=安装程序未完成安装。%n%n请修正这个问题并重新运行安装程序。
AbortRetryIgnoreSelectAction=选项
AbortRetryIgnoreRetry=重试(&T)
AbortRetryIgnoreIgnore=忽略错误并继续(&I)
AbortRetryIgnoreCancel=关闭安装程序
; *** 安装状态消息
StatusClosingApplications=正在关闭应用程序...
StatusCreateDirs=正在创建目录...
StatusExtractFiles=正在解压缩文件...
StatusCreateIcons=正在创建快捷方式...
StatusCreateIniEntries=正在创建 INI 条目...
StatusCreateRegistryEntries=正在创建注册表条目...
StatusRegisterFiles=正在注册文件...
StatusSavingUninstall=正在保存卸载信息...
StatusRunProgram=正在完成安装...
StatusRestartingApplications=正在重启应用程序...
StatusRollback=正在撤销更改...
; *** 其它错误
ErrorInternal2=内部错误: %1
ErrorFunctionFailedNoCode=%1 失败
ErrorFunctionFailed=%1 失败;错误代码 %2
ErrorFunctionFailedWithMessage=%1 失败;错误代码 %2.%n%3
ErrorExecutingProgram=不能执行文件:%n%1
; *** 注册表错误
ErrorRegOpenKey=打开注册表项时出错:%n%1\%2
ErrorRegCreateKey=创建注册表项时出错:%n%1\%2
ErrorRegWriteKey=写入注册表项时出错:%n%1\%2
; *** INI 错误
ErrorIniEntry=在文件“%1”创建 INI 项目错误。
; *** 文件复制错误
FileAbortRetryIgnoreSkipNotRecommended=跳过这个文件 (不推荐)(&S)
FileAbortRetryIgnoreIgnoreNotRecommended=忽略错误并继续 (不推荐)(&I)
SourceIsCorrupted=源文件已损坏
SourceDoesntExist=源文件“%1”不存在
ExistingFileReadOnly2=无法替换现有文件,因为它是只读的。
ExistingFileReadOnlyRetry=移除只读属性并重试(&R)
ExistingFileReadOnlyKeepExisting=保留现有文件(&K)
ErrorReadingExistingDest=尝试读取现有文件时发生一个错误:
FileExists=文件已经存在。%n%n您想要安装程序覆盖它吗
ExistingFileNewer=现有的文件新与安装程序要安装的文件。推荐您保留现有文件。%n%n您想要保留现有的文件吗
ErrorChangingAttr=尝试改变下列现有的文件的属性时发生一个错误:
ErrorCreatingTemp=尝试在目标目录创建文件时发生一个错误:
ErrorReadingSource=尝试读取下列源文件时发生一个错误:
ErrorCopying=尝试复制下列文件时发生一个错误:
ErrorReplacingExistingFile=尝试替换现有的文件时发生错误:
ErrorRestartReplace=重启电脑后替换文件失败:
ErrorRenamingTemp=尝试重新命名以下目标目录中的一个文件时发生错误:
ErrorRegisterServer=不能注册 DLL/OCX: %1
ErrorRegSvr32Failed=RegSvr32 失败;退出代码 %1
ErrorRegisterTypeLib=不能注册类型库: %1
; *** 卸载显示名字标记
; used for example as 'My Program (32-bit)'
UninstallDisplayNameMark=%1 (%2)
; used for example as 'My Program (32-bit, All users)'
UninstallDisplayNameMarks=%1 (%2, %3)
UninstallDisplayNameMark32Bit=32位
UninstallDisplayNameMark64Bit=64位
UninstallDisplayNameMarkAllUsers=所有用户
UninstallDisplayNameMarkCurrentUser=当前用户
; *** 安装后错误
ErrorOpeningReadme=当尝试打开自述文件时发生一个错误。
ErrorRestartingComputer=安装程序不能重新启动电脑,请手动重启。
; *** 卸载消息
UninstallNotFound=文件“%1”不存在。不能卸载。
UninstallOpenError=文件“%1”不能打开。不能卸载。
UninstallUnsupportedVer=卸载日志文件“%1”有未被这个版本的卸载器承认的格式。不能卸载
UninstallUnknownEntry=在卸载日志中遇到一个未知的条目 (%1)
ConfirmUninstall=您确认想要完全删除 %1 及它的所有组件吗?
UninstallOnlyOnWin64=这个安装程序只能在 64 位 Windows 中进行卸载。
OnlyAdminCanUninstall=这个安装的程序只能是有管理员权限的用户才能卸载。
UninstallStatusLabel=正在从您的电脑中删除 %1请等待。
UninstalledAll=%1 已顺利地从您的电脑中删除。
UninstalledMost=%1 卸载完成。%n%n有一些内容不能被删除。您可以手工删除它们。
UninstalledAndNeedsRestart=要完成 %1 的卸载,您的电脑必须重新启动。%n%n您现在想重新启动电脑吗
UninstallDataCorrupted=“%1”文件被破坏不能卸载
; *** 卸载状态消息
ConfirmDeleteSharedFileTitle=删除共享文件吗?
ConfirmDeleteSharedFile2=系统中包含的下列共享文件已经不被其它程序使用。您想要卸载程序删除这些共享文件吗?%n%n如果这些文件被删除但还有程序正在使用这些文件这些程序可能不能正确执行。如果您不能确定选择“否”。把这些文件保留在系统中以免引起问题。
SharedFileNameLabel=文件名:
SharedFileLocationLabel=位置:
WizardUninstalling=卸载状态
StatusUninstalling=正在卸载 %1...
; *** Shutdown block reasons
ShutdownBlockReasonInstallingApp=正在安装 %1.
ShutdownBlockReasonUninstallingApp=正在卸载 %1.
; The custom messages below aren't used by Setup itself, but if you make
; use of them in your scripts, you'll want to translate them.
[CustomMessages]
NameAndVersion=%1 版本 %2
AdditionalIcons=附加快捷方式:
CreateDesktopIcon=创建桌面快捷方式(&D)
CreateQuickLaunchIcon=创建快速运行栏快捷方式(&Q)
ProgramOnTheWeb=%1 网站
UninstallProgram=卸载 %1
LaunchProgram=运行 %1
AssocFileExtension=将 %2 文件扩展名与 %1 建立关联(&A)
AssocingFileExtension=正在将 %2 文件扩展名与 %1 建立关联...
AutoStartProgramGroupDescription=启动组:
AutoStartProgram=自动启动 %1
AddonHostProgramNotFound=%1无法找到您所选择的文件夹。%n%n您想要继续吗

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B