tiberium23
Member | Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "My Program" #define MyAppVerName "My Program 1.5" #define MyAppPublisher "My Company, Inc." #define MyAppURL "http://www.example.com/" #define MyAppExeName "MyProg.exe" #define CursorName "cursor.ani" [Setup] AppName={#MyAppName} AppVerName={#MyAppVerName} DefaultDirName={pf}\{#MyAppName} OutputBaseFilename=setup [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] Source: "botva2.dll"; DestDir: "{tmp}"; Flags: dontcopy ;Source: "botva.dll"; DestDir: "{tmp}"; Flags: dontcopy Source: "l4d.jpg"; DestDir: "{tmp}"; Flags: dontcopy Source: "glass.png"; DestDir: "{tmp}"; Flags: dontcopy Source: "bluesquare.png"; DestDir: "{tmp}"; Flags: dontcopy Source: "mspaint.png"; DestDir: "{tmp}"; Flags: dontcopy Source: {#CursorName}; DestDir: {tmp}; Flags: dontcopy [Icons] Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon [Run] Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: nowait postinstall skipifsilent [Code] var img:Longint; hNewCursor:Longint; function gdipDrawImage(Wnd:HWND; FileName:PChar; Left,Top,Width,Height:integer; Stretch,IsBkg:boolean):Longint; external 'gdipDrawImage@files:botva2.dll stdcall'; procedure gdipReleaseImage(img:Longint); external 'gdipReleaseImage@files:botva2.dll stdcall'; procedure gdipShutdown; external 'gdipShutdown@files:botva2.dll stdcall'; function SetClassLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): DWORD; external 'SetClassLongA@user32.dll stdcall'; function DestroyCursor(hCursor: Longint): BOOL; external 'DestroyCursor@user32.dll stdcall'; function LoadCursorFromFile(lpFileName: PChar): Longint; external 'LoadCursorFromFileA@user32.dll stdcall'; procedure InitializeWizard(); var h:HWND; begin with WizardForm do begin //InnerNotebook.Hide; Bevel.Hide; OuterNotebook.Height:=WizardForm.ClientHeight; CancelButton.BringToFront; NextButton.BringToFront; BackButton.BringToFront; WelcomeLabel1.Hide; WelcomeLabel2.Hide; with TLabel.Create(WizardForm) do begin Left:=ScaleX(176); Top:=ScaleY(66); Width:=ScaleX(301); Height:=ScaleY(54); AutoSize:=False; Transparent:=True; WordWrap:=True; Font.Size:=14; Font.Color:=clRed; Font.Style:=[fsBold]; Parent:=WelcomePage; Caption:=WelcomeLabel1.Caption; ParentFont:=False; end; with TLabel.Create(WizardForm) do begin Left:=ScaleX(176); Top:=ScaleY(136); Width:=ScaleX(301); Height:=ScaleY(300); AutoSize:=False; Transparent:=True; WordWrap:=True; Font.Color:=clRed; Font.Style:=[fsBold]; Parent:=WelcomePage; Caption:=WelcomeLabel2.Caption; ParentFont:=False; end; ExtractTemporaryFile('{#CursorName}'); hNewCursor:=LoadCursorFromFile(ExpandConstant('{tmp}')+'\{#CursorName}'); if hNewCursor<>0 then SetClassLong(CancelButton.Handle,-12,hNewCursor) end; ExtractTemporaryFile('l4d.jpg'); ExtractTemporaryFile('bluesquare.png'); ExtractTemporaryFile('mspaint.png'); ExtractTemporaryFile('glass.png'); h:=WizardForm.WelcomePage.Handle; gdipDrawImage(h, ExpandConstant('{tmp}\l4d.jpg'),0,0,WizardForm.WelcomePage.ClientWidth,WizardForm.WelcomePage.ClientHeight,True,True); gdipDrawImage(h,ExpandConstant('{tmp}\mspaint.png'),WizardForm.WelcomePage.ClientWidth-400,0,WizardForm.WelcomePage.ClientWidth,WizardForm.WelcomePage.ClientHeight,False,True); gdipDrawImage(h,ExpandConstant('{tmp}\mspaint.png'),WizardForm.WelcomePage.ClientWidth-200,0,WizardForm.WelcomePage.ClientWidth,WizardForm.WelcomePage.ClientHeight,False,False); gdipDrawImage(h,ExpandConstant('{tmp}\bluesquare.png'),56,-13,WizardForm.WelcomePage.ClientWidth,WizardForm.WelcomePage.ClientHeight,False,False); gdipDrawImage(h,ExpandConstant('{tmp}\bluesquare.png'),250,250,120,120,False,False); img:=gdipDrawImage(h, ExpandConstant('{tmp}\glass.png'),0,0,WizardForm.WelcomePage.ClientWidth,WizardForm.WelcomePage.ClientHeight,True,False); end; procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean); begin Cancel:=True; gdipReleaseImage(img); Confirm:=True; end; procedure DeinitializeSetup(); begin gdipShutdown; if hNewCursor<>0 then DestroyCursor(hNewCursor); //убиваем свой курсор end; |