Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-04-2013, 23:08
mausschieber's Avatar
mausschieber mausschieber is offline
Conversion Designer
 
Join Date: Jan 2011
Location: germany
Posts: 4,375
Thanks: 6,810
Thanked 11,858 Times in 3,283 Posts
mausschieber is on a distinguished road
How can i solve this

the error is in both versions
I have read many treads
but no solution found
so I hope you can help me
oh and my system is win7 64bit
my video card has 4GB

Thanks in advance







[Code]
#define processor "2000"
#define videoram "255500000"
#define ram "2047"
#define pagefile "756"

[Setup]
AppName=System Check
AppVerName=System Check
DefaultDirName={pf32}\System Check

[Files]
Source: C:\Program Files (x86)\Inno Setup 5\get_hw_caps.dll; Flags: dontcopy

[Code]
function GetVideoCardName(): PansiChar; external 'hwc_GetVideoCardName@files:get_hw_caps.dll stdcall';
function GetSoundCardName(): PansiChar; external 'hwc_GetSoundCardName@files:get_hw_caps.dll stdcall';
function DetectHardware(): Integer; external 'hwc_DetectHardware@files:get_hw_caps.dll stdcall';
function GetHardDriveFreeSpace(hdd: integer): Integer; external 'hwc_GetHardDriveFreeSpace@files:get_hw_caps.dll stdcall';
function GetHardDriveName(hdd: integer): PansiChar; external 'hwc_GetHardDriveName@files:get_hw_caps.dll stdcall';
function GetHardDriveTotalSpace(hdd: integer): Integer; external 'hwc_GetHardDriveTotalSpace@files:get_hw_caps.dll stdcall';
function GetHardDrivesCount(): Integer; external 'hwc_GetHardDrivesCount@files:get_hw_caps.dll stdcall';
function GetSoundCards(): Integer; external 'hwc_GetSoundCards@files:get_hw_caps.dll stdcall';
function GetSystemPage(): Integer; external 'hwc_GetSystemPage@files:get_hw_caps.dll stdcall';
function GetSystemPhys(): Integer; external 'hwc_GetSystemPhys@files:get_hw_caps.dll stdcall';
function GetVidMemLocal(): Integer; external 'hwc_GetVidMemLocal@files:get_hw_caps.dll stdcall';
function GetVidMemNonLocal(): Integer; external 'hwc_GetVidMemNonLocal@files:get_hw_caps.dll stdcall';
function GetVideoCardDev(): Integer; external 'hwc_GetVideoCardDev@files:get_hw_caps.dll stdcall';
function GetVideoCardVen(): Integer; external 'hwc_GetVideoCardVen@files:get_hw_caps.dll stdcall';

function CheckSystemPage(PreviousPageId: Integer): Integer;
var
Page: TWizardPage;
ProcessorName:string;
Processor,ProcessorNamePanel,VideoCardNamePanel,Vi deoCardPanel,AudioCardNamePanel,RAMTotalPanel,Page FileTotalPanel,AudioCardPanel,RAMPanel,PageFilePan el: TMemo;
ProcessorMHZ: Cardinal;
StaticText,StaticText2:TNewStaticText;
oneGhz,oneMB,Rest:Integer;
begin
RegQueryStringValue(HKLM, 'HARDWARE\DESCRIPTION\System\CentralProcessor\0',' ProcessorNameString', ProcessorName);
RegQueryDWordValue(HKLM, 'HARDWARE\DESCRIPTION\System\CentralProcessor\0',' ~MHz', ProcessorMHZ);
GetVidMemLocal;
GetSoundCards;
oneGhz:=1000;
Rest:=ProcessorMHZ - oneGhz;
oneMB:=1024*1024;

Page := CreateCustomPage(PreviousPageId,'Hardware','Setup hat die folgenden Voraussetzungen erkannt');

StaticText:=TNewStaticText.Create(Page);
with StaticText do begin
Parent:=Page.Surface;
Caption:='Alle Komponenten erfüllen die Anforderungen des Spiels.';
Left:=0;
Top:=5;
AutoSize:=True;
end;

StaticText2:=TNewStaticText.Create(Page);
with StaticText2 do begin
Parent:=Page.Surface;
Caption:='Wenn Sie bereit sind fortzufahren, klicken Sie auf "Weiter"'
Left:=0;
Top:=220;
AutoSize:=True;
end;

Processor := TMemo.Create(Page);
with Processor do begin
Parent := Page.Surface;
Lines.Add(ExpandConstant(' Prozessor'));
Color := -16777194;
Left := ScaleX(0);
Top := ScaleY(32);
Width := ScaleX(104);
Height := ScaleY(21);
ReadOnly := True;
Cursor := crArrow;
end;

ProcessorNamePanel := TMemo.Create(Page);
with ProcessorNamePanel do begin
Parent := Page.Surface;
Lines.Add(' '+ProcessorName+' '+IntToStr(ProcessorMHZ/oneGhz)+','+IntToStr(Rest)+'GHz'+' '+'@'+IntToStr(ProcessorMHZ)+'MHz');
Left := ScaleX(109);
Top := ScaleY(32);
Width := ScaleX(304);
Height := ScaleY(21);
Color := $CCFFCC;
ReadOnly := True;
Cursor := crArrow;
end;

//CPU-Geschwindigkeit//
if ProcessorMHZ<{#processor} then begin
ProcessorNamePanel.Color:=clred;
StaticText.Caption:='Komponenten in rot erfüllen nicht die Anforderungen des Spiels.';
end;

VideoCardPanel:=TMemo.Create(Page);
with VideoCardPanel do begin
Parent := Page.Surface;
Lines.Add(ExpandConstant(' Grafikkarte'));
Color := -16777194;
Left:=ScaleX(0);
Top:=Processor.Top+27;
Width:=ScaleX(104);
Height:=ScaleY(21);
ReadOnly := True;
Cursor := crArrow;
end;

VideoCardNamePanel:=TMemo.Create(Page);
with VideoCardNamePanel do begin
Parent:=Page.Surface;
Lines.Add(' '+GetVideoCardName+' '+IntToStr(GetVidMemLocal/oneMB)+' MB');
Left:=ScaleX(109);
Top:=VideoCardPanel.Top;
Width:=ScaleX(304);
Height:=ScaleY(21);
Color := $CCFFCC;
ReadOnly := True;
Cursor := crArrow;
end;

//Video Memory//
if GetVidMemLocal<{#videoram} then begin
StaticText.Caption:='Komponenten in rot erfüllen nicht die Anforderungen des Spiels.';
VideoCardNamePanel.Color:=clred;
end

; AudioCardPanel:=TMemo.Create(Page);
with AudioCardPanel do begin
Parent := Page.Surface;
Lines.Add(ExpandConstant(' Soundkarte'));
Color := -16777194;
Left := ScaleX(0);
Top:=VideoCardPanel.Top+27;
Width := ScaleX(104);
Height := ScaleY(21);
ReadOnly := True; Cursor := crArrow;
end;

AudioCardNamePanel:=TMemo.Create(Page);
with AudioCardNamePanel do begin
Parent:=Page.Surface;
Lines.Add(' '+GetSoundCardName);
Left:=ScaleX(109);
Top:=AudioCardPanel.Top;
Width:=ScaleX(304);
Height:=ScaleY(21);
Color := $CCFFCC;
ReadOnly := True;
Cursor := crArrow;
end;

//Audio//
if GetSoundCards=0 then begin
StaticText.Caption:='Komponenten in rot erfüllen nicht die Anforderungen des Spiels.';
with
AudioCardNamePanel do begin
Color:=clred;
Lines.Add('nicht gefunden');
ReadOnly := True; Cursor := crArrow;
end;
end;

RAMPanel:=TMemo.Create(Page);
with RAMPanel do begin
Parent := Page.Surface;
Lines.Add(ExpandConstant(' RAM'));
Color := -16777194;
Left := ScaleX(0);
Top:=AudioCardPanel.Top+27;
Width := ScaleX(104);
Height := ScaleY(21);
ReadOnly := True;
Cursor := crArrow;
end;

RAMTotalPanel:=TMemo.Create(Page);
with RAMTotalPanel do begin
Parent:=Page.Surface;
Lines.Add(' '+IntToStr(GetSystemPhys+1) +' MB');
Left:=AudioCardNamePanel.Left;
Top:=RAMPanel.Top;
Width:=AudioCardNamePanel.Width;
Height:=ScaleY(21);
Color := $CCFFCC;
ReadOnly := True;
Cursor := crArrow;
end;

//RAM//
if GetSystemPhys+1<{#ram} then begin
RAMTotalPanel.Color:=clred;
StaticText.Caption:='Komponenten in rot erfüllen nicht die Anforderungen des Spiels.';
end;

PageFilePanel:=TMemo.Create(Page);
with PageFilePanel do begin
Parent := Page.Surface;
Lines.Add(ExpandConstant(' Auslagerungsdatei'));
Color := -16777194;
Left := ScaleX(0);
Top:=RAMPanel.Top+27;
Width := ScaleX(104);
Height := ScaleY(21);
ReadOnly := True;
Cursor := crArrow;
end;

PageFileTotalPanel:=TMemo.Create(Page);
with PageFileTotalPanel do begin
Parent:=Page.Surface;
Lines.Add(' '+IntToStr(GetSystemPage)+' MB');
Left:=RAMTotalPanel.Left;
Top:=PageFilePanel.Top;
Width:=RAMTotalPanel.Width;
Height:=ScaleY(21);
Color := $CCFFCC;
ReadOnly := True; Cursor := crArrow;
end;

//Auslagerungsdatei//
if GetSystemPage<{#pagefile} then begin
PageFileTotalPanel.Color:=clred;
StaticText.Caption:='Komponenten in rot erfüllen nicht die Anforderungen des Spiels.';
end;

Result:=Page.ID;
end;

procedure InitializeWizard();
begin
CheckSystemPage(wpWelcome);
end;
[LangOptions]
LanguageName=German
LanguageID=$0407

Last edited by mausschieber; 05-04-2013 at 23:47. Reason: Code insert
Reply With Quote
The Following 2 Users Say Thank You to mausschieber For This Useful Post:
zougjaysean (21-06-2013)
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -7. The time now is 08:57.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com