Johny777, у меня другая проблема ISArcExtract:
Так вот написал так:
if not ISArcExtract ( 0, 0, ExpandConstant('{userdesktop}\RK14\RK\rk.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
компилированный сетапник с BIN-ами ищет то, что указано в коде {userdesktop}\RK14\RK\rk.arc и распаковывается, а Вот проблема в том, что я хочу на диск записывать и чтоб распаковалось из диска в HDD, компилированный сетапник с BIN-ами перенес в папку ISO, чтоб правильно тестировался финишной установки и можно смело записать на диск; запускаю из папки ISO компилированный сетап с BIN-ами, по поздним заданним путям из кода {userdesktop}\RK14\RK\rk.arc файл-архив rk.arc удалил, т.к. уже в внутри образа формата BIN-а, после нажатия "Установить" выдает такую ошибку: "Не найден ни одного файла ISArcExtract", но дело в том, что уже в внутри BIN-е, а не этим путям, как сделать так, что инсталлятор видел BIN-a сразу распаковался, а не из пути моего компьютера, т.е. {userdesktop}\RK14\RK\rk.arc (rk.arc удалил).
Johny777
24-07-2012, 01:19
alert30,
положи архив рядом с экзешником
юзай константу {src} (внешний)
кажись так
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\rk.arc'), ExpandConstant('{src}'), '', false, '', '', ExpandConstant('{src}'), notPCFonFLY {PCFonFLY}) then break;
======================================================
у меня возник вопрос
наткнулся на этап установки ssPreInstall
но кажется он не работает
в справке о нём ни слова (значит он одно из расширений)
выделил жирным в коде:
[Setup]
SourceDir=.
AppName=1
AppVerName=1
DefaultDirName={pf}\1
[code]
procedure CurStepChanged(CurStep: TSetupStep);
begin
case
CurStep of
ssPreInstall: MsgBox('Не работает?',mberror,MB_ok);
ssInstall: MsgBox('начало учтановки',mberror,MB_ok);
ssPostInstall: MsgBox('после установки',mberror,MB_ok);
ssDone: MsgBox('после завершения работы инсталла',mberror,MB_ok);
end;
end;
==================================================
а также улучшил код "фоновый рисунок в зависимости от разрешения" под свои нужнды
(блин, мои нужды - это один единственный инсталл)
было так:
[Setup]
AppName=AppName
AppVerName=AppVerName
DefaultDirName={pf}\AppName
[Files]
Source: 640.bmp; DestDir: {tmp}; Flags: dontcopy
Source: 800.bmp; DestDir: {tmp}; Flags: dontcopy
Source: 1024.bmp; DestDir: {tmp}; Flags: dontcopy
Source: 1152.bmp; DestDir: {tmp}; Flags: dontcopy
Source: 1280.bmp; DestDir: {tmp}; Flags: dontcopy
Source: 1600.bmp; DestDir: {tmp}; Flags: dontcopy
[code]
function GetDC(HWND: DWord): DWord;
external 'GetDC@user32.dll stdcall';
function GetDeviceCaps(DC: DWord; Index: Integer): Integer;
external 'GetDeviceCaps@gdi32.dll stdcall';
function ReleaseDC(HWND: DWord;DC: DWord): Integer;
external 'ReleaseDC@user32.dll stdcall';
function ShowWindow(hWnd: DWord; nCmdShow: Integer): boolean;
external 'ShowWindow@user32.dll stdcall';
function SetWindowLong(hWnd: DWord; nIndex: Integer; dwNewLong: Longint): Longint;
external 'SetWindowLongA@user32.dll stdcall';
procedure InitializeWizard();
var
bgImage : TBitmapImage;
bgImageName: String;
width: integer;
dc: DWord;
begin
bgImage:=TBitmapImage.Create(MainForm)
bgImage.Align:=alClient
bgImage.Stretch:=True
bgImage.Parent:=MainForm
dc:=GetDC(MainForm.Handle)
width:=GetDeviceCaps(dc,8)
ReleaseDC(MainForm.Handle,dc)
if width <=640 then
bgImageName:='640.bmp'
else if width<=800 then
bgImageName:='800.bmp'
else if width<=1024 then
bgImageName:='1024.bmp'
else if width<=1152 then
bgImageName:='1152.bmp'
else if width<=1280 then
bgImageName:='1280.bmp'
else
bgImageName:='1600.bmp'
ExtractTemporaryFile(bgImageName)
bgImage.bitmap.LoadFromFile(expandConstant('{tmp}\'+bgImageName))
SetWindowLong(MainForm.Handle,-16,$80000000)
ShowWindow(Mainform.Handle,SW_SHOWMAXIMIZED)
end;
недоработка кода выше это то что проверяется только ширина монитора
те при ширине на 16 9 = 1280 на 720 или 800(16 10) и при ширине 1280 на 1024(4 3)
будет одна и та же картинка
стало так:
[Setup]
AppName=AppName
AppVerName=AppVerName
DefaultDirName={pf}\AppName
[Files]
Source: Backgr_Pic\169.bmp; Flags: dontcopy solidbreak nocompression sortfilesbyextension
Source: Backgr_Pic\43.bmp; Flags: dontcopy solidbreak nocompression sortfilesbyextension
Source: Backgr_Pic\1610.bmp; Flags: dontcopy solidbreak nocompression sortfilesbyextension
Source: Backgr_Pic\finish.bmp; Flags: dontcopy solidbreak nocompression sortfilesbyextension
[code]
function GetDC(HWND: DWord): DWord; external 'GetDC@user32.dll stdcall';
function GetDeviceCaps(DC: DWord; Index: Integer): Integer; external 'GetDeviceCaps@gdi32.dll stdcall';
function ReleaseDC(HWND: DWord;DC: DWord): Integer; external 'ReleaseDC@user32.dll stdcall';
function ShowWindow(hWnd: DWord; nCmdShow: Integer): boolean; external 'ShowWindow@user32.dll stdcall';
function SetWindowLong(hWnd: DWord; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall';
procedure InitializeWizard();
var
bgImage : TBitmapImage;
bgImageName: String;
Width, Height: integer;
dc: DWord;
begin
dc := GetDC(MainForm.Handle);
Width := GetDeviceCaps(dc,8);
Height := GetDeviceCaps(dc,10);
ReleaseDC(MainForm.Handle,dc);
if ((Width = 1280) and (Height = 720)) or
((Width = 1366) and (Height = 768)) or
((Width = 1600) and (Height = 900)) or
((Width = 1920) and (Height = 1080)) or
((Width = 2560) and (Height = 1440))
then bgImageName := '169.bmp'
else
if ((Width = 1024) and (Height = 768)) or
((Width = 1152) and (Height = 864)) or
((Width = 1280) and (Height = 900)) or
((Width = 1280) and (Height = 1024)) or
((Width = 1600) and (Height = 1200))
then bgImageName := '43.bmp'
else
if ((Width = 1280) and (Height = 768)) or
((Width = 1280) and (Height = 800)) or
((Width = 1440) and (Height = 900)) or
((Width = 1600) and (Height = 1024)) or
((Width = 1680) and (Height = 1050))
then bgImageName := '1610.bmp'
else
if ((Width > 1920) and (Height > 1080))
then bgImageName := 'finish.bmp'
bgImage:=TBitmapImage.Create(MainForm)
with bgImage do
begin
Align := alClient;
Stretch := True;
Parent:=MainForm;
ExtractTemporaryFile(bgImageName);
Bitmap.LoadFromFile(expandConstant('{tmp}\'+ bgImageName))
end;
SetWindowLong(MainForm.Handle,-16,$80000000)
ShowWindow(Mainform.Handle,SW_SHOWMAXIMIZED)
end;
скорость обработки (4 if) высокая и точность
пользуйтесь кто хочет (выдрал у себя из кода)!
finish.bmp это если разрешение выше так называемого фулл хд
сделан учётом далёкого будущего
разрешение картинки 3840 на 2160
Это всё понятно.
Я же ясно написал, что с подключением в секциях [Files] и [Registry] проблем не возникает,
а проблема при подключении скриптов с кодом в секции [code]
Вот как подключить к основному скрипту этот
[CustomMessages]
HWREQProcessor=Процессор
HWREQVideoCard=Видеокарта
HWREQRamMemory=Оперативная память
HWREQSoundCard=Звуковая карта
HWREQSystem=Операционная система
HWREQError=Система не соответсвует требованиям.%nПроверьте компоненты, выделенные красным цветом.
HWREQErrorProc=Процессор не соответствует требуемому.%nНормальная работа не гарантируется.
HWREQErrorVideo=Видеокарта не соответствует требуемой.%nНормальная работа не гарантируется.
HWREQErrorRam=Оперативная память не соответствует требуемой.%nНормальная работа не гарантируется.
HWREQErrorSound=Звуковая карта не соответствует требуемой.%nНормальная работа не гарантируется.
HWREQErrorSys=Операционная система не соответствует требуемой.%nВозможны проблемы с запуском или сбои в работе.
HWREQPageCaption=Системные требования
HWREQPageDescription=Мастер установки проверяет систему.
HWREQPageInfo=Нажмите «Далее», чтобы продолжить, или «Отмена»,%nчтобы выйти из программы установки.
HWREQAllOk=Параметры системы соответсвуют требованиям.
HWREQCantFindDevice=Невозможно определить устройство.
HWREQCantFindWindows=Невозможно определить версию ОС.
[code]
type
THardwareRequirementSnapShot = record
ProcName: String;
ProcCount: Integer;
ProcFreq: Integer;
VideoName: String;
VideoFreq: Integer;
VideoPdm: String;
SoundName: String;
SoundCount: Integer;
RAMCount: Integer;
WinName: String;
WinBits: String;
WinVer: TWindowsVersion;
end;
TMemoryStatusEx = record
dwLength: DWORD;
dwMemoryLoad: DWORD;
LoTotalPhys: Integer;
HiTotalPhys: Integer;
LoAvailPhys: Integer;
HiAvailPhys: Integer;
LoTotalPageFile: Integer;
HiTotalPageFile: Integer;
LoAvailPageFile: Integer;
HiAvailPageFile: Integer;
LoTotalVirtual: Integer;
HiTotalVirtual: Integer;
LoAvailVirtual: Integer;
HiAvailVirtual: Integer;
LoAvailExtendedVirtual: Integer;
HiAvailExtendedVirtual: Integer;
end;
PDisplay_Device = record
cb: DWord;
DeviceName: array [0..31] of char;
DeviceString: array [0..127] of char;
StateFlags: DWord;
DeviceID, DeviceKey: array [0..127] of char;
end;
var
HWREQ: THardwareRequirementSnapShot;
HWREQPage: TWizardPage;
HWREQProc1, HWREQProc2, HWREQVid1, HWREQVid2, HWREQSound1, HWREQSound2,
HWREQRam1, HWREQRam2, HWREQWin1, HWREQWin2: TLabel;
HWREQInfoLabel, HWREQStatusLabel: TLabel;
HWREQFont: TFont;
SystemTest: Boolean;
SystemButton: TNewButton;
Test: Boolean;
const
HWREQ_NEED_PROC_FREQ = {#Processor};
HWREQ_NEED_VIDEO_FREQ = {#VideoCard};
HWREQ_NEED_RAM_FREQ = {#RamMemory};
HWREQ_NEED_SYSTEM = '{#System}';
function GlobalMemoryStatusEx(var lpBuffer: TMemoryStatusEx): Boolean; external 'GlobalMemoryStatusEx@kernel32.dll stdcall';
function EnumDisplayDevices(lpDevice, iDevNum: DWord; var lpDisplayDevice: PDisplay_Device; dwFlags: DWord): Boolean; external 'EnumDisplayDevicesA@user32.dll Stdcall';
//function GetSystemMetrics(nIndex: Integer): Integer; external 'GetSystemMetrics@user32.dll stdcall';
function GetDeviceCaps(hDC, nIndex: Integer): Integer; external 'GetDeviceCaps@GDI32 stdcall';
function CreateDC(lpDriverName, lpDeviceName, lpOutput: String; lpInitData: Integer): Integer; external 'CreateDCA@GDI32 stdcall';
function DelSp(s: string): string;
begin
while Pos(' ',s)>0 do StringChange(s,' ',' ');
Result:=Trim(s);
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;
function RoundUp(Num: Longint): Integer;
var i, k, t: Integer;
begin
i:= trunc(Num/64);
repeat
if ((64*i)<Num) then i:=i+1;
k:=trunc(i/2);
if ((k*2)<i) then i:=i+1;
until (not (64*i)<Num)and(not (k*2)<>i);
k:= 64*i; Result:= k;
end;
function DecodeSystemStr(Str: String): TWindowsVersion;
var tmp, s: string;
begin
tmp:= str;
s:= Copy(tmp, 1, Pos('.', tmp)-1)
Delete(tmp, 1, Pos('.', tmp));
if (s <> '') then Result.Major:= StrToInt(s);
s:= Copy(tmp, 1, Pos('.', tmp)-1)
Delete(tmp, 1, Pos('.', tmp));
if (s <> '') then Result.minor:= StrToInt(s);
s:= Copy(tmp, 1, Pos('.', tmp)-1)
Delete(tmp, 1, Pos('.', tmp));
if (s <> '') then Result.Build:= StrToInt(s);
s:= Copy(tmp, 1, Pos('.', tmp)-1)
Delete(tmp, 1, Pos('.', tmp));
if (s <> '') then Result.ServicePackMajor:= StrToInt(s);
end;
procedure HWREQ_Repaint();
begin
HWREQProc2.Caption:= HWREQ.ProcName+' @ '+IntToStr(HWREQ.ProcFreq)+ 'MHz'
HWREQVid2.Caption:= HWREQ.VideoName+' '+IntToStr(HWREQ.VideoFreq)+' Mb ('+HWREQ.VideoPdm+')'
HWREQSound2.Caption:= HWREQ.SoundName
HWREQRam2.Caption:= IntToStr(HWREQ.RAMCount)+' Mb'
HWREQWin2.Caption:= HWREQ.WinName+' '+HWREQ.WinBits+' ('+IntToStr(HWREQ.WinVer.Major)+'.'+IntToStr(HWREQ.WinVer.Minor)+'.'+IntToStr(HWREQ.WinVer.Build)+' Service Pack '+IntToStr(HWREQ.WinVer.ServicePackMajor)++')'
HWREQStatusLabel.Caption:= CustomMessage('HWREQAllOk')
end;
procedure HWREQ_UpdateInfo();
var
Keys: TArrayOfString; MS: TMemoryStatusEx;
DeviceKey, DeviceName: String; DeviceValue: Cardinal;
n, i, c1, c2, x, cur: Integer; WriteV: Boolean;
aKeys, bKeys, cKeys, Devices: TArrayOfString;
lpDisplayDevice: PDisplay_Device;
begin
SystemTest:=True;
if not RegQueryStringValue(HKLM, 'Hardware\Description\System\CentralProcessor\0', 'ProcessorNameString', DeviceName) then
DeviceName:=CustomMessage('HWREQCantFindDevice');
RegQueryDWordValue(HKLM, 'Hardware\Description\System\CentralProcessor\0', '~MHz', DeviceValue);
RegGetSubkeyNames(HKLM, 'Hardware\Description\System\CentralProcessor', Keys);
HWREQ.ProcName:= DelSP(DeviceName);
HWREQ.ProcFreq:= DeviceValue;
HWREQ.ProcCount:= GetArrayLength(Keys);
MS.dwLength := SizeOf(MS);
GlobalMemoryStatusEx(MS);
HWREQ.RAMCount:= RoundUp(Round(Size64(MS.HiTotalPhys, MS.LoTotalPhys)/(1024*1024)));
RegGetSubKeyNames(HKCU, 'Software\Microsoft\ActiveMovie\devenum', aKeys);
i:= GetArrayLength(aKeys);
if (i>0) then for c1:=i-1 downto 0 do begin
SetArrayLength(bKeys, 0); n:=0;
RegGetSubKeyNames(HKCU, 'Software\Microsoft\ActiveMovie\devenum\'+aKeys[c1], bKeys);
n:= GetArrayLength(bKeys);
if (n>0) then for c2:=n-1 downto 0 do begin
if RegQueryDWordValue(HKCU, 'Software\Microsoft\ActiveMovie\devenum\'+aKeys[c1]+'\'+bKeys[c2], 'WaveOutId', DeviceValue) then
if RegQueryStringValue(HKCU, 'Software\Microsoft\ActiveMovie\devenum\'+aKeys[c1]+'\'+bKeys[c2], 'FriendlyName', DeviceName)and(DeviceValue<10) then begin
x:= GetArrayLength(cKeys); SetArrayLength(cKeys, x+1); cKeys[x]:= DeviceName; Cur:=c1;
end;
end;
end;
SetArrayLength(bKeys, 0);
RegGetSubKeyNames(HKCU, 'Software\Microsoft\ActiveMovie\devenum\'+aKeys[Cur], bKeys);
i:= GetArrayLength(bKeys);
if (i>0) then for c1:=0 to i-1 do begin
if RegQueryStringValue(HKCU, 'Software\Microsoft\ActiveMovie\devenum\'+aKeys[Cur]+'\'+bKeys[c1], 'FriendlyName', DeviceName) then
for c2:= 0 to GetArrayLength(cKeys)-1 do
if (cKeys[c2]<>DeviceName)and(Pos(CKeys[c2], DeviceName)>0) then begin
StringChange(DeviceName, 'DirectSound:', ''); StringChange(DeviceName, 'S/PDIF', ''); StringChange(DeviceName, '()', '');
if (Pos('(', DeviceName)>0)and(Pos(')', DeviceName)>0) then DeviceName:= Copy(DeviceName, Pos('(', DeviceName)+1, Pos(')', DeviceName)-Pos('(', DeviceName)-1);
if DeviceName[1] = ' ' then Delete(DeviceName, 1, 1); x:= GetArrayLength(Devices); WriteV:= False;
if (x>0) then if (Devices[x-1]<>DeviceName) then WriteV:= True; if (x=0) then WriteV:= True;
if WriteV then begin SetArrayLength(Devices, x+1); Devices[x]:= DeviceName; end;
end;
end;
n:= GetArrayLength(Devices); HWREQ.SoundCount:=n; HWREQ.SoundName:='';
if (n>0) then HWREQ.SoundName:= Devices[0] else
HWREQ.SoundName:= CustomMessage('HWREQCantFindDevice');
if not RegQueryStringValue(HKLM, 'Software\Microsoft\Windows NT\CurrentVersion', 'ProductName', DeviceName) then
DeviceName:= CustomMessage('HWREQCantFindWindows');
HWREQ.WinName:= DelSP(DeviceName);
GetWindowsVersionEx(HWREQ.WinVer);
if IsWin64 then HWREQ.WinBits:= 'x64' else HWREQ.WinBits:= 'x86';
lpDisplayDevice.cb := SizeOf(lpDisplayDevice);
DeviceKey:= ''; n:= 0;
while not (EnumDisplayDevices(0, n, lpDisplayDevice, 0)and(lpDisplayDevice.StateFlags and 4 > 0))and(n < 127) do n:= n+1;
for n := 0 to 127 do DeviceKey:= DeviceKey + lpDisplayDevice.DeviceKey[n];
Delete(DeviceKey, Pos(Chr(0), DeviceKey), 127);
StringChange(DeviceKey, '\Registry\Machine\', '');
i := 1; DeviceValue := 0;
if RegQueryBinaryValue(HKLM, DeviceKey, 'HardwareInformation.MemorySize', DeviceName) then
for n := 1 to Length(DeviceName) do
begin
DeviceValue := DeviceValue + Ord(DeviceName[n])*i;
i := i*$100;
end else
if not RegQueryDWordValue(HKLM, DeviceKey, 'HardwareInformation.MemorySize', DeviceValue) then
RegQueryDWordValue(HKLM, DeviceKey + '\Info', 'VideoMemory', DeviceValue);
DeviceName:= '';
for n := 0 to 127 do DeviceName := DeviceName + lpDisplayDevice.DeviceString[n];
Delete(DeviceName, Pos( Chr(0), DeviceName ), 127);
HWREQ.VideoName:= DelSP(DeviceName);
HWREQ.VideoFreq:= RoundUp(DeviceValue/(1024*1024));
HWREQ.VideoPdm:= IntToStr(GetSystemMetrics(0))+'x'+IntToStr(GetSystemMetrics(1))+' ('+IntToStr(GetDeviceCaps(CreateDC('DISPLAY','','',0),14)*GetDeviceCaps(CreateDC('DISPLAY','','',0), 12))+' bit)';
if HWREQ.VideoName='' then HWREQ.VideoName:= CustomMessage('HWREQCantFindDevice');
end;
function HWREQ_CompareProcessor(): Boolean;
begin
Result:= False;
if HWREQ.ProcName <> CustomMessage('HWREQCantFindDevice') then
if HWREQ_NEED_PROC_FREQ <= (HWREQ.ProcCount*HWREQ.ProcFreq) then
Result:= True;
end;
function HWREQ_CompareVideo(): Boolean;
begin
Result:= False;
if HWREQ.VideoName <> CustomMessage('HWREQCantFindDevice') then
if HWREQ_NEED_VIDEO_FREQ <= HWREQ.VideoFreq then
Result:= True;
end;
function HWREQ_CompareSound(): Boolean;
begin
Result:= False;
If HWREQ.SoundCount <> 0 then
if HWREQ.SoundName <> CustomMessage('HWREQCantFindDevice') then
Result:= True;
end;
function HWREQ_CompareRAM(): Boolean;
begin
Result:= False;
if HWREQ_NEED_RAM_FREQ <= HWREQ.RAMCount then
Result:= True;
end;
function HWREQ_CompareWindows(): Boolean;
var tmp: TWindowsVersion;
begin
Result:= False;
tmp:= DecodeSystemStr(HWREQ_NEED_SYSTEM)
if HWREQ.WinVer.NTPlatform then begin
if (tmp.Major <= HWREQ.WinVer.Major) then
if (tmp.Minor <= HWREQ.WinVer.Minor) then
if (tmp.Build <= HWREQ.WinVer.Build) then
if (tmp.ServicePackMajor <= HWREQ.WinVer.ServicePackMajor) then
Result:= True;
end;
end;
procedure HWREQ_Testing();
begin
Test:= True;
HWREQStatusLabel.Font.Color:= clLime;
if not HWREQ_CompareProcessor then begin Test:= False; HWREQProc2.Font.Color:= clRed; end;
if not HWREQ_CompareVideo then begin Test:= False; HWREQVid2.Font.Color:= clRed; end;
if not HWREQ_CompareSound then begin Test:= False; HWREQSound2.Font.Color:= clRed; end;
if not HWREQ_CompareRAM then begin Test:= False; HWREQRam2.Font.Color:= clRed; end;
if not HWREQ_CompareWindows then begin Test:= False; HWREQWin2.Font.Color:= clRed; end;
if not Test then begin HWREQStatusLabel.Font.Color:= clRed; HWREQStatusLabel.Caption:= CustomMessage('HWREQError') end;
end;
// Начало Действие кнопки "Система"
procedure SystemButtonOnClick(Sender: TObject);
begin
if SystemTest then
begin
#ifdef PlaySFX
sndPlaySound(ExpandConstant('{tmp}\LClick.wav'),$0001);
#endif
HWREQStatusLabel.Caption := 'Минимальные системные требования';
HWREQStatusLabel.Font.Color:=clBlue;
HWREQProc2.Caption := 'Минимальная частота: {#Processor} MHz';
HWREQProc2.Font.Color:=clWhite//clBlack;
HWREQVid2.Caption := 'Минимальная видео память: {#VideoCard} Mb';
HWREQVid2.Font.Color:=clWhite//clBlack;
HWREQSound2.Caption := 'Минимальная память ОЗУ: {#RamMemory} Mb';
HWREQSound2.Font.Color:=clWhite//clBlack;
HWREQSound1.Caption:= CustomMessage('HWREQRamMemory');
HWREQRam1.hide;
HWREQRam2.hide;
HWREQWin1.hide;
HWREQWin2.hide;
SystemTest:=False;
end
else
begin
#ifdef PlaySFX
sndPlaySound(ExpandConstant('{tmp}\RClick.wav'),$0001);
#endif
HWREQRam1.show;
HWREQRam2.show;
HWREQWin1.show;
HWREQWin2.show;
HWREQSound1.Caption:= CustomMessage('HWREQSoundCard');
HWREQSound1.show;
HWREQSound2.show;
HWREQ_UpdateInfo;
HWREQ_Repaint;
HWREQ_Testing;
end;
end;
// Конец Действие кнопки "Система"
procedure HWREQ_CreatePanelSimple(AFont: TFont);
var
AFirstLeft, ASecondLeft, ATop, AFirstWidth, ASecondWidth, AHeight: Integer; Test: Boolean; AParent: TWinControl;
begin
HWREQ_UpdateInfo;
HWREQPage:= CreateCustomPage(wpWelcome, CustomMessage('HWREQPageCaption'), CustomMessage('HWREQPageDescription'));
AParent:= HWREQPage.Surface; AFirstLeft:=0; ATop:=ScaleY(40);
if (WizardForm.InnerNotebook.Visible = False)or(WizardForm.OuterNotebook.Visible = False) then
begin AFirstLeft:=ScaleX(40); ATop:=ScaleY(112); AParent:= WizardForm; end;
AFirstWidth:= (WizardForm.Width-ScaleX(90))/3;
ASecondWidth:= ((WizardForm.Width-ScaleX(90))*2/3);
ASecondLeft:= AFirstLeft+AFirstWidth+ScaleX(5);
if AFont <> nil then HWREQFont:= AFont else HWREQFont:= WizardForm.Font;
AHeight:= (HWREQFont.Size*2)+2;
// Начало Создание кнопки Система.
SystemButton := TNewButton.Create(HWREQPage);
with SystemButton do begin
Caption := 'Система';
Left:=338;
Top:=300;
Width:=79;
Height:=25;
OnClick:=@SystemButtonOnClick
#ifdef PlaySFX
OnMouseEnter:=@MouseEnter;
#endif
Cursor := crHand;
Parent:= AParent;
ShowHint := True;
Hint:= 'Показать "Cведения о системе"/Показать "Системные требования"'
end;
// Конец Создание кнопки Система.
HWREQInfoLabel:= TLabel.Create(HWREQPage)
with HWREQInfoLabel do begin
SetBounds(ScaleX(5), ScaleY(300), ScaleX(487), ScaleY(35));
Transparent:= True
AutoSize:= False
Font.Style:=[fsBold];
Font.Size:= 9;
Caption:= CustomMessage('HWREQPageInfo')
Font.Color:=clWhite; //
Parent:= AParent;
end;
//================= Начало - Процессор =================//
HWREQProc1:= TLabel.Create(HWREQPage)
with HWREQProc1 do begin
SetBounds(ScaleX(5), ScaleY(50), ScaleX(150), ScaleY(22));
Alignment:= taCenter;
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=clBlue;
Font.Style:=[fsBold];
Caption := CustomMessage('HWREQProcessor');
Parent:= AParent;
end;
HWREQProc2:= TLabel.Create(HWREQPage)
with HWREQProc2 do begin
SetBounds(ScaleX(5), ScaleY(70), ScaleX(300), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=clWhite//clBlack;
Font.Style:=[fsBold];
Parent:= AParent;
end;
//================= Конец - Процессор =================//
//================= Начало - Видеоадаптер =================//
HWREQVid1:= TLabel.Create(HWREQPage)
with HWREQVid1 do begin
AutoSize:=True;
SetBounds(ScaleX(5), ScaleY(100), ScaleX(150), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=clBlue;
Font.Style:=[fsBold];
Caption:= CustomMessage('HWREQVideoCard');
Parent:= AParent;
end;
HWREQVid2:= TLabel.Create(HWREQPage)
with HWREQVid2 do begin
AutoSize:=True;
SetBounds(ScaleX(5), ScaleY(120), ScaleX(300), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=clWhite//clBlack;
Font.Style:=[fsBold];
Parent:= AParent;
end;
//================= Конец - Видеоадаптер =================//
//================= Начало - Звуковая карта =================//
HWREQSound1:= TLabel.Create(HWREQPage)
with HWREQSound1 do begin
AutoSize:=True;
SetBounds(ScaleX(5), ScaleY(150), ScaleX(150), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=clBlue;
Font.Style:=[fsBold];
Caption:= CustomMessage('HWREQSoundCard');
Parent:= AParent;
end;
HWREQSound2:= TLabel.Create(HWREQPage)
with HWREQSound2 do begin
AutoSize:=True;
SetBounds(ScaleX(5), ScaleY(170), ScaleX(300), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=clWhite//clBlack;
Font.Style:=[fsBold];
Parent:= AParent;
end;
//================= Конец - Звуковая карта =================//
//================= Начало - ОЗУ =================//
HWREQRam1:= TLabel.Create(HWREQPage)
with HWREQRam1 do begin
AutoSize:=True;
SetBounds(ScaleX(5), ScaleY(200), ScaleX(150), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=clBlue;
Font.Style:=[fsBold];
Caption:= CustomMessage('HWREQRamMemory');
Parent:= AParent;
end;
HWREQRam2:= TLabel.Create(HWREQPage)
with HWREQRam2 do begin
AutoSize:=True;
SetBounds(ScaleX(5), ScaleY(220), ScaleX(300), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=clWhite//clBlack;
Font.Style:=[fsBold];
Parent:= AParent;
end;
//================= Конец - ОЗУ =================//
//================= Начало - Операционная система =================//
HWREQWin1:= TLabel.Create(HWREQPage)
with HWREQWin1 do begin
AutoSize:=True;
SetBounds(ScaleX(5), ScaleY(250), ScaleX(150), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=clBlue;
Font.Style:=[fsBold];
Caption:= CustomMessage('HWREQSystem');
Parent:= AParent;
end;
HWREQWin2:= TLabel.Create(HWREQPage)
with HWREQWin2 do begin
AutoSize:=True;
SetBounds(ScaleX(5), ScaleY(270), ScaleX(400), ScaleY(22));
Transparent:=True;
Font.Name:= 'Arial';
Font.Size:= 9;
Font.Color:=clWhite//clBlack;
Font.Style:=[fsBold];
Parent:= AParent;
end;
//================= Конец - Операционная система =================//
HWREQStatusLabel:= TLabel.Create(HWREQPage)
with HWREQStatusLabel do begin
SetBounds(ScaleX(5), ScaleY(0), ScaleX(487), ScaleY(35));
Transparent:= True;
AutoSize:= True;
Font.Size:= 9;
Font.Style:=[fsBold];
Font.Color:= clWhite//clWhiteclBlack;
Parent:= AParent;
HWREQ_UpdateInfo;
HWREQ_Repaint;
HWREQ_Testing;
end;
end;
procedure HWREQ_UpdatePage(CurPageID: Integer);
begin
HWREQInfoLabel.Hide; HWREQStatusLabel.Hide;
HWREQProc1.Hide; HWREQProc2.Hide;
HWREQVid1.Hide; HWREQVid2.Hide;
HWREQSound1.Hide; HWREQSound2.Hide;
HWREQRam1.Hide; HWREQRam2.Hide;
HWREQWin1.Hide; HWREQWin2.Hide;
if CurPageID = HWREQPage.ID then begin
HWREQInfoLabel.Show; HWREQStatusLabel.Show;
HWREQProc1.Show; HWREQProc2.Show;
HWREQVid1.Show; HWREQVid2.Show;
HWREQSound1.Show; HWREQSound2.Show;
HWREQRam1.Show; HWREQRam2.Show;
HWREQWin1.Show; HWREQWin2.Show;
end;
end;
Что и как прописать в секцию [code] основного скрипта, что бы ино этот файл подхватил при компиляции инстала.
этот скрипт лежит в папке SYSTEST\SystemTest.iss
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.