yavolirvag
Newbie | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору У меня установка DirectX начинаеться перед распаковкой архивов FreeArc можно ли изменить так чтоб установка DirectX начиналась после распаковки архивов FreeArc? Вот МОЙ КОД ; --- Generated by InnoSetup Script Joiner version 3.0, Jul 22 2009, (c) Bulat Ziganshin <Bulat.Ziganshin@gmail.com>. More info at http://issjoiner.codeplex.com/ ; --- Source: FreeArc_Example.iss ------------------------------------------------------------ ;[English] ;Example of using unarc.dll for decompression of FreeArc archives with displaying of progress indicator in Inno Setup window. ;In order to use the script compile it and put *.arc archives to the same directory as installer executable before running it. ;The script requires Inno Setup QuickStart Pack 5.2.3 and above (http://files.jrsoftware.org) ;You will also need InnoCallback.dll that may be found at the http://www.sherlocksoftware.org/page.php?id=54 ;[Russian] ;Пример распаковки FreeArc архива при помощи unarc.dll, с отображением прогресса распаковки в окне Inno Setup. ;Для использования скрипта откомпилируйте его и поместите архивы *.arc в один каталог с инсталятором перед тем как запустить его. ;Скрипт совместим с Inno Setup QuickStart Pack 5.2.3 и выше (http://files.jrsoftware.org) ;Вам также потребуется InnoCallback.dll (http://www.sherlocksoftware.org/page.php?id=54) ; Версия 3.3 от Bulat Ziganshin, 13-09-2009 ; - ускорение распаковки на 10% ; - FreeArcExtract() поддерживает опцию '-wPATH' для задания каталога для временных файлов ; - при прерывании распаковки стирает временные файлы ; - исправлена ошибка в unarc.dll - вылетала при распаковке с использованием временных файлов ; ; Версия 3.2 от Bulat Ziganshin, 31-07-2009 ; - исправлена unarc.dll - теперь она не вылетает на сбойных архивах ; ; Версия 3.1 от Bulat Ziganshin, 29-07-2009 ; - более плавный индикатор прогресса (данные из LZMA пишутся кусками по 8 мб вместо dictsize) ; - больше не грузятся всякие левые facompress.dll из PATH ; ; Версия 3.0 от Bulat Ziganshin, 29-07-2009 ; - функция ArchiveOrigSize возвращает объём данных в архиве ; - наименования колбэков изменены на read и write (было progress и written) ; ; Версия 2.1 от Bulat Ziganshin, 10-07-2009 ; - Кнопка 'Отмена установки' теперь по расположению, размеру и надписи точно дублирует стандартную кнопку Отмена ; - В unarc.dll исправлена ошибка, чреватая потенциальными проблемами при распаковке множества архивов ; ; Версия 2.0 от Bulat Ziganshin, 08-07-2009 ; - Корректно отображает общий объём установки и сколько данных уже распаковано ; - Индикатор прогресса теперь основан на объёме распакованных и записанных на диск данных ; - Дополнительно отображается сколько осталось времени ; - FreeArcCallback вызывается не менее 100 раз в секунду, что заменяет вызов по таймеру ; - Добавлен placeholder для периодически выполняемого кода (в начале процедуры FreeArcCallback) ; - Исправлена проблема с удалением последнего распакованного файла при отмене инсталяции ; - Исправлена проблема с русскими именами/путями распаковываемых архивов ; - Кнопка 'Отменить распаковку' масштабируется в зависимости от размеров формы ; - Исправлено вычисление оставшегося времени (теперь отсчёт начинается в момент начала распаковки) ; - За пределами процесса распаковки все лишние надписи убираются с экрана ; ; Изменения от Victor_Dobrov, 02-07-2009 ; - Кнопка инсталлятора в панели задач отображает время до завершения обработки всех архивов и общий процент распаковки. ; - В Unicode-версиях инсталлятора правильно отображаются имена файлов. ; ; Изменения от CTACKo & SotM'а. 01-07-2009 ; - Правильно создаются папки, если в пути установки встречаются русские буквы ; - При компиляции определяется использование PAnsiChar/PChar. Можно использовать как обычную так и UNICODE версию с установленным препроцессором. ; ; Изменения от SotM'а. 23-06-2009 ; - Нижний прогресс бар сместил чуть-чуть вниз, чтобы было видно имя распаковываемого файла. ; - Русские имена файлов теперь правильно отображаются. ; - При нажатии "отмены" при распаковке теперь появляется запрос на подтверждение отмены. ; - Переименовал некоторые переменные, чтобы их имена несли больше информации. ; - Немного переформатировал сам исходный код для более удобного и понятного чтения. ; - Исправил пару сообщений на английском языке. ; Изменения от Victor_Dobrov, 15-06-2009 ; - Оптимизация и локализация скрипта, более подробная строка статуса, общий прогресс-бар, при неудачной распаковке выполняется откат (деинсталляция) и показывается текст ошибки. ; Bulat Ziganshin, 13-06-2009 ; - Создание библиотеки unarc.dll и скрипта распаковки freearc_example.iss. [Setup] AppName=Dirt 3 RePacK By Razer AppVerName=Dirt 3 RePacK By Razer DefaultDirName={pf}\Dirt 3 RePacK By Razer DefaultGroupName=Dirt 3 RePacK By Razer VersionInfoCopyright=2011 OutputBaseFilename=setup OutputDir=. UsePreviousAppDir=false DirExistsWarning=no ShowLanguageDialog=no ; --- Source: от Репакера Razer.iss ------------------------------------------------------------ ; Скрипт создан с помощью ; IS GameScript Generator by South ; специально для www.csmania.ru SourceDir=. AppVersion=Dirt 3 RePacK By Razer AppPublisher=Dirt 3 RePacK By Razer AppCopyright=Dirt 3 RePacK By Razer AppPublisherURL=By Razer. AppSupportURL=By Razer. AppUpdatesURL=By Razer. AllowNoIcons=yes InfoBeforeFile=C:\Users\Колян\Desktop\1.txt InfoAfterFile=C:\Users\Колян\Desktop\2.txt WizardImageFile=C:\Users\Колян\Desktop\00.bmp WizardSmallImageFile=C:\Users\Колян\Desktop\3.bmp SetupIconFile=C:\Users\Колян\Desktop\icon.ico WindowVisible=no WindowShowCaption=no WindowResizable=no Compression=lzma/normal DiskSpanning=yes DiskSliceSize=2100000000 SlicesPerDisk=1 ; --- Dispatching code ------------------------------------------------------------ [Files] ;Source: *.arc; DestDir: {app}; Flags: nocompression Source: unarc.dll; DestDir: {tmp}; Flags: dontcopy deleteafterinstall Source: compiler:InnoCallback.dll; DestDir: {tmp}; Flags: dontcopy Source: ISSkin.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: steam.cjstyles; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: C:\Users\Колян\Desktop\f2816dea20121b76e98148413fa1b487.png; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: isgsg.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression [Icons] Name: {group}\Играть; Filename: {app}\dirt3.exe Name: {group}\Удалить; Filename: {app}\unins000.exe Name: {commondesktop}\dirt3; Filename: {app}\dirt3.exe [Languages] Name: rus; MessagesFile: compiler:Languages\Russian.isl Name: russian; MessagesFile: compiler:Languages\Russian.isl [CustomMessages] rus.ArcBreak=Установка прервана! rus.ExtractedInfo=Распаковано %1 Мб из %2 Мб rus.ArcInfo=Архив: %1 из %2 rus.ArcTitle=Распаковка архивов FreeArc rus.ArcError=Распаковщик FreeArc вернул код ошибки: %1 rus.ArcFail=Распаковка не завершена! rus.AllProgress=Общий прогресс распаковки: %1%% rus.ArcBroken=Возможно, архив %1 повреждён%nили недостаточно места на диске назначения. rus.Extracting=Распаковывается: %1 rus.taskbar=%1%%, жди %2 rus.remains=Осталось ждать %1 rus.LongTime=вечно rus.ending=завершение rus.hour=часов rus.min=мин rus.sec=сек [UninstallDelete] Type: filesandordirs; Name: {app} Type: filesandordirs; Name: {app} [Code] const Archives = '{src}\*.arc'; // укажите расположение архивов FreeArc; для внешних файлов строку в [Files] добавлять необязательно PM_REMOVE = 1; CP_ACP = 0; CP_UTF8 = 65001; oneMb = 1048576; type #ifdef UNICODE ; если у вас ошибка на этой строке, то установите препроцессор или исправьте скрипт для вашей версии Inno Setup #define A "W" #else #define A "A" ; точка входа в SetWindowText, {#A} меняется на A или W в зависимости от версии #endif #if Ver < 84018176 AnsiString = String; // There is no need for this line in Inno Setup 5.2.4 and above (для Inno Setup версий 5.2.4 и выше эта строка не нужна) #endif TMyMsg = record hwnd: HWND; message: UINT; wParam: Longint; lParam: Longint; time: DWORD; pt: TPoint; end; TFreeArcCallback = function (what: PAnsiChar; int1, int2: Integer; str: PAnsiChar): Integer; TArc = record Path: string; OrigSize: Integer; Size: Extended; end; var ExtractFile: TLabel; lblExtractFileName: TLabel; btnCancelUnpacking: TButton; CancelCode, n, UnPackError, StartInstall: Integer; Arcs: array of TArc; msgError: string; lastMb: Integer; baseMb: Integer; totalUncompressedSize: Integer; // total uncompressed size of archive data in mb LastTimerEvent: DWORD; Function MultiByteToWideChar(CodePage: UINT; dwFlags: DWORD; lpMultiByteStr: string; cbMultiByte: integer; lpWideCharStr: string; cchWideChar: integer): longint; external 'MultiByteToWideChar@kernel32.dll stdcall'; Function WideCharToMultiByte(CodePage: UINT; dwFlags: DWORD; lpWideCharStr: string; cchWideChar: integer; lpMultiByteStr: string; cbMultiByte: integer; lpDefaultChar: integer; lpUsedDefaultChar: integer): longint; external 'WideCharToMultiByte@kernel32.dll stdcall'; function PeekMessage(var lpMsg: TMyMsg; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; external 'PeekMessageA@user32.dll stdcall'; function TranslateMessage(const lpMsg: TMyMsg): BOOL; external 'TranslateMessage@user32.dll stdcall'; function DispatchMessage(const lpMsg: TMyMsg): Longint; external 'DispatchMessageA@user32.dll stdcall'; Function OemToChar(lpszSrc, lpszDst: AnsiString): longint; external 'OemToCharA@user32.dll stdcall'; function GetWindowLong(hWnd, nIndex: Integer): Longint; external 'GetWindowLongA@user32 stdcall delayload'; function SetWindowText(hWnd: Longint; lpString: String): Longint; external 'SetWindowText{#A}@user32 stdcall delayload'; function GetTickCount: DWord; external 'GetTickCount@kernel32'; function WrapFreeArcCallback (callback: TFreeArcCallback; paramcount: integer):longword; external 'wrapcallback@files:innocallback.dll stdcall'; function FreeArcExtract (callback: longword; cmd1,cmd2,cmd3,cmd4,cmd5,cmd6,cmd7,cmd8,cmd9,cmd10: PAnsiChar): integer; external 'FreeArcExtract@files:unarc.dll cdecl'; procedure AppProcessMessage; var Msg: TMyMsg; begin while PeekMessage(Msg, 0, 0, 0, PM_REMOVE) do begin TranslateMessage(Msg); DispatchMessage(Msg); end; end; // Перевод числа в строку с точностью 3 знака (%.3n) с округлением дробной части, если она есть Function NumToStr(Float: Extended): String; Begin Result:= Format('%.3n', [Float]); StringChange(Result, ',', '.'); while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Length(Result) > 1) do SetLength(Result, Length(Result)-1); End; function cm(Message: String): String; Begin Result:= ExpandConstant('{cm:'+ Message +'}') End; Function Size64(Hi, Lo: Integer): Extended; Begin Result:= Lo; if Lo<0 then Result:= Result + $7FFFFFFF + $7FFFFFFF + 2; for Hi:= Hi-1 Downto 0 do Result:= Result + $7FFFFFFF + $7FFFFFFF + 2; End; // Converts OEM encoded string into ANSI // Преобразует OEM строку в ANSI кодировку function OemToAnsiStr( strSource: AnsiString): AnsiString; var nRet : longint; begin SetLength( Result, Length( strSource ) ); nRet:= OemToChar( strSource, Result ); end; // Converts ANSI encoded string into UTF-8 // Преобразует строку из ANSI в UTF-8 кодировку function AnsiToUtf8( strSource: string ): string; var nRet : integer; WideCharBuf: string; MultiByteBuf: string; begin strSource:= strSource + chr(0); SetLength( WideCharBuf, Length( strSource ) * 2 ); SetLength( MultiByteBuf, Length( strSource ) * 2 ); nRet:= MultiByteToWideChar( CP_ACP, 0, strSource, -1, WideCharBuf, Length(WideCharBuf) ); nRet:= WideCharToMultiByte( CP_UTF8, 0, WideCharBuf, -1, MultiByteBuf, Length(MultiByteBuf), 0, 0); Result:= MultiByteBuf; end; // OnClick event function for btnCancel procedure btnCancelUnpackingOnClick(Sender: TObject); begin if MsgBox( SetupMessage( msgExitSetupMessage ), mbInformation, MB_YESNO ) = IDYES then CancelCode:= -127; end; var origsize: Integer; // The callback function for getting info about FreeArc archive function FreeArcInfoCallback (what: PAnsiChar; Mb, sizeArc: Integer; str: PAnsiChar): Integer; begin if string(what)='origsize' then origsize := Mb else if string(what)='compsize' then else if string(what)='total_files' then else Result:= CancelCode; end; // Returns decompressed size of files in archive function ArchiveOrigSize(arcname: string): Integer; var callback: longword; Begin callback:= WrapFreeArcCallback(@FreeArcInfoCallback,4); //FreeArcInfoCallback has 4 arguments CancelCode:= 0; AppProcessMessage; try // Pass the specified arguments to 'unarc.dll' Result:= FreeArcExtract (callback, 'l', '--', AnsiToUtf8(arcname), '', '', '', '', '', '', ''); if CancelCode < 0 then Result:= CancelCode; if Result >= 0 then Result:= origsize; except Result:= -63; // ArcFail end; end; // Scans the specified folders for archives and add them to list function FindArcs(dir: string): Extended; var FSR: TFindRec; Begin Result:= 0; if FindFirst(ExpandConstant(dir), FSR) then begin try repeat // Skip everything but the folders if FSR.Attributes and FILE_ATTRIBUTE_DIRECTORY > 0 then CONTINUE; n:= GetArrayLength(Arcs); // Expand the folder list SetArrayLength(Arcs, n +1); Arcs[n].Path:= ExtractFilePath(ExpandConstant(dir)) + FSR.Name; Arcs[n].Size:= Size64(FSR.SizeHigh, FSR.SizeLow); Result:= Result + Arcs[n].Size; Arcs[n].OrigSize := ArchiveOrigSize(Arcs[n].Path) totalUncompressedSize := totalUncompressedSize + Arcs[n].OrigSize until not FindNext(FSR); finally FindClose(FSR); end; end; End; // Sets the TaskBar title Procedure SetTaskBarTitle(Title: String); var h: Integer; Begin h:= GetWindowLong(MainForm.Handle, -8); if h <> 0 then SetWindowText(h, Title); End; // Converts milliseconds to human-readable time // Конвертирует милисекунды в человеко-читаемое изображение времени Function TicksToTime(Ticks: DWord; h,m,s: String; detail: Boolean): String; Begin if detail {hh:mm:ss format} then Result:= PADZ(IntToStr(Ticks/3600000), 2) +':'+ PADZ(IntToStr((Ticks/1000 - Ticks/1000/3600*3600)/60), 2) +':'+ PADZ(IntToStr(Ticks/1000 - Ticks/1000/60*60), 2) else if Ticks/3600 >= 1000 {more than hour} then Result:= IntToStr(Ticks/3600000) +h+' '+ PADZ(IntToStr((Ticks/1000 - Ticks/1000/3600*3600)/60), 2) +m else if Ticks/60 >= 1000 {1..60 minutes} then Result:= IntToStr(Ticks/60000) +m+' '+ PADZ(IntToStr(Ticks/1000 - Ticks/1000/60*60), 2) +s else Result:= IntToStr(Ticks/1000) +s {less than one minute} End; // The main callback function for unpacking FreeArc archives function FreeArcCallback (what: PAnsiChar; Mb, sizeArc: Integer; str: PAnsiChar): Integer; var percents, Remaining: Integer; s: String; begin if GetTickCount - LastTimerEvent > 1000 then begin // This code will be executed once each 1000 ms (этот код будет выполняться раз в 1000 миллисекунд) // .... // End of code executed by timer LastTimerEvent := LastTimerEvent+1000; end; if string(what)='filename' then begin // Update FileName label lblExtractFileName.Caption:= FmtMessage( cm( 'Extracting' ), [OemToAnsiStr( str )] ) end else if (string(what)='write') and (totalUncompressedSize>0) and (Mb>lastMb) then begin // Assign to Mb *total* amount of data extracted to the moment from all archives lastMb := Mb; Mb := baseMb+Mb; // Update progress bar WizardForm.ProgressGauge.Position:= Mb; // Show how much megabytes/archives were processed up to the moment percents:= (Mb*1000) div totalUncompressedSize; s := FmtMessage(cm('ExtractedInfo'), [IntToStr(Mb), IntToStr(totalUncompressedSize)]); if GetArrayLength(Arcs)>1 then s := s + '. '+FmtMessage(cm('ArcInfo'), [IntToStr(n+1), IntToStr(GetArrayLength(Arcs))]) ExtractFile.Caption := s // Calculate and show current percents percents:= (Mb*1000) div totalUncompressedSize; s:= FmtMessage(cm('AllProgress'), [Format('%.1n', [Abs(percents/10)])]); if Mb > 0 then Remaining:= trunc((GetTickCount - StartInstall) * Abs((totalUncompressedSize - Mb)/Mb)) else Remaining:= 0; if Remaining = 0 then SetTaskBarTitle(cm('ending')) else begin s:= s + '. '+FmtMessage(cm('remains'), [TicksToTime(Remaining, cm('hour'), cm('min'), cm('sec'), false)]) SetTaskBarTitle(FmtMessage(cm('taskbar'), [IntToStr(percents/10), TicksToTime(Remaining, 'h', 'm', 's', false)])) end; WizardForm.FileNameLabel.Caption := s end; AppProcessMessage; Result:= CancelCode; end; // Extracts all found archives function UnPack(Archives: string): Integer; var totalCompressedSize: Extended; callback: longword; FreeMB, TotalMB: Cardinal; begin // Display 'Extracting FreeArc archive' lblExtractFileName.Caption:= ''; lblExtractFileName.Show; ExtractFile.caption:= cm('ArcTitle'); ExtractFile.Show; // Show the 'Cancel unpacking' button and set it as default button btnCancelUnpacking.Caption:= WizardForm.CancelButton.Caption; btnCancelUnpacking.Show; WizardForm.ActiveControl:= btnCancelUnpacking; WizardForm.ProgressGauge.Position:= 0; // Get the size of all archives totalUncompressedSize := 0; totalCompressedSize := FindArcs(Archives); WizardForm.ProgressGauge.Max:= totalUncompressedSize; // Other initializations callback:= WrapFreeArcCallback(@FreeArcCallback,4); //FreeArcCallback has 4 arguments StartInstall:= GetTickCount; {время начала распаковки} LastTimerEvent:= GetTickCount; baseMb:= 0 for n:= 0 to GetArrayLength(Arcs) -1 do begin lastMb := 0 CancelCode:= 0; AppProcessMessage; try // Pass the specified arguments to 'unarc.dll' Result:= FreeArcExtract (callback, 'x', '-o+', '-dp' + AnsiToUtf8( ExpandConstant('{app}') ), '--', AnsiToUtf8(Arcs[n].Path), '', '', '', '', ''); if CancelCode < 0 then Result:= CancelCode; except Result:= -63; // ArcFail end; baseMb:= baseMb+lastMb // Error occured if Result <> 0 then begin msgError:= FmtMessage(cm('ArcError'), [IntToStr(Result)]); GetSpaceOnDisk(ExtractFileDrive(ExpandConstant('{app}')), True, FreeMB, TotalMB); case Result of -1: if FreeMB < 32 {Мб на диске} then msgError:= SetupMessage(msgDiskSpaceWarningTitle) else msgError:= msgError + #13#10 + FmtMessage(cm('ArcBroken'), [ExtractFileName(Arcs[n].Path)]); -127: msgError:= cm('ArcBreak'); //Cancel button -63: msgError:= cm('ArcFail'); end; // MsgBox(msgError, mbInformation, MB_OK); //сообщение показывается на странице завершения Log(msgError); Break; //прервать цикл распаковки end; end; // Hide labels and button WizardForm.FileNameLabel.Caption:= ''; lblExtractFileName.Hide; ExtractFile.Hide; btnCancelUnpacking.Hide; end; procedure CurStepChanged1(CurStep: TSetupStep); begin if CurStep = ssPostInstall then begin UnPackError:= UnPack(Archives) if UnPackError = 0 then SetTaskBarTitle(SetupMessage(msgSetupAppTitle)) else begin // Error occured, uninstall it then Exec(ExpandConstant('{uninstallexe}'), '/SILENT','', sw_Hide, ewWaitUntilTerminated, n); //откат установки из-за ошибки unarc.dll SetTaskBarTitle(SetupMessage(msgErrorTitle)) WizardForm.Caption:= SetupMessage(msgErrorTitle) +' - '+ cm('ArcBreak') end; end; end; // стандартный способ отката (не нужна CurPageChanged1), но архивы распаковываются до извлечения файлов инсталлятора // if CurStep = ssInstall then // if UnPack(Archives) <> 0 then Abort; Procedure CurPageChanged1(CurPageID: Integer); Begin if (CurPageID = wpFinished) and (UnPackError <> 0) then begin // Extraction was unsuccessful (распаковщик вернул ошибку) // Show error message WizardForm.FinishedLabel.Font.Color:= $0000C0; // red (красный) WizardForm.FinishedLabel.Height:= WizardForm.FinishedLabel.Height * 2; WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) + #13#10#13#10 + msgError; end; End; procedure InitializeWizard1(); begin with WizardForm.ProgressGauge do begin // Create a label to show current FileName being extracted lblExtractFileName:= TLabel.Create(WizardForm); lblExtractFileName.parent:=WizardForm.InstallingPage; lblExtractFileName.autosize:=false; lblExtractFileName.Width:= Width; lblExtractFileName.top:=Top + ScaleY(35); lblExtractFileName.Caption:= ''; lblExtractFileName.Hide; // Create a label to show percentage ExtractFile:= TLabel.Create(WizardForm); ExtractFile.parent:=WizardForm.InstallingPage; ExtractFile.autosize:=false; ExtractFile.Width:= Width; ExtractFile.top:=lblExtractFileName.Top + ScaleY(16); ExtractFile.caption:= ''; ExtractFile.Hide; end; // Create a 'Cancel unpacking' button and hide it for now. btnCancelUnpacking:=TButton.create(WizardForm); btnCancelUnpacking.Parent:= WizardForm; btnCancelUnpacking.SetBounds(WizardForm.CancelButton.Left, WizardForm.CancelButton.top, WizardForm.CancelButton.Width, WizardForm.CancelButton.Height); btnCancelUnpacking.OnClick:= @btnCancelUnpackingOnClick; btnCancelUnpacking.Hide; end; const dURL=2; var URLLabel,URLLabelShadow:TLabel; procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload'; 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'; procedure URLLabelClick(Sender: TObject); var ErrorCode:integer; begin ShellExec('open','RePacK By Razer.','','',SW_SHOWNORMAL,ewNoWait,ErrorCode); end; procedure URLLabelMouseDown(Sender:TObject;Button:TMouseButton;Shift:TShiftState;X,Y:Integer); begin URLLabel.Top:=URLLabel.Top+dURL; URLLabel.Left:=URLLabel.Left+dURL; URLLabel.Font.Style:=URLLabel.Font.Style+[fsUnderline]; URLLabel.Font.Color:=$50B5C4; URLLabelShadow.Visible:=False; end; procedure URLLabelMouseUp(Sender:TObject;Button:TMouseButton;Shift:TShiftState;X,Y:Integer); begin URLLabel.Top:=URLLabel.Top-dURL; URLLabel.Left:=URLLabel.Left-dURL; URLLabel.Font.Style:=URLLabel.Font.Style-[fsUnderline]; URLLabel.Font.Color:=$708A7A; URLLabelShadow.Visible:=True; end; function InitializeSetup2:boolean; begin ExtractTemporaryFile('steam.cjstyles'); LoadSkin(ExpandConstant('{tmp}')+'\steam.cjstyles', ''); Result:=True; end; procedure InitializeWizard2; begin URLLabelShadow:=TLabel.Create(WizardForm); with URLLabelShadow do begin Top:=ScaleY(331); Left:=ScaleX(25); Caption:='RePacK By Razer.'; AutoSize:=True; Parent:=WizardForm; Transparent:=True; Font.Color:=$041207; Font.Size:=9; Font.Style:=Font.Style+[fsBold]; end; URLLabel:=TLabel.Create(WizardForm); with URLLabel do begin Top:=ScaleY(331)-dURL; Left:=ScaleX(25)-dURL; Caption:='RePacK By Razer.'; AutoSize:=True; Parent:=WizardForm; Cursor:=crHand; Transparent:=True; Font.Color:=$708A7A; Font.Size:=9; Font.Style:=Font.Style+[fsBold]; BringToFront; OnClick:=@URLLabelClick; OnMouseDown:=@URLLabelMouseDown; OnMouseUp:=@URLLabelMouseUp; end; ExtractTemporaryFile('f2816dea20121b76e98148413fa1b487.png'); ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\f2816dea20121b76e98148413fa1b487.png',1000,3000,1000,0,255,False,$FFFFFF,10); WizardForm.BeveledLabel.Enabled:=True; end; procedure DeinitializeSetup2; begin ShowWindow(WizardForm.Handle,0); UnloadSkin(); end; procedure CurStepChanged(CurStep: TSetupStep); begin CurStepChanged1(CurStep); end; procedure CurPageChanged(CurPageID: Integer); begin CurPageChanged1(CurPageID); end; procedure InitializeWizard(); begin InitializeWizard1(); InitializeWizard2(); end; function InitializeSetup(): Boolean; begin Result := InitializeSetup2(); if not Result then exit; end; procedure DeinitializeSetup(); begin DeinitializeSetup2(); end; [Tasks] Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons} [Run] Description: {cm:LaunchProgram, dirt3}; Filename: {app}\dirt3.exe; WorkingDir: {app}; Flags: nowait postinstall skipifsilent unchecked [Registry] Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Codemasters\DiRT3; ValueType: string; ValueName: PATH_APPLICATION; ValueData: {app}; Flags: uninsdeletekey |