add demo
70
InnoSetupBeauty01/include/DllsImport.iss
Normal file
@ -0,0 +1,70 @@
|
||||
[Code]
|
||||
// for dll
|
||||
type
|
||||
TBtnEventProc = procedure (h:HWND);
|
||||
TPBProc = function(h:hWnd;Msg,wParam,lParam:Longint):Longint; //百分比
|
||||
TTimerProc = procedure(h:longword; msg:longword; idevent:longword; dwTime:longword);
|
||||
const
|
||||
Radius = 9;
|
||||
GWL_EXSTYLE = (-20);
|
||||
//窗口移动
|
||||
WM_SYSCOMMAND = $0112;
|
||||
WS_EX_LAYERED = $80000;
|
||||
WS_EX_TRANSPARENT = $20;
|
||||
LWA_COLORKEY = 1;
|
||||
TransparentColor = clLime; //要去掉的图片底色
|
||||
TransparentPercent = 80;
|
||||
BTN_MAX_PATH = 1024;
|
||||
|
||||
BtnClickEventID = 1;
|
||||
BtnMouseEnterEventID = 2;
|
||||
BtnMouseLeaveEventID = 3;
|
||||
BtnMouseMoveEventID = 4;
|
||||
BtnMouseDownEventID = 5;
|
||||
BtnMouseUpEventID = 6;
|
||||
|
||||
//function WrapBtnCallback(Callback: TBtnEventProc; ParamCount: Integer): Longword; external 'wrapcallback@files:innocallback.dll stdcall';
|
||||
function WrapTimerProc(callback: TTimerProc; Paramcount: Integer): Longword; external 'wrapcallback@files:innocallback.dll stdcall';
|
||||
|
||||
function DeleteObject(p1: Longword): BOOL; external 'DeleteObject@gdi32.dll stdcall';
|
||||
function GetPM(nIndex:Integer):Integer; external 'GetSystemMetrics@user32.dll stdcall';
|
||||
//botva2
|
||||
function ImgLoad(Wnd :HWND; FileName :PAnsiChar; Left, Top, Width, Height :integer; Stretch, IsBkg :boolean) :Longint; external 'ImgLoad@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure ImgSetVisibility(img :Longint; Visible :boolean); external 'ImgSetVisibility@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure ImgApplyChanges(h:HWND); external 'ImgApplyChanges@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure ImgSetPosition(img :Longint; NewLeft, NewTop, NewWidth, NewHeight :integer); external 'ImgSetPosition@files:botva2.dll stdcall';
|
||||
procedure ImgRelease(img :Longint); external 'ImgRelease@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure gdipShutdown; external 'gdipShutdown@{tmp}\botva2.dll stdcall delayload';
|
||||
function WrapBtnCallback(Callback: TBtnEventProc; ParamCount: Integer): Longword; external 'wrapcallback@{tmp}\innocallback.dll stdcall delayload';
|
||||
function BtnCreate(hParent:HWND; Left,Top,Width,Height:integer; FileName:PAnsiChar; ShadowWidth:integer; IsCheckBtn:boolean):HWND; external 'BtnCreate@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure BtnSetText(h:HWND; Text:PAnsiChar); external 'BtnSetText@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure BtnSetVisibility(h:HWND; Value:boolean); external 'BtnSetVisibility@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure BtnSetFont(h:HWND; Font:Cardinal); external 'BtnSetFont@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure BtnSetFontColor(h:HWND; NormalFontColor, FocusedFontColor, PressedFontColor, DisabledFontColor: Cardinal); external 'BtnSetFontColor@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure BtnSetEvent(h:HWND; EventID:integer; Event:Longword); external 'BtnSetEvent@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure BtnSetCursor(h:HWND; hCur:Cardinal); external 'BtnSetCursor@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure BtnSetEnabled(h:HWND; Value:boolean); external 'BtnSetEnabled@{tmp}\botva2.dll stdcall delayload';
|
||||
function GetSysCursorHandle(id:integer):Cardinal; external 'GetSysCursorHandle@{tmp}\botva2.dll stdcall delayload';
|
||||
function BtnGetChecked(h:HWND):boolean; external 'BtnGetChecked@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure BtnSetChecked(h:HWND; Value:boolean); external 'BtnSetChecked@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure CreateFormFromImage(h:HWND; FileName:PAnsiChar); external 'CreateFormFromImage@{tmp}\botva2.dll stdcall delayload';
|
||||
procedure BtnSetPosition(h:HWND; NewLeft, NewTop, NewWidth, NewHeight: integer); external 'BtnSetPosition@{tmp}\botva2.dll stdcall delayload';
|
||||
function SetLayeredWindowAttributes(hwnd:HWND; crKey:Longint; bAlpha:byte; dwFlags:longint ):longint;
|
||||
external 'SetLayeredWindowAttributes@user32 stdcall'; //函数声明
|
||||
function SetWindowLong(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall';
|
||||
function PBCallBack(P:TPBProc;ParamCount:integer):LongWord; external 'wrapcallback@files:innocallback.dll stdcall';
|
||||
function CallWindowProc(lpPrevWndFunc: Longint; hWnd: 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';
|
||||
function SetTimer(hWnd: LongWord; nIDEvent, uElapse: LongWord; lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall';
|
||||
function KillTimer(hWnd: LongWord; nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall';
|
||||
function GetWindowLong(Wnd: HWnd; Index: Integer): Longint; external 'GetWindowLongA@user32.dll stdcall';
|
||||
function ReleaseCapture(): Longint; external 'ReleaseCapture@user32.dll stdcall';
|
||||
function CreateRoundRectRgn(p1, p2, p3, p4, p5, p6: Integer): THandle; external 'CreateRoundRectRgn@gdi32 stdcall';
|
||||
function SetWindowRgn(hWnd: HWND; hRgn: THandle; bRedraw: Boolean): Integer; external 'SetWindowRgn@user32 stdcall';
|
||||
procedure ShapeForm(aForm: TForm; edgeSize: integer); //圆角
|
||||
var
|
||||
FormRegion:LongWord;
|
||||
begin
|
||||
FormRegion:=CreateRoundRectRgn(0,0,aForm.Width,aForm.Height,edgeSize,edgeSize);
|
||||
SetWindowRgn(aForm.Handle,FormRegion,True);
|
||||
end;
|
346
InnoSetupBeauty01/include/code.iss
Normal file
@ -0,0 +1,346 @@
|
||||
[Code]
|
||||
#include "DllsImport.iss"
|
||||
|
||||
var
|
||||
BGimg:longint;
|
||||
btnShowLicense,MinBtn,CancelBtn,btnBrowser,btnSetup,btnBack:HWND;
|
||||
isWelcomePage:boolean;
|
||||
pathEdit:tedit;
|
||||
labelReadImg,licenseImg,progressbgImg,PBOldProc,labelAutoRunImg:longint;
|
||||
checkboxLicense,checkboxAutoRun:HWND;
|
||||
licenseRich:TRichEditViewer;
|
||||
DpiScalePctg:integer;
|
||||
CurrentDPI:integer;
|
||||
|
||||
function DpiScale(v:integer):integer;
|
||||
begin
|
||||
Result:=v*DpiScalePctg/1000;
|
||||
end;
|
||||
|
||||
// 安装前强制杀进
|
||||
// 该函数在安装程序初始化时调用,返回False 将中断安装,True则继续安装.程
|
||||
function InitializeSetup(): Boolean;
|
||||
var ErrorCode: Integer;
|
||||
begin
|
||||
ShellExec('open','taskkill.exe','/f /im {#MyAppExeName}','',SW_HIDE,ewNoWait,ErrorCode);
|
||||
ShellExec('open','tskill.exe',' {#MyAppName}','',SW_HIDE,ewNoWait,ErrorCode);
|
||||
result := True;
|
||||
end;
|
||||
|
||||
// 卸载前强制杀进程
|
||||
function InitializeUninstall(): Boolean;
|
||||
var ErrorCode: Integer;
|
||||
begin
|
||||
ShellExec('open','taskkill.exe','/f /im {#MyAppExeName}','',SW_HIDE,ewNoWait,ErrorCode);
|
||||
ShellExec('open','tskill.exe',' {#MyAppName}','',SW_HIDE,ewNoWait,ErrorCode);
|
||||
result := True;
|
||||
end;
|
||||
|
||||
// 向导调用这个事件函数确定是否在所有页或不在一个特殊页 (用PageID 指定) 显示。如果返回True,将跳过该页;如果你返回False,该页被显示。
|
||||
// 注意: 这个事件函数不被wpWelcome、wpPreparing 和wpInstalling 页调用,还有安装程序已经确定要跳过的页也不会调用
|
||||
// wpWelcome, wpLicense, wpPassword, wpInfoBefore, wpUserInfo, wpSelectDir, wpSelectComponents, wpSelectProgramGroup, wpSelectTasks, wpReady, wpPreparing, wpInstalling, wpInfoAfter, wpFinished
|
||||
function ShouldSkipPage(PageID: Integer): Boolean;
|
||||
begin
|
||||
if PageID=wpLicense 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;
|
||||
end;
|
||||
|
||||
// 关闭按钮
|
||||
procedure CancelBtnOnClick(hBtn:HWND);
|
||||
begin
|
||||
WizardForm.CancelButton.OnClick(WizardForm);
|
||||
end;
|
||||
|
||||
// 最小化按钮
|
||||
procedure MinBtnOnClick(hBtn:HWND);
|
||||
begin
|
||||
SendMessage(WizardForm.Handle,WM_SYSCOMMAND,61472,0);
|
||||
end;
|
||||
|
||||
// 浏览文件夹按钮
|
||||
procedure btnBrowserclick(hBtn:HWND);
|
||||
begin
|
||||
WizardForm.DirBrowseButton.OnClick(WizardForm);
|
||||
pathEdit.text := WizardForm.DirEdit.text;
|
||||
end;
|
||||
|
||||
// 路径选择器 change
|
||||
procedure pathEditChange(Sender: TObject);
|
||||
begin
|
||||
WizardForm.DirEdit.text:=pathEdit.Text ;
|
||||
end;
|
||||
|
||||
// 立即安装等按钮的操作就是不断地下一步
|
||||
procedure nextSetpBtnClick(hBtn:HWND);
|
||||
begin
|
||||
WizardForm.NextButton.OnClick(WizardForm);
|
||||
end;
|
||||
|
||||
// 安装的进度条
|
||||
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;
|
||||
w:=Round(650*pr/100);
|
||||
ImgSetPosition(progressbgImg,0,DpiScale(320),DpiScale(w),DpiScale(15));
|
||||
ImgSetVisiblePart(progressbgImg,0,0,w,DpiScale(15));
|
||||
ImgApplyChanges(WizardForm.Handle);
|
||||
end;
|
||||
end;
|
||||
|
||||
// 鼠标拖动
|
||||
procedure WizardMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
ReleaseCapture
|
||||
SendMessage(WizardForm.Handle, $0112, $F012, 0)
|
||||
end;
|
||||
|
||||
// 查看 license
|
||||
procedure btnShowLicenseClick(hBtn:HWND);
|
||||
begin
|
||||
if isWelcomePage=true then
|
||||
begin
|
||||
isWelcomePage:=false
|
||||
ImgSetVisibility(licenseImg,true)
|
||||
ImgSetVisibility(BGimg,false)
|
||||
ImgSetVisibility(labelReadImg,false)
|
||||
licenseRich.Height:=DpiScale(295)
|
||||
BtnSetVisibility(checkboxLicense,false)
|
||||
BtnSetVisibility(btnShowLicense,false)
|
||||
BtnSetVisibility(btnSetup,false)
|
||||
BtnSetVisibility(btnBrowser,false)
|
||||
pathEdit.Hide
|
||||
BtnSetVisibility(btnBack,true)
|
||||
end else
|
||||
begin
|
||||
isWelcomePage:=true
|
||||
ImgSetVisibility(BGimg,true)
|
||||
ImgSetVisibility(licenseImg,false)
|
||||
ImgSetVisibility(labelReadImg,true)
|
||||
licenseRich.Height:=0
|
||||
BtnSetVisibility(checkboxLicense,true)
|
||||
BtnSetVisibility(btnShowLicense,true)
|
||||
BtnSetVisibility(btnSetup,true)
|
||||
BtnSetVisibility(btnBrowser,true)
|
||||
pathEdit.show
|
||||
BtnSetVisibility(btnBack,false)
|
||||
end;
|
||||
ImgApplyChanges(WizardForm.Handle)
|
||||
end;
|
||||
|
||||
// 勾选查看 license
|
||||
procedure checkboxLicenseClick(hBtn:HWND);
|
||||
begin
|
||||
if BtnGetChecked(checkboxLicense)=true then
|
||||
begin
|
||||
BtnSetEnabled(btnSetup,true)
|
||||
end else
|
||||
begin
|
||||
BtnSetEnabled(btnSetup,false)
|
||||
end
|
||||
end;
|
||||
|
||||
// 该过程在开始的时候改变向导或者向导页,不要指望使用InitializeSetup函数实现改变向导页的功能,因为InitializeSetup函数触发时向导窗口并不存在。
|
||||
procedure InitializeWizard();
|
||||
var
|
||||
MainLabel: TLabel;
|
||||
begin
|
||||
|
||||
CurrentDPI := WizardForm.Font.PixelsPerInch;
|
||||
DpiScalePctg := 1000* CurrentDPI / 96;
|
||||
// 设置欢迎向导页的尺寸大小
|
||||
WizardForm.OuterNotebook.hide;
|
||||
WizardForm.Bevel.Hide;
|
||||
WizardForm.BorderStyle:=bsnone;
|
||||
WizardForm.Position:=poScreenCenter;
|
||||
// WizardForm.Center;
|
||||
WizardForm.Width:=DpiScale(650);
|
||||
WizardForm.Height:=DpiScale(450);
|
||||
// WizardForm.Color:=clWhite;
|
||||
isWelcomePage:=true;
|
||||
// WizardForm.InnerNotebook.Hide;
|
||||
// wizardform.Color:=TransparentColor;
|
||||
|
||||
// 添加可以拖动窗口的Label
|
||||
MainLabel := TLabel.Create(WizardForm);
|
||||
MainLabel.Parent := WizardForm;
|
||||
MainLabel.AutoSize := False;
|
||||
MainLabel.Left := 0;
|
||||
MainLabel.Top := 0;
|
||||
MainLabel.Width := WizardForm.Width;
|
||||
MainLabel.Height := WizardForm.Height;
|
||||
MainLabel.Caption := '';
|
||||
MainLabel.Transparent := True;
|
||||
MainLabel.OnMouseDown := @WizardMouseDown;
|
||||
|
||||
// 加载资源到 tmp 临时目录
|
||||
ExtractTemporaryFile('bg_welcome.png');
|
||||
ExtractTemporaryFile('bg_installing.png');
|
||||
ExtractTemporaryFile('bg_license.png');
|
||||
ExtractTemporaryFile('bg_finished.png');
|
||||
ExtractTemporaryFile('label_read.png');
|
||||
ExtractTemporaryFile('label_license.png');
|
||||
ExtractTemporaryFile('license.txt');
|
||||
ExtractTemporaryFile('btn_close.png');
|
||||
ExtractTemporaryFile('btn_min.png');
|
||||
ExtractTemporaryFile('btn_back.png');
|
||||
ExtractTemporaryFile('btn_setup.png');
|
||||
ExtractTemporaryFile('btn_browser.png');
|
||||
ExtractTemporaryFile('checkbox.png');
|
||||
ExtractTemporaryFile('btn_complete.png');
|
||||
ExtractTemporaryFile('loading.png');
|
||||
ExtractTemporaryFile('label_autorun.png');
|
||||
|
||||
// 关闭按钮样式
|
||||
CancelBtn:=BtnCreate(WizardForm.Handle,DpiScale(650-10-16),DpiScale(8),DpiScale(16),DpiScale(16),ExpandConstant('{tmp}\btn_close.png'),1,False)
|
||||
BtnSetEvent(CancelBtn,BtnClickEventID,WrapBtnCallback(@CancelBtnOnClick,1));
|
||||
|
||||
// 最小化按钮样式
|
||||
MinBtn:=BtnCreate(WizardForm.Handle,DpiScale(624-10-16),DpiScale(8),DpiScale(16),DpiScale(16),ExpandConstant('{tmp}\btn_min.png'),1,False)
|
||||
BtnSetEvent(MinBtn,BtnClickEventID,WrapBtnCallback(@MinBtnOnClick,1));
|
||||
|
||||
// 立即安装按钮样式
|
||||
btnSetup:=BtnCreate(WizardForm.Handle,DpiScale(195),DpiScale(340),DpiScale(260),DpiScale(44),ExpandConstant('{tmp}\btn_setup.png'),1,False)
|
||||
BtnSetEvent(btnSetup,BtnClickEventID,WrapBtnCallback(@nextSetpBtnClick,1));
|
||||
|
||||
// 返回按钮样式
|
||||
btnBack:=BtnCreate(WizardForm.Handle,DpiScale(285),DpiScale(390),DpiScale(80),DpiScale(32),ExpandConstant('{tmp}\btn_back.png'),1,False)
|
||||
BtnSetEvent(btnBack,BtnClickEventID,WrapBtnCallback(@btnShowLicenseClick,1));
|
||||
BtnSetVisibility(btnBack,false)
|
||||
|
||||
pathEdit:= TEdit.Create(WizardForm);
|
||||
with pathEdit do
|
||||
begin
|
||||
Parent:=WizardForm;
|
||||
text:=WizardForm.DirEdit.text;
|
||||
Font.Name:='宋体'
|
||||
BorderStyle:=bsNone;
|
||||
SetBounds(DpiScale(110),DpiScale(272),DpiScale(340),DpiScale(15))
|
||||
OnChange:=@pathEditChange;
|
||||
TabStop:=false;
|
||||
end;
|
||||
|
||||
// 浏览按钮样式
|
||||
btnBrowser:=BtnCreate(WizardForm.Handle,DpiScale(470),DpiScale(263),DpiScale(80),DpiScale(32),ExpandConstant('{tmp}\btn_browser.png'),1,False)
|
||||
BtnSetEvent(btnBrowser,BtnClickEventID,WrapBtnCallback(@btnBrowserclick,1));
|
||||
|
||||
PBOldProc:=SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBCallBack(@PBProc,4));
|
||||
|
||||
// 查看 license 的文本区域
|
||||
licenseRich:= TRichEditViewer.Create(WizardForm);
|
||||
with licenseRich do
|
||||
begin
|
||||
Parent:=WizardForm;
|
||||
ReadOnly:=true;
|
||||
SCROLLBARS:=ssVertical;
|
||||
font.Name:='宋体';
|
||||
font.Size:=12;
|
||||
Color:=clWhite;
|
||||
BorderStyle:=bsNone;
|
||||
SetBounds(DpiScale(40),DpiScale(65),DpiScale(570),0)
|
||||
Lines.LoadFromFile(ExpandConstant('{tmp}\license.txt'));
|
||||
TabStop:=false;
|
||||
end;
|
||||
|
||||
ImgApplyChanges(WizardForm.Handle)
|
||||
end;
|
||||
|
||||
// 在新向导页 (由CurPageID 指定) 显示后调用。
|
||||
procedure CurPageChanged(CurPageID: Integer);
|
||||
begin
|
||||
// 默认的流程按钮隐藏掉
|
||||
WizardForm.NextButton.Visible:=false;
|
||||
WizardForm.CancelButton.Height:=0;
|
||||
WizardForm.BackButton.Height:=0;
|
||||
|
||||
if CurPageID=wpWelcome then
|
||||
begin
|
||||
licenseImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\bg_license.png'),0,0,DpiScale(650),DpiScale(450),true,true);
|
||||
ImgSetVisibility(licenseImg,false)
|
||||
BGimg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\bg_welcome.png'),0,0,DpiScale(650),DpiScale(450),true,true);
|
||||
|
||||
// license 提示
|
||||
checkboxLicense:=BtnCreate(WizardForm.Handle,DpiScale(220),DpiScale(400),DpiScale(16),DpiScale(16),ExpandConstant('{tmp}\checkbox.png'),1,true)
|
||||
BtnSetEvent(checkboxLicense,BtnClickEventID,WrapBtnCallback(@checkboxLicenseClick,1))
|
||||
|
||||
// 默认勾选 阅读并同意
|
||||
BtnSetChecked(checkboxLicense,true)
|
||||
labelReadImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\label_read.png'),DpiScale(243),DpiScale(398),DpiScale(39),DpiScale(20),true,true);
|
||||
btnShowLicense:=BtnCreate(WizardForm.Handle,DpiScale(282),DpiScale(398),DpiScale(65),DpiScale(20),ExpandConstant('{tmp}\label_license.png'),DpiScale(4),false)
|
||||
BtnSetEvent(btnShowLicense,BtnClickEventID,WrapBtnCallback(@btnShowLicenseClick,1))
|
||||
|
||||
WizardForm.Width:=DpiScale(650);
|
||||
WizardForm.Height:=DpiScale(450);
|
||||
WizardForm.Show;
|
||||
end;
|
||||
|
||||
if CurPageID = wpInstalling then
|
||||
begin
|
||||
BtnSetPosition(checkboxLicense,DpiScale(560),DpiScale(421),DpiScale(75),DpiScale(15));
|
||||
pathEdit.Hide;
|
||||
BtnSetVisibility(btnBrowser,false)
|
||||
WizardForm.Height:=DpiScale(450)
|
||||
BtnSetVisibility(btnShowLicense,false);
|
||||
BtnSetVisibility(checkboxLicense,false);
|
||||
BGimg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\bg_installing.png'),0,0,DpiScale(650),DpiScale(450),true,true);
|
||||
|
||||
progressbgImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\loading.png'),0,DpiScale(320),DpiScale(650),0,True,True);
|
||||
|
||||
BtnSetVisibility(btnSetup,false);
|
||||
end;
|
||||
|
||||
if CurPageID = wpFinished then
|
||||
begin
|
||||
ImgSetVisibility(progressbgImg,false)
|
||||
btnSetup:=BtnCreate(WizardForm.Handle,DpiScale(195),DpiScale(340),DpiScale(260),DpiScale(44),ExpandConstant('{tmp}\btn_complete.png'),1,False)
|
||||
BtnSetEvent(btnSetup,BtnClickEventID,WrapBtnCallback(@nextSetpBtnClick,1));
|
||||
|
||||
BGimg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\bg_finished.png'),0,0,DpiScale(650),DpiScale(450),true,true);
|
||||
|
||||
// 是否自动运行
|
||||
checkboxAutoRun:=BtnCreate(WizardForm.Handle,DpiScale(275),DpiScale(400),DpiScale(16),DpiScale(16),ExpandConstant('{tmp}\checkbox.png'),1,true)
|
||||
labelAutoRunImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\label_autorun.png'),DpiScale(295),DpiScale(398),DpiScale(84),DpiScale(20),true,true);
|
||||
|
||||
// 默认勾选
|
||||
BtnSetChecked(checkboxAutoRun,true);
|
||||
|
||||
// 完成页面隐藏关闭和最小化
|
||||
BtnSetVisibility(CancelBtn,false);
|
||||
BtnSetVisibility(MinBtn,false);
|
||||
end;
|
||||
|
||||
ImgApplyChanges(WizardForm.Handle)
|
||||
end;
|
||||
|
||||
// 该过程在安装终止时被调用,注意及时在用户没有安装任何文件之前退出也会被调用。
|
||||
procedure DeinitializeSetup();
|
||||
var RCode: Integer;
|
||||
begin
|
||||
// 检查是否需要自动运行
|
||||
if BtngetChecked(checkboxAutoRun)=true then
|
||||
begin
|
||||
Exec(ExpandConstant('{app}\{#MyAppExeName}'),'','',SW_SHOW, ewNoWait,RCode);
|
||||
end;
|
||||
|
||||
gdipShutdown;
|
||||
end;
|
||||
|
69
InnoSetupBeauty01/main.iss
Normal file
@ -0,0 +1,69 @@
|
||||
; 该执行目录为 setup.iss 所在的目录,请注意拼接相对目录
|
||||
#define MyAppId "{{1AC4D338-0D28-47E4-9FC7-18929EDDF90D}"
|
||||
#define MyAppName "xhschool_test"
|
||||
#define MyAppNameZh "星火智慧课堂测试版"
|
||||
#define MyAppVersion "3.4.5"
|
||||
#define MyAppPublisher "码客说"
|
||||
#define MyAppURL "www.psvmc.cn"
|
||||
; 打包文件
|
||||
#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 "\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={#MyAppId}
|
||||
AppName={#MyAppName}
|
||||
AppVersion={#MyAppVersion}
|
||||
AppVerName={#MyAppName}
|
||||
AppPublisher={#MyAppPublisher}
|
||||
AppPublisherURL={#MyAppURL}
|
||||
AppSupportURL={#MyAppURL}
|
||||
AppUpdatesURL={#MyAppURL}
|
||||
DefaultDirName={autopf}\{#MyAppName}
|
||||
LicenseFile={#LicenseFilePath}
|
||||
OutputDir={#OutputPath}
|
||||
OutputBaseFilename={#OutputFileName}v{#MyAppVersion}
|
||||
SetupIconFile={#SetupIconFilePath}
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
PrivilegesRequired=admin
|
||||
Uninstallable=yes
|
||||
UninstallDisplayName={#MyAppNameZh}
|
||||
UninstallDisplayIcon={uninstallexe},0
|
||||
DefaultGroupName={#MyAppNameZh}
|
||||
Versioninfodescription={#MyAppName} 安装程序
|
||||
versioninfocopyright=Copyright(c) 2022
|
||||
VersionInfoProductName={#MyAppName}
|
||||
DisableReadyPage=yes
|
||||
DisableProgramGroupPage=yes
|
||||
DirExistsWarning=no
|
||||
DisableDirPage=yes
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce
|
||||
|
||||
[Files]
|
||||
Source: {#ResourcesPath}; DestDir: {tmp}; Flags: dontcopy solidbreak ; Attribs: hidden system
|
||||
Source: {#SourceMain}; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: {#SourceFolder};Excludes: "{#MyExcludes}";DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
|
||||
[Messages]
|
||||
SetupAppTitle={#MyAppName} 安装向导
|
||||
SetupWindowTitle={#MyAppName} 安装向导
|
||||
|
||||
[Icons]
|
||||
Name: "{commondesktop}\{#MyAppNameZh}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||
Name: "{group}\{#MyAppNameZh}"; Filename: "{app}\{#MyAppExeName}"
|
||||
Name: "{group}\卸载{#MyAppNameZh}"; Filename: "{uninstallexe}"
|
||||
|
||||
[Code]
|
||||
#include ".\include\code.iss"
|
BIN
InnoSetupBeauty01/psd/bg_license.psd
Normal file
BIN
InnoSetupBeauty01/psd/bg_welcome.psd
Normal file
BIN
InnoSetupBeauty01/psd/btn_browser.psd
Normal file
BIN
InnoSetupBeauty01/psd/btn_close.psd
Normal file
BIN
InnoSetupBeauty01/psd/btn_min.psd
Normal file
BIN
InnoSetupBeauty01/psd/btn_setup.psd
Normal file
BIN
InnoSetupBeauty01/psd/checkbox.psd
Normal file
BIN
InnoSetupBeauty01/psd/label_license.psd
Normal file
337
InnoSetupBeauty01/setup_resources/ChineseSimp.isl
Normal file
@ -0,0 +1,337 @@
|
||||
; *** Inno Setup version 5.5.0+ Chinese (Simplified) messages ***
|
||||
; by Mack Zhang (hua_wuxin@21cn.com)
|
||||
;
|
||||
; To download user-contributed translations of this file, go to:
|
||||
; http://www.jrsoftware.org/files/istrans/
|
||||
;
|
||||
; Note: When translating this text, do not add periods (.) to the end of
|
||||
; messages that didn't have them already, because on those messages Inno
|
||||
; Setup adds the periods automatically (appending a period would result in
|
||||
; two periods being displayed).
|
||||
|
||||
[LangOptions]
|
||||
; The following three entries are very important. Be sure to read and
|
||||
; understand the '[LangOptions] section' topic in the help file.
|
||||
LanguageName=<4E2D><6587><FF08><7B80><4F53><FF09>
|
||||
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=9
|
||||
;WelcomeFontName=Verdana
|
||||
;WelcomeFontSize=12
|
||||
;TitleFontName=Arial
|
||||
;TitleFontSize=29
|
||||
;CopyrightFontName=Arial
|
||||
;CopyrightFontSize=8
|
||||
|
||||
[Messages]
|
||||
|
||||
; *** Application titles
|
||||
SetupAppTitle=安装向导
|
||||
SetupWindowTitle=安装向导 - %1
|
||||
UninstallAppTitle=卸载向导
|
||||
UninstallAppFullTitle=%1 卸载向导
|
||||
|
||||
; *** Misc. common
|
||||
InformationTitle=信息
|
||||
ConfirmTitle=确认
|
||||
ErrorTitle=错误
|
||||
|
||||
; *** SetupLdr messages
|
||||
SetupLdrStartupMessage=安装向导将在你的电脑上安装 %1。你确定要继续吗?
|
||||
LdrCannotCreateTemp=无法创建临时文件。安装中止
|
||||
LdrCannotExecTemp=无法运行临时文件夹中的文件。安装中止
|
||||
|
||||
; *** Startup error messages
|
||||
LastErrorMessage=%1.%n%n错误 %2:%3
|
||||
SetupFileMissing=安装文件夹缺少文件 %1。请纠正此问题或者索取软件的新版本。
|
||||
SetupFileCorrupt=安装文件已损坏。请索取软件的新版本。
|
||||
SetupFileCorruptOrWrongVer=安装文件已损坏,或者与本安装向导的版本不兼容。请纠正此问题或者索取软件的新版本。
|
||||
InvalidParameter=一个错误的参数被传递到了命令行:%n%n%1
|
||||
SetupAlreadyRunning=安装已经运行。
|
||||
WindowsVersionNotSupported=本程序不支持您的电脑上运行的 Windows 版本。
|
||||
WindowsServicePackRequired=本程序需要 %1 Service Pack %2 或更新的版本。
|
||||
NotOnThisPlatform=本程序不能在 %1 上运行。
|
||||
OnlyOnThisPlatform=本程序必须在 %1 上运行。
|
||||
OnlyOnTheseArchitectures=本程序只能安装在为下列处理器架构设计的 Windows 版本中:%n%n%1
|
||||
MissingWOW64APIs=当前的 Windows 版本没有包含执行 64 位安装向导所需的函数。若要纠正此问题,请安装 Service Pack %1。
|
||||
WinVersionTooLowError=本程序需要 %1 v%2 或更高版本。
|
||||
WinVersionTooHighError=本程序不能安装在 %1 v%2 或更高版本上。
|
||||
AdminPrivilegesRequired=安装本程序时你必须以管理员身份登录。
|
||||
PowerUserPrivilegesRequired=安装本程序时你必须以管理员或 Power Users 组成员的身份登录。
|
||||
SetupAppRunningError=安装向导发现 %1 正在运行。%n%n请关闭其所有实例,然后单击“确定”继续,或单击“取消”退出。
|
||||
UninstallAppRunningError=卸载向导发现 %1 正在运行。%n%n请关闭其所有实例,然后单击“确定”继续,或单击“取消”退出。
|
||||
|
||||
; *** Misc. errors
|
||||
ErrorCreatingDir=安装向导无法创建文件夹“%1”
|
||||
ErrorTooManyFilesInDir=无法在文件夹“%1”中创建文件,因为它包含了太多文件
|
||||
|
||||
; *** Setup common messages
|
||||
ExitSetupTitle=退出安装
|
||||
ExitSetupMessage=安装尚未完成。如果你现在退出,软件将不会安装。%n%n你可以在其它时间重新运行安装向导来完成安装。%n%n现在退出安装吗?
|
||||
AboutSetupMenuItem=关于安装向导(&A)…
|
||||
AboutSetupTitle=关于安装向导
|
||||
AboutSetupMessage=%1 版本 %2%n%3%n%n%1 主页:%n%4
|
||||
AboutSetupNote=
|
||||
TranslatorNote=
|
||||
|
||||
; *** Buttons
|
||||
ButtonBack=< 上一步(&B)
|
||||
ButtonNext=下一步(&N) >
|
||||
ButtonInstall=安装(&I)
|
||||
ButtonOK=确定
|
||||
ButtonCancel=取消
|
||||
ButtonYes=是(&Y)
|
||||
ButtonYesToAll=全是(&A)
|
||||
ButtonNo=否(&N)
|
||||
ButtonNoToAll=全否(&O)
|
||||
ButtonFinish=完成(&F)
|
||||
ButtonBrowse=浏览(&B)…
|
||||
ButtonWizardBrowse=浏览(&R)…
|
||||
ButtonNewFolder=创建文件夹(&M)
|
||||
|
||||
; *** "Select Language" dialog messages
|
||||
SelectLanguageTitle=选择安装语言
|
||||
SelectLanguageLabel=选择安装期间要使用的语言:
|
||||
|
||||
; *** Common wizard text
|
||||
ClickNext=单击“下一步”继续,或单击“取消”退出安装。
|
||||
BeveledLabel=
|
||||
BrowseDialogTitle=浏览文件夹
|
||||
BrowseDialogLabel=选择一个文件夹,然后单击“确定”。
|
||||
NewFolderName=新建文件夹
|
||||
|
||||
; *** "Welcome" wizard page
|
||||
WelcomeLabel1=欢迎使用 [name] 安装向导
|
||||
WelcomeLabel2=安装向导将在你的电脑上安装 [name/ver]。%n%n建议你在继续之前关闭所有其它应用程序。
|
||||
|
||||
; *** "Password" wizard page
|
||||
WizardPassword=密码
|
||||
PasswordLabel1=本安装有密码保护。
|
||||
PasswordLabel3=请输入密码,然后单击“下一步”进入下一步。密码区分大小写。
|
||||
PasswordEditLabel=密码(&P):
|
||||
IncorrectPassword=你输入的密码不正确。请重试。
|
||||
|
||||
; *** "License Agreement" wizard page
|
||||
WizardLicense=许可协议
|
||||
LicenseLabel=请在继续之前阅读以下重要信息。
|
||||
LicenseLabel3=请阅读以下许可协议。在继续安装之前,你必须接受此协议的条款。
|
||||
LicenseAccepted=我接受协议(&A)
|
||||
LicenseNotAccepted=我不接受协议(&D)
|
||||
|
||||
; *** "Information" wizard pages
|
||||
WizardInfoBefore=信息
|
||||
InfoBeforeLabel=请在继续之前阅读以下重要信息。
|
||||
InfoBeforeClickLabel=当你准备好继续安装后,请单击“下一步”。
|
||||
WizardInfoAfter=信息
|
||||
InfoAfterLabel=请在继续之前阅读以下重要信息。
|
||||
InfoAfterClickLabel=当你准备好继续安装后,请单击“下一步”。
|
||||
|
||||
; *** "User Information" wizard page
|
||||
WizardUserInfo=用户信息
|
||||
UserInfoDesc=请输入你的信息。
|
||||
UserInfoName=用户名(&U):
|
||||
UserInfoOrg=组织(&O):
|
||||
UserInfoSerial=序列号(&S):
|
||||
UserInfoNameRequired=必须输入用户名。
|
||||
|
||||
; *** "Select Destination Location" wizard page
|
||||
WizardSelectDir=选择目标位置
|
||||
SelectDirDesc=将 [name] 安装到哪里?
|
||||
SelectDirLabel3=安装向导将把 [name] 安装到以下文件夹中。
|
||||
SelectDirBrowseLabel=若要继续,单击“下一步”。如果你要选择不同的文件夹,请单击“浏览”。
|
||||
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不存在。创建该文件夹吗?
|
||||
|
||||
; *** "Select Components" wizard page
|
||||
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
|
||||
ComponentsDiskSpaceMBLabel=当前的选择至少需要 [mb] MB 磁盘空间。
|
||||
|
||||
; *** "Select Additional Tasks" wizard page
|
||||
WizardSelectTasks=选择附加任务
|
||||
SelectTasksDesc=要执行哪些附加任务?
|
||||
SelectTasksLabel2=请选择在安装 [name] 期间安装向导要执行的附加任务,然后点击“下一步”。
|
||||
|
||||
; *** "Select Start Menu Folder" wizard page
|
||||
WizardSelectProgramGroup=选择开始菜单文件夹
|
||||
SelectStartMenuFolderDesc=把程序快捷方式放到哪里?
|
||||
SelectStartMenuFolderLabel3=安装向导将在以下开始菜单文件夹中创建程序快捷方式。
|
||||
SelectStartMenuFolderBrowseLabel=点击“下一步”进入下一步。如果你要选择不同的文件夹,请点击“浏览”。
|
||||
MustEnterGroupName=你必须输入文件夹名称
|
||||
GroupNameTooLong=文件夹名称或路径太长
|
||||
InvalidGroupName=文件夹名称无效
|
||||
BadGroupName=文件夹名称不能包含下列字符:%n%n%1
|
||||
NoProgramGroupCheck2=不创建开始菜单文件夹(&D)
|
||||
|
||||
; *** "Ready to Install" wizard page
|
||||
WizardReady=准备安装
|
||||
ReadyLabel1=安装向导现在准备开始安装 [name]。
|
||||
ReadyLabel2a=点击“安装”继续安装,如果你想要查看或者更改设置请点击“上一步”。
|
||||
ReadyLabel2b=点击“安装”继续安装。
|
||||
ReadyMemoUserInfo=用户信息:
|
||||
ReadyMemoDir=目标位置:
|
||||
ReadyMemoType=安装类型:
|
||||
ReadyMemoComponents=所选组件:
|
||||
ReadyMemoGroup=开始菜单文件夹:
|
||||
ReadyMemoTasks=附加任务:
|
||||
|
||||
; *** "Preparing to Install" wizard page
|
||||
WizardPreparing=正在准备安装
|
||||
PreparingDesc=安装向导正在准备安装 [name]。
|
||||
PreviousInstallNotCompleted=先前程序的安装/卸载尚未完成。你需要重启电脑来完成安装。%n%n电脑重启之后,请重新运行安装向导来完成 [name] 的安装。
|
||||
CannotContinue=安装不能继续。请点击“取消”退出。
|
||||
ApplicationsFound=安装向导需要更新被下列应用程序占用的文件。建议你允许自动关闭这些应用程序。
|
||||
ApplicationsFound2=安装向导需要更新被下列应用程序占用的文件。建议你允许自动关闭这些应用程序。安装完成后,安装向导会尝试重新启动这些应用程序。
|
||||
CloseApplications=自动关闭应用程序(&A)
|
||||
DontCloseApplications=不自动关闭应用程序(&D)
|
||||
ErrorCloseApplications=安装程序无法自动关闭已打开的应用程序,建议您在继续安装之前先关闭相关应用程序。
|
||||
|
||||
; *** "Installing" wizard page
|
||||
WizardInstalling=正在安装
|
||||
InstallingLabel=正在你的计算机中安装 [name],请稍等…
|
||||
|
||||
; *** "Setup Completed" wizard page
|
||||
FinishedHeadingLabel=完成 [name] 安装
|
||||
FinishedLabelNoIcons=安装向导已完成 [name] 的安装。
|
||||
FinishedLabel=安装向导已完成 [name] 的安装。可以通过选择已安装的图标来运行应用程序。
|
||||
ClickFinish=点击“完成”退出安装。
|
||||
FinishedRestartLabel=为了完成 [name] 的安装,安装向导必须重启电脑。你要立即重启吗?
|
||||
FinishedRestartMessage=为了完成 [name] 的安装,安装向导必须重启电脑。%n%n你要立即重启吗?
|
||||
ShowReadmeCheck=是,我要查看自述文件
|
||||
YesRadio=是,立即重启电脑(&Y)
|
||||
NoRadio=否,稍后重启电脑(&N)
|
||||
; used for example as 'Run MyProg.exe'
|
||||
RunEntryExec=运行 %1
|
||||
; used for example as 'View Readme.txt'
|
||||
RunEntryShellExec=查看 %1
|
||||
|
||||
; *** "Setup Needs the Next Disk" stuff
|
||||
ChangeDiskTitle=安装向导需要下一个磁盘
|
||||
SelectDiskLabel2=请插入磁盘 %1 并点击“确定”。%n%n如果在除了下面显示的文件夹以外的文件夹中找不到该磁盘上的文件,就请输入正确的路径或点击“浏览”。
|
||||
PathLabel=路径(&P):
|
||||
FileNotInDir2=文件“%1”不在“%2”中。请插入正确的磁盘或选择其他文件夹。
|
||||
SelectDirectoryLabel=请指定下一个磁盘的位置。
|
||||
|
||||
; *** Installation phase messages
|
||||
SetupAborted=安装尚未完成。%n%n请纠正问题并重新运行安装向导。
|
||||
EntryAbortRetryIgnore=点击“重试”重新尝试,点击“忽略”继续安装,或点击“中止”取消安装。
|
||||
|
||||
; *** Installation status messages
|
||||
StatusClosingApplications=正在关闭应用程序…
|
||||
StatusCreateDirs=正在创建文件夹…
|
||||
StatusExtractFiles=正在提取文件…
|
||||
StatusCreateIcons=正在创建快捷方式…
|
||||
StatusCreateIniEntries=正在创建 INI 项目…
|
||||
StatusCreateRegistryEntries=正在创建注册表项目…
|
||||
StatusRegisterFiles=正在注册文件…
|
||||
StatusSavingUninstall=正在保存卸载信息…
|
||||
StatusRunProgram=正在完成安装…
|
||||
StatusRestartingApplications=正在重启应用程序…
|
||||
StatusRollback=正在回滚更改…
|
||||
|
||||
; *** Misc. errors
|
||||
ErrorInternal2=内部错误:%1
|
||||
ErrorFunctionFailedNoCode=%1 失败
|
||||
ErrorFunctionFailed=%1 失败。代码 %2
|
||||
ErrorFunctionFailedWithMessage=%1 失败。代码 %2。%n%3
|
||||
ErrorExecutingProgram=无法执行文件:%n%1
|
||||
|
||||
; *** Registry errors
|
||||
ErrorRegOpenKey=打开注册表键时出错:%n%1\%2
|
||||
ErrorRegCreateKey=创建注册表键时出错:%n%1\%2
|
||||
ErrorRegWriteKey=写入注册表键时出错:%n%1\%2
|
||||
|
||||
; *** INI errors
|
||||
ErrorIniEntry=在文件“%1”中创建 INI 项目时出错。
|
||||
|
||||
; *** File copying errors
|
||||
FileAbortRetryIgnore=点击“重试”重新尝试,点击“忽略”跳过此文件(不推荐),或点击“中止”取消安装。
|
||||
FileAbortRetryIgnore2=点击“重试”重新尝试,点击“忽略”继续安装(不推荐),或点击“中止”取消安装。
|
||||
SourceIsCorrupted=源文件已损坏
|
||||
SourceDoesntExist=源文件“%1”不存在
|
||||
ExistingFileReadOnly=现有文件为只读。%n%n点击“重试”移除只读属性并重试,点击“忽略”跳过此文件,或点击“中止”取消安装。
|
||||
ErrorReadingExistingDest=读取现有文件时发生错误:
|
||||
FileExists=文件已存在。%n%n你要覆盖它吗?
|
||||
ExistingFileNewer=现有文件比安装向导要安装的还新。建议你保留现有文件。%n%n保留现有文件吗?
|
||||
ErrorChangingAttr=更改现有文件的属性时发生错误:
|
||||
ErrorCreatingTemp=在目标文件夹中创建文件时发生错误:
|
||||
ErrorReadingSource=读取源文件时发生错误:
|
||||
ErrorCopying=复制文件时发生错误:
|
||||
ErrorReplacingExistingFile=替换现有文件时发生错误:
|
||||
ErrorRestartReplace=重启后替换失败:
|
||||
ErrorRenamingTemp=重命名目标文件夹中的文件时发生错误:
|
||||
ErrorRegisterServer=无法注册 DLL/OCX:%1
|
||||
ErrorRegSvr32Failed=RegSvr32 失败。返回值:%1
|
||||
ErrorRegisterTypeLib=无法注册类型库:%1
|
||||
|
||||
; *** Post-installation errors
|
||||
ErrorOpeningReadme=打开自述文件时发生错误。
|
||||
ErrorRestartingComputer=安装向导无法重启电脑。请手动重启。
|
||||
|
||||
; *** Uninstaller messages
|
||||
UninstallNotFound=文件“%1”不存在。不能卸载。
|
||||
UninstallOpenError=文件“%1”不能打开。不能卸载
|
||||
UninstallUnsupportedVer=卸载日志文件“%1”的格式不能被此版本的卸载向导识别。不能卸载
|
||||
UninstallUnknownEntry=卸载日志中遇到一个未知的项目 (%1)
|
||||
ConfirmUninstall=卸载前请先确保 %1 客户端已被关闭。%n%n你是否确定要完全删除 %1 及其所有组件?
|
||||
UninstallOnlyOnWin64=此安装只能在 64 位 Windows 上卸载。
|
||||
OnlyAdminCanUninstall=此安装只能由具备管理员权限的用户卸载。
|
||||
UninstallStatusLabel=正在删除 %1,请稍等…
|
||||
UninstalledAll=%1 已成功删除。
|
||||
UninstalledMost=%1 卸载完成。%n%n某些项目不能删除,可以手动删除。
|
||||
UninstalledAndNeedsRestart=若要完成 %1 的卸载,必须重启电脑。%n%n你要立即重启吗?
|
||||
UninstallDataCorrupted=文件“%1”已损坏。不能卸载
|
||||
|
||||
; *** Uninstallation phase messages
|
||||
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=将 %1 与 %2 文件扩展名关联(&A)
|
||||
AssocingFileExtension=正在将 %1 与 %2 文件扩展名关联…
|
||||
AutoStartProgramGroupDescription=启动:
|
||||
AutoStartProgram=自动启动 %1
|
||||
AddonHostProgramNotFound=在你选择的文件夹中找不到 %1。%n%n是否仍然继续?
|
BIN
InnoSetupBeauty01/setup_resources/InnoCallback.dll
Normal file
BIN
InnoSetupBeauty01/setup_resources/bg_finished.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
InnoSetupBeauty01/setup_resources/bg_installing.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
InnoSetupBeauty01/setup_resources/bg_license.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
InnoSetupBeauty01/setup_resources/bg_welcome.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
InnoSetupBeauty01/setup_resources/botva2.dll
Normal file
BIN
InnoSetupBeauty01/setup_resources/btn_back.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
InnoSetupBeauty01/setup_resources/btn_browser.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
InnoSetupBeauty01/setup_resources/btn_close.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
InnoSetupBeauty01/setup_resources/btn_complete.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
InnoSetupBeauty01/setup_resources/btn_min.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
InnoSetupBeauty01/setup_resources/btn_setup.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
InnoSetupBeauty01/setup_resources/checkbox.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
InnoSetupBeauty01/setup_resources/label_autorun.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
InnoSetupBeauty01/setup_resources/label_license.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
InnoSetupBeauty01/setup_resources/label_read.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
1
InnoSetupBeauty01/setup_resources/license.txt
Normal file
@ -0,0 +1 @@
|
||||
欢迎使用本软件
|
BIN
InnoSetupBeauty01/setup_resources/loading.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
181
InnoSetupBeauty02/Main.iss
Normal 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"
|
||||
|
BIN
InnoSetupBeauty02/Output/控制台_1.0.0.exe
Normal file
BIN
InnoSetupBeauty02/PSD/background_finish.psd
Normal file
BIN
InnoSetupBeauty02/PSD/background_installing.psd
Normal file
BIN
InnoSetupBeauty02/PSD/background_messagebox.psd
Normal file
BIN
InnoSetupBeauty02/PSD/background_welcome.psd
Normal file
BIN
InnoSetupBeauty02/PSD/background_welcome_more.psd
Normal file
BIN
InnoSetupBeauty02/PSD/button_browse.psd
Normal file
BIN
InnoSetupBeauty02/PSD/button_cancel.psd
Normal file
BIN
InnoSetupBeauty02/PSD/button_close.psd
Normal file
BIN
InnoSetupBeauty02/PSD/button_customize_setup.psd
Normal file
BIN
InnoSetupBeauty02/PSD/button_finish.psd
Normal file
BIN
InnoSetupBeauty02/PSD/button_license.psd
Normal file
BIN
InnoSetupBeauty02/PSD/button_minimize.psd
Normal file
BIN
InnoSetupBeauty02/PSD/button_ok.psd
Normal file
BIN
InnoSetupBeauty02/PSD/button_setup_or_next.psd
Normal file
BIN
InnoSetupBeauty02/PSD/button_uncustomize_setup.psd
Normal file
BIN
InnoSetupBeauty02/PSD/checkbox_license.psd
Normal file
BIN
InnoSetupBeauty02/PSD/checkbox_setdefault.psd
Normal file
BIN
InnoSetupBeauty02/PSD/progressbar_background.psd
Normal file
BIN
InnoSetupBeauty02/PSD/progressbar_foreground.psd
Normal file
BIN
InnoSetupBeauty02/Setup.ico
Normal file
After Width: | Height: | Size: 264 KiB |
BIN
InnoSetupBeauty02/app/cmd.exe
Normal file
798
InnoSetupBeauty02/include/Code.iss
Normal 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;
|
29
InnoSetupBeauty02/include/botva2.iss
Normal 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';
|
365
InnoSetupBeauty02/lang/ChineseSimplified.isl
Normal 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您想要继续吗?
|
||||
|
BIN
InnoSetupBeauty02/tmp/InnoCallback.dll
Normal file
BIN
InnoSetupBeauty02/tmp/background_finish.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
InnoSetupBeauty02/tmp/background_installing.png
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
InnoSetupBeauty02/tmp/background_messagebox.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
InnoSetupBeauty02/tmp/background_welcome.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
InnoSetupBeauty02/tmp/background_welcome_more.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
InnoSetupBeauty02/tmp/botva2.dll
Normal file
BIN
InnoSetupBeauty02/tmp/button_browse.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
InnoSetupBeauty02/tmp/button_cancel.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
InnoSetupBeauty02/tmp/button_close.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
InnoSetupBeauty02/tmp/button_customize_setup.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
InnoSetupBeauty02/tmp/button_finish.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
InnoSetupBeauty02/tmp/button_license.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
InnoSetupBeauty02/tmp/button_minimize.png
Normal file
After Width: | Height: | Size: 783 B |
BIN
InnoSetupBeauty02/tmp/button_ok.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
InnoSetupBeauty02/tmp/button_setup_or_next.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
InnoSetupBeauty02/tmp/button_uncustomize_setup.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
InnoSetupBeauty02/tmp/checkbox_license.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
InnoSetupBeauty02/tmp/checkbox_setdefault.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
InnoSetupBeauty02/tmp/progressbar_background.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
InnoSetupBeauty02/tmp/progressbar_foreground.png
Normal file
After Width: | Height: | Size: 118 B |