Войти

Показать полную графическую версию : Скрипты 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

R.i.m.s.k.y.
07-06-2011, 17:22
Как сделать чтобы он был в правом углу инсталятора а не левом? »
пробелами добить :)

Gnom_aka_Lexander
07-06-2011, 18:23
Как сделать чтобы он был в правом углу инсталятора а не левом? »
пробелами добить »
Ну зачем-же так жестоко :)
procedure InitializeWizard();
begin
with WizardForm.BeveledLabel do
begin
Left := ScaleX(352);
Width := ScaleX(145);
end;
end;

insombia
07-06-2011, 18:55
ЛександерДля моего скрипта и жестокость подойдет,ведь уже такие строки как procedure InitializeWizard(); уже есть

R.i.m.s.k.y.
07-06-2011, 19:22
уже такие строки как procedure InitializeWizard(); уже есть »
тебе надо просто в подInitializeWizard процедуру дописать
with WizardForm.BeveledLabel do
begin
Left := ScaleX(352);
Width := ScaleX(145);
end;

ILIA_1992
07-06-2011, 19:38
Помогите исправить


http://saveimg.ru/pictures/06-06-11/e184f7af6b42193db7c6c13e0ba3a7a3.jpg

скрипт http://rghost.ru/9424551

insombia
07-06-2011, 20:02
ILIA_1992 ;#define FreeArc
#ifdef FreeArc
#define ArcLocation "{src}\*.bin"
#endif

Укажы там где выделено где находится фриарк файл

nik1967
07-06-2011, 20:40
ILIA_1992, написано же: это не архив фриарка, или архив повреждён. Значит, какие выводы? Либо битый архив, либо архив, созданный не во фриарке. Ещё может быть(хотя может и нет), что ты пытаешься распаковать запароленный архив. ISDone(а точнее Unarc.dll), поддерживает распаковку запароленных архивов, но на сильных алгоритмах шифрования она сбоит и архив не извлекает. Ну вообще-то не совсем так, но все равно зашифрованные архивы она не извлекает.

ILIA_1992
07-06-2011, 21:03
ILIA_1992, написано же: это не архив фриарка, или архив повреждён. Значит, какие выводы? Либо битый архив, либо архив, созданный не во фриарке. Ещё может быть(хотя может и нет), что ты пытаешься распаковать запароленный архив.
Цитата:
ISDone(а точнее Unarc.dll), поддерживает распаковку запароленных архивов, но на сильных алгоритмах шифрования она сбоит и архив не извлекает. Ну вообще-то не совсем так, но все равно зашифрованные »
а может эта ошибка из за того ,что архив весит 9 гигов???

nik1967
07-06-2011, 21:40
ILIA_1992, попробуй спросить здесь (http://forum.ru-board.com/topic.cgi?forum=5&topic=34920&start=560).

insombia
07-06-2011, 22:22
ILIA_1992 Если 9 гб то можно разбить его пополам тоисть файлы игры по отдельности паковать чтобы припустим они по 4 50 гб занимали но это врятли из-за этого просто у таких как механики то так и делаеться(наверное)

insombia
07-06-2011, 22:38
vovka1021 DisableReadyPage=true и не парся насчет той фигни

vovka1021
07-06-2011, 22:39
AllowNoIcons=true пробовал не канает.

http://s010.radikal.ru/i314/1106/82/a3244883a72bt.jpg (http://radikal.ru/F/s010.radikal.ru/i314/1106/82/a3244883a72b.gif.html) http://i018.radikal.ru/1106/33/87c7db3798a7t.jpg (http://radikal.ru/F/i018.radikal.ru/1106/33/87c7db3798a7.gif.html)


просто в других же работает, а в этот не могу засунуть.

охото добить этот скрипт, а убрать это самый легкий способ!

insombia, DisableReadyPage=true это же просто убирает страницу готовности.

знающие люди помогите!!!


http://rghost.ru/9833951

insombia
07-06-2011, 22:42
DisableReadyPage не работает???

vovka1021 кинь свой скрипт(желательно залей на rghost

vovka1021 ну так уберёт и не будеш парится

insombia
07-06-2011, 22:58
[Messages]
rus.NoProgramGroupCheck2=Не создавать папку в меню «Пуск»

У тебя на другом скриншоте не показано что оно будет создавать в пуске папку так что оно по идее пашет

как в [LangOptions] сделать чтобы во всём инсталяторе был какой то шрифт?

vovka1021
07-06-2011, 23:12
insombia, пашет то оно пашет, просто не реагирует в готовности на создавать или нет. так надпись и стоит
http://s49.radikal.ru/i124/1106/d1/f97b5f2a8fd6t.jpg (http://radikal.ru/F/s49.radikal.ru/i124/1106/d1/f97b5f2a8fd6.gif.html) http://s52.radikal.ru/i135/1106/58/7b6cdf0aa6cft.jpg (http://radikal.ru/F/s52.radikal.ru/i135/1106/58/7b6cdf0aa6cf.gif.html)

tiestos
08-06-2011, 12:57
что надо изменить в скрипте чтобы сначала ишла роспаковка просто файлов запакованых Inno Setup'ом, а потом самых архивов
вот скрипт

#define GameName "Crysis Warhead"
#define NeedSize "10000000000"

#define precomp038
#define ExeName "Crysis2Launcher.exe"
#define ExeDir "bin32\"


[Setup]
AppName={#GameName}
AppVerName={#GameName}
DefaultDirName={pf}\{#GameName}
DefaultGroupName={#GameName}
OutputDir=.
OutputBaseFilename=Setup
SolidCompression=true
#ifdef NeedSize
ExtraDiskSpaceRequired={#NeedSize}
#endif
WizardImageFile=img.bmp
WizardSmallImageFile=shapka.bmp
#ifdef Components
SetupIconFile=iconset.ico
Compression=lzma2/ultra64
InternalCompressLevel=ultra64

[Types]
Name: "full"; Description: "Full installation"; Flags: iscustom


#endif

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

[Files]

Source: "C:\Users\ntrx\Desktop\1\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs

Source: "logo2.bmp"; DestDir: "{app}"; Attribs: hidden system;

Source: "DirBitmap.bmp"; DestDir: "{tmp}"; Flags: dontcopy
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\InnoCallback.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef precomp038
Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\RTconsole.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
[Run]
Filename: "{src}\Redist\dxwebsetup.exe"; StatusMsg: "Обновление DirectX..."; Flags: waituntilterminated
Filename: "{src}\Redist\vcredist_x86_2005_sp1.exe"; Parameters: "/q"; StatusMsg: "Установка Microsoft Visual C++ 2005 SP1 Redist..."; Flags: runhidden waituntilterminated ;
[Icons]
Name: {group}\{#GameName}; Filename: {app}\{#ExeDir}{#ExeName}; WorkingDir: {app}\{#ExeDir}; Comment: {#GameName};
Name: {group}\Удалить игру; Filename: {app}\Uninstall\unins000; WorkingDir: {app}\Uninstall\; Comment: Удалить игру;

Name: "{commondesktop}\{#GameName}"; Filename: "{app}\{#ExeDir}{#ExeName}"; WorkingDir: "{app}\{#ExeDir}"; Comment: "{#GameName}"; Tasks: desktopicon;


[CustomMessages]
russian.ExtractedFile=Распаковывается файл:
russian.CancelButton=Отменить распаковку
russian.Error=Ошибка распаковки!

[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"

[UninstallDelete]
Type: filesandordirs; Name: {app}

[code]
var
LabelPct,LabelCurrFileName: TLabel;
ISDoneProgressBar: TNewProgressBar;
MyCancelButton: TButton;
OveralPct,Cancel:integer;
CallBack:longword;
MyError:boolean;
FinishedLabel: TLabel;
Text: TNewStaticText;
LogoImage: TBitmapImage;


type
TCallback = function (Pct: integer;CurrentFile:string): longword;
TMessage = record hWnd: HWND; msg, wParam: Word; lParam: LongWord; Time: TFileTime; pt: TPoint; end;

function PeekMessage(var lpMsg: TMessage; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; external 'PeekMessageA@user32.dll stdcall';
function TranslateMessage(const lpMsg: TMessage): BOOL; external 'TranslateMessage@user32.dll stdcall';
function DispatchMessage(const lpMsg: TMessage): Longint; external 'DispatchMessageA@user32.dll stdcall';

function WrapMyCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:innocallback.dll stdcall';

function ISArcExtract(CurComponent:longword; var OveralPct:integer; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; callback: longword; Password, CfgFile, WorkPath: AnsiString):BOOL; external 'ISArcExtract@files:ISDone.dll stdcall';
function IS7ZipExtract(CurComponent:longword; var OveralPct:integer; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; callback: longword; Password: AnsiString):BOOL; external 'IS7zipExtract@files:ISDone.dll stdcall';

function ISPrecompExtract(CurComponent:longword; var OveralPct:integer; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean; callback: longword):BOOL; external 'ISPrecompExtract@files:ISDone.dll stdcall';
function ISSRepExtract(CurComponent:longword; var OveralPct:integer; PctOfTotal:double; InName, OutFile, IdxFile: AnsiString; DeleteInFile:boolean; callback: longword):BOOL; external 'ISSrepExtract@files:ISDone.dll stdcall';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):BOOL; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall';
function StartRecord(RecordFileName:AnsiString; AllComponents:longword):BOOL; external 'StartRecord@files:ISDone.dll stdcall';
function CheckPoint(CurComponent:Integer):BOOL; external 'CheckPoint@files:ISDone.dll stdcall';
function StopRecord:BOOL; external 'StopRecord@files:ISDone.dll stdcall';

function ProgressCallback(Pct: integer; CurrentFile:AnsiString): longword;
var Msg: TMessage;
begin
if Pct<=ISDoneProgressBar.Max then
ISDoneProgressBar.Position := Pct;
LabelPct.Caption := IntToStr(Pct div 10)+'.'+chr(48 + Pct mod 10)+'%';
LabelCurrFileName.Caption :=ExpandConstant('{cm:ExtractedFile} ')+CurrentFile;
while PeekMessage(Msg, 0, 0, 0, 1) do begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
Result := Cancel;
end;

procedure CancelButtonOnClick(Sender: TObject);
begin
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then Cancel:=1;
end;

procedure InitializeWizard();
begin

ExtractTemporaryFile('DirBitmap.bmp');

ExtractTemporaryFile('logo2.bmp');

LogoImage := TBitmapImage.Create(WizardForm);
with LogoImage do
begin

SetBounds(ScaleX(10), ScaleY(320), ScaleX(175), ScaleY(35));
Bitmap.LoadFromFile(ExpandConstant('{tmp}\logo2.bmp'));
Parent := WizardForm;
end;

with WizardForm.WizardSmallBitmapImage do
begin

SetBounds(ScaleX(0), ScaleY(2), ScaleX(497), ScaleY(56));
end;

with WizardForm.SelectDirBitmapImage do
begin

SetBounds(ScaleX(0), ScaleY(0), ScaleX(42), ScaleY(42));
end;

WizardForm.SelectDirBitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\DirBitmap.bmp'));


WizardForm.MainPanel.Color := clGray;
WizardForm.WizardBitmapImage.Width := 497;
WizardForm.WizardBitmapImage2.Width := 497;
WizardForm.PageNameLabel.Width:=0;
WizardForm.PageDescriptionLabel.Hide;
WizardForm.Font.Color:=clblack;

WizardForm.Color:=clGray;
WizardForm.WelcomePage.Color:=clGray;
WizardForm.InnerPage.Color:=clGray;
WizardForm.SelectDirPage.Color:=clGray;
WizardForm.FinishedPage.Color:=clGray;

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


with TLabel.Create(WizardForm) do begin
AutoSize:=WizardForm.WelcomeLabel1.AutoSize;
Left:=WizardForm.WelcomeLabel1.Left;
Top:=WizardForm.WelcomeLabel1.Top
Width:=WizardForm.WelcomeLabel1.Width
Height:=WizardForm.WelcomeLabel1.Height
WordWrap:=WizardForm.WelcomeLabel1.WordWrap;
Font.Name:=WizardForm.WelcomeLabel1.Font.Name;
Font.Size:=WizardForm.WelcomeLabel1.Font.Size;
Font.Color:=clblack;
Font.Style:=WizardForm.WelcomeLabel1.Font.Style;
Caption:=WizardForm.WelcomeLabel1.Caption;
Parent:=WizardForm.WelcomeLabel1.Parent
Transparent:=True
end;
with TLabel.Create(WizardForm) do begin
AutoSize:=WizardForm.WelcomeLabel2.AutoSize;
Left:=WizardForm.WelcomeLabel2.Left;
Top:=WizardForm.WelcomeLabel2.Top
Width:=WizardForm.WelcomeLabel2.Width
Height:=WizardForm.WelcomeLabel2.Height
WordWrap:=WizardForm.WelcomeLabel2.WordWrap;
Font.Name:=WizardForm.WelcomeLabel2.Font.Name;
Font.Size:=WizardForm.WelcomeLabel2.Font.Size;
Font.Color:=clblack;
Font.Style:=WizardForm.WelcomeLabel2.Font.Style;
Caption:=WizardForm.WelcomeLabel2.Caption;
Parent:=WizardForm.WelcomeLabel2.Parent
Transparent:=True
end;


WizardForm.FinishedHeadingLabel.Hide;


with TLabel.Create(WizardForm) do begin
AutoSize:=WizardForm.FinishedHeadingLabel.AutoSize;
Left:=WizardForm.FinishedHeadingLabel.Left;
Top:=WizardForm.FinishedHeadingLabel.Top
Width:=WizardForm.FinishedHeadingLabel.Width
Height:=WizardForm.FinishedHeadingLabel.Height
WordWrap:=WizardForm.FinishedHeadingLabel.WordWrap;
Font.Name:=WizardForm.FinishedHeadingLabel.Font.Name;
Font.Size:=WizardForm.FinishedHeadingLabel.Font.Size;
Font.Color:=clblack;
Font.Style:=WizardForm.FinishedHeadingLabel.Font.Style;
Caption:=WizardForm.FinishedHeadingLabel.Caption;
Parent:=WizardForm.FinishedHeadingLabel.Parent
Transparent:=True
end;

FinishedLabel:= TLabel.Create(WizardForm)
WizardForm.FinishedLabel.Hide;
with TLabel.Create(WizardForm) do begin
Font.Name:=WizardForm.FinishedLabel.Font.Name;
Font.Size:=WizardForm.FinishedLabel.Font.Size;
Font.Color:=clgreen;
Font.Style:=WizardForm.FinishedLabel.Font.Style;
Caption:=WizardForm.FinishedLabel.Caption;
Parent:=WizardForm.FinishedLabel.Parent
Transparent:=True
end;






ISDoneProgressBar := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar do begin
Left := ScaleX(0);
Top := ScaleY(40);
Width := ScaleX(417);
Max := 1000;
Height := WizardForm.ProgressGauge.Height;
Parent := WizardForm.InstallingPage;
end;

LabelPct := TLabel.Create(WizardForm);
with LabelPct do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;

Width := WizardForm.ProgressGauge.Width;

Top := WizardForm.ProgressGauge.Top + ScaleY(50);

Font.Size := 10;

Font.Color := clSilver;
Alignment := taCenter;
Caption := '';
end;

LabelCurrFileName := TLabel.Create(WizardForm);
with LabelCurrFileName do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
Width := WizardForm.ProgressGauge.Width;
Left := ScaleX(0);
Top := WizardForm.ProgressGauge.Top + ScaleY(25);
Caption := '';
end;
end;


Procedure CurPageChanged(CurPageID: Integer);
Begin
if (CurPageID = wpFinished) and MyError then
begin

with TLabel.Create(WizardForm) do begin
WizardForm.FinishedLabel.Hide;
AutoSize:=WizardForm.FinishedHeadingLabel.AutoSize;
Left:=WizardForm.FinishedLabel.Left;
Top:=WizardForm.FinishedLabel.Top
Width:=WizardForm.FinishedLabel.Width
Height:=WizardForm.FinishedLabel.Height
WordWrap:=WizardForm.FinishedLabel.WordWrap;
Font.Name:=WizardForm.FinishedLabel.Font.Name;
Font.Size:=WizardForm.FinishedLabel.Font.Size;


WizardForm.Caption:= ExpandConstant('{cm:Error}');
WizardForm.FinishedLabel.Font.Color:= clyellow;
WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted);

Font.Color:=clwhite;

Font.Style:=WizardForm.FinishedLabel.Font.Style;
Caption:=WizardForm.FinishedLabel.Caption;
Parent:=WizardForm.FinishedLabel.Parent
Transparent:=True
end;
end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var ChComp, TmpValue:longword;
n:integer;
begin
if CurStep = ssInstall then begin
WizardForm.ProgressGauge.Hide;
WizardForm.CancelButton.Visible:=false;
MyCancelButton:=TButton.Create(WizardForm);
with MyCancelButton do begin
Parent:=WizardForm;
Width:=ScaleX(135);
Caption:=ExpandConstant('{cm:CancelButton}');
Left:=ScaleX(360);
Top:=WizardForm.cancelbutton.top;
OnClick:=@CancelButtonOnClick;
end;
CallBack:=WrapMyCallback(@ProgressCallback,2);
Cancel:=0;
OveralPct:=0;

















#ifdef records
ExtractTemporaryFile('records.inf');
#endif

#ifdef precomp038
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('RTconsole.exe');
ExtractTemporaryFile('precomp038.exe');
ExtractTemporaryFile('zlib1.dll');
#endif



ChComp:=0;


StartRecord(ExpandConstant('{src}\records.inf'),ChComp);
repeat
MyError:=true;
CallBack:=WrapMyCallback(@ProgressCallback,2);
OveralPct:=0;
ISArcExtract ( 0, OveralPct, 30, ExpandConstant('{src}\muzk.arc'), ExpandConstant('{app}'),false,CallBack, '', '', '')
ISSRepExtract ( 0, OveralPct, 20, ExpandConstant('{app}\muzk.srep'), ExpandConstant('{app}\muzk.pcf'), '', true, CallBack)
ISPrecompExtract( 0, OveralPct, 30, ExpandConstant('{app}\muzk.pcf'), ExpandConstant('{app}\muzk.7z'),true, CallBack)
IS7ZipExtract ( 0, OveralPct, 20, ExpandConstant('{app}\muzk.7z'), ExpandConstant('{app}'),true, CallBack, '')
MyError:=false;
until true;
StopRecord;

MyCancelButton.Visible:=false;
WizardForm.CancelButton.Visible:=true;
end;
if (CurStep=ssPostInstall) and MyError then
Exec(ExpandConstant('{uninstallexe}'), '/SILENT','', sw_Hide, ewWaitUntilTerminated, n);
end;

insombia
08-06-2011, 17:13
Как сделать чтобы когда устанавлеваеш игру на какой то диск и на нём не хватает памяти то чтобы туда игру нельзя было установить игру?

El Sanchez
08-06-2011, 17:30
старшие камрады! обратите на меня внимание! а то краунмейдеры сидят без дистра
пост http://forum.oszone.net/post-1689745.html#post1689745
точки с запятой в юникод-скрипте я расставил, дело не в них а в
RegQueryBinaryValue(HKLM, DeviceKey, 'HardwareInformation.MemorySize', String)
в анси прокатывает, в юникоде - нет
а эта строчка и возвращает название видухи »
R.i.m.s.k.y., как обычно через WMI:

[Code]
function GetVideoControllerName(): String;
var
objSWbemLocator, objSWbemServices: Variant;
begin
try
objSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
except
ShowExceptionMessage;
Exit;
end;
objSWbemServices := objSWbemLocator.ConnectServer();
objSWbemServices.Security_.ImpersonationLevel := 3;
try
Result := objSWbemServices.ExecQuery('SELECT Name FROM Win32_VideoController WHERE Availability=3').Item('Win32_VideoController="VideoController1"').Properties_.Item('Name').Value;
except
end;
end;

procedure InitializeWizard();
begin
MsgBox(GetVideoControllerName(), mbInformation, MB_OK);
end;


BeveledLabel=
Как сделать чтобы он был в правом углу инсталятора а не левом? »
with WizardForm.BeveledLabel do
begin
Left := ScaleX(352);
Width := ScaleX(145);
end; »
insombia, R.i.m.s.k.y., жестко задавать координаты плохо. А вдруг я размер формы поменяю? :) Тогда уж так:

[Messages]
BeveledLabel=sometext

procedure InitializeWizard();
begin
with WizardForm.BeveledLabel do Left := WizardForm.Width - Width;
end;

Vamp1re
08-06-2011, 17:42
Как создать кликабельную кнопку на странице выбора директории установки? Мне нужно чтоб она открывала HUD сообщение с проверкой системных требований. И возможно ли ето? :)

nik1967
09-06-2011, 14:21
Vamp1re, возможно, почему бы и нет? Скачай (http://rghost.ru/10059271) скрипт от sjwrec - в нём есть эта фича. Только чур, разбирайся сам!




© OSzone.net 2001-2012