Доброго, Всем, времени суток, будьте добры, помогите решить проблему. Дело в том, что когда компилирую всё проходит до конца, но не запускается инсталятор, уведомление об установке высвечуется только в панели задач и стоит без изменений, но когда из папки с игрой вырезаю всё кроме исполнительного и ещё парочки файлов, то всё в порядке, инстал запускается без проблем, всё устанавливается и удаляется, может я гдето допустил ошибку в скрипте? Заранее, Всем, ОГРОМНОЕ СПАСИБО за помощь!!!
Вот сам скрипт:
читать дальше »
; Скрипт создан при помощи мастера создания скриптов.
; СМ. ДОКУМЕНТАЦИЮ ДЛЯ ИЗУЧЕНИЯ ДЕТАЛЕЙ ОТНОСИТЕЛЬНО СОЗДАНИЯ ФАЙЛОВ СКРИПТА 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;