Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Пользователь


Сообщения: 144
Благодарности: 3

Профиль | Отправить PM | Цитировать


El Sanchez, туда я залазил хоть и скрипт маленький но нифига не понял, так же смотрел такой скрипт
Код: Выделить весь код
Setup]
AppName=Inno Setup Scripting v5.1 Russian Edition
AppVerName=Inno Setup Scripting v5.1 Russian Edition
DefaultDirName={pf}\Inno Setup Scripting v5.1
DefaultGroupName=Inno Setup Scripting v5.1
AllowNoIcons=yes
OutputDir=C:\Output
OutputBaseFilename=iss_setup
Compression=lzma/ultra
SolidCompression=yes
WizardImageFile=C:\WizardSmallImage.bmp
WizardSmallImageFile=C:\WizardSmallImage.bmp
SetupIconFile=C:\10.ico

[Messages]
BeveledLabel=- Kindly Software Installer -

[LangOptions]
LanguageName=English
LanguageID=$0409
LanguageCodePage=0
DialogFontName=Tahoma
DialogFontSize=8

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: C:\button2.bmp; DestDir: {tmp}; Flags: dontcopy
Source: C:\WizardImage2.bmp; DestDir: {tmp}; Flags: dontcopy
Source: C:\BASSMOD.dll; DestDir: "{tmp}"; Flags: dontcopy
Source: C:\TWINKLE.IT; DestDir: "{tmp}"; Flags: dontcopy
Source: C:\Transparent Arrow.cur; DestDir: "{tmp}"; Flags: dontcopy
Source: C:\Transparent Hand.cur; DestDir: "{tmp}"; Flags: dontcopy

Source: "C:\iss\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs

[Icons]
Name: "{group}\Запуск Inno Setup Scripting v5.1"; Filename: "{app}\ISS.exe"; WorkingDir: "{app}"
Name: "{group}\История версий"; Filename: "{app}\readme_rus.txt"; WorkingDir: "{app}"
Name: "{group}\Удалить Inno Setup Scripting v5.1"; Filename: "{uninstallexe}"; WorkingDir: "{app}"
Name: "{commondesktop}\Inno Setup Scripting v5.1"; Filename: "{app}\ISS.exe"; WorkingDir: "{app}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Inno Setup Scripting v5.1"; Filename: "{app}\ISS.exe"; WorkingDir: "{app}"; Tasks: quicklaunchicon

[_Code]
const
  ButtonWidth = 80;    //Указываем размер кнопок
  ButtonHeight = 23;

  bidBack = 0;
  bidNext = 1;
  bidCancel = 2;
  bidDirBrowse = 3;
  bidGroupBrowse = 4;

  BASS_MUSIC_RAMP         = 1;
  BASS_MUSIC_RAMPS        = 2;
  BASS_MUSIC_LOOP         = 4;
  BASS_MUSIC_FT2MOD       = 16;
  BASS_MUSIC_PT1MOD       = 32;
  BASS_MUSIC_SURROUND	    = 512;
  BASS_MUSIC_SURROUND2	  = 1024;

GCL_HCURSOR = (-12);
OCR_NORMAL = 32512;


function LoadCursorFromFile(FileName: String): Longint;
 external 'LoadCursorFromFileA@user32 stdcall';

function SetClassLong(hWnd: HWND; Index, NewLong: Longint): Longint;
 external 'SetClassLongA@user32 stdcall';

function SetCursor(Cursor: Longint): Longint;
 external 'SetCursor@user32 stdcall';

function SetSystemCursor(Cursor, CurType: Longint): Longint;
 external 'SetSystemCursor@user32 stdcall';

function GetCursor(): Longint;
 external 'GetCursor@user32 stdcall';

 procedure BASSMOD_MusicFree();
external 'BASSMOD_MusicFree@files:BASSMOD.dll stdcall delayload';

function BASSMOD_Init(device: Integer; freq, flags: DWORD): Boolean;
external 'BASSMOD_Init@files:BASSMOD.dll stdcall delayload';

function BASSMOD_MusicLoad(mem: BOOL; f: PChar; offset: DWORD; length: DWORD; flags: DWORD): Boolean;
external 'BASSMOD_MusicLoad@files:BASSMOD.dll stdcall delayload';

function BASSMOD_MusicPlay(): Boolean;
external 'BASSMOD_MusicPlay@files:BASSMOD.dll stdcall delayload';

procedure BASSMOD_Free();
external 'BASSMOD_Free@files:BASSMOD.dll stdcall delayload';

function BASSMOD_MusicStop(): Boolean;
external 'BASSMOD_MusicStop@files:BASSMOD.dll stdcall delayload';

Var
  ButtonPanel: array [0..4] of TPanel;
  ButtonImage: array [0..4] of TBitmapImage;
  ButtonLabel: array [0..4] of TLabel;

WizardImage: TBitmapImage;
YesRadio,NoRadio: TRadioButton;
WelcomeLabel1,WelcomeLabel2,LicenseLabel1,LicenseAcceptedLabel,LicenseNotAcceptedLabel,PasswordLabel,PasswordEditLabel,
InfoBeforeClickLabel,UserInfoNameLabel,UserInfoOrgLabel,UserInfoSerialLabel,SelectDirLabel,SelectDirBrowseLabel,DiskSpaceLabel,
SelectComponentsLabel,ComponentsDiskSpaceLabel,SelectStartMenuFolderLabel,SelectStartMenuFolderBrowseLabel,NoIconsLabel,
SelectTasksLabel,ReadyLabel,StatusLabel,InfoAfterClickLabel,FinishedHeadingLabel,FinishedLabel,YesRadioLabel,NoRadioLabel,
BeveledLabel: TLabel;
CheckBox: TCheckBox;
CheckBoxLabel: Tlabel;
ResultCode: Integer;

OldCursor, NewCursor, NewCursor1: Longint;

procedure ButtonLabelClick(Sender: TObject);
var
  Button: TButton;
begin
  ButtonImage[TLabel(Sender).Tag].Left:=0
  case TLabel(Sender).Tag of
    bidBack: Button:=WizardForm.BackButton
    bidNext: Button:=WizardForm.NextButton
    bidCancel: Button:=WizardForm.CancelButton
    bidDirBrowse: Button:=WizardForm.DirBrowseButton
    bidGroupBrowse: Button:=WizardForm.GroupBrowseButton
  else
    Exit
  end
  Button.OnClick(Button)
end;

procedure ButtonLabelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  if ButtonLabel[TLabel(Sender).Tag].Enabled then
     ButtonImage[TLabel(Sender).Tag].Left:=-ButtonWidth
end;

procedure ButtonLabelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  ButtonImage[TLabel(Sender).Tag].Left:=0
end;

procedure LoadButtonImage(AButton: TButton; AButtonIndex: integer);
var
  Image: TBitmapImage;
  Panel: TPanel;
  Labl: TLabel;

begin
  Panel:=TPanel.Create(WizardForm)
  Panel.Left:=AButton.Left
  Panel.Top:=AButton.Top
  Panel.Width:=AButton.Width
  Panel.Height:=AButton.Height
  Panel.Tag:=AButtonIndex
  Panel.Parent:=AButton.Parent
  ButtonPanel[AButtonIndex]:=Panel

  Image:=TBitmapImage.Create(WizardForm)    //Рисунок который ложится на кнопку
  Image.Width:=160                          //Обязательно прописать оригинальный размер рисунка
  Image.Height:=23
  Image.Enabled:=False
  Image.Bitmap.LoadFromFile(ExpandConstant('{tmp}\button2.bmp'))
  Image.Parent:=Panel
  ButtonImage[AButtonIndex]:=Image

  with TLabel.Create(WizardForm) do begin
    Tag:=AButtonIndex
    Parent:=Panel
    Width:=Panel.Width
    Height:=Panel.Height
    Transparent:=True
    OnClick:=@ButtonLabelClick
    OnDblClick:=@ButtonLabelClick
    OnMouseDown:=@ButtonLabelMouseDown
    OnMouseUp:=@ButtonLabelMouseUp
  end

  Labl:=TLabel.Create(WizardForm)        //Текст кнопок
  Labl.Left:=23                          //Указываем положение текста
  Labl.Top:=5
  Labl.Autosize:=True
  Labl.Alignment:=taCenter
  Labl.Tag:=AButtonIndex
  Labl.Transparent:=True
  Labl.Font.Color:=clWhite               //Цвет текста
  Labl.Caption:=AButton.Caption
  Labl.OnClick:=@ButtonLabelClick
  Labl.OnDblClick:=@ButtonLabelClick
  Labl.OnMouseDown:=@ButtonLabelMouseDown
  Labl.OnMouseUp:=@ButtonLabelMouseUp
  Labl.Parent:=Panel
  ButtonLabel[AButtonIndex]:=Labl
end;

procedure UpdateButton(AButton: TButton;AButtonIndex: integer);
begin
  ButtonLabel[AButtonIndex].Caption:=AButton.Caption
  ButtonPanel[AButtonIndex].Visible:=AButton.Visible
  ButtonLabel[AButtonIndex].Enabled:=Abutton.Enabled
end;

procedure LicenceAcceptedRadioOnClick(Sender: TObject);
begin
  ButtonLabel[bidNext].Enabled:=True
end;

procedure LicenceNotAcceptedRadioOnClick(Sender: TObject);
begin
  ButtonLabel[bidNext].Enabled:=False
end;

Procedure NoIconsLabelOnClick (Sender: TObject);
begin
WizardForm.NoIconsCheck.Checked:=Not(WizardForm.NoIconsCheck.Checked)
end;

Procedure YesRadioOnClick (Sender: TObject);
begin
WizardForm.YesRadio.Checked:=True
end;

Procedure NoRadioOnClick (Sender: TObject);
begin
WizardForm.NoRadio.Checked:=True
end;

Procedure HideAll();
begin
WizardForm.Bevel.Hide
WizardForm.Bevel1.Hide
WizardForm.MainPanel.Hide
WizardForm.BeveledLabel.Hide
WizardForm.OuterNotebook.Hide
WizardForm.InnerNotebook.Hide

WelcomeLabel1.Hide
WelcomeLabel2.Hide
LicenseLabel1.Hide
WizardForm.LicenseMemo.Hide
WizardForm.LicenseAcceptedRadio.Hide
LicenseAcceptedLabel.Hide
WizardForm.LicenseNotAcceptedRadio.Hide
LicenseNotAcceptedLabel.Hide
PasswordLabel.Hide
PasswordEditLabel.Hide
WizardForm.PasswordEdit.Hide
InfoBeforeClickLabel.Hide
WizardForm.InfoBeforeMemo.Hide
UserInfoNameLabel.Hide
WizardForm.UserInfoNameEdit.Hide
UserInfoOrgLabel.Hide
WizardForm.UserInfoOrgEdit.Hide
UserInfoSerialLabel.Hide
WizardForm.UserInfoSerialEdit.Hide
SelectDirLabel.Hide
SelectDirBrowseLabel.Hide
WizardForm.DirEdit.Hide
WizardForm.DirBrowseButton.Hide
DiskSpaceLabel.Hide
SelectComponentsLabel.Hide
WizardForm.TypesCombo.Hide
WizardForm.ComponentsList.Hide
ComponentsDiskSpaceLabel.Hide
SelectStartMenuFolderLabel.Hide
SelectStartMenuFolderBrowseLabel.Hide
WizardForm.GroupEdit.Hide
WizardForm.GroupBrowseButton.Hide
WizardForm.NoIconsCheck.Hide
NoIconsLabel.Hide
SelectTasksLabel.Hide
WizardForm.TasksList.Hide
ReadyLabel.Hide
WizardForm.ReadyMemo.Hide
StatusLabel.Hide
WizardForm.ProgressGauge.Hide
InfoAfterClickLabel.Hide
WizardForm.InfoAfterMemo.Hide
FinishedHeadingLabel.Hide
FinishedLabel.Hide

WizardForm.RunList.Hide

YesRadio.Hide
YesRadioLabel.Hide
NoRadio.Hide
NoRadioLabel.Hide
end;

Procedure InitializeSkin();
begin
ExtractTemporaryFile('WizardImage2.bmp')

WizardImage:=TBitmapImage.Create(WizardForm)
WizardImage.AutoSize:=True
WizardImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardImage2.bmp'))
WizardImage.Parent:=WizardForm

WizardForm.ClientWidth:=690
WizardForm.ClientHeight:=496
WizardForm.Font.Color:=$ffffff
WizardForm.Center

  WizardForm.BackButton.Left:=293
  WizardForm.BackButton.Top:=462
  WizardForm.BackButton.Width:=80
  WizardForm.BackButton.Height:=23

  WizardForm.NextButton.Left:=375
  WizardForm.NextButton.Top:=462
  WizardForm.NextButton.Width:=80
  WizardForm.NextButton.Height:=23

  WizardForm.CancelButton.Left:=600
  WizardForm.CancelButton.Top:=462
  WizardForm.CancelButton.Width:=80
  WizardForm.CancelButton.Height:=23

BeveledLabel:=TLabel.Create(WizardForm)
BeveledLabel.Left:=10
BeveledLabel.Top:=468
BeveledLabel.Font.Color:=clWhite
BeveledLabel.Transparent:=True
BeveledLabel.Caption:=WizardForm.BeveledLabel.Caption
BeveledLabel.Parent:=WizardForm

WizardForm.BeveledLabel.Left:=700

// wpWelcome
WelcomeLabel1:=TLabel.Create(WizardForm)
WelcomeLabel1.Left:=205
WelcomeLabel1.Top:=90
WelcomeLabel1.Width:=465
WelcomeLabel1.Height:=28
WelcomeLabel1.AutoSize:=False
WelcomeLabel1.WordWrap:=True
WelcomeLabel1.Transparent:=True
WelcomeLabel1.Font.Color:=$ffffff
WelcomeLabel1.Font.Style:=[fsBold]
WelcomeLabel1.Caption:=WizardForm.WelcomeLabel1.Caption
WelcomeLabel1.Parent:=WizardForm

WelcomeLabel2:=TLabel.Create(WizardForm)
WelcomeLabel2.Left:=205
WelcomeLabel2.Top:=130
WelcomeLabel2.Width:=465
WelcomeLabel2.Height:=200
WelcomeLabel2.AutoSize:=False
WelcomeLabel2.WordWrap:=True
WelcomeLabel2.Transparent:=True
WelcomeLabel2.Caption:=WizardForm.WelcomeLabel2.Caption
WelcomeLabel2.Parent:=WizardForm

// wpLicense
LicenseLabel1:=TLabel.Create(WizardForm)
LicenseLabel1.Left:=205
LicenseLabel1.Top:=90
LicenseLabel1.Width:=465
LicenseLabel1.Height:=28
LicenseLabel1.AutoSize:=False
LicenseLabel1.WordWrap:=True
LicenseLabel1.Transparent:=True
LicenseLabel1.Caption:=WizardForm.LicenseLabel1.Caption
LicenseLabel1.Parent:=WizardForm

WizardForm.LicenseMemo.Left:=205
WizardForm.LicenseMemo.Top:=128
WizardForm.LicenseMemo.Width:=465
WizardForm.LicenseMemo.Height:=266
WizardForm.LicenseMemo.Parent:=WizardForm

WizardForm.LicenseAcceptedRadio.Left:=205
WizardForm.LicenseAcceptedRadio.Top:=405
WizardForm.LicenseAcceptedRadio.Width:=14
WizardForm.LicenseAcceptedRadio.Height:=14
WizardForm.LicenseAcceptedRadio.Color:=clBlack
WizardForm.LicenseAcceptedRadio.Parent:=WizardForm

LicenseAcceptedLabel:=TLabel.Create(WizardForm)
LicenseAcceptedLabel.Left:=221
LicenseAcceptedLabel.Top:=405
LicenseAcceptedLabel.Transparent:=True
LicenseAcceptedLabel.Caption:=WizardForm.LicenseAcceptedRadio.Caption

LicenseAcceptedLabel.Parent:=WizardForm

WizardForm.LicenseNotAcceptedRadio.Left:=205
WizardForm.LicenseNotAcceptedRadio.Top:=425
WizardForm.LicenseNotAcceptedRadio.Width:=14
WizardForm.LicenseNotAcceptedRadio.Height:=14
WizardForm.LicenseNotAcceptedRadio.Color:=clBlack
WizardForm.LicenseNotAcceptedRadio.Parent:=WizardForm

LicenseNotAcceptedLabel:=TLabel.Create(WizardForm)
LicenseNotAcceptedLabel.Left:=221
LicenseNotAcceptedLabel.Top:=425
LicenseNotAcceptedLabel.Transparent:=True
LicenseNotAcceptedLabel.Caption:=WizardForm.LicenseNotAcceptedRadio.Caption

LicenseNotAcceptedLabel.Parent:=WizardForm

// wpPassword
PasswordLabel:=TLabel.Create(WizardForm)
PasswordLabel.Left:=205
PasswordLabel.Top:=90
PasswordLabel.Width:=465
PasswordLabel.Height:=28
PasswordLabel.AutoSize:=False
PasswordLabel.WordWrap:=True
PasswordLabel.Transparent:=True
PasswordLabel.Caption:=WizardForm.PasswordLabel.Caption
PasswordLabel.Parent:=WizardForm

PasswordEditLabel:=TLabel.Create(WizardForm)
PasswordEditLabel.Left:=205
PasswordEditLabel.Top:=124
PasswordEditLabel.Transparent:=True
PasswordEditLabel.Caption:=WizardForm.PasswordEditLabel.Caption
PasswordEditLabel.Parent:=WizardForm

WizardForm.PasswordEdit.Left:=205
WizardForm.PasswordEdit.Top:=140
WizardForm.PasswordEdit.Width:=465
WizardForm.PasswordEdit.Height:=21
WizardForm.PasswordEdit.Color:=$000000
WizardForm.PasswordEdit.Font.Color:=$ffffff
WizardForm.PasswordEdit.Parent:= WizardForm

// wpInfoBefore
InfoBeforeClickLabel:=TLabel.Create(WizardForm)
InfoBeforeClickLabel.Left:=205
InfoBeforeClickLabel.Top:=90
InfoBeforeClickLabel.Transparent:=True
InfoBeforeClickLabel.Caption:=WizardForm.InfoBeforeClickLabel.Caption
InfoBeforeClickLabel.Parent:=WizardForm

WizardForm.InfoBeforeMemo.Left:=205
WizardForm.InfoBeforeMemo.Top:=114
WizardForm.InfoBeforeMemo.Width:=465
WizardForm.InfoBeforeMemo.Height:=300
WizardForm.InfoBeforeMemo.Parent:= WizardForm

// wpUserInfo
UserInfoNameLabel:=TLabel.Create(WizardForm)
UserInfoNameLabel.Left:=205
UserInfoNameLabel.Top:=90
UserInfoNameLabel.Transparent:=True
UserInfoNameLabel.Caption:=WizardForm.UserInfoNameLabel.Caption
UserInfoNameLabel.Parent:=WizardForm

WizardForm.UserInfoNameEdit.Left:=205
WizardForm.UserInfoNameEdit.Top:=106
WizardForm.UserInfoNameEdit.Width:=465
WizardForm.UserInfoNameEdit.Height:=21
WizardForm.UserInfoNameEdit.Parent:= WizardForm

UserInfoOrgLabel:=TLabel.Create(WizardForm)
UserInfoOrgLabel.Left:=205
UserInfoOrgLabel.Top:=142
UserInfoOrgLabel.Transparent:=True
UserInfoOrgLabel.Caption:=WizardForm.UserInfoOrgLabel.Caption
UserInfoOrgLabel.Parent:=WizardForm

WizardForm.UserInfoOrgEdit.Left:=205
WizardForm.UserInfoOrgEdit.Top:=158
WizardForm.UserInfoOrgEdit.Width:=465
WizardForm.UserInfoOrgEdit.Height:=21
WizardForm.UserInfoOrgEdit.Color:=$000000
WizardForm.UserInfoOrgEdit.Font.Color:=$ffffff
WizardForm.UserInfoOrgEdit.Parent:= WizardForm

UserInfoSerialLabel:=TLabel.Create(WizardForm)
UserInfoSerialLabel.Left:=205
UserInfoSerialLabel.Top:=194
UserInfoSerialLabel.Transparent:=True
UserInfoSerialLabel.Caption:=WizardForm.UserInfoSerialLabel.Caption
UserInfoSerialLabel.Parent:=WizardForm

WizardForm.UserInfoSerialEdit.Left:=205
WizardForm.UserInfoSerialEdit.Top:=210
WizardForm.UserInfoSerialEdit.Width:=465
WizardForm.UserInfoSerialEdit.Height:=21
WizardForm.UserInfoSerialEdit.Color:=$000000
WizardForm.UserInfoSerialEdit.Font.Color:=$ffffff
WizardForm.UserInfoSerialEdit.Parent:= WizardForm

// wpSelectDir
SelectDirLabel:=TLabel.Create(WizardForm)
SelectDirLabel.Left:=205
SelectDirLabel.Top:=90
SelectDirLabel.Width:=465
SelectDirLabel.Height:=28
SelectDirLabel.AutoSize:=False
SelectDirLabel.WordWrap:=True
SelectDirLabel.Transparent:=True
SelectDirLabel.Caption:=WizardForm.SelectDirLabel.Caption
SelectDirLabel.Parent:=WizardForm

SelectDirBrowseLabel:=TLabel.Create(WizardForm)
SelectDirBrowseLabel.Left:=205
SelectDirBrowseLabel.Top:=120
SelectDirBrowseLabel.Width:=465
SelectDirBrowseLabel.Height:=28
SelectDirBrowseLabel.AutoSize:=False
SelectDirBrowseLabel.WordWrap:=True
SelectDirBrowseLabel.Transparent:=True
SelectDirBrowseLabel.Caption:=WizardForm.SelectDirBrowseLabel.Caption
SelectDirBrowseLabel.Parent:=WizardForm

WizardForm.DirEdit.Left:=205
WizardForm.DirEdit.Top:=380
WizardForm.DirEdit.Width:=370
WizardForm.DirEdit.Height:=21
WizardForm.DirEdit.Color:=$000000
WizardForm.DirEdit.Font.Color:=$ffffff
WizardForm.DirEdit.Parent:= WizardForm


    WizardForm.DirBrowseButton.Width:=80
    WizardForm.DirBrowseButton.Height:=23
    WizardForm.DirBrowseButton.Parent:= WizardForm

DiskSpaceLabel:=TLabel.Create(WizardForm)
DiskSpaceLabel.Left:=205
DiskSpaceLabel.Top:=415
DiskSpaceLabel.Transparent:=True
DiskSpaceLabel.Caption:=WizardForm.DiskSpaceLabel.Caption
DiskSpaceLabel.Parent:=WizardForm

// wpSelectComponents
SelectComponentsLabel:=TLabel.Create(WizardForm)
SelectComponentsLabel.Left:=205
SelectComponentsLabel.Top:=90
SelectComponentsLabel.Width:=465
SelectComponentsLabel.Height:=42
SelectComponentsLabel.AutoSize:=False
SelectComponentsLabel.WordWrap:=True
SelectComponentsLabel.Transparent:=True
SelectComponentsLabel.Caption:=WizardForm.SelectComponentsLabel.Caption
SelectComponentsLabel.Parent:=WizardForm

WizardForm.TypesCombo.Left:=205
WizardForm.TypesCombo.Top:=134
WizardForm.TypesCombo.Width:=465
WizardForm.TypesCombo.Height:=21
WizardForm.TypesCombo.Color:=$000000
WizardForm.TypesCombo.Font.Color:=$ffffff
WizardForm.TypesCombo.Parent:= WizardForm

WizardForm.ComponentsList.Left:=205
WizardForm.ComponentsList.Top:=158
WizardForm.ComponentsList.Width:=465
WizardForm.ComponentsList.Height:=243
WizardForm.ComponentsList.Color:=$000000
WizardForm.ComponentsList.Font.Color:=$ffffff
WizardForm.ComponentsList.Parent:= WizardForm

ComponentsDiskSpaceLabel:=TLabel.Create(WizardForm)
ComponentsDiskSpaceLabel.Left:=205
ComponentsDiskSpaceLabel.Top:=415
ComponentsDiskSpaceLabel.Transparent:=True
ComponentsDiskSpaceLabel.Caption:=WizardForm.ComponentsDiskSpaceLabel.Caption
ComponentsDiskSpaceLabel.Parent:=WizardForm

// wpSelectProgramGroup
SelectStartMenuFolderLabel:=TLabel.Create(WizardForm)
SelectStartMenuFolderLabel.Left:=205
SelectStartMenuFolderLabel.Top:=90
SelectStartMenuFolderLabel.Width:=465
SelectStartMenuFolderLabel.Height:=28
SelectStartMenuFolderLabel.AutoSize:=False
SelectStartMenuFolderLabel.WordWrap:=True
SelectStartMenuFolderLabel.Transparent:=True
SelectStartMenuFolderLabel.Caption:=WizardForm.SelectStartMenuFolderLabel.Caption
SelectStartMenuFolderLabel.Parent:=WizardForm

SelectStartMenuFolderBrowseLabel:=TLabel.Create(WizardForm)
SelectStartMenuFolderBrowseLabel.Left:=205
SelectStartMenuFolderBrowseLabel.Top:=120
SelectStartMenuFolderBrowseLabel.Width:=465
SelectStartMenuFolderBrowseLabel.Height:=28
SelectStartMenuFolderBrowseLabel.AutoSize:=False
SelectStartMenuFolderBrowseLabel.WordWrap:=True
SelectStartMenuFolderBrowseLabel.Transparent:=True
SelectStartMenuFolderBrowseLabel.Caption:=WizardForm.SelectStartMenuFolderBrowseLabel.Caption
SelectStartMenuFolderBrowseLabel.Parent:=WizardForm

WizardForm.GroupEdit.Left:=205
WizardForm.GroupEdit.Top:=380
WizardForm.GroupEdit.Width:=370
WizardForm.GroupEdit.Height:=21
WizardForm.GroupEdit.Color:=$000000
WizardForm.GroupEdit.Font.Color:=$ffffff
WizardForm.GroupEdit.Parent:= WizardForm

    WizardForm.GroupBrowseButton.Left:=378
    WizardForm.GroupBrowseButton.Top:=288
    WizardForm.GroupBrowseButton.Width:=80
    WizardForm.GroupBrowseButton.Height:=23
    WizardForm.GroupBrowseButton.Parent:= WizardForm

WizardForm.NoIconsCheck.Left:=205
WizardForm.NoIconsCheck.Top:=415
WizardForm.NoIconsCheck.Width:=13
WizardForm.NoIconsCheck.Height:=13
WizardForm.NoIconsCheck.Visible:=True
WizardForm.NoIconsCheck.Parent:= WizardForm

NoIconsLabel:=TLabel.Create(WizardForm)
NoIconsLabel.Left:=221
NoIconsLabel.Top:=415
NoIconsLabel.Transparent:=True
NoIconsLabel.OnClick:= @NoIconsLabelOnClick
NoIconsLabel.Caption:=WizardForm.NoIconsCheck.Caption
NoIconsLabel.Parent:=WizardForm

// wpSelectTasks
SelectTasksLabel:=TLabel.Create(WizardForm)
SelectTasksLabel.Left:=205
SelectTasksLabel.Top:=90
SelectTasksLabel.Width:=465
SelectTasksLabel.Height:=28
SelectTasksLabel.AutoSize:=False
SelectTasksLabel.WordWrap:=True
SelectTasksLabel.Transparent:=True
SelectTasksLabel.Caption:=WizardForm.SelectTasksLabel.Caption
SelectTasksLabel.Parent:=WizardForm

WizardForm.TasksList.Left:=205
WizardForm.TasksList.Top:=124
WizardForm.TasksList.Width:=465
WizardForm.TasksList.Height:=300
WizardForm.TasksList.Color:=$000000
WizardForm.TasksList.Font.Color:=$ffffff
WizardForm.TasksList.Parent:= WizardForm

// wpReady
ReadyLabel:=TLabel.Create(WizardForm)
ReadyLabel.Left:=205
ReadyLabel.Top:=90
ReadyLabel.Width:=465
ReadyLabel.Height:=28
ReadyLabel.AutoSize:=False
ReadyLabel.WordWrap:=True
ReadyLabel.Transparent:=True
ReadyLabel.Parent:=WizardForm

WizardForm.ReadyMemo.Left:=205
WizardForm.ReadyMemo.Top:=124
WizardForm.ReadyMemo.Width:=465
WizardForm.ReadyMemo.Height:=300
WizardForm.ReadyMemo.Color:=$000000
WizardForm.ReadyMemo.Font.Color:=$ffffff
WizardForm.ReadyMemo.Parent:= WizardForm

// wpInstalling
StatusLabel:=TLabel.Create(WizardForm)
StatusLabel.Left:=205
StatusLabel.Top:=90
StatusLabel.Transparent:=True
StatusLabel.Caption:=WizardForm.Caption +'...'
StatusLabel.Parent:=WizardForm

WizardForm.ProgressGauge.Left:=205
WizardForm.ProgressGauge.Top:=120
WizardForm.ProgressGauge.Width:=465
WizardForm.ProgressGauge.Height:=21
WizardForm.ProgressGauge.Parent:= WizardForm

// wpInfoAfter
InfoAfterClickLabel:=TLabel.Create(WizardForm)
InfoAfterClickLabel.Left:=205
InfoAfterClickLabel.Top:=90
InfoAfterClickLabel.Transparent:=True
InfoAfterClickLabel.Caption:=WizardForm.InfoAfterClickLabel.Caption
InfoAfterClickLabel.Parent:=WizardForm

WizardForm.InfoAfterMemo.Left:=205
WizardForm.InfoAfterMemo.Top:=124
WizardForm.InfoAfterMemo.Width:=465
WizardForm.InfoAfterMemo.Height:=300
WizardForm.InfoAfterMemo.Parent:= WizardForm

// wpFinished
FinishedHeadingLabel:=TLabel.Create(WizardForm)
FinishedHeadingLabel.Left:=205
FinishedHeadingLabel.Top:=90
FinishedHeadingLabel.Width:=465
FinishedHeadingLabel.Height:=28
FinishedHeadingLabel.AutoSize:=False
FinishedHeadingLabel.WordWrap:=True
FinishedHeadingLabel.Transparent:=True
FinishedHeadingLabel.Font.Color:=$ffffff
FinishedHeadingLabel.Font.Style:=[fsBold]
FinishedHeadingLabel.Caption:=WizardForm.FinishedHeadingLabel.Caption
FinishedHeadingLabel.Parent:=WizardForm

FinishedLabel:=TLabel.Create(WizardForm)
FinishedLabel.Left:=205
FinishedLabel.Top:=130
FinishedLabel.Width:=465
FinishedLabel.Height:=56
FinishedLabel.AutoSize:=False
FinishedLabel.WordWrap:=True
FinishedLabel.Transparent:=True
FinishedLabel.Caption:=WizardForm.FinishedLabel.Caption
FinishedLabel.Parent:=WizardForm

    WizardForm.RunList.Left:=0
    WizardForm.RunList.Top:=200
    WizardForm.RunList.Width:=465
    WizardForm.RunList.Height:=120
    WizardForm.RunList.Color:=$000000
    WizardForm.RunList.Font.Color:=$ffffff

YesRadio:=TRadioButton.Create(WizardForm)
YesRadio.Left:=205
YesRadio.Top:=290
YesRadio.Width:=13
YesRadio.Height:=13
YesRadio.Color:=$b58434
YesRadio.OnClick:=@YesRadioOnClick
YesRadio.Parent:=WizardForm

YesRadioLabel:=TLabel.Create(WizardForm)
YesRadioLabel.Left:=221
YesRadioLabel.Top:=290
YesRadioLabel.Transparent:=True
YesRadioLabel.Caption:=WizardForm.YesRadio.Caption
YesRadioLabel.Parent:=WizardForm

NoRadio:=TRadioButton.Create(WizardForm)
NoRadio.Left:=205
NoRadio.Top:=310
NoRadio.Width:=13
NoRadio.Height:=13
NoRadio.Color:=$b58434
NoRadio.OnClick:=@NoRadioOnClick
NoRadio.Parent:=WizardForm

NoRadioLabel:=TLabel.Create(WizardForm)
NoRadioLabel.Left:=221
NoRadioLabel.Top:=310
NoRadioLabel.Transparent:=True
NoRadioLabel.Caption:=WizardForm.NoRadio.Caption
NoRadioLabel.Parent:=WizardForm
end;

Procedure ShowPageComponents(CurPageID: Integer);
begin
Case CurPageID of

wpWelcome:
begin
WelcomeLabel1.Show
WelcomeLabel2.Show
end

wpLicense:
begin
LicenseLabel1.Show
WizardForm.LicenseMemo.Show
WizardForm.LicenseAcceptedRadio.Show
LicenseAcceptedLabel.Show
WizardForm.LicenseNotAcceptedRadio.Show
LicenseNotAcceptedLabel.Show
end

wpPassword:
begin
PasswordLabel.Show
PasswordEditLabel.Show
WizardForm.PasswordEdit.Show
end

wpInfoBefore:
begin
InfoBeforeClickLabel.Show
WizardForm.InfoBeforeMemo.Show
end

wpUserInfo:
begin
UserInfoNameLabel.Show
WizardForm.UserInfoNameEdit.Show
UserInfoOrgLabel.Show
WizardForm.UserInfoOrgEdit.Show
UserInfoSerialLabel.Show
WizardForm.UserInfoSerialEdit.Show
end

wpSelectDir:
begin
SelectDirLabel.Show
SelectDirBrowseLabel.Show
WizardForm.DirEdit.Show
WizardForm.DirBrowseButton.Show
DiskSpaceLabel.Show

end

wpSelectComponents:
begin
SelectComponentsLabel.Show
WizardForm.TypesCombo.Show
WizardForm.ComponentsList.Show
ComponentsDiskSpaceLabel.Show
end

wpSelectProgramGroup:
begin
SelectStartMenuFolderLabel.Show
SelectStartMenuFolderBrowseLabel.Show
WizardForm.GroupEdit.Show
WizardForm.GroupBrowseButton.Show

end

wpSelectTasks:
begin
SelectTasksLabel.Show
WizardForm.TasksList.Show
end

wpReady:
begin
ReadyLabel.Show
ReadyLabel.Caption:=WizardForm.ReadyLabel.Caption
WizardForm.ReadyMemo.Show
end

wpInstalling:
begin
StatusLabel.Show
WizardForm.ProgressGauge.Show
end

wpInfoAfter:
begin
InfoAfterClickLabel.Show
WizardForm.InfoAfterMemo.Show
end

wpFinished:
begin
FinishedHeadingLabel.Show
FinishedLabel.Show
FinishedLabel.Caption:=WizardForm.FinishedLabel.Caption
WizardForm.RunList.hide
//YesRadio.Checked:=True
//YesRadio.Show
//YesRadioLabel.Show
//NoRadio.Show
//NoRadioLabel.Show
end
end;
end;

function InitializeSetup(): Boolean;
var
  ResultCode: Integer;
  ResultStr:string;
begin
Result:=True;
begin
  If RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup Scripting v5.1 Russian Edition_is1', 'UninstallString', ResultStr)
then
 begin
  If ResultStr<>''
then
 begin
  ResultStr:=RemoveQuotes(ResultStr);
  if MsgBox('Setup has detected that this program is already installed.' #13#13 'Would you like to uninstall the existing copy before continuing?', mbConfirmation, MB_YESNO) = idYes
then
  if not Exec(ResultStr, '/silent', '', SW_SHOW, ewWaitUntilTerminated, ResultCode)
then
  MsgBox('Uninstall Error. ' #13#13 '' + SysErrorMessage(ResultCode) + '.' #13#13 'Probably, uninstall files was moved, removed or renamed.', mbError, MB_OK);
end;
end;
end;
end;

procedure CancelButtonClick(CurPage: Integer; var Cancel, Confirm: Boolean);
begin
 Cancel:=False;
 Confirm:=False;
if MsgBox('Are you shure you want to cancel Setup?', mbError, MB_YESNO) = idYes
 then
  Cancel:=true;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  HideAll
  ShowPageComponents(CurPageID)
  UpdateButton(WizardForm.BackButton,bidBack)
  UpdateButton(WizardForm.NextButton,bidNext)
  UpdateButton(WizardForm.CancelButton,bidCancel)
  UpdateButton(WizardForm.DirBrowseButton,bidDirBrowse)
  UpdateButton(WizardForm.GroupBrowseButton,bidGroupBrowse)
end;

Procedure InitializeWizard();
var
   Name1: string;
begin
  ExtractTemporaryFile('WizardImage2.bmp')
  ExtractTemporaryFile('button2.bmp')
  ExtractTemporaryFile('Transparent Hand.cur')
  ExtractTemporaryFile('Transparent Arrow.cur')
  ExtractTemporaryFile('BASSMOD.dll');
  ExtractTemporaryFile('TWINKLE.IT');
  
  InitializeSkin

  NewCursor:= LoadCursorFromFile(ExpandConstant('{tmp}\Transparent Hand.cur'));
  NewCursor1:= LoadCursorFromFile(ExpandConstant('{tmp}\Transparent Arrow.cur'));
  OldCursor:= SetClassLong(WizardForm.NextButton.Handle, GCL_HCURSOR, NewCursor);
  OldCursor:= SetClassLong(WizardForm.Handle, GCL_HCURSOR, NewCursor1);
  OldCursor:= SetClassLong(WizardForm.MainPanel.Handle, GCL_HCURSOR, NewCursor);

  WizardForm.BackButton.Left:=293
  WizardForm.BackButton.Width:=ButtonWidth
  WizardForm.BackButton.Height:=ButtonHeight

  WizardForm.NextButton.Left:=375
  WizardForm.NextButton.Width:=ButtonWidth
  WizardForm.NextButton.Height:=ButtonHeight

  WizardForm.CancelButton.Left:=600
  WizardForm.CancelButton.Width:=ButtonWidth
  WizardForm.CancelButton.Height:=ButtonHeight

  WizardForm.DirBrowseButton.Top:=379
  WizardForm.DirBrowseButton.Left:=580
  WizardForm.DirBrowseButton.Width:=ButtonWidth
  WizardForm.DirBrowseButton.Height:=ButtonHeight

  WizardForm.GroupBrowseButton.Top:=379
  WizardForm.GroupBrowseButton.Left:=580
  WizardForm.GroupBrowseButton.Width:=ButtonWidth
  WizardForm.GroupBrowseButton.Height:=ButtonHeight

  LoadButtonImage(WizardForm.BackButton,bidBack)
  LoadButtonImage(WizardForm.NextButton,bidNext)
  LoadButtonImage(WizardForm.CancelButton,bidCancel)
  LoadButtonImage(WizardForm.DirBrowseButton,bidDirBrowse)
  LoadButtonImage(WizardForm.GroupBrowseButton,bidGroupBrowse)
  
     if not BASSMOD_Init(-1,44100,0)
       then
          begin
            BASSMOD_Free;
          end
        else
      Name1:=ExpandConstant('{tmp}\TWINKLE.IT');
   if BASSMOD_MusicLoad(FALSE, PChar(Name1), 0, 0, BASS_MUSIC_LOOP or BASS_MUSIC_SURROUND or 32 or 1) then
  BASSMOD_MusicPlay;
end;

procedure DeInitializeSetup();
begin
BASSMOD_MusicStop;
BASSMOD_Free();
SetSystemCursor(OldCursor, OCR_NORMAL);
end;
тоже нифига не понял

Отправлено: 14:54, 23-03-2012 | #1270