inno setup yang

;此安装包脚本来自雨杰网络棋牌游戏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\InternetExplorer\QuickLaunch\雨杰棋牌游戏中心";Filename:"{app}\GameLauncher.exe";WorkingDir:"{app}";

//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com

;安装包包含的文件

[Files]

Source:"{image}\*";DestDir:{tmp};Flags:dontcopysolidbreak;

;Source:"{app}\*";DestDir:{app};Flags:ignoreversionrecursesubdirscreateallsubdirs;

//此安装包脚本来自雨杰网络棋牌游戏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);

functionSetLayeredWindowAttributes(hwnd:HWND;crKey:TColor;bAlpha:BYTE;dwFlags:DWORD):Boolean;external'[email protected]';

functionGetWindowLong(Wnd:HWnd;Index:Integer):Longint;external'[email protected]';

functionLoadCursorFromFile(FileName:String):Cardinal;external'LoadCursorFromFileA@user32stdcall';

functionDeleteObject(p1:Longword):BOOL;external'[email protected]';

functionGetSysColor(nIndex:Integer):DWORD;external'[email protected]';

functionGetSystemMetrics(nIndex:Integer):Integer;external'[email protected]';

functionReleaseCapture():Longint;external'[email protected]';

functionSleep(Index:Integer):Longint;external'[email protected]';

functionGetTickCount():Longint;external'[email protected]';

functionSetWindowLong(Wnd:HWnd;Index:Integer;NewLong:Longint):Longint;external'[email protected]';

functionLoadImage(hInst:THandle;ImageName:PChar;ImageType:UINT;X,Y:Integer;Flags:UINT):THandle;external'[email protected]';

functionGetDC(hWnd:HWND):Longword;external'[email protected]';

functionSetWindowRgn(hWnd:HWND;hRgn:LongWord;bRedraw:BOOL):Integer;external'[email protected]';

functionReleaseDC(hWnd:HWND;hDC:LongWord):Integer;external'[email protected]';

functionAddFontResource(FileName:PAnsiChar):Integer;external'[email protected]';

functionRemoveFontResource(FileName:PAnsiChar):BOOL;external'[email protected]';

functionPBCallBack(P:TPBProc;ParamCount:integer):LongWord;external'wrapcallback@files:innocallback.dllstdcall';

functionCallWindowProc(lpPrevWndFunc:Longint;hWnd:HWND;Msg:UINT;wParam,lParam:Longint):Longint;external'[email protected]';

functionSetTimer(hWnd:LongWord;nIDEvent,uElapse:LongWord;lpTimerFunc:LongWord):LongWord;external'[email protected]';

functionKillTimer(hWnd:LongWord;nIDEvent:LongWord):LongWord;external'[email protected]';

functionWrapTimerProc(callback:TTimerProc;Paramcount:Integer):Longword;external'wrapcallback@files:innocallback.dllstdcall';

functionmciSendString(lpstrCommand,lpstrReturnString:PAnsiChar;uReturnLength:Cardinal;hWndCallback:HWND):Cardinal;external'[email protected]';

functionsndPlaySound(lpszSoundName:AnsiString;uFlags:cardinal):integer;external'[email protected]';

procedureCreateFormFromImage(h:HWND;FileName:PAnsiChar);external'CreateFormFromImage@files:botva2.dllstdcall';

functionCreateBitmapRgn(DC:LongWord;Bitmap:HBITMAP;TransClr:DWORD;dX:integer;dY:integer):LongWord;external'CreateBitmapRgn@files:botva2.dllstdcall';

procedureSetMinimizeAnimation(Value:Boolean);external'SetMinimizeAnimation@files:botva2.dllstdcall';

functionGetMinimizeAnimation:Boolean;external'GetMinimizeAnimation@files:botva2.dllstdcall';

functionImgLoad(Wnd:HWND;FileNameAnsiChar;Left,Top,Width,Height:integer;Stretch,IsBkg:boolean):Longint;external'ImgLoad@files:botva2.dllstdcall';

procedureImgSetVisiblePart(img:Longint;NewLeft,NewTop,NewWidth,NewHeight:integer);external'ImgSetVisiblePart@files:botva2.dllstdcall';

procedureImgSetVisibility(img:Longint;Visible:boolean);external'ImgSetVisibility@files:botva2.dllstdcall';

functionImgGetVisibility(img:Longint):boolean;external'ImgGetVisibility@files:botva2.dllstdcall';

procedureImgApplyChanges(h:HWND);external'ImgApplyChanges@files:botva2.dllstdcall';

procedureImgSetPosition(img:Longint;NewLeft,NewTop,NewWidth,NewHeight:integer);external'ImgSetPosition@files:botva2.dllstdcall';

functionBtnCreate(hParent:HWND;Left,Top,Width,Height:integer;FileNameAnsiChar;ShadowWidth:integer;IsCheckBtn:boolean):HWND;external'BtnCreate@files:botva2.dllstdcall';

procedureBtnSetEvent(h:HWND;EventID:integer;Event:Longword);external'BtnSetEvent@files:botva2.dllstdcall';

functionWrapBtnCallback(Callback:TBtnEventProc;ParamCount:Integer):Longword;external'wrapcallback@files:innocallback.dllstdcalldelayload';

proceduregdipShutdown;external'gdipShutdown@files:botva2.dllstdcall';

procedureBtnSetFont(h:HWND;Font:Cardinal);external'BtnSetFont@files:botva2.dllstdcall';

procedureBtnSetText(h:HWND;TextAnsiChar);external'BtnSetText@files:botva2.dllstdcall';

procedureBtnSetFontColor(h:HWND;NormalFontColor,FocusedFontColor,PressedFontColor,DisabledFontColor:Cardinal);external'BtnSetFontColor@files:botva2.dllstdcall';

procedureBtnSetEnabled(h:HWND;Value:boolean);external'BtnSetEnabled@files:botva2.dllstdcall';

procedureBtnSetVisibility(h:HWND;Value:boolean);external'BtnSetVisibility@files:botva2.dllstdcall';

functionBtnGetChecked(h:HWND):boolean;external'BtnGetChecked@files:botva2.dllstdcall';

procedureBtnSetChecked(h:HWND;Value:boolean);external'BtnSetChecked@files:botva2.dllstdcall';

procedureImgRelease(img:Longint);external'ImgRelease@files:botva2.dllstdcalldelayload';

//此安装包脚本来自雨杰网络棋牌游戏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

functionPBProc(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

//快捷方式

FunctionDesktopCheckClick():Boolean;

begin

ifBtnGetChecked(DesktopCheck)=truethen

Result:=true;

end;

functionColorToRGB(Color:TColor):Longint;

begin

ifColor<0then

Result:=GetSysColor(Colorand$000000FF)

else

Result:=Color;

end;

//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com

//释放文件到临时目录

procedureExtractTmpFiles;

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');

fori:=0to23do

begin

ImgFile:=format('%.1d',[i+1])+'.png';

ExtractTemporaryFile(ImgFile);

end;

end;

procedureTimer1Timer(Sender:TObject);

begin

gy:=gy+1;

ifgy=iothen

begin

CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh1.png'));

end

ifgy=io*2then

begin

CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh2.png'));

end

ifgy=io*3then

begin

CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh3.png'));

end

ifgy=io*4then

begin

CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh4.png'));

end

ifgy=io*5then

begin

CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh0.png'));

gy:=0;

end

ImgApplyChanges(Frame1.Handle);

end;

procedureWizardFormMouseDown(Sender:TObject;Button:TMouseButton;Shift:TShiftState;X,Y:Integer);

begin

ifNun<>wpInstallingthen

begin

ReleaseCapture

SendMessage(WizardForm.Handle,WM_SYSCOMMAND,$F012,0)

end;

end;

procedureFrameMouseDown(Sender:TObject;Button:TMouseButton;Shift:TShiftState;X,Y:Integer);

begin

ifNun<>wpInstallingthen

begin

ReleaseCapture

SendMessage(Frame0.Handle,WM_SYSCOMMAND,$F012,0)

end;

end;

procedurePlayListCallback(FrameCount:Integer);

begin

AnimateFairy('(0-23)',nil);

end;

procedureNextBtnClick(hBtn:HWND);

begin

WizardForm.NextButton.Click;

end;

procedurelicenseCheckCheckClick(hBtn:HWND);

begin

ifBtnGetChecked(licenseCheck)=truethen

BtnSetEnabled(NextBtn,true)

else

BtnSetEnabled(NextBtn,false);

end;

procedureShowLicense(Sender:TObject);

var

ErrorCode:Integer;

begin

ShellExec('',ExpandConstant('{tmp}\license.txt'),'','',SW_SHOW,ewNoWait,ErrorCode)

end;

//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com

//文字路径

procedureNewDirBrowseButtonClick(Sender:TObject);

begin

WizardForm.DirBrowseButton.Click;

PackFilePathLabel.Caption:=MinimizePathName(WizardForm.DirEdit.Text,PackFilePathLabel.Font,PackFilePathLabel.Width-20);

end;

//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com

//创建异型窗口

procedureCreateFrame0;

begin

Frame0:=TForm.Create(nil);;

Frame0.BorderStyle:=bsNone;

CreateFormFromImage(Frame0.Handle,ExpandConstant('{tmp}\bg0.png'));

withTLabel.Create(Frame0)dobegin

Parent:=Frame0;

AutoSize:=False;

Left:=0;

Top:=0;

Width:=Frame0.CLientWidth;

Height:=Frame0.ClientHeight;

end;

Frame0.show;

end;

procedureCreateFrame1;

begin

Frame1:=TForm.Create(nil);;

Frame1.BorderStyle:=bsNone;

CreateFormFromImage(Frame1.Handle,ExpandConstant('{tmp}\dh1.png'));

withTLabel.Create(Frame1)dobegin

Parent:=Frame1;

AutoSize:=False;

Left:=0;

Top:=0;

Cursor:=crhand;

Width:=Frame1.CLientWidth;

Height:=Frame1.ClientHeight;

end;

Frame1.show;

end;

procedureinstall();

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);

fori:=0to23do

begin

ImgFile:=format('%.1d',[i+1])+'.png';

ifS<>''thenS:=S+'|';

S:=S+IntToStr(x)+'|'+IntToStr(y)+'|'+IntToStr(255)+'|'+IntToStr(TransparentColor1)+'|'+ExpandConstant('{tmp}\'+ImgFile);

end;

AddImgsToList(S,@PlayListCallback);

end;

//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com

//最小化按钮

procedureMinBtnOnClick(hBtn:HWND);

begin

SendMessage(WizardForm.Handle,WM_SYSCOMMAND,61472,0);

end;

//关闭按钮

procedureCloseBtnOnClick(hBtn:HWND);

begin

WizardForm.Close;

end;

//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com

//单击“取消”直接退出

procedureCancelButtonClick(CurPageID:Integer;varCancel,Confirm:Boolean);

begin

Cancel:=false;

caseNunof

wpInstalling:beginend;

wpFinished:beginend;

else

begin

ifMsgBox('是否退出本棋牌游戏的安装',mbConfirmation,MB_YESNO)=IDYESthen

begin

Confirm:=false;

Cancel:=true;

end;

end;

end;

end;

//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com

//雨杰网络棋牌游戏3500经典版本安装结束,点"完成"之后自动运行的程序

procedureRunApp();

var

RCode:Integer;

begin

ifBtnGetChecked(RunappCheck)=truethen

Exec(ExpandConstant('{app}\GameLauncher.exe'),'','',SW_SHOW,ewNoWait,RCode);

end;

//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com

//跳过界面

functionShouldSkipPage(PageID:Integer):Boolean;

begin

ifPageID=wpSelectComponentsthen//跳过组件安装界面

result:=true;

ifPageID=wpWelcomethen

result:=true;

ifPageID=wpSelectDirthen

result:=true;

end;

functionInitializeSetup:Boolean;

var

ResultStr:String;

ResultCode:Integer;

begin

ifRegQueryStringValue(HKLM,'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\雨杰棋牌游戏3500_is1','UninstallString',ResultStr)then

begin

ifmsgbox('检测到旧版本,点击"确定"将自动卸载旧版本,点击"取消"退出安装',mbInformation,MB_OKCANCEL)=idokthen

begin

ResultStr:=RemoveQuotes(ResultStr);

Exec(ResultStr,'/VERYSILENT','',SW_SHOWNORMAL,ewWaitUntilTerminated,ResultCode);

Result:=true;

endelse

begin

Result:=False;

end

endelse

begin

Result:=true;

end

end;

procedureInitializeWizard();

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

procedureCurPageChanged(CurPageID:Integer);

begin

ifCurPageID=wpInstallingthen

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)orWS_EX_LAYERED)

SetLayeredWindowAttributes(WizardForm.Handle,TransparentColor,220,LWA_COLORKEYorLWA_ALPHA)

install;//安装过程中的动画

WizardForm.Left:=M_left;

WizardForm.Top:=M_top;

PrLabel.Show;

end;

ifCurPageID=wpFinishedthen

begin

Frame0.Close;

HideFairy;

UninitFairy;

ImgRelease(WizardFormImage)

PrLabel.Hide;

RunApp;//安装完成后执行程序

WizardForm.NextButton.Click;

//ifMsgBox('恭喜你xxx已经安装完成,是否执行xxx',mbConfirmation,MB_YESNO)=IDYESthen

//begin

//Exec(ExpandConstant('{app}\GameLauncher.exe'),'','',SW_SHOW,ewNoWait,RCode);

//end;

end;

ImgApplyChanges(WizardForm.Handle);//如果没有它就显示不了图像

end;

//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com

procedureDeinitializeSetup();

begin

//此安装包脚本来自雨杰网络棋牌游戏3500经典版本的安装脚本--www.cnyxwl.com

gdipShutdown;//背景图

HideFairy;

//WizardForm.Hide;

UninitFairy;

ifPBOldProc<>0thenSetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBOldProc);

end;

app

相关推荐