Показать полную графическую версию : [архив] Скрипты Inno Setup. Помощь и советы [часть 2]
Есть скрипт ли для сначала распаковки фриарк архивов а потом сразу и precomp
Habetdin
09-02-2010, 22:50
Jerichoman, Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2; ValueType: string; ValueName: InstallPath; ValueData: {app}; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\SP; ValueType: string; ValueName: InstallPath; ValueData: {app}\SP; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\SP; ValueType: string; ValueName: Working; ValueData: {app}\SP\Builds\Binaries; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\SP; ValueType: string; ValueName: Launcher; ValueData: {app}\SP\Builds\Binaries\Bioshock2Launcher.exe; Flags: uninsdeletevalue uninsdeletekeyifempty
Jerichoman
09-02-2010, 23:02
Habetdin,
спасибо
morozov-ch
10-02-2010, 08:36
Habetdin, извените уважаемый, но так не получается.
У меня DOS приложение, мне бы его загнать в полноэкранку.
всем привет, прошу помощи, скажите что надо редактировать что-бы подвинуть кнопки?
const
ButtonWidth = 80; //Указываем размер кнопок
ButtonHeight = 23;
bidBack = 0;
bidNext = 1;
bidCancel = 2;
bidDirBrowse = 3;
bidGroupBrowse = 4;
var
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}\button.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 CurPageChanged(CurPageID: Integer);
begin
UpdateButton(WizardForm.BackButton,bidBack)
UpdateButton(WizardForm.NextButton,bidNext)
UpdateButton(WizardForm.CancelButton,bidCancel)
end;
procedure InitializeWizard();
begin
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('button.bmp')
LoadButtonImage(WizardForm.BackButton,bidBack)
LoadButtonImage(WizardForm.NextButton,bidNext)
LoadButtonImage(WizardForm.CancelButton,bidCancel)
LoadButtonImage(WizardForm.DirBrowseButton,bidDirBrowse)
LoadButtonImage(WizardForm.GroupBrowseButton,bidGroupBrowse)
end;
http://s42.radikal.ru/i098/1002/53/c0907b2e65f0t.jpg (http://radikal.ru/F/s42.radikal.ru/i098/1002/53/c0907b2e65f0.jpg.html)
http://s57.radikal.ru/i156/1002/1a/4705cf28ba32t.jpg (http://radikal.ru/F/s57.radikal.ru/i156/1002/1a/4705cf28ba32.jpg.html)
просто скажите куда здесь писать значения, что-бы подвинуть это изображение(кнопки) как видите, их надо приподнять!
Не ,не слайды а когда в самом окне инсталляторя меняется картинка
и ещё подскажите пожалста я где то здесь видел пак inno с библиотеками и со всеми наворотами
Подскажите скрипт, чтобы был один установочный файл (Setup.exe+.arc).
svensoft
10-02-2010, 18:56
всем привет, прошу помощи, скажите что надо редактировать что-бы подвинуть кнопки? »
Tukash, вот это попробуй в своем коде подправить :
procedure UpdateButton(AButton: TButton;AButtonIndex: integer);
begin
ButtonLabel[AButtonIndex].Caption:=AButton.Caption
ButtonPanel[AButtonIndex].Visible:=AButton.Visible
ButtonLabel[AButtonIndex].Enabled:=Abutton.Enabled
ButtonLabel[AButtonIndex].Top:=AButton.Top
end;
procedure CurPageChanged(CurPageID: Integer);
begin
UpdateButton(WizardForm.BackButton,bidBack)
UpdateButton(WizardForm.NextButton,bidNext)
UpdateButton(WizardForm.CancelButton,bidCancel)
If CurPageID=wpSelectDir then
begin
UpdateButton(WizardForm.DirBrowseButton,bidDirBrowse)
end
else
If CurPageID=wpSelectProgramGroup then
begin
UpdateButton(WizardForm.GroupBrowseButton,bidGroupBrowse)
end
end;
svensoft
во чувак, респект тебе, а то я уже от горя, кнопки по дефолту поставил!
правда обошелся только ButtonPanel[AButtonIndex].Top:=AButton.Top
Inno ISCmplr Setup (http://restools.hanzify.org/inno/Inno_ISCmplr_Setup100210(7zip).zip) 5.3.7 build 100210
Vengeance
11-02-2010, 13:37
Подскажите тогда уж мн, а вернее дайте скрипт за основу.
Скрипт выбора компонентов, например:
Установить модели.
1. А
2. Б
3. С
И обьясните: как создавать возможность выбора только одного элемента из компонентов, как можно сделать установку по выбору(ставить компонент или нет, как сделать чтобы из опр. папок в опр. ставилось. К примеру я делаю инсталлятор папки C:/hl. А у меня модели компонентов в C:/s/1, C:/s/2, C:/s/3 и чтобы они поставились в C:/hl/valve/models :)
Здрасьтя всем!!!
такой вопрос, хочу вот тут=> http://s56.radikal.ru/i154/1002/5f/4d7f0d1bf5cd.jpg (http://www.radikal.ru)изменить цвет,"всмысле" там где голубой сделать темно синий, можно-ли это сделать путем занесения чего-либо в секцию [КОД], без разных там ***.cjstyles?
изменить цвет,"всмысле" там где голубой сделать темно синий, можно-ли это сделать путем занесения чего-либо в секцию [КОД], без разных там ***.cjstyles? »
если без использования сторонних длл, то в принципе можно, только такой способ будет действовать на всех наследников EDIT (т.е. во всей винде поменяются цвета у Edit, Memo и т.д. + менюшки и т.п.). обычная подмена системных цветов
[Setup]
AppName=My Program
AppVerName=My Program v 1.5
DefaultDirName={pf}\My Program
[Languages]
Name: rus; MessagesFile: compiler:Languages\Russian.isl
[Code]
type
TM1 = array [0..1] of integer;
TM2 = array [0..1] of DWORD;
var
M1 : TM1;
M2 : TM2;
OldHighLightTextColor,
OldHighLightColor : DWORD;
function SetSysColors(cElements: Integer; lpaElements:TM1; lpaRgbValues:TM2): BOOL; external 'SetSysColors@user32.dll stdcall';
function GetSysColor(nIndex: Integer): DWORD; external 'GetSysColor@user32.dll stdcall';
procedure InitializeWizard();
begin
OldHighLightTextColor:=GetSysColor(14);
OldHighLightColor:=GetSysColor(13);
M1[0]:=14;
M1[1]:=13;
M2[0]:=$FF0000; // цвет выделенного текста
M2[1]:=$0000FF; // цвет фона выделенного текста
SetSysColors(2,M1,M2);
end;
procedure DeinitializeSetup();
begin
//вернем все взад, чтобы юзер не обиделся
M2[0]:=OldHighLightTextColor; //$FFFFFF;
M2[1]:=OldHighLightColor; //$C56A31;
SetSysColors(2,M1,M2);
end;
если нужно только для конкретного эдита, то это как минимум перехват оконной процедуры, т.е. тащить с собой стороннюю длл
South
вот блин, не надо нам такова,но за ответ спасибо!!!
___________________________________
кто подскажет, что надо приписать что-бы папка находящаяся в одном каталоге с инсталлятором,(например папка с видео(movie)) скопирывалась в {app}\data\* как напрямую скопирывалась в нужный каталог?(без запаковки и распаковки напрямую)
и еще, как уже готовый архив FreeArc разбить на части?(так как делают репакеры на трекерах, разбивают их по 700 метров, и они распаковываются?это делается Inno без сжатия?)
Inno Setup Compiler (http://restools.hanzify.org/inno/InnoCompiler100212_English(7zip).zip) 5.3.7 build 100212 (English) by Restools (http://restools.hanzify.org)
IgrikxXx
13-02-2010, 15:25
Помогите пожайлуйста нада реализовать что бы чекбоксы били видны на картинке, вот в этом скрипте! Срочняк нужно надеюсь на вашу помощь!
Вот сам оригинал скрипта! http://www.forum.oszone.ru/post-1242285-250.html
[Setup]
AppName=The Sims 3
AppVerName=The Sims 3 v 1.5
DefaultDirName={pf}\The Sims 3
DefaultGroupName=The Sims 3
AppCopyright=Copyright © 2009 IgrikxXx
;SetupIconFile=nfs.ico
OutputDir=.
;WizardImageFile=Left.bmp
Compression=lzma/ultra64
InternalCompressLevel=ultra
SolidCompression=yes
DiskSpanning=yes
SlicesPerDisk=1
DiskSliceSize=734000000
[Languages]
Name: rus; MessagesFile: compiler:Languages\Russian.isl
[Files]
;Source: D:\games\The sims 3\*; DestDir: {app}; Flags: ignoreversion createallsubdirs recursesubdirs
[Run]
Filename: {src}\Redist\DirectX\dxsetup.exe; Tasks: directx
[Tasks]
Name: desktopicon; Description: Создать ярлык на рабочем столе
Name: directx; Description: Установить DirectX 9.0c
[Icons]
Name: {group}\The Sims; Filename: {app}\nfshs.exe; WorkingDir: {app}
Name: {group}\Удалить игрy; Filename: {uninstallexe}
Name: {userdesktop}\Need For Speed IV SE; Filename: {app}\nfshs.exe; WorkingDir: {app}; Tasks: desktopicon
[Messages]
BeveledLabel=- Repack by IgrikxXx -
[Code]
var
pnl: TPanel;
///////////////////////WelcomePage//////////////////////////////////////
procedure WelcomePage;
begin
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.WelcomeLabel1.AutoSize;
SetBounds(WizardForm.WelcomeLabel1.Left,WizardForm.WelcomeLabel1.Top,
WizardForm.WelcomeLabel1.Width,WizardForm.WelcomeLabel1.Height);
WordWrap:= WizardForm.WelcomeLabel1.WordWrap;
Caption:= WizardForm.WelcomeLabel1.Caption;
with Font do
begin
Color:= WizardForm.WelcomeLabel1.Font.Color;
Style:= WizardForm.WelcomeLabel1.Font.Style;
Name:= WizardForm.WelcomeLabel1.Font.Name;
Size:= WizardForm.WelcomeLabel1.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.WelcomeLabel2.AutoSize;
SetBounds(WizardForm.WelcomeLabel2.Left,WizardForm.WelcomeLabel2.Top,
WizardForm.WelcomeLabel2.Width,WizardForm.WelcomeLabel2.Height);
WordWrap:= WizardForm.WelcomeLabel2.WordWrap;
Caption:= WizardForm.WelcomeLabel2.Caption;
with Font do
begin
Color:= WizardForm.WelcomeLabel2.Font.Color;
Style:= WizardForm.WelcomeLabel2.Font.Style;
Name:= WizardForm.WelcomeLabel2.Font.Name;
Size:= WizardForm.WelcomeLabel2.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
pnl.Repaint;
end;
/////////////////////////////////////////////////////////////////
///////////////////////SelectDirPage//////////////////////////////////////
procedure SelectDirPage;
begin
with WizardForm do
begin
with DirEdit do
begin
Left:= 40;
Top:= 137;
Parent:= pnl;
end;
with DirBrowseButton do
begin
Left:= WizardForm.DirEdit.Left + WizardForm.DirEdit.Width + 10;
Top:= WizardForm.DirEdit.Top - 1;
Parent:= pnl;
end;
with SelectDirBitmapImage do
begin
Left:= WizardForm.DirEdit.Left;
Top:= WizardForm.DirEdit.Top - 62;
Stretch:= True;
Parent:= pnl;
end;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.SelectDirBrowseLabel.AutoSize;
SetBounds(WizardForm.DirEdit.Left,WizardForm.DirEdit.Top - 30,
WizardForm.SelectDirBrowseLabel.Width, WizardForm.SelectDirBrowseLabel.Height);
WordWrap:= WizardForm.SelectDirBrowseLabel.WordWrap;
Caption:= WizardForm.SelectDirBrowseLabel.Caption;
with Font do
begin
Color:= WizardForm.SelectDirBrowseLabel.Font.Color;
Style:= WizardForm.SelectDirBrowseLabel.Font.Style;
Name:= WizardForm.SelectDirBrowseLabel.Font.Name;
Size:= WizardForm.SelectDirBrowseLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.SelectDirLabel.AutoSize;
SetBounds(WizardForm.SelectDirBitmapImage.Left + 50,WizardForm.SelectDirBitmapImage.Top + 10,
WizardForm.SelectDirLabel.Width,WizardForm.SelectDirLabel.Height);
WordWrap:= WizardForm.SelectDirLabel.WordWrap;
Caption:= WizardForm.SelectDirLabel.Caption;
with Font do
begin
Color:= WizardForm.SelectDirLabel.Font.Color;
Style:= WizardForm.SelectDirLabel.Font.Style;
Name:= WizardForm.SelectDirLabel.Font.Name;
Size:= WizardForm.SelectDirLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.DiskSpaceLabel.AutoSize;
SetBounds(WizardForm.DirEdit.Left,WizardForm.Bevel.Top - 25,
WizardForm.DiskSpaceLabel.Width,WizardForm.DiskSpaceLabel.Height);
WordWrap:= WizardForm.DiskSpaceLabel.WordWrap;
Caption:= WizardForm.DiskSpaceLabel.Caption;
with Font do
begin
Color:= WizardForm.DiskSpaceLabel.Font.Color;
Style:= WizardForm.DiskSpaceLabel.Font.Style;
Name:= WizardForm.DiskSpaceLabel.Font.Name;
Size:= WizardForm.DiskSpaceLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
pnl.Repaint;
end;
/////////////////////////////////////////////////////////////////
///////////////////////ReadyPage//////////////////////////////////////
procedure ReadyPage;
var
ready_str: string;
begin
ready_str:= WizardForm.ReadyMemo.Text;
with TLabel.Create(pnl) do
begin
SetBounds(45,115,WizardForm.ReadyMemo.Width, WizardForm.ReadyMemo.Height);
Caption:= ready_str;
with Font do
begin
Color:= WizardForm.ReadyLabel.Font.Color;
Style:= WizardForm.ReadyLabel.Font.Style;
Name:= WizardForm.ReadyLabel.Font.Name;
Size:= WizardForm.ReadyLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TBevel.Create(WizardForm) do
begin
SetBounds(40,110, WizardForm.ReadyMemo.Width, WizardForm.ReadyMemo.Height);
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.ReadyLabel.AutoSize;
SetBounds(40,70, WizardForm.ReadyLabel.Width, WizardForm.ReadyLabel.Height);
WordWrap:= WizardForm.ReadyLabel.WordWrap;
Caption:= WizardForm.ReadyLabel.Caption;
with Font do
begin
Color:= WizardForm.ReadyLabel.Font.Color;
Style:= WizardForm.ReadyLabel.Font.Style;
Name:= WizardForm.ReadyLabel.Font.Name;
Size:= WizardForm.ReadyLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
pnl.Repaint;
end;
/////////////////////////////////////////////////////////////////
///////////////////////InstallingPage//////////////////////////////////////
procedure InstallingPage;
begin
with WizardForm.ProgressGauge do
begin
Left:= 40;
Top:= 115;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.FilenameLabel.AutoSize;
SetBounds(WizardForm.ProgressGauge.Left,WizardForm.ProgressGauge.Top-20,
WizardForm.FilenameLabel.Width,WizardForm.FilenameLabel.Height);
WordWrap:= WizardForm.FilenameLabel.WordWrap;
Caption:= WizardForm.FilenameLabel.Caption;
with Font do
begin
Color:= WizardForm.FilenameLabel.Font.Color;
Style:= WizardForm.FilenameLabel.Font.Style;
Name:= WizardForm.FilenameLabel.Font.Name;
Size:= WizardForm.FilenameLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.StatusLabel.AutoSize;
SetBounds(WizardForm.StatusLabel.Left,WizardForm.StatusLabel.Top,
WizardForm.StatusLabel.Width,WizardForm.StatusLabel.Height);
WordWrap:= WizardForm.StatusLabel.WordWrap;
Caption:= WizardForm.StatusLabel.Caption;
with Font do
begin
Color:= WizardForm.StatusLabel.Font.Color;
Style:= WizardForm.StatusLabel.Font.Style;
Name:= WizardForm.StatusLabel.Font.Name;
Size:= WizardForm.StatusLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
pnl.Repaint;
end;
/////////////////////////////////////////////////////////////////
///////////////////////FinishedPage//////////////////////////////////////
var
CheckBox: array of TNewCheckBox;
procedure CheckBoxClick(Sender: TObject);
begin
if TNewCheckBox(Sender).Checked then
WizardForm.RunList.Checked[TNewCheckBox(Sender).Tag]:= True
else WizardForm.RunList.Checked[TNewCheckBox(Sender).Tag]:= False;
end;
procedure LabelClick(Sender: TObject);
begin
if CheckBox[TLabel(Sender).Tag].Checked then
begin
WizardForm.RunList.Checked[TLabel(Sender).Tag]:= False;
CheckBox[TLabel(Sender).Tag].Checked:= False;
end
else
begin
WizardForm.RunList.Checked[TLabel(Sender).Tag]:= True;
CheckBox[TLabel(Sender).Tag].Checked:= True;
end;
end;
procedure HideRunList(Control: TWinControl);
var
i, t: Integer;
str: string;
begin
if WizardForm.RunList.Items.Count > 0 then
begin
WizardForm.RunList.Hide;
SetArrayLength(CheckBox, SizeOf(WizardForm.RunList.Items.Count));
for i:= 0 to WizardForm.RunList.Items.Count-1 do
begin
CheckBox[i]:= TNewCheckBox.Create(Control);
with CheckBox[i] do
begin
SetBounds(ScaleX(WizardForm.RunList.Left+2),ScaleY(WizardForm.RunList.Top+2+t),14,14);
Tag:= i;
Checked:= WizardForm.RunList.Checked[i];
Caption:= WizardForm.RunList.Items.Strings[i];
OnClick:= @CheckBoxClick;
Color:= clWhite;
Parent:= Control;
end;
str:= WizardForm.RunList.Items.Strings[i];
with TLabel.Create(WizardForm) do
begin
SetBounds(ScaleX(WizardForm.RunList.Left+20),ScaleY(WizardForm.RunList.Top+2+t),
WizardForm.RunList.Width,14);
Caption:= str;
Tag:= i;
OnClick:= @LabelClick;
Transparent:= True;
Parent:= Control;
end;
t:= t + 20;
end;
end;
end;
procedure FinishedPage;
begin
HideRunList(pnl);
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.FinishedHeadingLabel.AutoSize;
SetBounds(WizardForm.FinishedHeadingLabel.Left,WizardForm.FinishedHeadingLabel.Top,
WizardForm.FinishedHeadingLabel.Width,WizardForm.FinishedHeadingLabel.Height);
WordWrap:= WizardForm.FinishedHeadingLabel.WordWrap;
Caption:= WizardForm.FinishedHeadingLabel.Caption;
with Font do
begin
Color:= WizardForm.FinishedHeadingLabel.Font.Color;
Style:= WizardForm.FinishedHeadingLabel.Font.Style;
Name:= WizardForm.FinishedHeadingLabel.Font.Name;
Size:= WizardForm.FinishedHeadingLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.FinishedLabel.AutoSize;
SetBounds(WizardForm.FinishedLabel.Left,WizardForm.FinishedLabel.Top,
WizardForm.FinishedLabel.Width,WizardForm.FinishedLabel.Height);
WordWrap:= WizardForm.FinishedLabel.WordWrap;
Caption:= WizardForm.FinishedLabel.Caption;
with Font do
begin
Color:= WizardForm.FinishedLabel.Font.Color;
Style:= WizardForm.FinishedLabel.Font.Style;
Name:= WizardForm.FinishedLabel.Font.Name;
Size:= WizardForm.FinishedLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
pnl.Repaint;
end;
/////////////////////////////////////////////////////////////////
procedure CurPageChanged(CurPageID: Integer);
begin
pnl:= TPanel.Create(WizardForm);
with pnl do
begin
Align:= alClient;
Parent:= WizardForm;
end;
with WizardForm do
begin
with WizardBitmapImage do
begin
Align:= alClient;
Stretch:= True;
Parent:= pnl;
end;
NextButton.Parent:= pnl;
CancelButton.Parent:= pnl;
BackButton.Parent:= pnl;
Bevel.Parent:= pnl;
pnl.Repaint;
end;
if (CurPageID > wpWelcome) and (CurPageID < wpFinished) then
begin
WizardForm.Bevel1.Parent:= pnl;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.PageNameLabel.AutoSize;
SetBounds(WizardForm.PageNameLabel.Left,WizardForm.PageNameLabel.Top,
WizardForm.PageNameLabel.Width,WizardForm.PageNameLabel.Height);
Caption:= WizardForm.PageNameLabel.Caption;
with Font do
begin
Color:= WizardForm.PageNameLabel.Font.Color;
Style:= WizardForm.PageNameLabel.Font.Style;
Name:= WizardForm.PageNameLabel.Font.Name;
Size:= WizardForm.PageNameLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
with TLabel.Create(pnl) do
begin
AutoSize:= WizardForm.PageDescriptionLabel.AutoSize;
SetBounds(WizardForm.PageDescriptionLabel.Left,WizardForm.PageDescriptionLabel.Top,
WizardForm.PageDescriptionLabel.Width,WizardForm.PageDescriptionLabel.Height);
Caption:= WizardForm.PageDescriptionLabel.Caption;
with Font do
begin
Color:= WizardForm.PageDescriptionLabel.Font.Color;
Style:= WizardForm.PageDescriptionLabel.Font.Style;
Name:= WizardForm.PageDescriptionLabel.Font.Name;
Size:= WizardForm.PageDescriptionLabel.Font.Size;
end;
Transparent:= True;
Parent:= pnl;
end;
pnl.Repaint;
end;
if CurPageID = wpWelcome then WelcomePage;
if CurPageID = wpSelectDir then SelectDirPage;
if CurPageID = wpReady then ReadyPage;
if CurPageID = wpInstalling then InstallingPage;
if CurPageID = wpFinished then FinishedPage;
end;
madpiton
14-02-2010, 09:33
Привет народ ! Научите пожалуйста делать прекомп, очень хочеться научиться, но самостоятельно как-то не выходит. Есть такой скрипт:
[Files]
Source: "precomp\*"; DestDir: "{tmp}"; Flags: ignoreversion overwritereadonly
Source: "Data\*"; DestDir: "{app}"; Flags: overwritereadonly recursesubdirs ignoreversion createallsubdirs sortfilesbyextension; AfterInstall: RecompressPCF
[_Code]
procedure RecompressPCF;
var
Tmp, Text,
InputFile, OutputFile: string;
n, ResultCode: Integer;
begin
if ExtractFileExt(CurrentFileName)='.pcf' then
begin
InputFile:=ExpandConstant(CurrentFileName);
n:=Length(InputFile);
while InputFile[n]<>'.' do
n:=n-1;
OutputFile:=Copy(InputFile, 1, n-1);
Text:=WizardForm.StatusLabel.Caption;
WizardForm.StatusLabel.Caption:='Рекомпрессия извлеченного файла...';
WizardForm.FileNameLabel.Caption:=OutputFile;
Tmp:=ExpandConstant('{tmp}\');
Exec(Tmp+'precomp.exe', '-d -o"'+OutputFile+'" "'+InputFile+'"', Tmp, SW_HIDE, ewWaitUntilTerminated, ResultCode);
DeleteFile(InputFile);
WizardForm.StatusLabel.Caption:=Text;
end;
end;
В секции Source: "precomp\*"; DestDir: "{tmp}"; Flags: ignoreversion overwritereadonly как я понял должны быть *.dll но какие, и где их скачать я не знаю, подскажите пожалуйста что, где и как
В секции "code" опять же как я понял, приведён пример скрипта для распоковки прекомпрессионных файлов (Возвращение файлов *.PCF в их первоначальное состояние\расширение), но каким скриптом сделать такой прекомп, и как я уже написал выше, какие нужны для этого *.dll я не знаю.
Прошу помощи, очень на вас надеюсь.
P.S.
Респект создателям форума и извините за нубство или ещё если что не так...
madpiton
14-02-2010, 12:38
Ещё вычитал что надо батничек создать с определённым именем и параматерами и запустить перед компиляцией в одной папке с обрабатываемыми файлами и необходимыми длл*ками, но чего-то не работает этот способ, ну помогите мне плиз
baikalchanen
14-02-2010, 15:36
Извините,я понимаю что это наверняка не в первый раз задаётся такой вопрос,но ответьте пожалуйста столько страниц в облом читать!
Как в выделенные места вставить свои картинки?
Опишите подробнее если можно, в какую строку надо вставлять путь?
И ещё если не трудно вставить картинку в страницы инстала?(необязательно)
http://radikal.ru/F/s47.radikal.ru/i116/1002/2d/e04fe4e7c758.png
GrizzlyMK
14-02-2010, 18:24
Добрый вечер всем.
Прошу помощи в скрепте нада соединить 2 скрипта на сому установку и на разархивиронание
FreeArc, зарание спасибо.
P.S код для FreeArc не смог вставить слишком много симворов но если нада я выложу.
#define MyAppName "BioShock 2"
#define PB_ImageFile "progress1.bmp"
[Setup]
AppId={{E6D22FE1-AB5F-42CA-9480-7F799B96DDD88}
AppName=BioShock 2
AppVerName=BioShock 2
AppPublisher=2k Games
AppPublisherURL=http://www.2k.com/
AppVersion=1.0.0.1
;AppReadmeFile={group}\Readme.lnk
DefaultDirName={pf}\BioShock 2
DefaultGroupName=BioShock 2
OutputDir=D:\
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
DiskSpanning=yes
SlicesPerDisk=3
DiskSliceSize=1566000000
DisableReadyPage=True
[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[CustomMessages]
russian.Welcome1=Вас приветствует Мастер установки игры
russian.Welcome2=Программа установит игру {#MyAppName} на Ваш компьютер.%n%nРекомендуется закрыть антивирусные пакеты, а также все прочие приложения перед тем, как продолжить.%n%nНажмите «Далее», чтобы продолжить, или «Отмена», чтобы выйти из программы установки.
russian.Space=Доступно места на диске:
russian.Space1=Требуется места на диске:
russian.Status=Пожалуйста, подождите, пока игра установится на Ваш компьютер.
russian.DescrLbl1=В какую папку Вы хотите установить {#MyAppName}?
russian.Language=Язык игры:
russian.StartMenuLbl=Нажмите «Установить», чтобы продолжить. Если Вы хотите выбрать другую папку, нажмите «Обзор».
russian.Finished1=Установка игры {#MyAppName} успешно завершена.
russian.Finished2=Игра {#MyAppName} была успешно установлена на Ваш компьютер. Для ее запуска выберите соответствующий значек в меню «Пуск» или ярлык на Рабочем столе.
russian.Finished3=Нажмите «Завершить», чтобы выйти из программы установки.
russian.DirectX=Обновить DirectX
russian.DirectXInstall=Идет обновление DirectX...
russian.Icons=Добавить ярлык на Рабочий стол
russian.Uninstall=Удалить {#MyAppName}
[Files]
Source: "button.bmp"; DestDir: {tmp}; Flags: dontcopy
Source: "sound.mp3"; DestDir: "{tmp}"; Flags: dontcopy noencryption nocompression
Source: "MusicButton.bmp"; DestDir: "{tmp}"; Flags: dontcopy
Source: "bass.dll"; DestDir: "{tmp}"; Flags: dontcopy
Source: "ISSkin.dll"; DestDir: {app}; Flags: dontcopy
Source: "InnoCallback.dll"; Flags: dontcopy ignoreversion
Source: "Tiger.cjstyles"; DestDir: {tmp}; Flags: dontcopy
Source: {#PB_ImageFile}; DestDir: "{tmp}"; Flags: recursesubdirs ignoreversion
Source: "1.bmp"; Flags: dontcopy
Source: "2.bmp"; Flags: dontcopy
Source: "3.bmp"; Flags: dontcopy
Source: "4.bmp"; Flags: dontcopy
Source: "5.bmp"; Flags: dontcopy
;Source: "C:\Program Files\EA Games\Need for Speed Undercover\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; BeforeInstall: ProgressExt();
[UninstallDelete]
Type: filesandordirs; Name: {app}
[_Code]
type
TProc = procedure(HandleW, msg, idEvent, TimeSys: LongWord);
const
ButtonWidth = 80;
ButtonHeight = 23;
bidBack = 0;
bidNext = 1;
bidCancel = 2;
bidDirBrowse = 3;
bidGroupBrowse = 4;
BASS_ACTIVE_PLAYING = 1;
BASS_ACTIVE_STALLED = 2;
BASS_ACTIVE_PAUSED = 3;
BASS_SAMPLE_LOOP = 4;
var
ButtonPanel: array [0..4] of TPanel;
ButtonImage: array [0..4] of TBitmapImage;
ButtonLabel: array [0..4] of TLabel;
SetupFormPanel: TPanel;
TimerID: LongWord;
intOldCurrWidth : Integer;
ProgressBar_BitmapImage: TBitmapImage;
ProgressBar_Edit : TEdit;
ProgressBar_ImageHeight : integer;
LanguageLabel1: TLabel;
LanguageLabel2: TLabel;
rus: Boolean;
pnl_ru, pnl_us: TPanel;
mp3Handle: HWND;
mp3Name: String;
PlayButton, PauseButton, StopButton: TPanel;
PlayImage, PauseImage: TBitmapImage;
PlayLabel, PauseLabel: TLabel;
MouseLabel: Tlabel;
Welcome, Parameters, StartMenu, Installing, Finish,
IconsLabel, DirectXLabel, GroupLabel,
SelectDirLabel, SelectDirBrowseLabel,
PageNameLabel1, PageNameLabel2, PageNameLabel3,
PageDescriptionLabel1, PageDescriptionLabel2, PageDescriptionLabel3,
StatusLabel, FilenameLabel, NeedSpaceLabel,FreeSpaceLabel,
WelcomeLabel1, WelcomeLabel2,FinishedLabel, FinishedHeadingLabel,
SelectStartMenuFolderLabel, SelectStartMenuFolderBrowseLabel, ReadyLabel, NoIconsLabel: TLabel;
DirectX, Icons, Group: TCheckBox;
NeedSize:Integer;
FreeMB, TotalMB: Cardinal;
BmpFile: TBitmapImage;
function DetectPage(CurPageID: Integer): TNewNotebookPage;
begin
case CurPageID of
wpWelcome: Result:= WizardForm.WelcomePage;
wpSelectDir: Result:= WizardForm.SelectDirPage;
wpSelectProgramGroup: Result:= WizardForm.SelectProgramGroupPage;
wpInstalling: Result:= WizardForm.InstallingPage;
wpFinished: Result:= WizardForm.FinishedPage;
end;
end;
Function NumToStr(Float: Extended): String;
Begin
Result:= Format('%.2n', [Float]); StringChange(Result, ',', '.');
while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
SetLength(Result, Length(Result)-1);
End;
function InstallDirectX: Boolean;
begin
Result:= DirectX.Checked;
end;
function CreateIcons: Boolean;
begin
Result:=Icons.Checked;
end;
function GroupIcons: Boolean;
begin
Result:=Group.Checked;
end;
procedure DirectXLabelOnClick(Sender: TObject);
begin
if DirectX.Checked = False then
DirectX.Checked:= True else
DirectX.Checked:= False;
end;
procedure IconsOnClick(Sender: TObject);
begin
if Icons.Checked = False then
Icons.Checked:= True else
Icons.Checked:= False;
end;
procedure GetFreeSpaceCaption(Sender: TObject);
var
Path: String;
begin
Path := ExtractFileDrive(WizardForm.DirEdit.Text);
GetSpaceOnDisk(Path, True, FreeMB, TotalMB);
if FreeMB > 1024 then
FreeSpaceLabel.Caption := ExpandConstant('{cm:SPACE} ')+ NumToStr(round(FreeMB/1024*100)/100) + ' GB' else
FreeSpaceLabel.Caption := ExpandConstant('{cm:SPACE} ')+ NumToStr(FreeMB)+ ' MB';
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled := False else
WizardForm.NextButton.Enabled := True;
end;
procedure GetNeedSpaceCaption;
begin
if NeedSize > 1024 then
NeedSpaceLabel.Caption := ExpandConstant('{cm:SPACE1} ')+ NumToStr(round(NeedSize/1024*100)/100) + ' GB' else
NeedSpaceLabel.Caption := ExpandConstant('{cm:SPACE1} ')+ NumToStr(NeedSize)+ ' MB';
end;
procedure ProgressExt();
begin
FilenameLabel.Caption:= ExpandConstant(ExtractFileDir(CurrentFilename)) + '\' + ExtractFilename(CurrentFilename);
end;
procedure ProgressExt2();
begin
FilenameLabel.Caption:= ExpandConstant('{cm:DirectXInstall}')
end;
procedure InitializeWizard1();
begin
ExtractTemporaryFile('1.bmp');
ExtractTemporaryFile('2.bmp');
ExtractTemporaryFile('3.bmp');
ExtractTemporaryFile('4.bmp');
ExtractTemporaryFile('5.bmp');
NeedSize:= 5428;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp'));
BmpFile.Top:= ScaleY(0);
BmpFile.Left:= ScaleX(0);
BmpFile.Width:= ScaleX(790);
BmpFile.Height:= ScaleY(533);
BmpFile.Stretch:= true;
BmpFile.Parent:= WizardForm.WelcomePage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\2.bmp'));
BmpFile.Top:= ScaleY(0);
BmpFile.Left:= ScaleX(0);
BmpFile.Width:= ScaleX(790);
BmpFile.Height:= ScaleY(533);
BmpFile.Stretch:= true;
BmpFile.Parent:= WizardForm.SelectDirPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\3.bmp'));
BmpFile.Top:= ScaleY(0);
BmpFile.Left:= ScaleX(0);
BmpFile.Width:= ScaleX(790);
BmpFile.Height:= ScaleY(533);
BmpFile.Stretch:= true;
BmpFile.Parent:= WizardForm.SelectProgramGroupPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\4.bmp'));
BmpFile.Top:= ScaleY(0);
BmpFile.Left:= ScaleX(0);
BmpFile.Width:= ScaleX(790);
BmpFile.Height:= ScaleY(533);
BmpFile.Stretch:= true;
BmpFile.Parent:= WizardForm.InstallingPage;
BmpFile:= TBitmapImage.Create(WizardForm);
BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\5.bmp'));
BmpFile.Top:= ScaleY(0);
BmpFile.Left:= ScaleX(0);
BmpFile.Width:= ScaleX(790);
BmpFile.Height:= ScaleY(533);
BmpFile.Stretch:= true
BmpFile.Parent:= WizardForm.FinishedPage;
WizardForm.ClientWidth:=ScaleX(790);
WizardForm.ClientHeight:=ScaleY(533);
WizardForm.Font.Color:=$ffffff;
WizardForm.Center;
with WizardForm do
begin
PageNameLabel.Hide;
PageDescriptionLabel.Hide;
WelcomeLabel1.Hide;
WelcomeLabel2.Hide;
DiskSpaceLabel.Hide;
SelectDirBitmapImage.Hide;
SelectDirBrowseLabel.Hide;
SelectDirLabel.Hide;
FinishedHeadingLabel.Hide;
FinishedLabel.Hide;
MainPanel.Hide;
FilenameLabel.Hide;
StatusLabel.Hide;
SelectStartMenuFolderLabel.Hide;
SelectStartMenuFolderBrowseLabel.Hide;
ReadyLabel.Hide;
end;
with WizardForm do
begin
InnerNotebook.Left := ScaleX(0);
InnerNotebook.Top := ScaleY(0);
InnerNotebook.Width := ScaleX(790);
InnerNotebook.Height := ScaleY(533);
OuterNotebook.Left := ScaleX(0);
OuterNotebook.Top := ScaleY(0);
OuterNotebook.Width := ScaleX(790);
OuterNotebook.Height := ScaleY(533);
end;
WelcomeLabel1:= TLabel.Create(WizardForm);
with WelcomeLabel1 do
begin
Left:= ScaleX(70);
Top:= ScaleY(180);
Width:= ScaleX(650);
Height:= ScaleY(65);
AutoSize:= false;
Alignment := taCenter;
Transparent:= true;
WordWrap:= true;
Font.Name:='Georgia';
Font.Size:= 16;
Font.Color:=ClWhite;
Font.Style := [fsBold];
Parent:= WizardForm.WelcomePage;
Caption:= ExpandConstant('{cm:Welcome1}')+#13+('{#MyAppName}');
end;
WelcomeLabel2:=TLabel.Create(WizardForm);
with WelcomeLabel2 do
begin
Top:= ScaleY(270);
Left:= ScaleX(70);
Width:= ScaleX(650);
Height:= ScaleY(200);
AutoSize:= false;
WordWrap:= true;
Font.Name:= 'Georgia';
Font.Size:= 11
Font.Style := [fsBold, fsItalic];
Font.Color:=ClWhite;
Transparent:= true;
Parent:= WizardForm.WelcomePage;
Caption:= ExpandConstant('{cm:Welcome2}');
end;
PageNameLabel1:= TLabel.Create(WizardForm);
with PageNameLabel1 do
begin
Left:= ScaleX(65);
Top:= ScaleY(185);
Width:= ScaleX(300);
Height:= ScaleY(30);
AutoSize:= False;
Font.Name:= 'Georgia'
Font.Size:= 13;
Font.Style:= [fsBold];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.SelectDirPage;
end;
PageDescriptionLabel1:= TLabel.Create(WizardForm);
with PageDescriptionLabel1 do
begin
Left:=ScaleX(95);
Top:= ScaleY(215);
Width:= ScaleX(600);
Height:= ScaleY(50);
AutoSize:= False;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Style:= [fsBold, fsItalic];
Font.Color:= ClWhite;
Wordwrap:= True;
Transparent := True;
Parent:= WizardForm.SelectDirPage;
end;
SelectDirBrowseLabel:= TLabel.Create(WizardForm);
with SelectDirBrowseLabel do
begin
Caption:= WizardForm.SelectDirBrowseLabel.Caption;
Left:= ScaleX(120);
Top:= ScaleY(250);
Width:= ScaleX(600);
Height:= ScaleY(50);
AutoSize:= False;
WordWrap:= True;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Style:= [fsBold, fsItalic];
Font.Color:= ClWhite;
Transparent:= True;
Parent:= WizardForm.SelectDirPage;
end;
with WizardForm do
begin
DirBrowseButton.Top:= ScaleY(305);
DirEdit.Left:= ScaleX(120);
DirEdit.Top:= ScaleY(305);
DirEdit.Width:= ScaleX(460);
DirEdit.Font.Size:= 9;
end;
DirectX:= TCheckBox.Create(WizardForm);
with DirectX do
begin
Parent:= WizardForm.SelectDirPage;
Left:= ScaleX(65);
Top:= ScaleY(340);
Width:= ScaleX(14);
Height:= ScaleY(14);
TabOrder:= 0;
Checked:= False;
end;
DirectXLabel:= TLabel.Create(WizardForm);
with DirectXLabel do
begin
Caption:= ExpandConstant('{cm:DirectX}');
Left:= ScaleX(90);
Top:= ScaleY(340);
Width:= ScaleX(150);
Height:= ScaleY(13);
Font.Name:= 'Georgia';
Font.Size:= 8;
Font.Style:= [fsBold, fsItalic];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.SelectDirPage;
OnClick:= @DirectXLabelOnClick;
end;
Icons:= TCheckBox.Create(WizardForm);
with Icons do
begin
Parent:= WizardForm.SelectDirPage;
Left:= ScaleX(65);
Top:= ScaleY(360);
Width:= ScaleX(14);
Height:= ScaleY(14);
TabOrder:= 2;
Checked:= False;
end;
IconsLabel:= TLabel.Create(WizardForm);
with IconsLabel do
begin
Caption:=ExpandConstant('{cm:Icons}');
Left:= ScaleX(90);
Top:= ScaleY(360);
Width:= ScaleX(150);
Height:= ScaleY(13);
Font.Name:= 'Georgia';
Font.Size:= 8;
Font.Style:= [fsBold, fsItalic];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.SelectDirPage;
OnClick:= @IconsOnClick;
end;
NeedSpaceLabel:= TLabel.Create(WizardForm);
with NeedSpaceLabel do
begin
Parent:= WizardForm.SelectDirPage;
Left:= ScaleX(65);
Top:= ScaleY(420);
Width:= ScaleX(209);
Height:= ScaleY(13);
Font.Name:= 'Georgia';
Font.Size:= 8;
Font.Style:= [fsBold, fsItalic];
Font.Color:= ClWhite;
Transparent:= True;
end;
FreeSpaceLabel:= TLabel.Create(WizardForm);
with FreeSpaceLabel do
begin
Parent:= WizardForm.SelectDirPage;
Left:= ScaleX(65);
Top:= ScaleY(440);
Width:= ScaleX(209);
Height:= ScaleY(13);
Font.Name:= 'Georgia';
Font.Size:= 8;
Font.Style:= [fsBold, fsItalic];
Font.Color:= ClWhite;
Transparent:= True;
end;
WizardForm.DirEdit.OnChange:= @GetFreeSpaceCaption;
WizardForm.DirEdit.Text:= WizardForm.DirEdit.Text + #0;
PageNameLabel2:= TLabel.Create(WizardForm);
with PageNameLabel2 do
begin
Left:= ScaleX(65);
Top:= ScaleY(185);
Width:= ScaleX(350);
Height:= ScaleY(30);
AutoSize:= False;
Font.Name:= 'Georgia';
Font.Size:= 13;
Font.Style:= [fsBold];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.SelectProgramGroupPage;
end;
PageDescriptionLabel2:= TLabel.Create(WizardForm);
with PageDescriptionLabel2 do
begin
Left:=ScaleX(95);
Top:= ScaleY(215);
Width:= ScaleX(600);
Height:= ScaleY(50);
AutoSize:= False;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Style:= [fsBold, fsItalic];
Font.Color:= ClWhite;
Wordwrap:= True;
Transparent := True;
Parent:= WizardForm.SelectProgramGroupPage;
end;
SelectStartMenuFolderBrowseLabel:=TLabel.Create(WizardForm)
with SelectStartMenuFolderBrowseLabel do
begin
Left:= ScaleX(120);
Top:= ScaleY(250);
Width:= ScaleX(600);
Height:= ScaleY(50);
AutoSize:= False;
WordWrap:= True;
Font.Name:= 'Georgia';
Font.Size:= 10;
Font.Style:= [fsBold, fsItalic];
Font.Color:= ClWhite;
WordWrap:=True
Transparent:=True
Caption:=ExpandConstant('{cm:StartMenuLbl}')
Parent:=WizardForm.SelectProgramGroupPage
end;
with WizardForm do
begin
GroupEdit.Left:= ScaleX(120);
GroupEdit.Top:= ScaleY(305);
GroupEdit.Width:= ScaleX(460);
GroupEdit.Font.Size:=9
GroupBrowseButton.Top:= ScaleY(305);
end;
PageNameLabel3:= TLabel.Create(WizardForm);
with PageNameLabel3 do
begin
Left:= ScaleX(65);
Top:= ScaleY(185);
Width:= ScaleX(150);
Height:= ScaleY(20);
AutoSize:= False;
Font.Name:= 'Georgia';
Font.Size:= 13;
Font.Style:= [fsBold];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.InstallingPage;
end;
StatusLabel:= TLabel.Create(WizardForm);
with StatusLabel do
begin
Left:=ScaleX(95);
Top:= ScaleY(215);
Width:= ScaleX(600);
Height:= ScaleY(50);
AutoSize:= False;
Font.Name:= 'Georgia';
Font.Size:= 10;
Font.Style:= [fsBold, fsItalic];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.InstallingPage;
Caption:= ExpandConstant('{cm:Status}')
end;
FilenameLabel:= TLabel.Create(WizardForm);
with FilenameLabel do
begin
Left:= ScaleX(65);
Top:= ScaleY(275);
Width:= ScaleX(625);
Height:= ScaleY(20);
AutoSize:= False;
Font.Name:= 'Georgia'
Font.Size:= 10;
Font.Style:= [fsBold, fsItalic];
Font.Color:= ClWhite;
Transparent := True;
Parent:= WizardForm.InstallingPage;
end;
with WizardForm do
begin
ProgressGauge.Top:=ScaleY(310);
ProgressGauge.Left:=ScaleX(100);
ProgressGauge.Width:=ScaleX(590);
end;
FinishedHeadingLabel:=TLabel.Create(WizardForm);
with FinishedHeadingLabel do
begin
Left:= ScaleX(70);
Top:= ScaleY(180);
Width:= ScaleX(650);
Height:= ScaleY(65)
AutoSize:= false;
Alignment := taCenter;
WordWrap:= true;
Font.Name:='Georgia';
Font.Size:= 16;
Font.Color:=ClWhite;
Font.Style := [fsBold];
Transparent:= true;
Parent:= WizardForm.FinishedPage;
Caption:= ExpandConstant('{cm:Finished1}');
end;
FinishedLabel:= TLabel.Create(WizardForm);
with FinishedLabel do
begin
Top:= ScaleY(270);
Left:= ScaleX(70);
Width:= ScaleX(650);
Height:= ScaleY(200);
AutoSize:= false;
WordWrap:= true;
Font.Name:= 'Georgia'
Font.Size:= 11;
Font.Style := [fsBold, fsItalic];
Font.Color:=ClWhite;
Transparent:= true;
Parent:= WizardForm.FinishedPage;
Caption:= ExpandConstant('{cm:Finished2}')+#13#13+ExpandConstant('{cm:Finished3}');
end;
end;
procedure CurPageChanged1(CurPageID: Integer);
begin
PageNameLabel1.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel1.Caption:= WizardForm.PageDescriptionLabel.Caption;
PageNameLabel2.Caption:= WizardForm.PageNameLabel.Caption;
PageDescriptionLabel2.Caption:= WizardForm.PageDescriptionLabel.Caption;
PageNameLabel3.Caption:= WizardForm.PageNameLabel.Caption;
if CurPageID=wpSelectProgramGroup then
begin
If WizardForm.FindComponent('NextButton') is TButton
then
TButton(WizardForm.FindComponent('NextButton')).Caption:='Установить';
end;
end;
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 := -ScaleX(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 := ScaleX(160);
Image.Height := ScaleY(23);
Image.Enabled := False;
Image.Bitmap.LoadFromFile(ExpandConstant('{tmp}\button.bmp'));
Image.Stretch := True;
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.Autosize := True;
Labl.Alignment := taCenter;
Labl.Tag := AButtonIndex;
Labl.Transparent := True;
Labl.Font.Color := clWhite;
Labl.Font.Style := [fsBold];
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 InitializeWizard2();
begin
WizardForm.BackButton.SetBounds(WizardForm.ClientWidth - ScaleX(8) * 37,
WizardForm.ClientHeight - ScaleY(ButtonHeight) * 2, ScaleX(ButtonWidth), ScaleY(ButtonHeight));
WizardForm.NextButton.SetBounds(WizardForm.ClientWidth - ScaleX(8) * 26,
WizardForm.ClientHeight - ScaleY(ButtonHeight) * 2, ScaleX(ButtonWidth), ScaleY(ButtonHeight));
WizardForm.CancelButton.SetBounds(WizardForm.ClientWidth - ScaleX(8)* 15,
WizardForm.ClientHeight - ScaleY(ButtonHeight) * 2, ScaleX(ButtonWidth), ScaleY(ButtonHeight));
WizardForm.DirBrowseButton.SetBounds(WizardForm.ClientWidth - ScaleX(5) * 30,
WizardForm.ClientHeight - ScaleY(ButtonHeight) * 10, ScaleX(ButtonWidth), ScaleY(ButtonHeight));
WizardForm.GroupBrowseButton.SetBounds(WizardForm.ClientWidth - ScaleX(5) * 30,
WizardForm.ClientHeight - ScaleY(ButtonHeight) * 10, ScaleX(ButtonWidth), ScaleY(ButtonHeight));
ExtractTemporaryFile('button.bmp')
LoadButtonImage(WizardForm.BackButton,bidBack)
LoadButtonImage(WizardForm.NextButton,bidNext)
LoadButtonImage(WizardForm.CancelButton,bidCancel)
LoadButtonImage(WizardForm.DirBrowseButton,bidDirBrowse)
LoadButtonImage(WizardForm.GroupBrowseButton,bidGroupBrowse)
end;
procedure CurPageChanged2(CurPageID: Integer);
begin
UpdateButton(WizardForm.BackButton,bidBack)
UpdateButton(WizardForm.NextButton,bidNext)
UpdateButton(WizardForm.CancelButton,bidCancel)
ButtonLabel[bidBack].Left := ButtonPanel[bidBack].Width div 2 - ButtonLabel[bidBack].Width div 2;
ButtonLabel[bidBack].Top := ButtonPanel[bidBack].Height div 2 - ButtonLabel[bidBack].Height div 2;
ButtonLabel[bidNext].Left := ButtonPanel[bidNext].Width div 2 - ButtonLabel[bidNext].Width div 2;
ButtonLabel[bidNext].Top := ButtonPanel[bidNext].Height div 2 - ButtonLabel[bidNext].Height div 2;
ButtonLabel[bidCancel].Left := ButtonPanel[bidCancel].Width div 2 - ButtonLabel[bidCancel].Width div 2;
ButtonLabel[bidCancel].Top := ButtonPanel[bidCancel].Height div 2 - ButtonLabel[bidCancel].Height div 2;
ButtonLabel[bidDirBrowse].Left := ButtonPanel[bidDirBrowse].Width div 2 - ButtonLabel[bidDirBrowse].Width div 2;
ButtonLabel[bidDirBrowse].Top := ButtonPanel[bidDirBrowse].Height div 2 - ButtonLabel[bidDirBrowse].Height div 2;
ButtonLabel[bidGroupBrowse].Left := ButtonPanel[bidGroupBrowse].Width div 2 - ButtonLabel[bidGroupBrowse].Width div 2;
ButtonLabel[bidGroupBrowse].Top := ButtonPanel[bidGroupBrowse].Height div 2 - ButtonLabel[bidGroupBrowse].Height div 2;
if CurPageID = wpSelectDir then
begin
GetNeedSpaceCaption;
end;
end;
Procedure InitializeWizard3();
Var
CurPageID: Integer;
begin
Welcome := TLabel.Create(WizardForm);
Welcome.Top := ScaleY(94);
Welcome.Left := ScaleX(35);
Welcome.Caption := 'Приветствие';
Welcome.Transparent := True;
Welcome.Font.Size := 10;
Welcome.Font.Name := 'Arial';
Welcome.Font.Style:= [fsBold];
Parameters := TLabel.Create(WizardForm);
Parameters.Top := ScaleY(94);
Parameters.Left := ScaleX(201);
Parameters.Caption:= 'Параметры';
Parameters.Transparent := True;
Parameters.Font.Size := 10;
Parameters.Font.Name := 'Arial';
Parameters.Font.Style:= [fsBold];
StartMenu := TLabel.Create(WizardForm);
StartMenu.Top := ScaleY(94);
StartMenu.Left := ScaleX(355);
StartMenu.Caption := 'Меню "Пуск"';
StartMenu.Transparent := True;
StartMenu.Font.Size := 10;
StartMenu.Font.Name := 'Arial';
StartMenu.Font.Style:= [fsBold];
Installing := TLabel.Create(WizardForm);
Installing.Top := ScaleY(94);
Installing.Left := ScaleX(520);
Installing.Caption := 'Установка';
Installing.Transparent := True;
Installing.Font.Size := 10;
Installing.Font.Name := 'Arial';
Installing.Font.Style:= [fsBold];
Finish := TLabel.Create(WizardForm);
Finish.Left := 400;
Finish.Top := ScaleY(94);
Finish.Left := ScaleX(670);
Finish.Caption := 'Завершение';
Finish.Transparent := True;
Finish.Font.Size := 10;
Finish.Font.Name := 'Arial';
Finish.Font.Style:= [fsBold];
end;
procedure CurPageChanged3(CurPageID: Integer);
begin
Welcome.Font.Color := -16777199;
Parameters.Font.Color := -16777199;
StartMenu.Font.Color := -16777199;
Installing.Font.Color := -16777199;
Finish.Font.Color := -16777199;
if (CurPageID= wpWelcome)or(CurPageID= wpSelectDir)or (CurPageID= wpSelectProgramGroup)or(CurPageID= wpInstalling)or(CurPageID= wpFinished) then
Welcome.Parent := DetectPage(CurPageID);
Parameters.Parent := DetectPage(CurPageID);
StartMenu.Parent := DetectPage(CurPageID);
Installing.Parent := DetectPage(CurPageID);
Finish.Parent := DetectPage(CurPageID);
if CurPageID = wpWelcome then
begin
Welcome.Font.Color := clWhite;
end;
if CurPageID = wpSelectDir then
begin
Parameters.Font.Color := clWhite;
end;
if CurPageID = wpSelectProgramGroup then
begin
StartMenu.Font.Color := clWhite;
end;
if CurPageID = wpInstalling then
begin
Installing.Font.Color := clWhite;
end;
if CurPageID = wpFinished then
begin
Finish.Font.Color := clWhite;
end;
end;
procedure LoadSkin(lpszPath: String; lpszIniFileName: String);
external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin();
external 'UnloadSkin@files:isskin.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer;
external 'ShowWindow@user32.dll stdcall';
function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('BASS.dll');
Result := True;
ExtractTemporaryFile('Tiger.cjstyles');
LoadSkin(ExpandConstant('{tmp}\Tiger.cjstyles'), '');
Result := True;
end;
function WrapTimerProc(callback:TProc; paramcount:integer):longword; external 'wrapcallback@files:innocallback.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';
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
if CurPageID = wpInstalling then
ProgressBar_Edit.Show;
end;
procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord);
var
CurrWidth : single;
begin
with WizardForm.ProgressGauge do
begin
CurrWidth := ( Position * Width ) / Max;
if intOldCurrWidth <> Round( CurrWidth ) then
begin
intOldCurrWidth := Round( CurrWidth );
ProgressBar_BitmapImage.SetBounds( 0, 0, intOldCurrWidth, ProgressBar_ImageHeight );
ProgressBar_BitmapImage.Show();
end;
end;
end;
procedure CurPageChanged4(CurPageID: Integer);
var
pfunc: LongWord;
begin
if CurPageID = wpInstalling then
begin
pfunc := WrapTimerProc( @OnTimer, 4 );
TimerID := SetTimer( 0, 0, 100, pfunc );
intOldCurrWidth := 0;
end;
if CurPageID = wpFinished then
KillTimer( 0, TimerID );
end;
Procedure InitializeWizard6();
begin
ProgressBar_Edit := TEdit.Create( WizardForm );
with ProgressBar_Edit do
begin
Left := WizardForm.ProgressGauge.Left;
Top := WizardForm.ProgressGauge.Top;
Width := WizardForm.ProgressGauge.Width;
Height := WizardForm.ProgressGauge.Height;
Enabled := False;
ReadOnly := True;
Color := 10789024;
Parent := WizardForm.InstallingPage;
end;
ExtractTemporaryFile( '{#PB_ImageFile}' );
ProgressBar_BitmapImage := TBitmapImage.Create( WizardForm );
with ProgressBar_BitmapImage do
begin
Bitmap.LoadFromFile( ExpandConstant( '{tmp}\' ) + '{#PB_ImageFile}' );
Parent := ProgressBar_Edit;
Stretch := True;
Hide;
end;
ProgressBar_ImageHeight := ProgressBar_Edit.Height - 2;
WizardForm.ProgressGauge.Hide;
end;
procedure DeinitializeSetup();
begin
KillTimer( 0, TimerID );
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
UnloadSkin();
end;
procedure CurPageChanged(CurPageID: Integer);
begin
CurPageChanged1(CurPageID);
CurPageChanged2(CurPageID);
CurPageChanged3(CurPageID);
CurPageChanged4(CurPageID);
end;
Procedure InitializeWizard();
begin
InitializeWizard1();
InitializeWizard2();
InitializeWizard3();
InitializeWizard6();
end;
© OSzone.net 2001-2012
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.
Available in ZeroNet 1osznRoVratMCN3bFoFpR2pSV5c9z6sTC