DeKaNszn ето уже пробовал. текстура на "Oтмена" не меняется, а нужно чтоб она становилась нажатой.
вот весь скрипт [more][Setup]
AppName=Command & Conquer 3 Kane's Wrath (RePack by spider91)
AppVerName=Command & Conquer 3 Kane's Wrath
DefaultDirName={pf}\Electronic Arts\Command & Conquer 3 Kane's Wrath
DefaultGroupName=Command & Conquer 3 Kane's Wrath
AllowNoIcons=yes
OutputBaseFilename=setup
Compression=lzma/ultra64
SolidCompression=yes
WizardSmallImageFile=C:\Users\Dmitri\Desktop\small.bmp
WizardImageFile=C:\Users\Dmitri\Desktop\big.bmp
SetupIconFile=C:\Users\Dmitri\Desktop\icon.ico
ExtraDiskSpaceRequired=4765687732
UninstallFilesDir={app}\Uninstall
[Languages]
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "en"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "icon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
Name: "dx"; Description: "Обновить DirectX"; GroupDescription: "Дополнительное программное обеспечение:"; Languages: ru;
Name: "vc"; Description: "Установить Microsoft Visual C++ 2005 SP1 Redist"; GroupDescription: "Дополнительное программное обеспечение:"; Languages: ru;
Name: "dx"; Description: "Update DirectX"; GroupDescription: "Additional software:"; Languages: en;
Name: "vc"; Description: "Install Microsoft Visual C++ 2005 SP1 Redist"; GroupDescription: "Additional software:"; Languages: en;
[Registry]
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3"; ValueName: "InstallPath"; ValueType: String; ValueData: "{app}\cc3";
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "DisplayName"; ValueType: String; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "Locale"; ValueType: String; ValueData: "ru"; Languages: ru; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "Language"; ValueType: String; ValueData: "english"; Languages: en; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "UseLocalUserMaps"; ValueType: Dword; ValueData: "0"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "MapPackVersion"; ValueType: Dword; ValueData: "65536"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "Package"; ValueType: String; ValueData: "{{CC2422C9-F7B5-4175-B295-5EC2283AA674}"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "Language"; ValueType: String; ValueData: "russian"; Languages: ru; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "ReplayFolderName"; ValueType: String; ValueData: "Replays"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "ScreenshotsFolderName"; ValueType: String; ValueData: "Screenshots"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "UserDataLeafName"; ValueType: String; ValueData: "Command & Conquer 3 Kane's Wrath"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "SaveFolderName"; ValueType: String; ValueData: "SaveGames"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "ProfileFolderName"; ValueType: String; ValueData: "Profiles"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "InstallPath"; ValueType: String; ValueData: "{app}\"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "Readme"; ValueType: String; ValueData: "{app}\Support\ru\readme.txt"; Languages: ru; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "Readme"; ValueType: String; ValueData: "{app}\readme.txt"; Languages: en; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "Version"; ValueType: Dword; ValueData: "65536"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Electronic Arts\Electronic Arts\Command and Conquer 3 Kanes Wrath"; ValueName: "Hash"; ValueType: Dword; ValueData: "382823914"; Flags: uninsdeletekey
[LangOptions]
WelcomeFontName=Tahoma
WelcomeFontSize=11
[UninstallDelete]
Type: filesandordirs ; Name: "{app}";
[Files]
Source: C:\Program Files (x86)\Inno Setup Scripting v5.1\Scripts\Buttons\button3.bmp; DestDir: {tmp}; Flags: dontcopy
Source: C:\Users\Dmitri\Desktop\cckw\Arc.exe; DestDir: {tmp}; Flags: dontcopy
Source: C:\Users\Dmitri\Desktop\cckw\Movies\*; DestDir: "{app}\Movies"; Flags: ignoreversion overwritereadonly recursesubdirs createallsubdirs
Source: C:\Users\Dmitri\Desktop\Command & Conquer 3 Kane's Wrath\#readme#\CC3-dummy\*; DestDir: "{app}\cc3"; Flags: ignoreversion overwritereadonly recursesubdirs createallsubdirs
[Icons]
Name: "{group}\Играть Command & Conquer 3 Kane's Wrath "; Filename: "{app}\cnc3ep1.exe"; Parameters: "-ui"; WorkingDir: {app}; Languages: ru;
Name: "{group}\Удалить Command & Conquer 3 Kane's Wrath"; Filename: "{uninstallexe}"; Languages: ru;
Name: "{userdesktop}\Command & Conquer 3 Kane's Wrath "; Filename: "{app}\cnc3ep1.exe"; Parameters: "-ui"; WorkingDir: {app}; Tasks: icon
Name: "{group}\Play Command & Conquer 3 Kane's Wrath "; Filename: "{app}\cnc3ep1.exe"; Parameters: "-ui"; WorkingDir: {app}; Languages: en;
Name: "{group}\Uninstall Command & Conquer 3 Kane's Wrath"; Filename: "{uninstallexe}"; Languages: en;
[Run]
Filename: {app}\cnc3ep1.exe; Parameters: "-ui"; WorkingDir: {app}; Description: "Начать игру"; Languages: ru; Flags: postinstall nowait
Filename: {app}\cnc3ep1.exe; Parameters: "-ui"; WorkingDir: {app}; Description: "Play game"; Languages: en; Flags: postinstall nowait
Filename: "{src}\Redist\DirectX\DXSETUP.exe"; Parameters: "/silent"; StatusMsg: "Обновление DirectX..."; Languages: ru; Tasks: "dx"; Flags: waituntilterminated
Filename: "{src}\Redist\vcredist_x86.exe"; Parameters: "/q"; StatusMsg: "Установка Microsoft Visual C++ 2005 SP1 Redist..."; Languages: ru; Tasks: "vc"; Flags: runhidden waituntilterminated
Filename: "{src}\Redist\DirectX\DXSETUP.exe"; Parameters: "/silent"; StatusMsg: "Updating DirectX..."; Languages: en; Tasks: "dx"; Flags: waituntilterminated
Filename: "{src}\Redist\vcredist_x86.exe"; Parameters: "/q"; StatusMsg: "Installing Microsoft Visual C++ 2005 SP1 Redist..."; Languages: en; Tasks: "vc"; Flags: runhidden waituntilterminated
[CustomMessages]
en.Msg1=Extracting files...
ru.Msg1=Распаковка файлов...
[Code]
const
ButtonWidth = 80; //Указываем размер кнопок
ButtonHeight = 23;
bidBack = 0;
bidNext = 1;
bidCancel = 2;
bidDirBrowse = 3;
bidGroupBrowse = 4;
var
ProgressBar1: TNewProgressBar;
PageNameLabel, PageDescriptionLabel: TLabel;
ButtonPanel: array [0..4] of TPanel;
ButtonImage: array [0..4] of TBitmapImage;
ButtonLabel: array [0..4] of TLabel;
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}\button3.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:=15 //Указываем положение текста
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 CurPageChanged(CurPageID: Integer);
begin
UpdateButton(WizardForm.BackButton,bidBack)
UpdateButton(WizardForm.NextButton,bidNext)
UpdateButton(WizardForm.CancelButton,bidCancel)
PageNameLabel.Caption:= WizardForm.PageNameLabel.Caption;
end;
procedure InitializeWizard();
begin
WizardForm.Position:=poScreenCenter;
WizardForm.BackButton.Width:=ButtonWidth
WizardForm.BackButton.Height:=ButtonHeight
WizardForm.NextButton.Width:=ButtonWidth
WizardForm.NextButton.Height:=ButtonHeight
WizardForm.CancelButton.Width:=ButtonWidth
WizardForm.CancelButton.Height:=ButtonHeight
WizardForm.DirBrowseButton.Left:=337
WizardForm.DirBrowseButton.Width:=ButtonWidth
WizardForm.DirBrowseButton.Height:=ButtonHeight
WizardForm.GroupBrowseButton.Left:=337
WizardForm.GroupBrowseButton.Width:=ButtonWidth
WizardForm.GroupBrowseButton.Height:=ButtonHeight
WizardForm.LicenseAcceptedRadio.OnClick:=@LicenceAcceptedRadioOnClick
WizardForm.LicenseNotAcceptedRadio.OnClick:=@LicenceNotAcceptedRadioOnClick
ExtractTemporaryFile('button3.bmp')
LoadButtonImage(WizardForm.BackButton,bidBack)
LoadButtonImage(WizardForm.NextButton,bidNext)
LoadButtonImage(WizardForm.CancelButton,bidCancel)
LoadButtonImage(WizardForm.DirBrowseButton,bidDirBrowse)
LoadButtonImage(WizardForm.GroupBrowseButton,bidGroupBrowse)
WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;
PageNameLabel:= TLabel.Create( WizardForm );
PageNameLabel.Left:= WizardForm.PageNameLabel.Left;
PageNameLabel.Top:= WizardForm.PageNameLabel.Top;
PageNameLabel.Transparent:= True;
PageNameLabel.Font.Style:= [fsBold];
PageNameLabel.Font.Color:= clWhite;
PageNameLabel.Parent:= WizardForm.MainPanel;
PageDescriptionLabel:= TLabel.Create( WizardForm );
PageDescriptionLabel.Left:= WizardForm.PageDescriptionLabel.Left;
PageDescriptionLabel.Top:= WizardForm.PageDescriptionLabel.Top;
PageDescriptionLabel.Transparent:= True;
PageDescriptionLabel.Font.Color:= clWhite;
PageDescriptionLabel.Parent:= WizardForm.MainPanel;
WizardForm.WizardSmallBitmapImage.Left:= ScaleX(0);
WizardForm.WizardSmallBitmapImage.Width:=WizardForm.ClientWidth;
WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:msg1}');
WizardForm.FileNameLabel.Visible:=False;
WizardForm.ProgressGauge.Top:=ScaleY(65);
WizardForm.ProgressGauge.Width:=280;
WizardForm.ProgressGauge.Left:=120;
WizardForm.StatusLabel.Top:=ScaleY(29);
WizardForm.WelcomeLabel2.Top:=ScaleY(90);
ProgressBar1 := TNewProgressBar.Create(wizardform);
with ProgressBar1 do
begin
Parent := wizardform.installingpage;
Top := 65;
Width := 110;
Height := wizardform.progressgauge.height;
Max :=11;
end;
end;
procedure CurStepChanged(CurStep: TSetupStep);
var ResultCode:integer;
begin
If CurStep=ssInstall
then
begin
WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:msg1}');
ProgressBar1.Position := ProgressBar1.Position+1
ExtractTemporaryFile('Arc.exe')
Exec(ExpandConstant('{tmp}\Arc.exe'), 'x '+AddQuotes(ExpandConstant('{src}\data1.bin'))+' -y -dp'+AddQuotes(ExpandConstant('{app}')), '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:msg1}');
ProgressBar1.Position := ProgressBar1.Position+2
Exec(ExpandConstant('{tmp}\Arc.exe'), 'x '+AddQuotes(ExpandConstant('{src}\data2.bin'))+' -y -dp'+AddQuotes(ExpandConstant('{app}')), '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:msg1}');
ProgressBar1.Position := ProgressBar1.Position+3
Exec(ExpandConstant('{tmp}\Arc.exe'), 'x '+AddQuotes(ExpandConstant('{src}\data3.bin'))+' -y -dp'+AddQuotes(ExpandConstant('{app}')), '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:msg1}');
ProgressBar1.Position := ProgressBar1.Position+3
Exec(ExpandConstant('{tmp}\Arc.exe'), 'x '+AddQuotes(ExpandConstant('{src}\data4.bin'))+' -y -dp'+AddQuotes(ExpandConstant('{app}')), '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:msg1}');
ProgressBar1.Position := ProgressBar1.Position+2
end;
end;
[/more]
Добавлено: Цитата: добавь в код перед началом распаковки загрузку текстуры
хотя не так не пробовал. щас попробую
Добавлено: попробовал. идет но не совсем так как я хотел. текст становится темнее но я хотел чтоб и текстура становилась как у нажатой кнопки