PDA

Показать полную графическую версию : Скрипты Inno Setup. Помощь и советы [часть 3]


Страниц : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 [161] 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188

VinTagE
01-10-2011, 16:44
onlainserver, Так:

[Setup]
AppName=Black Setup
AppVersion=Black Setup
DefaultDirName={pf}\Black Setup

[Code]
const
Color = clblack;

procedure InitializeWizard();
begin
WizardForm.Font.Color:=clLime;
WizardForm.Color:=Color;
WizardForm.WelcomePage.Color:=Color;
WizardForm.InnerPage.Color:=Color;
WizardForm.FinishedPage.Color:=Color;
WizardForm.LicensePage.Color:=Color;
WizardForm.PasswordPage.Color:=Color;
WizardForm.InfoBeforePage.Color:=Color;
WizardForm.UserInfoPage.Color:=Color;
WizardForm.SelectDirPage.Color:=Color;
WizardForm.SelectComponentsPage.Color:=Color;
WizardForm.SelectProgramGroupPage.Color:=Color;
WizardForm.SelectTasksPage.Color:=Color;
WizardForm.ReadyPage.Color:=Color;
WizardForm.PreparingPage.Color:=Color;
WizardForm.InstallingPage.Color:=clblack;
WizardForm.InfoAfterPage.Color:=Color;
WizardForm.DirEdit.Color:=Color;
WizardForm.DiskSpaceLabel.Color:=Color;
WizardForm.DirEdit.Color:=Color;
WizardForm.GroupEdit.Color:=Color;
WizardForm.PasswordLabel.Color:=Color;
WizardForm.PasswordEdit.Color:=Color;
WizardForm.PasswordEditLabel.Color:=Color;
WizardForm.ReadyMemo.Color:=Color;
WizardForm.TypesCombo.Color:=Color;
WizardForm.WelcomeLabel1.Color:=Color;
WizardForm.WelcomeLabel1.Font.Color:=clLime;
WizardForm.InfoBeforeClickLabel.Color:=Color;
WizardForm.MainPanel.Color:=Color;
WizardForm.PageNameLabel.Color:=Color;
WizardForm.PageDescriptionLabel.Color:=Color;
WizardForm.ReadyLabel.Color:=Color;
WizardForm.FinishedLabel.Color:=Color;
WizardForm.YesRadio.Color:=Color;
WizardForm.NoRadio.Color:=Color;
WizardForm.WelcomeLabel2.Color:=Color;
WizardForm.LicenseLabel1.Color:=Color;
WizardForm.InfoAfterClickLabel.Color:=Color;
WizardForm.ComponentsList.Color:=Color;
WizardForm.ComponentsDiskSpaceLabel.Color:=Color;
WizardForm.BeveledLabel.Color:=Color;
WizardForm.StatusLabel.Color:=Color;
WizardForm.FilenameLabel.Color:=Color;
WizardForm.SelectDirLabel.Color:=Color;
WizardForm.SelectStartMenuFolderLabel.Color:=Color;
WizardForm.SelectComponentsLabel.Color:=Color;
WizardForm.SelectTasksLabel.Color:=Color;
WizardForm.LicenseAcceptedRadio.Color:=Color;
WizardForm.LicenseNotAcceptedRadio.Color:=Color;
WizardForm.UserInfoNameLabel.Color:=Color;
WizardForm.UserInfoNameEdit.Color:=Color;
WizardForm.UserInfoOrgLabel.Color:=Color;
WizardForm.UserInfoOrgEdit.Color:=Color;
WizardForm.PreparingLabel.Color:=Color;
WizardForm.FinishedHeadingLabel.Color:=Color;
WizardForm.FinishedHeadingLabel.Font.Color:=clLime;
WizardForm.UserInfoSerialLabel.Color:=Color;
WizardForm.UserInfoSerialEdit.Color:=Color;
WizardForm.TasksList.Color:=Color;
WizardForm.RunList.Color:=Color;
WizardForm.SelectDirBrowseLabel.Color:=Color;
WizardForm.SelectStartMenuFolderBrowseLabel.Color:=Color;
WizardForm.PageNameLabel.Font.Color:=clLime;
WizardForm.Bevel.visible:=False;
WizardForm.BeveledLabel.visible:=False;
WizardForm.Bevel1.visible:=False;
end;

onlainserver
01-10-2011, 17:17
а кнопки чтобы были тоже черными можно сделать?

insombia
01-10-2011, 17:25
onlainserver нужно качать специальные черные кнопки как у механиков например http://rghost.ru/23077961

Dark_Delphin
01-10-2011, 17:37
Всем добрый день!

Подскажите пожалуйста как наложить свои кнопки на прозрачный фон. Что-бы углы были нормальные.
Или пример дайте.

Заранее спасибо!

slysoft
01-10-2011, 18:26
Доброго, Всем, времени суток, будьте добры, помогите решить проблему. Дело в том, что когда компилирую всё проходит до конца, но не запускается инсталятор, уведомление об установке высвечуется только в панели задач и стоит без изменений, но когда из папки с игрой вырезаю всё кроме исполнительного и ещё парочки файлов, то всё в порядке, инстал запускается без проблем, всё устанавливается и удаляется, может я гдето допустил ошибку в скрипте? Заранее, Всем, ОГРОМНОЕ СПАСИБО за помощь!!!

Вот сам скрипт:
; Скрипт создан при помощи мастера создания скриптов.
; СМ. ДОКУМЕНТАЦИЮ ДЛЯ ИЗУЧЕНИЯ ДЕТАЛЕЙ ОТНОСИТЕЛЬНО СОЗДАНИЯ ФАЙЛОВ СКРИПТА INNO SETUP!

#define MyAppName "Modern Warfare 2"
#define MyAppVerName "Multiplayer"
#define MyAppPublisher "Infinity Ward"
#define MyAppURL "http://***"
#define MyAppExeName "iw4mp.exe"

[Setup]
DiskSpanning=true
DiskSliceSize=1457664000
AppName={#MyAppName}
AppVerName={#MyAppVerName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
OutputDir=E:\Инсталяторы
OutputBaseFilename=MW2AlterIWnet
SetupIconFile=mw2alter.ico
Compression=lzma/ultra64
SolidCompression=true
InternalCompressLevel=ultra64
WizardImageFile=1.bmp
WindowVisible=false
WizardImageBackColor=clGreen
WizardSmallImageFile=logo1.bmp
WindowStartMaximized=false
BackColor=clSilver
BackColor2=clSilver

[Languages]
Name: russian; MessagesFile: compiler:Default.isl

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

[Files]
Source: D:\Games\Call of Duty Modern Warfare [MultiPlayer]\iw4mp.exe; DestDir: {app}; Flags: ignoreversion
Source: D:\Games\Call of Duty Modern Warfare [MultiPlayer]\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
; ОТМЕТЬТЕ: Не используйте "Флажки: Проигнорировать версию" на любых общедоступных системных файлах
;Изображение размером 240x23
Source: button.bmp; Flags: dontcopy
Source: logo1.bmp; Flags: dontcopy
Source: 2.bmp; Flags: dontcopy
Source: Button1.bmp; Flags: dontcopy

Source: ISSkin.dll; DestDir: {app}; Flags: dontcopy
Source: 111.cjstyles; Flags: dontcopy


[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
Name: {group}\{cm:ProgramOnTheWeb,{#MyAppName}}; Filename: {#MyAppURL}
Name: {group}\Удалить Modern Warfare 2; Filename: {uninstallexe}; WorkingDir: {app}
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: quicklaunchicon
Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}

[Run]
Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent

[code]
const
ButtonWidth = 80;
ButtonHeight = 23;

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

////// Цвета, но лучше это делать в скине, хотя, как говорится, на любителя.
Color = clblack; ////// Цвет визарда
ColorF = clLime; ////// Цвет шрифта

var
ButtonPanel: array [0..4] of TPanel;
ButtonImage: array [0..4] of TBitmapImage;
ButtonLabel: array [0..4] of TLabel;
n: Integer;
WizardLabel, WelcomeLabel1, WelcomeLabel2, FinishedLabel, FinishedHeadingLabel: TLabel;

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('111.cjstyles');
LoadSkin(ExpandConstant('{tmp}\111.cjstyles'), 'NormalBlack.ini');
Result := True;
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:=-ButtonWidth
end;

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

procedure ButtonLabelMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
if ButtonLabel[TLabel(Sender).Tag].Left <> -80 then
begin
for n:=0 to 4 do ButtonImage[n].Left:= 0
end;
if ButtonLabel[TLabel(Sender).Tag].Enabled then
begin
if ButtonLabel[TLabel(Sender).Tag].Left <> -80 then
ButtonImage[TLabel(Sender).Tag].Left:= -160
end;
end;

procedure WizardLabelMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
if ButtonLabel[TLabel(Sender).Tag].Left <> -80 then
for n:=0 to 4 do ButtonImage[n].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:=240
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
OnMouseMove:=@ButtonLabelMove
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.OnMouseMove:=@ButtonLabelMove
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
ButtonLabel[AButtonIndex].Left:= ButtonPanel[AButtonIndex].Width div 2 - ButtonLabel[AButtonIndex].Width div 2;
ButtonLabel[AButtonIndex].Top:= ButtonPanel[AButtonIndex].Height div 2 - ButtonLabel[AButtonIndex].Height div 2;
end;

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

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

procedure LogoOnClick(Sender: TObject);
var ResCode: Integer;
begin
ShellExec('', 'http://***', '' , '', SW_SHOW, ewNoWait, ResCode)
end;

procedure InitializeWizard();
var
BtnPanel: TPanel;
BtnImage: TBitmapImage;
begin

WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;

WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;

WizardForm.FinishedLabel.Hide;
WizardForm.FinishedHeadingLabel.Hide;

WizardForm.Bevel.Hide;
WizardForm.BeveledLabel.Hide;
WizardForm.Bevel1.Hide;

WizardForm.WizardSmallBitmapImage.Left := ScaleX(0);
WizardForm.WizardSmallBitmapImage.Top := ScaleY(0);
WizardForm.WizardSmallBitmapImage.Width := WizardForm.MainPanel.Width;
WizardForm.WizardSmallBitmapImage.Height := WizardForm.MainPanel.Height;

ExtractTemporaryFile('Button1.bmp')
ExtractTemporaryFile('2.bmp');

BtnPanel:=TPanel.Create(WizardForm)
BtnPanel.SetBounds(20, 325, 200, 30);
BtnPanel.Cursor:=crHand
BtnPanel.OnClick:=@logoOnClick
BtnPanel.Parent:=WizardForm

BtnImage:=TBitmapImage.Create(WizardForm)
BtnImage.AutoSize:=True;
BtnImage.Enabled:=False;
BtnImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\Button1.bmp')
BtnImage.Parent:=BtnPanel

WizardForm.WizardBitmapImage.Width := ScaleX(497); //координаты поправишь как те надо)
WizardForm.WizardBitmapImage.Height := ScaleX(323);
////////завершение
WizardForm.WizardBitmapImage2.Width := ScaleX(497);
WizardForm.WizardBitmapImage2.Height := ScaleX(323);

WizardForm.WizardBitmapImage.Width:= ScaleX(497);
WizardForm.WizardBitmapImage2.Width:= ScaleX(497);
WizardForm.WizardBitmapImage2.Bitmap.LoadFromFile(ExpandConstant('{tmp}\2.bmp'));

////////Кнопки
WizardLabel:= TLabel.Create(WizardForm)
WizardLabel.Left:= ScaleX(0)
WizardLabel.Top:= ScaleY(0)
WizardLabel.Width:= ScaleX(497);
WizardLabel.Height:= ScaleY(360);
WizardLabel.Transparent:= True;
WizardLabel.AutoSize:=false;
WizardLabel.Caption:='';
WizardLabel.OnMouseMove:=@WizardLabelMove
WizardLabel.Parent:= WizardForm;

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)
////////Кнопки


////////начало Если понадобится - раскомментировать - это лейбелы страницы приветсятвия.
// WelcomeLabel1:= TLabel.Create(WizardForm);
// WelcomeLabel1.AutoSize:= False;
// with WizardForm.WelcomeLabel1 do
// WelcomeLabel1.SetBounds(Left, Top, Width, Height);
// WelcomeLabel1.Font:= WizardForm.WelcomeLabel1.Font
// WelcomeLabel1.Font.Color:= clWhite;
// WelcomeLabel1.Transparent:= True;
// WelcomeLabel1.WordWrap:= true;
// WelcomeLabel1.Caption:= WizardForm.WelcomeLabel1.Caption;
// WelcomeLabel1.Parent:= WizardForm.WelcomePage
//
// WelcomeLabel2:= TLabel.Create(WizardForm);
// WelcomeLabel2.AutoSize:= False;
// with WizardForm.WelcomeLabel2 do
// WelcomeLabel2.SetBounds(Left, Top, Width, Height);
// WelcomeLabel2.Font:= WizardForm.WelcomeLabel2.Font
// WelcomeLabel2.Font.Color:= clWhite;
// WelcomeLabel2.Transparent:= True;
// WelcomeLabel2.WordWrap:= true;
// WelcomeLabel2.Caption:= WizardForm.WelcomeLabel2.Caption;
// WelcomeLabel2.Parent:= WizardForm.WelcomePage
////////конец Если понадобится - раскомментировать - это лейбелы страницы приветсятвия.

FinishedHeadingLabel:= TLabel.Create(WizardForm);
FinishedHeadingLabel.AutoSize:= False;
with WizardForm.FinishedHeadingLabel do
FinishedHeadingLabel.SetBounds(Left, Top, Width, Height);
FinishedHeadingLabel.Font:= WizardForm.FinishedHeadingLabel.Font
FinishedHeadingLabel.Font.Color:= clWhite;
FinishedHeadingLabel.Transparent:= True;
FinishedHeadingLabel.WordWrap:= true;
FinishedHeadingLabel.Caption:= WizardForm.FinishedHeadingLabel.Caption;
FinishedHeadingLabel.Parent:= WizardForm.FinishedPage

FinishedLabel:= TLabel.Create(WizardForm);
FinishedLabel.Parent:= WizardForm.FinishedPage
FinishedLabel.AutoSize:= False;
with WizardForm.FinishedLabel do
FinishedLabel.SetBounds(Left, Top, Width, Height);
FinishedLabel.Font:= WizardForm.FinishedLabel.Font
FinishedLabel.Font.Color:= clWhite;
FinishedLabel.Transparent:= True;
FinishedLabel.WordWrap:= true;
FinishedLabel.Caption:= WizardForm.FinishedLabel.Caption;
FinishedLabel.Caption:= WizardForm.FinishedLabel.Caption;

WizardForm.Font.Color:=ColorF;
WizardForm.Color:=Color;
WizardForm.WelcomePage.Color:=Color;
WizardForm.InnerPage.Color:=Color;
WizardForm.FinishedPage.Color:=Color;

WizardForm.DirEdit.Color:=Color;
WizardForm.GroupEdit.Color:=Color;
WizardForm.ReadyMemo.Color:=Color;
WizardForm.TypesCombo.Color:=Color;
WizardForm.ComponentsList.Color:=Color;
WizardForm.MainPanel.Color:=clblack;
WizardForm.TasksList.Color:=Color;
WizardForm.RunList.Color:=Color;
end;

////////Кнопки
procedure CurPageChanged(CurPageID: Integer);
begin
UpdateButton(WizardForm.BackButton,bidBack)
UpdateButton(WizardForm.NextButton,bidNext)
UpdateButton(WizardForm.CancelButton,bidCancel)
UpdateButton(WizardForm.DirBrowseButton,bidDirBrowse)
UpdateButton(WizardForm.GroupBrowseButton,bidGroupBrowse)
end;
////////Кнопки

procedure DeinitializeSetup();
begin
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
UnloadSkin();
end;

valyok666
01-10-2011, 18:35
slysoft,
[Files]
Source: button.bmp; Flags: dontcopy
Source: logo1.bmp; Flags: dontcopy
Source: 2.bmp; Flags: dontcopy
Source: Button1.bmp; Flags: dontcopy
Source: ISSkin.dll; DestDir: {app}; Flags: dontcopy
Source: 111.cjstyles; Flags: dontcopy
Source: D:\Games\Call of Duty Modern Warfare [MultiPlayer]\iw4mp.exe; DestDir: {app}; Flags: ignoreversion
Source: D:\Games\Call of Duty Modern Warfare [MultiPlayer]\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs

slysoft
01-10-2011, 18:45
to valyok666, спасибо, а я и забыл, что файлы исполюзующиеся для интерфейса инстала нужно ставить на передний план, как говорится: "Век живи, век учись, а....", в общем спасибо!!!

slysoft
01-10-2011, 19:08
ntrx, честно говоря не совсем понял, что ты имеешь ввиду, но может это тебе поможет http://rghost.ru/23792081

Sk.Faker
01-10-2011, 19:36
Народ, привет. Делаю патч для мода. Мне нужно удалить файлы перед установкой, которые не устанавливает этот патч. Если важно, то их устанавливает мод. Прописал их в "Удаление перед установкой", но он их удаляет, только если они установлены этим же установщиком.. Я не особо разбираюсь в Inno Setup, помогите пожалуйста! Ни где не могу найти, как это сделать. Это вообще возможно?
Пытался сделать через .bat файл, но не вышло

Dark_Delphin
01-10-2011, 20:07
slysoft, вместо стандартных кнопок наложить свои, чтобы края у кнопок были нормальные.

http://img42.imageshack.us/img42/2331/87178391.png

Vista-w
01-10-2011, 20:12
Sk.Faker,
Можно например через папку замутить. или не подойдет?
Можно и через фильтр, т.е файлы определенного формата.

ntrx,
плохо будет смотреться, т.к используешь ISWin7. кнопки будут засветлеными.
вот текстурирование кнопок.

[Files]
Source: button.bmp; DestDir: {tmp}; Flags: dontcopy
//---------------------------------------------------------------
[Code]
const
ButtonWidth = 80;
ButtonHeight = 23;
bidBack = 0;
bidNext = 1;
bidCancel = 2;
bidDirBrowse = 3;
bidGroupBrowse = 4;
PM_REMOVE = 1;
CP_ACP = 0; CP_UTF8 = 65001;
Period = 250;
VK_ESCAPE = 27;
HC_ACTION = 0;
WH_CALLWNDPROC = 4;
WM_PAINT = $F;
PCFonFLY=true;
oneMb = 1048576;
notPCFonFLY=false;
var
ButtonPanel: array [0..4] of TPanel;
ButtonImage: array [0..4] of TBitmapImage;
ButtonLabel: array [0..4] of TLabel;
Texture2, Texture: TBitmapImage;
//------------------------------------------------------------------
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:=clBlack
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 UpdateButtons(CurPageID: Integer);
begin
UpdateButton(WizardForm.BackButton,bidBack)
UpdateButton(WizardForm.NextButton,bidNext)
UpdateButton(WizardForm.CancelButton,bidCancel)
ButtonLabel[bidBack].Left := (ButtonPanel[bidBack].Width / 2 - ButtonLabel[bidBack].Width / 2);
ButtonLabel[bidNext].Left := (ButtonPanel[bidNext].Width / 2 - ButtonLabel[bidNext].Width / 2);
ButtonLabel[bidCancel].Left := (ButtonPanel[bidCancel].Width / 2 - ButtonLabel[bidCancel].Width / 2);
ButtonLabel[bidDirBrowse].Left := (ButtonPanel[bidDirBrowse].Width / 2 - ButtonLabel[bidDirBrowse].Width / 2);
ButtonLabel[bidGroupBrowse].Left := (ButtonPanel[bidGroupBrowse].Width / 2 - ButtonLabel[bidGroupBrowse].Width / 2);
end;

procedure ButtonTextures();
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
LoadButtonImage(WizardForm.BackButton,bidBack)
LoadButtonImage(WizardForm.NextButton,bidNext)
LoadButtonImage(WizardForm.CancelButton,bidCancel)
LoadButtonImage(WizardForm.DirBrowseButton,bidDirBrowse)
LoadButtonImage(WizardForm.GroupBrowseButton,bidGroupBrowse)
end;
//-----------------------------------------------------
procedure InitializeWizard();
begin
ExtractTemporaryFile('button.bmp')
ButtonTextures();

Dark_Delphin
01-10-2011, 20:18
Vista-w, значит никак?

Vista-w
01-10-2011, 20:19
ntrx,
дал же пример.

Dark_Delphin
01-10-2011, 20:40
Vista-w, но кнопки на стекле как ты и говрил засветленые (полупрозрачные).
А можно так что-бы идеально наложились?

insombia
01-10-2011, 20:44
ntrx дай скрипт наложу тебе кнопки

Sk.Faker
01-10-2011, 21:24
Vista-w, нет, так не пойдёт. Мне нужно удалить файлы разного типа, размеров и местоположения. + ещё нужно удалить пару папок

R.i.m.s.k.y.
01-10-2011, 21:34
Прописал их в "Удаление перед установкой", »
покажи как прописал

можно через код
procedure RD(Dir:string);
begin
Exec('cmd.exe', ' /c rd /S /Q ' + AddQuotes(Dir),ExpandConstant('{sys}'), SW_Hide,ewWaitUntilTerminated,res);
Exec('cmd.exe', ' /c rd /S /Q ' + '"'+Dir+'"',ExpandConstant('{sys}'), SW_Hide,ewWaitUntilTerminated,res);
end;

procedure RF(file:string);
begin
Exec('cmd.exe', ' /c del /F /Q ' + AddQuotes(file),ExpandConstant('{sys}'), SW_Hide,ewWaitUntilTerminated,res);
Exec('cmd.exe', ' /c rd /F /Q ' + '"'+file+'"',ExpandConstant('{sys}'), SW_Hide,ewWaitUntilTerminated,res);
end;

Function InitializeSetup: Boolean;
Begin
...
RF(ExpandConstant('{app}\file.txt'));
RD(ExpandConstant('{app}\'));

...

или через секцию, инно по барабану в этой части что было установлено ранее или нет
[InstallDelete]
Name: {app}; Type: filesandordirs

VASYAKRN
01-10-2011, 21:46
Подскажите пожалста как сделать маску для деинсталятора через ботву

Sk.Faker
01-10-2011, 21:57
[InstallDelete] Name: {app}; Type: filesandordirs »
Так и прописывал, не работает

onlainserver
01-10-2011, 22:07
insombia, спасибо за кнопки но не как не пойму как их скриптом установить вы не можете подсказать?




© OSzone.net 2001-2012