- 浏览: 7814 次
最新评论
;此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
#include "{image}\fairy.iss"
[Setup]
;安装程序的描述名字
AppName=雨杰棋牌游戏3500
;应用程序版本
AppVersion=3.5.0.0
;应用程序版权所有的公司
VersionInfoCompany=江苏雨杰网络科技有限公司
;应用程序版本信息版权所有
VersionInfoCopyright=Copyright@1998-2015 江苏雨杰网络科技有限公司
;应用程序的评论
AppComments=江苏雨杰网络科技有限公司-中国第一家专业棋牌游戏开发公司
;版本信息
VersionInfoVersion=3.5.0.0
;应用发布
AppPublisher=江苏雨杰网络科技有限公司
;应用发布路径
AppPublisherURL=http://www.cnyxwl.com
;应用程序支持网址
AppSupportURL=http://www.cnyxwl.com
;应用程序更新网址
AppUpdatesURL=http://www.cnyxwl.com
;默认安装路径
DefaultDirName={pf}\yjqp3500
;系统程序目录下创建的快捷目录名
DefaultGroupName=雨杰棋牌游戏3500
;安装包的名字
OutputBaseFilename=雨杰棋牌游戏3500
;压缩模式
Compression=lzma2
;固态压缩模式
SolidCompression=yes
;允许无图标
AllowNoIcons=yes
;设置安装包的ico图标文件
SetupIconFile={image}\installer.ico
;禁用安装完成的页面
DisableReadyPage=yes
;禁用系统程序目录下创建的快捷目录完成的页面 有效值: auto, yes 或 no
DisableProgramGroupPage=yes
;内部压缩级别与算法
InternalCompressLevel=ultra64
;在系统程序目录下创建的快捷目录设置
[Icons]
Name: "{group}\雨杰棋牌游戏中心"; Filename: "{app}\GameLauncher.exe"; WorkingDir: "{app}" ;
Name: "{group}\{cm:ProgramOnTheWeb,雨杰棋牌游戏中心}"; Filename: "http://www.cnyxw.com/"
Name: "{group}\{cm:UninstallProgram,雨杰棋牌游戏中心}"; Filename: "{uninstallexe}";
Name: "{commondesktop}\雨杰棋牌游戏中心"; Filename: "{app}\GameLauncher.exe"; WorkingDir: "{app}" ;
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\雨杰棋牌游戏中心"; Filename: "{app}\GameLauncher.exe"; WorkingDir: "{app}" ;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
;安装包包含的文件
[Files]
Source: "{image}\*"; DestDir: {tmp}; Flags: dontcopy solidbreak;
;Source: "{app}\*"; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
type
TPBProc = function(h:hWnd;Msg,wParam,lParam:Longint):Longint;
TTimerProc = procedure(h:longword; msg:longword; idevent:longword; dwTime:longword);
TBtnEventProc = procedure(h:HWND);
function SetLayeredWindowAttributes(hwnd: HWND; crKey: TColor; bAlpha: BYTE; dwFlags: DWORD): Boolean; external 'SetLayeredWindowAttributes@user32.dll stdcall';
function GetWindowLong(Wnd: HWnd; Index: Integer): Longint; external 'GetWindowLongA@user32.dll stdcall';
function LoadCursorFromFile(FileName: String): Cardinal; external 'LoadCursorFromFileA@user32 stdcall';
function DeleteObject(p1: Longword): BOOL; external 'DeleteObject@gdi32.dll stdcall';
function GetSysColor(nIndex: Integer): DWORD; external 'GetSysColor@user32.dll stdcall';
function GetSystemMetrics(nIndex: Integer): Integer; external 'GetSystemMetrics@user32.dll stdcall';
function ReleaseCapture(): Longint; external 'ReleaseCapture@user32.dll stdcall';
function Sleep(Index: Integer): Longint; external 'Sleep@kernel32.dll stdcall';
function GetTickCount(): Longint; external 'GetTickCount@kernel32.dll stdcall';
function SetWindowLong(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall';
function LoadImage(hInst: THandle; ImageName: PChar; ImageType: UINT; X, Y: Integer; Flags: UINT): THandle; external 'LoadImageA@user32.dll stdcall';
function GetDC(hWnd: HWND): Longword; external 'GetDC@user32.dll stdcall';
function SetWindowRgn(hWnd: HWND; hRgn: LongWord; bRedraw: BOOL): Integer; external 'SetWindowRgn@user32.dll stdcall';
function ReleaseDC(hWnd: HWND; hDC: LongWord): Integer; external 'ReleaseDC@user32.dll stdcall';
function AddFontResource(FileName: PAnsiChar): Integer; external 'AddFontResourceA@gdi32.dll stdcall';
function RemoveFontResource(FileName: PAnsiChar): BOOL; external 'RemoveFontResourceA@gdi32.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';
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 WrapTimerProc(callback: TTimerProc; Paramcount: Integer): Longword; external 'wrapcallback@files:innocallback.dll stdcall';
function mciSendString(lpstrCommand, lpstrReturnString: PAnsiChar; uReturnLength: Cardinal; hWndCallback: HWND): Cardinal; external 'mciSendStringA@winmm.dll stdcall';
function sndPlaySound(lpszSoundName: AnsiString; uFlags: cardinal):integer; external 'sndPlaySoundA@winmm.dll stdcall';
procedure CreateFormFromImage(h:HWND; FileName:PAnsiChar); external 'CreateFormFromImage@files:botva2.dll stdcall';
function CreateBitmapRgn(DC: LongWord; Bitmap: HBITMAP; TransClr: DWORD; dX:integer; dY:integer): LongWord; external 'CreateBitmapRgn@files:botva2.dll stdcall';
procedure SetMinimizeAnimation(Value: Boolean); external 'SetMinimizeAnimation@files:botva2.dll stdcall';
function GetMinimizeAnimation: Boolean; external 'GetMinimizeAnimation@files:botva2.dll stdcall';
function ImgLoad(Wnd :HWND; FileNameAnsiChar; Left, Top, Width, Height :integer; Stretch, IsBkg :boolean) :Longint; external 'ImgLoad@files:botva2.dll stdcall';
procedure ImgSetVisiblePart(img:Longint; NewLeft, NewTop, NewWidth, NewHeight : integer); external 'ImgSetVisiblePart@files:botva2.dll stdcall';
procedure ImgSetVisibility(img :Longint; Visible :boolean); external 'ImgSetVisibility@files:botva2.dll stdcall';
function ImgGetVisibility(img:Longint):boolean; external 'ImgGetVisibility@files:botva2.dll stdcall';
procedure ImgApplyChanges(h:HWND); external 'ImgApplyChanges@files:botva2.dll stdcall';
procedure ImgSetPosition(img :Longint; NewLeft, NewTop, NewWidth, NewHeight :integer); external 'ImgSetPosition@files:botva2.dll stdcall';
function BtnCreate(hParent :HWND; Left, Top, Width, Height :integer; FileNameAnsiChar; ShadowWidth :integer; IsCheckBtn :boolean) :HWND; external 'BtnCreate@files:botva2.dll stdcall';
procedure BtnSetEvent(h :HWND; EventID :integer; Event :Longword); external 'BtnSetEvent@files:botva2.dll stdcall';
function WrapBtnCallback(Callback: TBtnEventProc; ParamCount: Integer): Longword; external 'wrapcallback@files:innocallback.dll stdcall delayload';
procedure gdipShutdown; external 'gdipShutdown@files:botva2.dll stdcall';
procedure BtnSetFont(h :HWND; Font :Cardinal); external 'BtnSetFont@files:botva2.dll stdcall';
procedure BtnSetText(h :HWND; TextAnsiChar); external 'BtnSetText@files:botva2.dll stdcall';
procedure BtnSetFontColor(h :HWND; NormalFontColor, FocusedFontColor, PressedFontColor, DisabledFontColor :Cardinal); external 'BtnSetFontColor@files:botva2.dll stdcall';
procedure BtnSetEnabled(h :HWND; Value :boolean); external 'BtnSetEnabled@files:botva2.dll stdcall';
procedure BtnSetVisibility(h :HWND; Value :boolean); external 'BtnSetVisibility@files:botva2.dll stdcall';
function BtnGetChecked(h :HWND) :boolean; external 'BtnGetChecked@files:botva2.dll stdcall';
procedure BtnSetChecked(h :HWND; Value :boolean); external 'BtnSetChecked@files:botva2.dll stdcall';
procedure ImgRelease(img :Longint); external 'ImgRelease@files:botva2.dll stdcall delayload';
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
const
TransparentColor = $ffffff;
TransparentPercent = 80;
WS_EX_LAYERED = $80000;
WS_EX_TRANSPARENT = $20;
LWA_COLORKEY = 1;
LWA_ALPHA = 2;
GWL_EXSTYLE = (-20);
SM_CYBORDER = 6;
SM_CYDLGFRAME = 8;
WM_SYSCOMMAND = $0112;
//鼠标指向
MyCursor1 = 101;
MyCursor2 = 102;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//按钮
BtnClickEventID = 1;
BtnMouseEnterEventID = 2;
var
M_top,M_left,l_top,l_left :Longint;
Nun :Longint;
Frame0,Frame1: TForm;
WizardFormImage: Longint; //背景图
MinBtn,CloseBtn,NextBtn: HWND; //右上角按钮+取消窗口
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//快捷方式选框
DesktopCheck,licenseCheck,RunAppCheck: HWND; //
DesktopLabel,licenseLabel,licenseLabelFile,PackFilePathLabel,PackFilePathTitle,RunAppLabel: TLabel;//
timer1 :TTimer;
gy,dh,io:integer;
//百分比
PrLabel: TLabel;
PBOldProc : Longint;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//百分比 1211
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;
sleep(50);
PrLabel.Caption:=IntToStr(Round(pr))+'%';
//显示图片进度 这个脚本用不着
// w:=Round(797*pr/100);
// ImgSetPosition(progressbgImg,2,230,w,23);
// ImgSetVisiblePart(progressbgImg,0,0,w,23);
// ImgApplyChanges(WizardForm.Handle);
end;
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//快捷方式
Function DesktopCheckClick(): Boolean;
begin
if BtnGetChecked(DesktopCheck) = true then
Result := true;
end;
function ColorToRGB(Color: TColor): Longint;
begin
if Color < 0 then
Result := GetSysColor(Color and $000000FF)
else
Result := Color;
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//释放文件到临时目录
procedure ExtractTmpFiles;
var
i : Integer;
ImgFile: AnsiString;
begin
ExtractTemporaryFile('bg0.png');
ExtractTemporaryFile('bg.png');
ExtractTemporaryFile('MinBtn.png');
ExtractTemporaryFile('CloseBtn.png');
ExtractTemporaryFile('install.png');
ExtractTemporaryFile('CheckBox.png');
ExtractTemporaryFile('pr.png');
ExtractTemporaryFile('license.txt');
ExtractTemporaryFile('dh0.png');
ExtractTemporaryFile('dh1.png');
ExtractTemporaryFile('dh2.png');
ExtractTemporaryFile('dh3.png');
ExtractTemporaryFile('dh4.png');
for i := 0 to 23 do
begin
ImgFile := format('%.1d',[i+1])+'.png';
ExtractTemporaryFile(ImgFile);
end;
end;
procedure Timer1Timer(Sender: TObject);
begin
gy:=gy+1;
if gy=io then
begin
CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh1.png'));
end;
if gy=io*2 then
begin
CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh2.png'));
end;
if gy=io*3 then
begin
CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh3.png'));
end;
if gy=io*4 then
begin
CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh4.png'));
end;
if gy=io*5 then
begin
CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh0.png'));
gy:=0;
end;
ImgApplyChanges(Frame1.Handle);
end;
procedure WizardFormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if Nun <> wpInstalling then
begin
ReleaseCapture
SendMessage(WizardForm.Handle, WM_SYSCOMMAND, $F012, 0)
end;
end;
procedure FrameMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if Nun <> wpInstalling then
begin
ReleaseCapture
SendMessage(Frame0.Handle, WM_SYSCOMMAND, $F012, 0)
end;
end;
procedure PlayListCallback(FrameCount: Integer);
begin
AnimateFairy('(0-23)', nil);
end;
procedure NextBtnClick(hBtn:HWND);
begin
WizardForm.NextButton.Click;
end;
procedure licenseCheckCheckClick(hBtn:HWND);
begin
if BtnGetChecked(licenseCheck) = true then
BtnSetEnabled(NextBtn,true)
else
BtnSetEnabled(NextBtn,false);
end;
procedure ShowLicense(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('', ExpandConstant('{tmp}\license.txt'),'', '', SW_SHOW, ewNoWait, ErrorCode)
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//文字路径
procedure NewDirBrowseButtonClick(Sender: TObject);
begin
WizardForm.DirBrowseButton.Click;
PackFilePathLabel.Caption:=MinimizePathName(WizardForm.DirEdit.Text, PackFilePathLabel.Font, PackFilePathLabel.Width-20);
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//创建异型窗口
procedure CreateFrame0;
begin
Frame0:=TForm.Create(nil);;
Frame0.BorderStyle:=bsNone;
CreateFormFromImage(Frame0.Handle,ExpandConstant('{tmp}\bg0.png'));
with TLabel.Create(Frame0) do begin
Parent:=Frame0;
AutoSize:=False;
Left:=0;
Top:=0;
Width:=Frame0.CLientWidth;
Height:=Frame0.ClientHeight;
end;
Frame0.show;
end;
procedure CreateFrame1;
begin
Frame1:=TForm.Create(nil);;
Frame1.BorderStyle:=bsNone;
CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh1.png'));
with TLabel.Create(Frame1) do begin
Parent:=Frame1;
AutoSize:=False;
Left:=0;
Top:=0;
Cursor:=crhand;
Width:=Frame1.CLientWidth;
Height:=Frame1.ClientHeight;
end;
Frame1.show;
end;
procedure install();
var
i,x, y: Integer;
ImgFile: AnsiString;
S: AnsiString;
TransparentColor1, BH: Integer;
begin
CreateFrame0;
CreateFrame1;
timer1 := TTimer.Create(WizardForm);
timer1.Name:='Timer1';
timer1.OnTimer:=@Timer1Timer;
timer1.Enabled:=True;
timer1.Interval:=1;
ClearImgList;
InitFairy(Frame0.Handle, 0, 100);
S := '';
BH := GetSystemMetrics(SM_CYBORDER) + GetSystemMetrics(SM_CYDLGFRAME);
x := -10; //(434-170)/2
y := -10;
TransparentColor1 := ColorToRGB(clFuchsia);
for i := 0 to 23 do
begin
ImgFile := format('%.1d',[i+1])+'.png';
if S <> '' then S := S + '|';
S := S + IntToStr(x) + '|' + IntToStr(y) + '|' + IntToStr(255) + '|' + IntToStr(TransparentColor1) + '|' + ExpandConstant('{tmp}\'+ImgFile);
end;
AddImgsToList(S, @PlayListCallback);
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//最小化按钮
procedure MinBtnOnClick(hBtn:HWND);
begin
SendMessage(WizardForm.Handle,WM_SYSCOMMAND,61472,0);
end;
//关闭按钮
procedure CloseBtnOnClick(hBtn:HWND);
begin
WizardForm.Close;
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//单击“取消”直接退出
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Cancel := false;
case Nun of
wpInstalling:begin end;
wpFinished:begin end;
else
begin
if MsgBox('是否退出本棋牌游戏的安装', mbConfirmation, MB_YESNO) = IDYES then
begin
Confirm:= false;
Cancel := true;
end;
end;
end;
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//雨杰网络棋牌游戏3500经典版本安装结束,点"完成"之后自动运行的程序
procedure RunApp();
var
RCode: Integer;
begin
if BtnGetChecked(RunappCheck) = true then
Exec(ExpandConstant('{app}\GameLauncher.exe'), '', '', SW_SHOW, ewNoWait, RCode);
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//跳过界面
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if PageID=wpSelectComponents then //跳过组件安装界面
result := true;
if PageID=wpWelcome then
result := true;
if PageID=wpSelectDir then
result := true;
end;
function InitializeSetup: Boolean;
var
ResultStr: String;
ResultCode: Integer;
begin
if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\雨杰棋牌游戏3500_is1', 'UninstallString', ResultStr) then
begin
if msgbox('检测到旧版本,点击"确定"将自动卸载旧版本,点击"取消"退出安装',mbInformation,MB_OKCANCEL)=idok then
begin
ResultStr := RemoveQuotes(ResultStr);
Exec(ResultStr, '/VERYSILENT', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
Result := true;
end else
begin
Result := False;
end
end else
begin
Result := true;
end
end;
procedure InitializeWizard();
begin
ExtractTmpFiles;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//初始化主界面 434,344
WizardForm.BorderStyle:=bsNone;
WizardForm.ClientWidth:=434;
WizardForm.ClientHeight:=384;
WizardForm.InnerNotebook.Hide;
WizardForm.OuterNotebook.Hide;
wizardform.Color:=TransparentColor;
WizardForm.Bevel.Hide;
WizardForm.Center
WizardForm.NextButton.Width:=0;
WizardForm.BackButton.Width:=0;
WizardForm.CancelButton.Width:=0;
WizardForm.OnMouseDown:=@WizardFormMouseDown;
M_top:=WizardForm.Top;
M_left:=WizardForm.Left;
WizardFormImage:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\bg.png'),ScaleX(0), ScaleY(0),434,384,True,True);
io:= 5;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//最小化按钮
MinBtn:=BtnCreate(WizardForm.Handle,390,15,11,11,ExpandConstant('{tmp}\MinBtn.png'),3,False);
BtnSetEvent(MinBtn,BtnClickEventID,WrapBtnCallback(@MinBtnOnClick,1));
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//关闭按钮
CloseBtn:=BtnCreate(WizardForm.Handle,410,15,11,11,ExpandConstant('{tmp}\CloseBtn.png'),3,False);
BtnSetEvent(CloseBtn,BtnClickEventID,WrapBtnCallback(@CloseBtnOnClick,1));
NextBtn:=BtnCreate(WizardForm.Handle,100,180,231,56,ExpandConstant('{tmp}\install.png'),3,False);
BtnSetEvent(NextBtn,BtnClickEventID,WrapBtnCallback(@NextBtnClick,1));
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//文件安装路径
PackFilePathTitle := TLabel.Create(WizardForm);
PackFilePathTitle.AutoSize:=true;
PackFilePathTitle.SetBounds(80 + (16), 240 + (12), ScaleY(98), ScaleX(14));
PackFilePathTitle.Transparent:=True;
PackFilePathTitle.Font.Name := '新宋体'
PackFilePathTitle.Font.Size := 10
PackFilePathTitle.Caption := '安装路径:';
PackFilePathTitle.Parent := WizardForm;
PackFilePathTitle.OnMouseDown:=@WizardFormMouseDown;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//路径
PackFilePathLabel := TLabel.Create(WizardForm);
PackFilePathLabel.AutoSize:=true;
PackFilePathLabel.SetBounds(145 + (16), 240 + (12), ScaleY(98), ScaleX(14));
PackFilePathLabel.Transparent:=True;
PackFilePathLabel.Font.Name := '新宋体'
PackFilePathLabel.Font.Size := 10
PackFilePathLabel.Font.Color := clblue;//4370433;
PackFilePathLabel.Font.Style := [fsUnderline];
PackFilePathLabel.Caption := WizardForm.DirEdit.Text;//MinimizePathName(WizardForm.DirEdit.Text, PackFilePathLabel.Font, PackFilePathLabel.Width-20);//WizardForm.DirEdit.Text;
PackFilePathLabel.Parent := WizardForm;
PackFilePathLabel.OnClick :=@NewDirBrowseButtonClick;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//许可协议
licenseCheck:=BtnCreate(WizardForm.Handle,80 + (16), 240 + (32), ScaleY(16), ScaleY(16),ExpandConstant('{tmp}\CheckBox.png'),1,true);
BtnSetChecked(licenseCheck,true);
BtnSetEvent(licenseCheck,BtnClickEventID,WrapBtnCallback(@licenseCheckCheckClick,1));
licenseLabel := TLabel.Create(WizardForm);
licenseLabel.AutoSize:=true;
licenseLabel.SetBounds(80 + (35), 240 + (32), ScaleY(98), ScaleX(14));
licenseLabel.Transparent:=True;
licenseLabel.Font.Name := '新宋体'
licenseLabel.Font.Size := 10
licenseLabel.Caption := '已经阅读,并同意';
licenseLabel.Parent := WizardForm;
licenseLabel.OnMouseDown:=@WizardFormMouseDown;
licenseLabelFile := TLabel.Create(WizardForm);
licenseLabelFile.AutoSize:=true;
licenseLabelFile.SetBounds(190 + (40), 240 + (32), ScaleY(98), ScaleX(14));
licenseLabelFile.Cursor:= crHand;
licenseLabelFile.Transparent:=True;
licenseLabelFile.Font.Color := clblue;//4370433;
licenseLabelFile.Font.Name := '新宋体'
licenseLabelFile.Font.Size := 10
licenseLabelFile.Font.Style := [fsUnderline];
licenseLabelFile.Caption := '许可协议';
licenseLabelFile.Parent := WizardForm;
licenseLabelFile.OnClick:=@ShowLicense;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//快捷方式选框
//桌面快捷方式
DesktopCheck:=BtnCreate(WizardForm.Handle,80 + (16), 240 + (52), ScaleY(16), ScaleY(16),ExpandConstant('{tmp}\CheckBox.png'),1,true);
BtnSetChecked(DesktopCheck,true);
DesktopLabel := TLabel.Create(WizardForm);
DesktopLabel.AutoSize:=true;
DesktopLabel.SetBounds(80 + (35), 240 + (52), ScaleY(98), ScaleX(14));
DesktopLabel.Transparent:=True;
//DesktopLabel.Font.Color := clWhite;
DesktopLabel.Font.Name := '新宋体'
DesktopLabel.Font.Size := 10
DesktopLabel.Caption := '创建桌面快捷方式';
DesktopLabel.Parent := WizardForm;
DesktopLabel.OnMouseDown:=@WizardFormMouseDown;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//安装完成后 是否立即启动程序
RunAppCheck:=BtnCreate(WizardForm.Handle,80 + (16), 240 + (72), ScaleY(16), ScaleY(16),ExpandConstant('{tmp}\CheckBox.png'),1,true);
BtnSetChecked(RunAppCheck,true);
RunAppLabel := TLabel.Create(WizardForm);
RunAppLabel.AutoSize:=true;
RunAppLabel.SetBounds(80 + (35), 240 + (72), ScaleY(98), ScaleX(14));
RunAppLabel.Transparent:=True;
RunAppLabel.Font.Name := '新宋体'
RunAppLabel.Font.Size := 10
RunAppLabel.Caption := '安装完成后,立即运行程序';
RunAppLabel.Parent := WizardForm;
RunAppLabel.OnMouseDown:=@WizardFormMouseDown;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//百分比 1211
PrLabel:=TLabel.Create(WizardForm);
PrLabel.Parent:=WizardForm;
PrLabel.Left:=200;
PrLabel.Top:=280;;
PrLabel.Caption:='0%';
PrLabel.Font.Style := [fsBold];
PrLabel.Font.Color:=$f4e8e8;
PrLabel.Font.Size:= 20
PrLabel.Transparent:=True;
PBOldProc:=SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBCallBack(@PBProc,4));
PrLabel.Hide;
Nun := wpWelcome;
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpInstalling then
begin
Nun :=wpInstalling;
DesktopLabel.Hide;
licenseLabel.Hide;
licenseLabelFile.Hide;
PackFilePathLabel.Hide;
PackFilePathTitle.Hide;
RunAppLabel.Hide;
BtnSetVisibility(MinBtn,False);
BtnSetVisibility(CloseBtn,False);
BtnSetVisibility(NextBtn,False);
BtnSetVisibility(DesktopCheck,False);
BtnSetVisibility(licenseCheck,False);
BtnSetVisibility(RunAppCheck,False);
ImgRelease(WizardFormImage)
WizardFormImage:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\pr.png'),ScaleX(170), ScaleY(303),100,29,True,True);
SetWindowLong(WizardForm.Handle, GWL_EXSTYLE, GetWindowLong(WizardForm.Handle, GWL_EXSTYLE) or WS_EX_LAYERED)
SetLayeredWindowAttributes(WizardForm.Handle, TransparentColor,220, LWA_COLORKEY or LWA_ALPHA)
install;//安装过程中的动画
WizardForm.Left:=M_left;
WizardForm.Top:=M_top;
PrLabel.Show;
end;
if CurPageID = wpFinished then
begin
Frame0.Close;
HideFairy;
UninitFairy;
ImgRelease(WizardFormImage)
PrLabel.Hide;
RunApp;//安装完成后执行程序
WizardForm.NextButton.Click;
// if MsgBox('恭喜你 xxx已经安装完成,是否执行 xxx', mbConfirmation, MB_YESNO) = IDYES then
// begin
// Exec(ExpandConstant('{app}\GameLauncher.exe'), '', '', SW_SHOW, ewNoWait, RCode);
// end;
end;
ImgApplyChanges(WizardForm.Handle);//如果没有它就显示不了图像
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
procedure DeinitializeSetup();
begin
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
gdipShutdown; //背景图
HideFairy;
//WizardForm.Hide;
UninitFairy;
if PBOldProc<>0 then SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBOldProc);
end;
#include "{image}\fairy.iss"
[Setup]
;安装程序的描述名字
AppName=雨杰棋牌游戏3500
;应用程序版本
AppVersion=3.5.0.0
;应用程序版权所有的公司
VersionInfoCompany=江苏雨杰网络科技有限公司
;应用程序版本信息版权所有
VersionInfoCopyright=Copyright@1998-2015 江苏雨杰网络科技有限公司
;应用程序的评论
AppComments=江苏雨杰网络科技有限公司-中国第一家专业棋牌游戏开发公司
;版本信息
VersionInfoVersion=3.5.0.0
;应用发布
AppPublisher=江苏雨杰网络科技有限公司
;应用发布路径
AppPublisherURL=http://www.cnyxwl.com
;应用程序支持网址
AppSupportURL=http://www.cnyxwl.com
;应用程序更新网址
AppUpdatesURL=http://www.cnyxwl.com
;默认安装路径
DefaultDirName={pf}\yjqp3500
;系统程序目录下创建的快捷目录名
DefaultGroupName=雨杰棋牌游戏3500
;安装包的名字
OutputBaseFilename=雨杰棋牌游戏3500
;压缩模式
Compression=lzma2
;固态压缩模式
SolidCompression=yes
;允许无图标
AllowNoIcons=yes
;设置安装包的ico图标文件
SetupIconFile={image}\installer.ico
;禁用安装完成的页面
DisableReadyPage=yes
;禁用系统程序目录下创建的快捷目录完成的页面 有效值: auto, yes 或 no
DisableProgramGroupPage=yes
;内部压缩级别与算法
InternalCompressLevel=ultra64
;在系统程序目录下创建的快捷目录设置
[Icons]
Name: "{group}\雨杰棋牌游戏中心"; Filename: "{app}\GameLauncher.exe"; WorkingDir: "{app}" ;
Name: "{group}\{cm:ProgramOnTheWeb,雨杰棋牌游戏中心}"; Filename: "http://www.cnyxw.com/"
Name: "{group}\{cm:UninstallProgram,雨杰棋牌游戏中心}"; Filename: "{uninstallexe}";
Name: "{commondesktop}\雨杰棋牌游戏中心"; Filename: "{app}\GameLauncher.exe"; WorkingDir: "{app}" ;
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\雨杰棋牌游戏中心"; Filename: "{app}\GameLauncher.exe"; WorkingDir: "{app}" ;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
;安装包包含的文件
[Files]
Source: "{image}\*"; DestDir: {tmp}; Flags: dontcopy solidbreak;
;Source: "{app}\*"; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
type
TPBProc = function(h:hWnd;Msg,wParam,lParam:Longint):Longint;
TTimerProc = procedure(h:longword; msg:longword; idevent:longword; dwTime:longword);
TBtnEventProc = procedure(h:HWND);
function SetLayeredWindowAttributes(hwnd: HWND; crKey: TColor; bAlpha: BYTE; dwFlags: DWORD): Boolean; external 'SetLayeredWindowAttributes@user32.dll stdcall';
function GetWindowLong(Wnd: HWnd; Index: Integer): Longint; external 'GetWindowLongA@user32.dll stdcall';
function LoadCursorFromFile(FileName: String): Cardinal; external 'LoadCursorFromFileA@user32 stdcall';
function DeleteObject(p1: Longword): BOOL; external 'DeleteObject@gdi32.dll stdcall';
function GetSysColor(nIndex: Integer): DWORD; external 'GetSysColor@user32.dll stdcall';
function GetSystemMetrics(nIndex: Integer): Integer; external 'GetSystemMetrics@user32.dll stdcall';
function ReleaseCapture(): Longint; external 'ReleaseCapture@user32.dll stdcall';
function Sleep(Index: Integer): Longint; external 'Sleep@kernel32.dll stdcall';
function GetTickCount(): Longint; external 'GetTickCount@kernel32.dll stdcall';
function SetWindowLong(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall';
function LoadImage(hInst: THandle; ImageName: PChar; ImageType: UINT; X, Y: Integer; Flags: UINT): THandle; external 'LoadImageA@user32.dll stdcall';
function GetDC(hWnd: HWND): Longword; external 'GetDC@user32.dll stdcall';
function SetWindowRgn(hWnd: HWND; hRgn: LongWord; bRedraw: BOOL): Integer; external 'SetWindowRgn@user32.dll stdcall';
function ReleaseDC(hWnd: HWND; hDC: LongWord): Integer; external 'ReleaseDC@user32.dll stdcall';
function AddFontResource(FileName: PAnsiChar): Integer; external 'AddFontResourceA@gdi32.dll stdcall';
function RemoveFontResource(FileName: PAnsiChar): BOOL; external 'RemoveFontResourceA@gdi32.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';
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 WrapTimerProc(callback: TTimerProc; Paramcount: Integer): Longword; external 'wrapcallback@files:innocallback.dll stdcall';
function mciSendString(lpstrCommand, lpstrReturnString: PAnsiChar; uReturnLength: Cardinal; hWndCallback: HWND): Cardinal; external 'mciSendStringA@winmm.dll stdcall';
function sndPlaySound(lpszSoundName: AnsiString; uFlags: cardinal):integer; external 'sndPlaySoundA@winmm.dll stdcall';
procedure CreateFormFromImage(h:HWND; FileName:PAnsiChar); external 'CreateFormFromImage@files:botva2.dll stdcall';
function CreateBitmapRgn(DC: LongWord; Bitmap: HBITMAP; TransClr: DWORD; dX:integer; dY:integer): LongWord; external 'CreateBitmapRgn@files:botva2.dll stdcall';
procedure SetMinimizeAnimation(Value: Boolean); external 'SetMinimizeAnimation@files:botva2.dll stdcall';
function GetMinimizeAnimation: Boolean; external 'GetMinimizeAnimation@files:botva2.dll stdcall';
function ImgLoad(Wnd :HWND; FileNameAnsiChar; Left, Top, Width, Height :integer; Stretch, IsBkg :boolean) :Longint; external 'ImgLoad@files:botva2.dll stdcall';
procedure ImgSetVisiblePart(img:Longint; NewLeft, NewTop, NewWidth, NewHeight : integer); external 'ImgSetVisiblePart@files:botva2.dll stdcall';
procedure ImgSetVisibility(img :Longint; Visible :boolean); external 'ImgSetVisibility@files:botva2.dll stdcall';
function ImgGetVisibility(img:Longint):boolean; external 'ImgGetVisibility@files:botva2.dll stdcall';
procedure ImgApplyChanges(h:HWND); external 'ImgApplyChanges@files:botva2.dll stdcall';
procedure ImgSetPosition(img :Longint; NewLeft, NewTop, NewWidth, NewHeight :integer); external 'ImgSetPosition@files:botva2.dll stdcall';
function BtnCreate(hParent :HWND; Left, Top, Width, Height :integer; FileNameAnsiChar; ShadowWidth :integer; IsCheckBtn :boolean) :HWND; external 'BtnCreate@files:botva2.dll stdcall';
procedure BtnSetEvent(h :HWND; EventID :integer; Event :Longword); external 'BtnSetEvent@files:botva2.dll stdcall';
function WrapBtnCallback(Callback: TBtnEventProc; ParamCount: Integer): Longword; external 'wrapcallback@files:innocallback.dll stdcall delayload';
procedure gdipShutdown; external 'gdipShutdown@files:botva2.dll stdcall';
procedure BtnSetFont(h :HWND; Font :Cardinal); external 'BtnSetFont@files:botva2.dll stdcall';
procedure BtnSetText(h :HWND; TextAnsiChar); external 'BtnSetText@files:botva2.dll stdcall';
procedure BtnSetFontColor(h :HWND; NormalFontColor, FocusedFontColor, PressedFontColor, DisabledFontColor :Cardinal); external 'BtnSetFontColor@files:botva2.dll stdcall';
procedure BtnSetEnabled(h :HWND; Value :boolean); external 'BtnSetEnabled@files:botva2.dll stdcall';
procedure BtnSetVisibility(h :HWND; Value :boolean); external 'BtnSetVisibility@files:botva2.dll stdcall';
function BtnGetChecked(h :HWND) :boolean; external 'BtnGetChecked@files:botva2.dll stdcall';
procedure BtnSetChecked(h :HWND; Value :boolean); external 'BtnSetChecked@files:botva2.dll stdcall';
procedure ImgRelease(img :Longint); external 'ImgRelease@files:botva2.dll stdcall delayload';
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
const
TransparentColor = $ffffff;
TransparentPercent = 80;
WS_EX_LAYERED = $80000;
WS_EX_TRANSPARENT = $20;
LWA_COLORKEY = 1;
LWA_ALPHA = 2;
GWL_EXSTYLE = (-20);
SM_CYBORDER = 6;
SM_CYDLGFRAME = 8;
WM_SYSCOMMAND = $0112;
//鼠标指向
MyCursor1 = 101;
MyCursor2 = 102;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//按钮
BtnClickEventID = 1;
BtnMouseEnterEventID = 2;
var
M_top,M_left,l_top,l_left :Longint;
Nun :Longint;
Frame0,Frame1: TForm;
WizardFormImage: Longint; //背景图
MinBtn,CloseBtn,NextBtn: HWND; //右上角按钮+取消窗口
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//快捷方式选框
DesktopCheck,licenseCheck,RunAppCheck: HWND; //
DesktopLabel,licenseLabel,licenseLabelFile,PackFilePathLabel,PackFilePathTitle,RunAppLabel: TLabel;//
timer1 :TTimer;
gy,dh,io:integer;
//百分比
PrLabel: TLabel;
PBOldProc : Longint;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//百分比 1211
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;
sleep(50);
PrLabel.Caption:=IntToStr(Round(pr))+'%';
//显示图片进度 这个脚本用不着
// w:=Round(797*pr/100);
// ImgSetPosition(progressbgImg,2,230,w,23);
// ImgSetVisiblePart(progressbgImg,0,0,w,23);
// ImgApplyChanges(WizardForm.Handle);
end;
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//快捷方式
Function DesktopCheckClick(): Boolean;
begin
if BtnGetChecked(DesktopCheck) = true then
Result := true;
end;
function ColorToRGB(Color: TColor): Longint;
begin
if Color < 0 then
Result := GetSysColor(Color and $000000FF)
else
Result := Color;
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//释放文件到临时目录
procedure ExtractTmpFiles;
var
i : Integer;
ImgFile: AnsiString;
begin
ExtractTemporaryFile('bg0.png');
ExtractTemporaryFile('bg.png');
ExtractTemporaryFile('MinBtn.png');
ExtractTemporaryFile('CloseBtn.png');
ExtractTemporaryFile('install.png');
ExtractTemporaryFile('CheckBox.png');
ExtractTemporaryFile('pr.png');
ExtractTemporaryFile('license.txt');
ExtractTemporaryFile('dh0.png');
ExtractTemporaryFile('dh1.png');
ExtractTemporaryFile('dh2.png');
ExtractTemporaryFile('dh3.png');
ExtractTemporaryFile('dh4.png');
for i := 0 to 23 do
begin
ImgFile := format('%.1d',[i+1])+'.png';
ExtractTemporaryFile(ImgFile);
end;
end;
procedure Timer1Timer(Sender: TObject);
begin
gy:=gy+1;
if gy=io then
begin
CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh1.png'));
end;
if gy=io*2 then
begin
CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh2.png'));
end;
if gy=io*3 then
begin
CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh3.png'));
end;
if gy=io*4 then
begin
CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh4.png'));
end;
if gy=io*5 then
begin
CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh0.png'));
gy:=0;
end;
ImgApplyChanges(Frame1.Handle);
end;
procedure WizardFormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if Nun <> wpInstalling then
begin
ReleaseCapture
SendMessage(WizardForm.Handle, WM_SYSCOMMAND, $F012, 0)
end;
end;
procedure FrameMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if Nun <> wpInstalling then
begin
ReleaseCapture
SendMessage(Frame0.Handle, WM_SYSCOMMAND, $F012, 0)
end;
end;
procedure PlayListCallback(FrameCount: Integer);
begin
AnimateFairy('(0-23)', nil);
end;
procedure NextBtnClick(hBtn:HWND);
begin
WizardForm.NextButton.Click;
end;
procedure licenseCheckCheckClick(hBtn:HWND);
begin
if BtnGetChecked(licenseCheck) = true then
BtnSetEnabled(NextBtn,true)
else
BtnSetEnabled(NextBtn,false);
end;
procedure ShowLicense(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('', ExpandConstant('{tmp}\license.txt'),'', '', SW_SHOW, ewNoWait, ErrorCode)
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//文字路径
procedure NewDirBrowseButtonClick(Sender: TObject);
begin
WizardForm.DirBrowseButton.Click;
PackFilePathLabel.Caption:=MinimizePathName(WizardForm.DirEdit.Text, PackFilePathLabel.Font, PackFilePathLabel.Width-20);
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//创建异型窗口
procedure CreateFrame0;
begin
Frame0:=TForm.Create(nil);;
Frame0.BorderStyle:=bsNone;
CreateFormFromImage(Frame0.Handle,ExpandConstant('{tmp}\bg0.png'));
with TLabel.Create(Frame0) do begin
Parent:=Frame0;
AutoSize:=False;
Left:=0;
Top:=0;
Width:=Frame0.CLientWidth;
Height:=Frame0.ClientHeight;
end;
Frame0.show;
end;
procedure CreateFrame1;
begin
Frame1:=TForm.Create(nil);;
Frame1.BorderStyle:=bsNone;
CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh1.png'));
with TLabel.Create(Frame1) do begin
Parent:=Frame1;
AutoSize:=False;
Left:=0;
Top:=0;
Cursor:=crhand;
Width:=Frame1.CLientWidth;
Height:=Frame1.ClientHeight;
end;
Frame1.show;
end;
procedure install();
var
i,x, y: Integer;
ImgFile: AnsiString;
S: AnsiString;
TransparentColor1, BH: Integer;
begin
CreateFrame0;
CreateFrame1;
timer1 := TTimer.Create(WizardForm);
timer1.Name:='Timer1';
timer1.OnTimer:=@Timer1Timer;
timer1.Enabled:=True;
timer1.Interval:=1;
ClearImgList;
InitFairy(Frame0.Handle, 0, 100);
S := '';
BH := GetSystemMetrics(SM_CYBORDER) + GetSystemMetrics(SM_CYDLGFRAME);
x := -10; //(434-170)/2
y := -10;
TransparentColor1 := ColorToRGB(clFuchsia);
for i := 0 to 23 do
begin
ImgFile := format('%.1d',[i+1])+'.png';
if S <> '' then S := S + '|';
S := S + IntToStr(x) + '|' + IntToStr(y) + '|' + IntToStr(255) + '|' + IntToStr(TransparentColor1) + '|' + ExpandConstant('{tmp}\'+ImgFile);
end;
AddImgsToList(S, @PlayListCallback);
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//最小化按钮
procedure MinBtnOnClick(hBtn:HWND);
begin
SendMessage(WizardForm.Handle,WM_SYSCOMMAND,61472,0);
end;
//关闭按钮
procedure CloseBtnOnClick(hBtn:HWND);
begin
WizardForm.Close;
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//单击“取消”直接退出
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Cancel := false;
case Nun of
wpInstalling:begin end;
wpFinished:begin end;
else
begin
if MsgBox('是否退出本棋牌游戏的安装', mbConfirmation, MB_YESNO) = IDYES then
begin
Confirm:= false;
Cancel := true;
end;
end;
end;
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//雨杰网络棋牌游戏3500经典版本安装结束,点"完成"之后自动运行的程序
procedure RunApp();
var
RCode: Integer;
begin
if BtnGetChecked(RunappCheck) = true then
Exec(ExpandConstant('{app}\GameLauncher.exe'), '', '', SW_SHOW, ewNoWait, RCode);
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//跳过界面
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if PageID=wpSelectComponents then //跳过组件安装界面
result := true;
if PageID=wpWelcome then
result := true;
if PageID=wpSelectDir then
result := true;
end;
function InitializeSetup: Boolean;
var
ResultStr: String;
ResultCode: Integer;
begin
if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\雨杰棋牌游戏3500_is1', 'UninstallString', ResultStr) then
begin
if msgbox('检测到旧版本,点击"确定"将自动卸载旧版本,点击"取消"退出安装',mbInformation,MB_OKCANCEL)=idok then
begin
ResultStr := RemoveQuotes(ResultStr);
Exec(ResultStr, '/VERYSILENT', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
Result := true;
end else
begin
Result := False;
end
end else
begin
Result := true;
end
end;
procedure InitializeWizard();
begin
ExtractTmpFiles;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//初始化主界面 434,344
WizardForm.BorderStyle:=bsNone;
WizardForm.ClientWidth:=434;
WizardForm.ClientHeight:=384;
WizardForm.InnerNotebook.Hide;
WizardForm.OuterNotebook.Hide;
wizardform.Color:=TransparentColor;
WizardForm.Bevel.Hide;
WizardForm.Center
WizardForm.NextButton.Width:=0;
WizardForm.BackButton.Width:=0;
WizardForm.CancelButton.Width:=0;
WizardForm.OnMouseDown:=@WizardFormMouseDown;
M_top:=WizardForm.Top;
M_left:=WizardForm.Left;
WizardFormImage:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\bg.png'),ScaleX(0), ScaleY(0),434,384,True,True);
io:= 5;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//最小化按钮
MinBtn:=BtnCreate(WizardForm.Handle,390,15,11,11,ExpandConstant('{tmp}\MinBtn.png'),3,False);
BtnSetEvent(MinBtn,BtnClickEventID,WrapBtnCallback(@MinBtnOnClick,1));
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//关闭按钮
CloseBtn:=BtnCreate(WizardForm.Handle,410,15,11,11,ExpandConstant('{tmp}\CloseBtn.png'),3,False);
BtnSetEvent(CloseBtn,BtnClickEventID,WrapBtnCallback(@CloseBtnOnClick,1));
NextBtn:=BtnCreate(WizardForm.Handle,100,180,231,56,ExpandConstant('{tmp}\install.png'),3,False);
BtnSetEvent(NextBtn,BtnClickEventID,WrapBtnCallback(@NextBtnClick,1));
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//文件安装路径
PackFilePathTitle := TLabel.Create(WizardForm);
PackFilePathTitle.AutoSize:=true;
PackFilePathTitle.SetBounds(80 + (16), 240 + (12), ScaleY(98), ScaleX(14));
PackFilePathTitle.Transparent:=True;
PackFilePathTitle.Font.Name := '新宋体'
PackFilePathTitle.Font.Size := 10
PackFilePathTitle.Caption := '安装路径:';
PackFilePathTitle.Parent := WizardForm;
PackFilePathTitle.OnMouseDown:=@WizardFormMouseDown;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//路径
PackFilePathLabel := TLabel.Create(WizardForm);
PackFilePathLabel.AutoSize:=true;
PackFilePathLabel.SetBounds(145 + (16), 240 + (12), ScaleY(98), ScaleX(14));
PackFilePathLabel.Transparent:=True;
PackFilePathLabel.Font.Name := '新宋体'
PackFilePathLabel.Font.Size := 10
PackFilePathLabel.Font.Color := clblue;//4370433;
PackFilePathLabel.Font.Style := [fsUnderline];
PackFilePathLabel.Caption := WizardForm.DirEdit.Text;//MinimizePathName(WizardForm.DirEdit.Text, PackFilePathLabel.Font, PackFilePathLabel.Width-20);//WizardForm.DirEdit.Text;
PackFilePathLabel.Parent := WizardForm;
PackFilePathLabel.OnClick :=@NewDirBrowseButtonClick;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//许可协议
licenseCheck:=BtnCreate(WizardForm.Handle,80 + (16), 240 + (32), ScaleY(16), ScaleY(16),ExpandConstant('{tmp}\CheckBox.png'),1,true);
BtnSetChecked(licenseCheck,true);
BtnSetEvent(licenseCheck,BtnClickEventID,WrapBtnCallback(@licenseCheckCheckClick,1));
licenseLabel := TLabel.Create(WizardForm);
licenseLabel.AutoSize:=true;
licenseLabel.SetBounds(80 + (35), 240 + (32), ScaleY(98), ScaleX(14));
licenseLabel.Transparent:=True;
licenseLabel.Font.Name := '新宋体'
licenseLabel.Font.Size := 10
licenseLabel.Caption := '已经阅读,并同意';
licenseLabel.Parent := WizardForm;
licenseLabel.OnMouseDown:=@WizardFormMouseDown;
licenseLabelFile := TLabel.Create(WizardForm);
licenseLabelFile.AutoSize:=true;
licenseLabelFile.SetBounds(190 + (40), 240 + (32), ScaleY(98), ScaleX(14));
licenseLabelFile.Cursor:= crHand;
licenseLabelFile.Transparent:=True;
licenseLabelFile.Font.Color := clblue;//4370433;
licenseLabelFile.Font.Name := '新宋体'
licenseLabelFile.Font.Size := 10
licenseLabelFile.Font.Style := [fsUnderline];
licenseLabelFile.Caption := '许可协议';
licenseLabelFile.Parent := WizardForm;
licenseLabelFile.OnClick:=@ShowLicense;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//快捷方式选框
//桌面快捷方式
DesktopCheck:=BtnCreate(WizardForm.Handle,80 + (16), 240 + (52), ScaleY(16), ScaleY(16),ExpandConstant('{tmp}\CheckBox.png'),1,true);
BtnSetChecked(DesktopCheck,true);
DesktopLabel := TLabel.Create(WizardForm);
DesktopLabel.AutoSize:=true;
DesktopLabel.SetBounds(80 + (35), 240 + (52), ScaleY(98), ScaleX(14));
DesktopLabel.Transparent:=True;
//DesktopLabel.Font.Color := clWhite;
DesktopLabel.Font.Name := '新宋体'
DesktopLabel.Font.Size := 10
DesktopLabel.Caption := '创建桌面快捷方式';
DesktopLabel.Parent := WizardForm;
DesktopLabel.OnMouseDown:=@WizardFormMouseDown;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//安装完成后 是否立即启动程序
RunAppCheck:=BtnCreate(WizardForm.Handle,80 + (16), 240 + (72), ScaleY(16), ScaleY(16),ExpandConstant('{tmp}\CheckBox.png'),1,true);
BtnSetChecked(RunAppCheck,true);
RunAppLabel := TLabel.Create(WizardForm);
RunAppLabel.AutoSize:=true;
RunAppLabel.SetBounds(80 + (35), 240 + (72), ScaleY(98), ScaleX(14));
RunAppLabel.Transparent:=True;
RunAppLabel.Font.Name := '新宋体'
RunAppLabel.Font.Size := 10
RunAppLabel.Caption := '安装完成后,立即运行程序';
RunAppLabel.Parent := WizardForm;
RunAppLabel.OnMouseDown:=@WizardFormMouseDown;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
//百分比 1211
PrLabel:=TLabel.Create(WizardForm);
PrLabel.Parent:=WizardForm;
PrLabel.Left:=200;
PrLabel.Top:=280;;
PrLabel.Caption:='0%';
PrLabel.Font.Style := [fsBold];
PrLabel.Font.Color:=$f4e8e8;
PrLabel.Font.Size:= 20
PrLabel.Transparent:=True;
PBOldProc:=SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBCallBack(@PBProc,4));
PrLabel.Hide;
Nun := wpWelcome;
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpInstalling then
begin
Nun :=wpInstalling;
DesktopLabel.Hide;
licenseLabel.Hide;
licenseLabelFile.Hide;
PackFilePathLabel.Hide;
PackFilePathTitle.Hide;
RunAppLabel.Hide;
BtnSetVisibility(MinBtn,False);
BtnSetVisibility(CloseBtn,False);
BtnSetVisibility(NextBtn,False);
BtnSetVisibility(DesktopCheck,False);
BtnSetVisibility(licenseCheck,False);
BtnSetVisibility(RunAppCheck,False);
ImgRelease(WizardFormImage)
WizardFormImage:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\pr.png'),ScaleX(170), ScaleY(303),100,29,True,True);
SetWindowLong(WizardForm.Handle, GWL_EXSTYLE, GetWindowLong(WizardForm.Handle, GWL_EXSTYLE) or WS_EX_LAYERED)
SetLayeredWindowAttributes(WizardForm.Handle, TransparentColor,220, LWA_COLORKEY or LWA_ALPHA)
install;//安装过程中的动画
WizardForm.Left:=M_left;
WizardForm.Top:=M_top;
PrLabel.Show;
end;
if CurPageID = wpFinished then
begin
Frame0.Close;
HideFairy;
UninitFairy;
ImgRelease(WizardFormImage)
PrLabel.Hide;
RunApp;//安装完成后执行程序
WizardForm.NextButton.Click;
// if MsgBox('恭喜你 xxx已经安装完成,是否执行 xxx', mbConfirmation, MB_YESNO) = IDYES then
// begin
// Exec(ExpandConstant('{app}\GameLauncher.exe'), '', '', SW_SHOW, ewNoWait, RCode);
// end;
end;
ImgApplyChanges(WizardForm.Handle);//如果没有它就显示不了图像
end;
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
procedure DeinitializeSetup();
begin
//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com
gdipShutdown; //背景图
HideFairy;
//WizardForm.Hide;
UninitFairy;
if PBOldProc<>0 then SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBOldProc);
end;
相关推荐
解压压缩包中的 Inno Setup 5.5.zip,运行Inno Setup 5.5\Inno Setup 5\Compil32.exe,右上角可以改变语言。 打开build.iss文件,一些自定义字段请按需修改,点击Inno Setup工具栏中的 ‘绿色小三角’ 来运行脚本,...
Inno Setup是一个为Microsoft Windows应用程序创建安装程序的工具。innoextract允许在非Windows系统下提取此类安装程序,而无需使用wine运行实际的安装程序。innoextract 目前支持由 Inno Setup 1.2.10 到 6.2.1 ...
Inno Setup是一款广泛使用的安装制作程序,尤其受到开发者和软件发行者的青睐。它以其简洁的界面和强大的功能著称,允许用户快速创建专业的Windows安装包。Inno Setup 6.2.1是该软件的一个版本,它可能包含了新功能...
《Inno Setup中文帮助文档》是为软件开发者和系统管理员提供的一款详尽的指南,它主要介绍了Inno Setup的使用方法和配置技巧。Inno Setup是一款功能强大的安装制作工具,常用于创建Windows平台上的应用程序安装包。...
Inno Setup是一款流行的安装制作工具,常用于创建Windows应用程序的安装包。它的最新版本是6.0.3,这个压缩包“InnoSetup6.0.3安装包与中文包.rar”包含了该版本的安装程序以及中文语言包,使得国内用户能够方便地...
Inno Setup是一款流行的安装制作工具,它被广泛用于创建Windows应用程序的安装程序。这款软件以其简单易用的界面和强大的功能而闻名。Inno Setup支持创建单文件安装包,自解压程序,以及多语言安装界面,使得开发者...
**Inno Setup 中文教程** Inno Setup是一款广泛使用的免费安装制作工具,尤其适用于Windows平台。它可以帮助开发者创建自解压安装程序,提供简洁而强大的脚本语言,使得程序的安装、卸载过程更加专业和个性化。这个...
【标题】"innosetup 仿有道云安装包" 涉及的主要知识点是使用Inno Setup创建类似有道云笔记的安装程序。Inno Setup是一款免费且开源的安装制作工具,常用于创建Windows应用程序的安装包,它允许开发者自定义安装界面...
《InnoSetup安装界面美化深度解析》 InnoSetup,一款强大的Windows安装程序制作工具,以其简洁易用的脚本语言和丰富的自定义功能深受开发者喜爱。本资源包"innosetup安装界面美化.zip"专门针对InnoSetup的安装和...
《Inno Setup 5:Windows下的程序打包利器》 Inno Setup 5是一款经典的Windows平台应用程序打包工具,它能够将你的程序(如Tomcat、批处理脚本等)打包成易于安装的.exe文件,使得用户只需点击下一步、下一步,就能...
Inno Setup是一款流行的安装制作工具,它被广泛用于创建Windows应用程序的安装程序。这款软件以其简单易用的脚本语法和强大的功能集而受到开发者们的青睐。本文将深入探讨Inno Setup 6.1.0及其对应的中文翻译包,...
InnoSetup是一款流行的安装制作工具,它被广泛用于创建Windows应用程序的安装程序。这款软件以其简单易用的脚本语法和强大的功能集而受到开发者们的青睐。标题中的"innosetup安装包+中文语言包"表明我们拥有Inno...
解决 Inno Setup 制作中文安装包在非中文系统上显示乱码的问题 在制作安装包时,Inno Setup 是一个常用的选择,尤其是在制作中文安装包时。但是,在非中文系统上,Inno Setup 制作的中文安装包常常会出现乱码的问题...
Inno Setup是一款流行的安装制作工具,它被广泛用于创建Windows应用程序的安装程序。这款软件以其简单易用的脚本语法和强大的功能集而受到开发者们的青睐。标题中的"Inno Setup 6.1.0中文语言包"指的是Inno Setup的...
Inno Setup是一款强大的安装包制作工具,尤其适合个人开发者和小型团队使用。它以其免费、易用和功能全面的特点在IT行业中受到了广泛欢迎。这款工具不仅提供了Windows 2000风格的传统安装界面,还支持设计出类似QQ...
《InnoSetup 5.6.1:打造专业级别的安装程序》 InnoSetup是一款广泛应用于软件安装包制作的工具,其5.6.1版本是该系列的一个经典版本,深受开发者喜爱。这款软件提供了丰富的功能,使得创建具有专业水准的安装程序...
InnoSetup是一款强大的安装制作工具,它被广泛用于创建Windows应用程序的安装程序。这款工具以其易用性、灵活性和自定义能力而闻名,允许开发者创建专业级别的安装包,包括设置程序路径、添加启动菜单快捷方式、注册...
自定义Inno Setup安装界面是创建个性化安装程序的一项技术,主要应用于Windows平台。Inno Setup是一款免费的安装制作工具,它允许开发者自定义安装过程的各个方面,包括界面、图标、安装选项等,使得安装程序更加...
InnoSetup是一款强大的安装制作工具,它使用脚本语言来编写安装程序,具有灵活的定制性和易用性。本文将详细解析"innosetup脚本范例"中的知识点,帮助你理解如何利用InnoSetup创建自定义安装包。 1. **InnoSetup...
Inno工具是一套用于创建Windows安装程序的专业软件,主要包括InnoSetup和ISTool两个组件,它们都是为了简化软件部署过程而设计的。InnoSetup和ISTool在IT领域中广泛应用于制作精简、用户友好的安装包,尤其适用于...