Попробывал я заменить Listbox на ListboxNew, ни чо не выходит !
Еу вы вот сами попробуйте это сделать ! Значит я просто криворукий и нне чо в этом не смыслю, так помогите же криворукому, не для этого ли форуму создаются? ;(
Добавлено: Ошибка происходит не при компилляции проекта тоесть в инно... А уже в скомпллированом Setup.exe тоесть при инсталляции ! ! ! Вот посмотрите мой код:
[more]
[Setup]
AppName=Counter-Strike
AppVerName=Counter-Strike 6.0
AppPublisher=Forslay™ Incorporated, 2007
AppPublisherURL=http://ataka.muravlenko.ru:8080
AppSupportURL=http://ataka.muravlenko.ru:8080
AppUpdatesURL=http://ataka.muravlenko.ru:8080
AppID={{066335C3-D554-4EF2-8339-281B2922BCEE}
AppMutex={{066335C3-D554-4EF2-8339-281B2922BCEE}
AppVersion=6.0
AppCopyright=Forslay™ Inc, 2007 ©
AppComments=Лучшая модификация игры 2007 года.
AppContact=Forslay@inbox.ru (Шаклеин Павел)
VersionInfoTextVersion=6.0
VersionInfoCopyright=Forslay™ Inc, 2007 ©
VersionInfoCompany=Forslay™ Incorporated, 2007 ©
VersionInfoVersion=6.0
OutputBaseFilename=CS
OutputDir=C:\Documents and Settings\Администратор\Рабочий стол
LicenseFile=C:\Program Files\Inno Setup 5\Information\License.rtf
InfoBeforeFile=C:\Program Files\Inno Setup 5\Information\INFO-1.rtf
InfoAfterFile=C:\Program Files\Inno Setup 5\Information\INFO-2.rtf
DefaultDirName={pf}\sX89 Clan\Games\Counter-Strike
DefaultGroupName=sX89 Clan\Games\Counter-Strike
SetupIconFile=C:\Program Files\Inno Setup 5\Ico\Steam.ico
AllowNoIcons=true
WizardImageFile=C:\Program Files\Inno Setup 5\Wizards\1.bmp
WizardSmallImageFile=C:\Program Files\Inno Setup 5\Wizards\2.bmp
ChangesEnvironment=true
ChangesAssociations=true
AlwaysShowDirOnReadyPage=true
AlwaysShowGroupOnReadyPage=true
ShowTasksTreeLines=true
UsePreviousUserInfo=true
Encryption=true
Password=sX89 Clan
Compression=lzma/ultra64
InternalCompressLevel=ultra64
SolidCompression=true
UserInfoPage=true
UninstallDisplayName=Counter-Strike ™
PrivilegesRequired=poweruser
UninstallDisplayIcon={app}\valve\resource\UI\Uninstall.ico
UninstallRestartComputer=true
ShowUndisplayableLanguages=true
SetupLogging=false
AllowRootDirectory=true
DisableStartupPrompt=false
[Messages]
BeveledLabel=Forslay™ Incorporated, 2007 ©
[Languages]
Name: Rus; MessagesFile: compiler:Languages\Russian.isl
[Types]
Name: custom; Description: Обычная установка; Flags: iscustom
Name: full; Description: Полная установка
Name: fps; Description: Компоненты для слабых машин
[Components]
Name: cstrike; Description: Counter-Strike ™; Types: custom full; Flags: fixed
Name: eng; Description: Английская версия; Types: custom full; Flags: exclusive
Name: rus; Description: Русская версия; Types: custom full; Flags: exclusive
Name: HLTV; Description: Компоненты Half Life TV; Types: full
Name: Maps; Description: Набор дополнительных карт; Types: full
Name: Config; Description: Конфигурация игры для повышения FPS в игре; Types: FPS full
Name: Weapons; Description: Низкополигонные модели оружия. (Рекомендуется для слабых машин, повышает FPS); Types: FPS full
Name: Players; Description: Низкополигонные модели скинов игроков. (Рекомендуется для слабых машин, повышает FPS); Types: FPS full
Name: DirectX; Description: Обновление системы для Windows - DirectX 9.0 C [2007]; Types: custom full
[Run]
Components: Config; Filename: {src}\Data\System\Counter-Strike\Components\UnRAR.exe; WorkingDir: {src}\Data\System\Counter-Strike\Components; Parameters: "x -O+ Config - High FPS.rar""{app}\valve"""; StatusMsg: Настройка конфигурации системы для повышения FPS в игре...; Flags: waituntilterminated
Components: Weapons; Filename: {src}\Data\System\Counter-Strike\Components\UnRAR.exe; WorkingDir: {src}\Data\System\Counter-Strike\Components; Parameters: "x -O+ HLTV - Models.rar""{app}\cstrike"""; StatusMsg: Установка низкополигонных моделей оружия...; Flags: waituntilterminated
Components: Players; Filename: {src}\Data\System\Counter-Strike\Components\UnRAR.exe; WorkingDir: {src}\Data\System\Counter-Strike\Components; Parameters: "x -O+ FPS - Models.rar""{app}\cstrike"""; StatusMsg: Установка низкополигонных моделей игроков...; Flags: waituntilterminated
Components: HLTV; Filename: {src}\Data\System\Counter-Strike\Components\Unrar.exe; WorkingDir: {src}\Data\System\Counter-Strike\Components; Parameters: "x -O+ HLTV.rar ""{app}\"""; StatusMsg: Установка HLTV компонентов...; Flags: waituntilterminated
Components: Maps; Filename: {src}\Data\System\Counter-Strike\Components\Maps.exe; WorkingDir: {src}\Data\System\Counter-Strike\Components; Parameters: "-y -o""{app}\"""; StatusMsg: Установка дополнительных карт...; Flags: waituntilterminated
Components: DirectX; Filename: {src}\Data\System\DirectX\DX Setup.exe; WorkingDir: {src}\Data\System\DirectX\; Parameters: /silent; StatusMsg: Обновление системы Direct-X...; Flags: waituntilterminated
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Components: ; Languages:
[Icons]
Name: {userdesktop}\Counter-Strike; Filename: {app}\Counter-Strike.exe; Tasks: desktopicon; IconFilename: {app}\valve\resource\UI\cs.ico; Components: ; Languages: ; IconIndex: 0; WorkingDir: {app}
Name: {group}\Counter-Strike; Filename: {app}\Counter-Strike.exe; IconFilename: {app}\valve\resource\UI\cs.ico; Comment: Запуск игры; IconIndex: 0; WorkingDir: {app}
Name: {group}\Сайт разработчиков; Filename: {app}\cstrike\dlls\Website.url; IconFilename: {app}\valve\resource\UI\Attack.ico; Comment: Зайти на домашнюю страницу проекта; Components: ; Tasks: ; Languages: ; IconIndex: 0
Name: {group}\Удаление игры; Filename: {uninstallexe}; IconFilename: {app}\valve\resource\UI\Uninstall.ico; Comment: Деинсталляция игры; Components: ; Tasks: ; Languages: ; IconIndex: 0
[Files]
Components: rus; Source: C:\Rus\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
Components: eng; Source: C:\Eng\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
Components: cstrike; Source: ..\..\..\Counter-Strike\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; AfterInstall: Progress()
Source: ..\..\..\Counter-Strike\Counter-Strike.exe; DestDir: {app}; DestName: Counter-Strike.exe; AfterInstall: Progress(); Flags: ignoreversion; Components:
Source: ..\..\..\Counter-Strike\cstrike\config.cfg; DestDir: {app}\cstrike; DestName: config.cfg; Flags: ignoreversion; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\Websites\website.url; DestDir: {app}\cstrike\dlls; DestName: Website.url; Flags: noencryption nocompression; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\Media\sound.mp3; DestDir: {tmp}; DestName: sound.mp3; Flags: noencryption nocompression solidbreak dontcopy; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\Wizards\splash.bmp; DestDir: {tmp}; Flags: noencryption nocompression solidbreak dontcopy; DestName: splash.bmp; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\Media\splash.wav; DestDir: {tmp}; Flags: noencryption nocompression solidbreak dontcopy; DestName: splash.wav; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\Wizards\1.bmp; DestDir: {tmp}; DestName: 1.bmp; Flags: noencryption nocompression solidbreak dontcopy; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\Wizards\2.bmp; DestDir: {tmp}; DestName: 2.bmp; Flags: noencryption nocompression solidbreak dontcopy; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\Wizards\3.bmp; DestDir: {tmp}; DestName: 3.bmp; Flags: noencryption nocompression solidbreak dontcopy; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\Wizards\MusicButton.bmp; DestDir: {tmp}; DestName: MusicButton.bmp; Flags: noencryption nocompression solidbreak dontcopy; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\cursors\DesertEagle-Backround.ani; DestDir: {tmp}; Flags: noencryption nocompression solidbreak dontcopy; DestName: DesertEagle-Backround.ani; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\Ico\Uninstall.ico; DestDir: {app}\valve\resource\UI; DestName: Uninstall.ico; Flags: noencryption nocompression; AfterInstall: Progress()
Source: ..\..\..\Counter-Strike\valve\resource\UI\CS.ico; DestDir: {app}\valve\resource\UI; DestName: CS.ico; Flags: noencryption nocompression; AfterInstall: Progress()
Source: ..\..\..\Counter-Strike\valve\resource\UI\Attack.ico; DestName: Attack.ico; Flags: noencryption nocompression; DestDir: {app}\valve\resource\UI; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\Information\License.rtf; DestDir: {tmp}; DestName: License.rtf; Flags: noencryption nocompression solidbreak dontcopy; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\Information\INFO-1.rtf; DestDir: {tmp}; DestName: INFO-1.rtf; Flags: dontcopy noencryption nocompression solidbreak; Components: ; Tasks: ; Languages:
Source: ..\..\..\Program Files\Inno Setup 5\Information\INFO-2.rtf; DestDir: {tmp}; DestName: INFO-2.rtf; Flags: dontcopy noencryption nocompression solidbreak; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\DLL\AdvSplash.dll; DestDir: {sys}; DestName: ADVSPLASH.dll; Flags: noencryption nocompression solidbreak dontcopy; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\DLL\BASS.dll; DestDir: {sys}; DestName: BASS.dll; Flags: noencryption nocompression solidbreak dontcopy; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\DLL\callnsis.dll; DestDir: {sys}; DestName: CALLNSIS.dll; Flags: noencryption nocompression solidbreak dontcopy; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\DLL\get_hw_caps.dll; DestDir: {sys}; DestName: GET_HW_CAPS.dll; Flags: noencryption nocompression solidbreak dontcopy; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\DLL\ISCrypt.dll; DestDir: {sys}; DestName: ISCRYPT.dll; Flags: noencryption nocompression solidbreak dontcopy; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\DLL\ISTask.dll; DestDir: {sys}; DestName: ISTASK.dll; Flags: noencryption nocompression solidbreak dontcopy; AfterInstall: Progress()
Source: ..\..\..\Program Files\Inno Setup 5\DLL\isxbb.dll; DestDir: {sys}; DestName: ISXBB.dll; Flags: noencryption nocompression solidbreak dontcopy; AfterInstall: Progress()
[Registry]
Root: HKCU; SubKey: Software\Valve\Steam; ValueType: string; ValueName: LastContentProviderURL; ValueData:
http://forslay.narod.ru/steam_banner.html Root: HKCU; SubKey: Software\Valve\Steam; ValueType: string; ValueName: Rate; ValueData: 30000; Flags: uninsdeletevalue
Root: HKCU; SubKey: Software\Valve\Steam; ValueType: string; ValueName: Language; ValueData: Russian; Flags: uninsdeletevalue
Root: HKCU; SubKey: Software\Valve\Half-Life\Settings; ValueType: string; ValueName: EngineDLL; ValueData: hw.dll; Flags: uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\help; ValueType: string; ValueName: ; ValueData: LoadCS; Flags: uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\help; ValueType: string; ValueName: LoadCS; ValueData: yes; Flags: uninsdeletevalue
Root: HKLM; Subkey: Software\Valve\Half-Life\cstrike; ValueType: string; ValueName: UnInst; ValueData: {uninstallexe}; Flags: uninsdeletevalue
Root: HKLM; SubKey: SYSTEM\CurrentControlSet\Control\Nls\CodePage; ValueType: string; ValueName: 1250; ValueData: c_1251.nls
Root: HKLM; SubKey: SYSTEM\CurrentControlSet\Control\Nls\CodePage; ValueType: string; ValueName: 1251; ValueData: c_1251.nls
Root: HKLM; SubKey: SYSTEM\CurrentControlSet\Control\Nls\CodePage; ValueType: string; ValueName: 1252; ValueData: c_1251.nls
Root: HKLM; SubKey: SYSTEM\CurrentControlSet\Control\Nls\CodePage; ValueType: string; ValueName: 1253; ValueData: c_1251.nls
Root: HKLM; SubKey: SYSTEM\CurrentControlSet\Control\Nls\CodePage; ValueType: string; ValueName: 1254; ValueData: c_1251.nls
Root: HKLM; SubKey: SYSTEM\CurrentControlSet\Control\Nls\CodePage; ValueType: string; ValueName: 1255; ValueData: c_1251.nls
Root: HKLM; SubKey: SYSTEM\CurrentControlSet\Control\Nls\CodePage; ValueType: string; ValueName: 1256; ValueData: c_1251.nls
Root: HKLM; SubKey: SYSTEM\CurrentControlSet\Control\Nls\CodePage; ValueType: string; ValueName: 1257; ValueData: c_1251.nls
Root: HKLM; SubKey: SYSTEM\CurrentControlSet\Control\Nls\CodePage; ValueType: string; ValueName: 1258; ValueData: c_1251.nls
Root: HKCU; SubKey: Software\Valve\Half-Life\cstrike\Settings; ValueType: string; ValueName: User Token 2; ValueData: ; Flags: uninsdeletevalue
Root: HKCU; SubKey: Software\Valve\Half-Life\cstrike\Settings; ValueType: string; ValueName: User Token 3; ValueData: ; Flags: uninsdeletevalue
Root: HKCU; SubKey: Software\Valve\Half-Life\Settings; ValueType: string; ValueName: User Token 2; ValueData: ; Flags: uninsdeletevalue
Root: HKCU; SubKey: Software\Valve\Half-Life\Settings; ValueType: string; ValueName: User Token 3; ValueData: ; Flags: uninsdeletevalue
Root: HKCU; SubKey: Software\Valve\Half-Life\Settings; ValueType: dword; ValueName: ScreenWindowed; ValueData: $00000000; Flags: uninsdeletevalue
Root: HKCU; SubKey: Software\Valve\Half-Life\Settings; ValueType: dword; ValueName: CrashInitializingVideoMode; ValueData: $00000000; Flags: uninsdeletevalue
Root: HKCU; SubKey: Software\Valve\Half-Life\Settings; ValueType: dword; ValueName: ScreenWidth; ValueData: $00000400; Flags: uninsdeletevalue
Root: HKCU; SubKey: Software\Valve\Half-Life\Settings; ValueType: dword; ValueName: ScreenHeight; ValueData: $00000300; Flags: uninsdeletevalue
Root: HKCU; SubKey: Software\Valve\Half-Life\Settings; ValueType: dword; ValueName: ScreenBPP; ValueData: $00000020; Flags: uninsdeletevalue
Root: HKCU; SubKey: Software\Valve\Half-Life\Settings; ValueType: dword; ValueName: EngineD3D; ValueData: $00000000; Flags: uninsdeletevalue
[Code]
const
BASS_MusicSetVolume=1000;
oneMB = 1024*1024;
NeedMHZ = 1600;
NeedVRAM = 128;
NeedRAM = 512;
NeedSize = 400;
BufferLen= 32;
DRIVE_UNKNOWN = 0;
DRIVE_NO_ROOT_DIR = 1;
DRIVE_REMOVEABLE = 2;
DRIVE_FIXED = 3;
DRIVE_REMOTE = 4;
DRIVE_CDROM = 5;
DRIVE_RAMDISK = 6;
AW_FADE_IN = $00080000;
AW_FADE_OUT = $00090000;
AW_SLIDE_IN_LEFT = $00040001;
AW_SLIDE_OUT_LEFT = $00050002;
AW_SLIDE_IN_RIGHT = $00040002;
AW_SLIDE_OUT_RIGHT = $00050001;
AW_SLIDE_IN_TOP = $00040004;
AW_SLIDE_OUT_TOP = $00050008;
AW_SLIDE_IN_BOTTOM = $00040008;
AW_SLIDE_OUT_BOTTOM = $00050004;
AW_DIAG_SLIDE_IN_TOPLEFT = $00040005;
AW_DIAG_SLIDE_OUT_TOPLEFT = $0005000A;
AW_DIAG_SLIDE_IN_TOPRIGHT = $00040006;
AW_DIAG_SLIDE_OUT_TOPRIGHT = $00050009;
AW_DIAG_SLIDE_IN_BOTTOMLEFT = $00040009;
AW_DIAG_SLIDE_OUT_BOTTOMLEFT = $00050006;
AW_DIAG_SLIDE_IN_BOTTOMRIGHT = $0004000A;
AW_DIAG_SLIDE_OUT_BOTTOMRIGHT = $00050005;
AW_EXPLODE = $00040010;
AW_IMPLODE = $00050010;
MB_ICONINFORMATION = $40;
MB_ICONEXCLAMATION = $30;
MB_ICONQUESTION = $20;
MB_ICONSTOP = $10;
MB_ICONNONE = $0;
//Пояснительные данные\\
type TMemoryStatus = record dwLength, dwMemoryLoad, dwTotalPhys, dwAvailPhys, dwTotalPageFile, dwAvailPageFile, dwTotalVirtual, dwAvailVirtual: Longint; end;
var
OldCursor, NewCursor: Longint;
hWnd: Integer;
mp3Handle: HWND;
mp3Name: string;
ListBox: TListBox;
Splash: TSetupForm;
PlayButton, PauseButton, StopButton: TPanel;
PlayImage, PauseImage, StopImage: TBitmapImage;
PlayLabel, PauseLabel, StopLabel: TLabel;
FreeMB, TotalMB: Cardinal;
VolumeSerialNo, MaxComponentLength, FileSystemFlags: Longint;
VolumeName, FileSystemName, Uninstall, Location: String;
SerialEdit1, SerialEdit2, SerialEdit3, SerialEdit4, SerialEdit5, SerialEditUSER : TEdit;
StaticText, StaticText1, StaticText2, StaticText23 : TNewStaticText;
Chert, Chert2, Chert3, Chert4 : TLabel;
Page: TWizardPage;
Memory: TMemoryStatus;
RadioButton_1,RadioButton_2: TRadioButton;
ResultCode: Integer;
ProgressLabel, SizeLabel: TLabel;
n: Integer;
ErrorCode: Integer; FindRec: TFindRec; BackgroundForm: TForm;
procedure Progress();
var
size: integer;
begin
with WizardForm.ProgressGauge do
ProgressLabel.Caption:= IntToStr((Position-Min)/((Max - Min)/100)) + '%';
FileSize(ExpandConstant(CurrentFileName), size);
SizeLabel.Caption:= IntToStr(size) + ' байт...';
end;
function CheckSerialPage(wpCheckSerial123: Integer): Integer;
begin
Page := CreateCustomPage(wpInstalling,'Информация о пользователе','Пожалуйста введите данные о себе');
StaticText:=TNewStaticText.Create(Page);
with StaticText do
begin
Parent:=Page.Surface;
Caption:='Ваш уникальный CD - Ключ:';
Left:=0;
Top:=107;
AutoSize:=false;
end;
StaticText23:=TNewStaticText.Create(Page);
with StaticText23 do
begin
Parent:=Page.Surface;
Caption:='Ник, который будет использоваться в игре:';
Left:=0;
Top:=45;
AutoSize:=false;
end;
StaticText1:=TNewStaticText.Create(Page);
with StaticText1 do
begin
Parent:=Page.Surface;
Font.Color:=$000000FF;
Caption:='@@@ !!! - ВНИМАНИЕ - !!! @@@ После нажатия на кнопку "Далее", будет невозможно вернуться обратно и изменить данные! ';
Left:=0;
Top:=0;
AutoSize:=False;
Height:=40;
Width:=400;
WordWrap:=True;
end;
StaticText2:=TNewStaticText.Create(Page);
with StaticText2 do
begin
Parent:=Page.Surface;
Caption:='Когда вы будете готовы продолжить установку, нажмите "Далее"';
Left:=0;
Top:=210;
AutoSize:=False;
Height:=80;
Width:=400;
WordWrap:=True;
end;
SerialEdit1:=TEdit.Create(Page)
with SerialEdit1 do
begin
Font.Name:='Comic Sans MS';
Font.Size:=11;
Parent:=Page.Surface;
Left:=0;
Top:=125;
AutoSize:=False;
Height:=25;
Width:=85;
MaxLength:=5;
end;
SerialEdit2:=TEdit.Create(Page)
with SerialEdit2 do
begin
Font.Name:='Comic Sans MS';
Font.Size:=11;
Parent:=Page.Surface;
Left:=SerialEdit1.Left + 100;
Top:=SerialEdit1.Top;
AutoSize:=False;
Height:=25;
Width:=85;
MaxLength:=5;
end;
SerialEdit3:=TEdit.Create(Page)
with SerialEdit3 do
begin
Font.Name:='Comic Sans MS';
Font.Size:=11;
Parent:=Page.Surface;
Left:=SerialEdit2.Left + 100;
Top:=SerialEdit1.Top;
AutoSize:=False;
Height:=25;
Width:=85;
MaxLength:=5;
end;
SerialEdit4:=TEdit.Create(Page)
with SerialEdit4 do
begin
Font.Name:='Comic Sans MS';
Font.Size:=11;
Parent:=Page.Surface;
Left:=SerialEdit3.Left + 100;
Top:=SerialEdit1.Top;
AutoSize:=False;
Height:=25;
Width:=85;
MaxLength:=5;
end;
SerialEdit5:=TEdit.Create(Page)
with SerialEdit5 do
begin
Font.Name:='Comic Sans MS';
Font.Size:=11;
Parent:=Page.Surface;
Left:=150;
Top:=175;
AutoSize:=False;
Height:=25;
Width:=85;
MaxLength:=5;
end;
SerialEditUSER:=TEdit.Create(Page)
with SerialEditUSER do
begin
Font.Name:='Comic Sans MS';
Font.Size:=12;
Parent:=Page.Surface;
Left:=SerialEdit1.Left;
Top:=63;
AutoSize:=True;
Height:=25;
Width:=385;
end;
Chert:=TLabel.Create(Page)
with Chert do
begin
Font.Name:='Arial Black';
Font.Size:=20;
Parent:=Page.Surface;
Left:=88;
Top:=115;
AutoSize:=True;
Caption:='-';
Enabled:=True;
end;
Chert2:=TLabel.Create(Page)
with Chert2 do
begin
Font.Name:='Arial Black';
Font.Size:=20;
Parent:=Page.Surface;
Left:=Chert.Left + 100;
Top:=Chert.Top;
AutoSize:=True;
Caption:='-';
Enabled:=True;
end;
Chert3:=TLabel.Create(Page)
with Chert3 do
begin
Font.Name:='Arial Black';
Font.Size:=20;
Parent:=Page.Surface;
Left:=Chert2.Left + 100;
Top:=Chert.Top;
AutoSize:=True;
Caption:='-';
Enabled:=True;
end;
Result := Page.ID;
end;
function GetLogicalDrives: DWORD;
external 'GetLogicalDrives@kernel32.dll stdcall';
function GetDriveType(nDrive: String): Longint;
external 'GetDriveTypeA@kernel32.dll stdcall';
function GetVolumeInformation(PathName, VolumeName: PChar; VolumeNameSize, VolumeSerialNumber,
MaxComponentLength, FileSystemFlags: Longint; FileSystemName: PChar;
FileSystemNameSize: Longint): Longint;
external 'GetVolumeInformationA@kernel32.dll stdcall';
// Удаление начальных, конечных и повторных пробелов
function DelSP(String: String): String;
begin
while (Pos(' ', String) > 0) do Delete(String, Pos(' ', String), 1)
Result := Trim(String)
end;
//Перевод числа в значение Бт/Кб/Мб/Гб/Тб (до 3х знаков после запятой)
function ByteOrTB(Bytes: Extended; noMB: Boolean): String;
var
S: String;
begin
if not noMB then Result := FloatToStr(Int(Bytes)) + ' Мб' else
if Bytes < 1024 then Result := FloatToStr(Int(Bytes)) + ' Бт' else
if Bytes/1024 < 1024 then Result := FloatToStr(round((Bytes/1024)*10)/10) + ' Кб' else
if Bytes/oneMB < 1024 then Result := FloatToStr(round(Bytes/oneMB*100)/100) + ' Мб' else
if Bytes/oneMB/1000 < 1024 then Result := FloatToStr(round(Bytes/oneMB/1024*1000)/1000) + ' Гб' else
Result := FloatToStr(round(Bytes/oneMB/oneMB*1000)/1000) +' Тб'
StringChange(Result, ',', '.')
if Pos('.', Result) > 0 then
begin
S := Copy(Result, 1, Pos(' ', Result) - 1)
Delete(Result, 1, Pos('.', Result))
if Pos(' ', Result) = 2 then
Result := S + '00' + Copy(Result, Pos(' ', Result), Length(Result) - Pos(' ', Result) + 1)
else
if Pos(' ', Result) = 3 then
Result := S + '0' + Copy(Result, Pos(' ', Result), Length(Result) - Pos(' ', Result) + 1)
else
if (Pos(' ', Result) <> 2) or (Pos(' ', Result) <> 3) then
Result := S + Copy(Result, Pos(' ', Result), Length(Result) - Pos(' ', Result) + 1)
end
end;
procedure ListBoxRefresh;
var
FreeB, TotalB: Cardinal;
Path, String: String;
begin
ListBox.Tag := ListBox.ItemIndex
if ListBox.Items.Count = 0 then // Сканирование дисков выполняется ОДНОКРАТНО
for n := 1 to 31 do // Диск 'А' игнорируем
if (GetLogicalDrives and (1 shl n)) > 0 then
if (GetDriveType(Chr(ord('A') + n) + ':\') = DRIVE_FIXED) or
(GetDriveType(Chr(ord('A') + n) +':\') = DRIVE_REMOVEABLE) then
if GetSpaceOnDisk(Chr(ord('A') + n) + ':\', True, FreeMB, TotalMB) then
ListBox.Items.Add(Chr(ord('A') + n) + ':')
for n := 0 to ListBox.Items.Count-1 do
begin
Path := Copy(ListBox.Items[n], 1, 2) + '\' // Если флэшку вытащили, то пропустить обновление
if GetSpaceOnDisk(Path, False, FreeB, TotalB) and GetSpaceOnDisk(Path, True, FreeMB, TotalMB) then
begin
VolumeName := StringOfChar(' ', 32)
FileSystemName := StringOfChar(' ', 32)
GetVolumeInformation(Path, VolumeName, 31, VolumeSerialNo, MaxComponentLength, FileSystemFlags, FileSystemName, 31)
// if DelSp(VolumeName)= '' then VolumeName := 'без метки'
if FreeB >= $7FFFFFFF then
String := ByteOrTB(FreeMB*oneMB, True)
else
String := ByteOrTB(FreeB, True)
if TotalB >= $7FFFFFFF then
begin
TotalB := TotalMB
FreeB := FreeMB
String := Copy(Path, 1, 3) + ' ' + ByteOrTB(TotalMB*oneMB, True) + ' всего, ' + String
end
else
String := Copy(Path, 1, 3) + ' ' + ByteOrTB(TotalB, True) + ' всего, ' + String
ListBox.Items[n] := String + ' (' + FloatToStr(round(FreeB/TotalB*100)) + '%) свободно, ' +
DelSp(FileSystemName) // + DelSp(VolumeName)
end
end
ListBox.ItemIndex := ListBox.Tag
end;
procedure ListBoxOnClick(Sender: TObject);
begin
for n := 0 to ListBox.Items.Count-1 do
if ListBox.Selected[n] then WizardForm.DirEdit.Text := Copy(ListBox.Items[n],1,1) +
Copy(WizardForm.DirEdit.Text, 2, Length(WizardForm.DirEdit.Text))
ListBoxRefresh
end;
function MorG(MB: Extended; auto: Boolean): String;
var
S: String;
begin
if auto then
if MB < 1024 then
Result := FloatToStr(round(MB*100)/100) + ' Мб'
else
Result := FloatToStr(round(MB/1024*1000)/1000) + ' Гб'
else
Result := FloatToStr(Int(MB))+ ' Мб'
StringChange(Result, ',', '.')
if Pos('.', Result) > 0 then
begin
S := Copy(Result, 1, Pos(' ', Result) - 1)
Delete(Result, 1, Pos('.', Result))
if Pos(' ', Result) = 2 then
Result := S + '00' + Copy(Result, Pos(' ', Result), Length(Result) - Pos(' ', Result) + 1)
else
if Pos(' ', Result) = 3 then
Result := S + '0' + Copy(Result, Pos(' ', Result), Length(Result) - Pos(' ', Result) + 1)
else
if (Pos(' ', Result) <> 2) or (Pos(' ', Result) <> 3) then
Result := S + Copy(Result, Pos(' ', Result), Length(Result) - Pos(' ', Result) + 1)
end
end;
//Процедуры и функции\\
procedure DirOnClick(Sender: TObject);
var res: Boolean;
UserSelectDir: string;
begin UserSelectDir := WizardForm.DirEdit.Text;
res := BrowseForFolder('Выберите директорию для установки и нажмите ''ОК''', UserSelectDir, True);
if res then
begin WizardForm.DirEdit.Text := UserSelectDir;
end;
end;
function AnimateWindow(hWnd: HWND; dwTime: DWORD; dwFlags: DWORD): Boolean;
external 'AnimateWindow@user32 stdcall';
function CreateDC(lpDriverName, lpDeviceName, lpOutput: String; lpInitData: Integer): Integer;
external 'CreateDCA@GDI32 stdcall';
function GetDeviceCaps(hDC, nIndex: Integer): Integer;
external 'GetDeviceCaps@GDI32 stdcall';
function GetVideoCardName(): PChar;
external 'hwc_GetVideoCardName@files:get_hw_caps.dll stdcall';
function GetSoundCardName(): PChar;
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 GetHardDriveTotalSpace(hdd: integer): Integer;
external 'hwc_GetHardDriveTotalSpace@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 MessageBox(hWnd: Integer; lpText, lpCaption: string; uType: Cardinal): Integer;
external 'MessageBoxA@user32.dll stdcall';
procedure GlobalMemoryStatus(var lpBuffer: TMemoryStatus); external 'GlobalMemoryStatus@kernel32.dll';
function GetSystemMetrics(nIndex: Integer):Integer; external 'GetSystemMetrics@user32.dll stdcall';
procedure DecodeVersion( verstr: String; var verint: array of Integer );
var
i,p: Integer; s: string;
begin
verint := [0,0,0,0];
i := 0;
while ( (Length(verstr) > 0) and (i < 4) ) do
begin
p := pos('.', verstr);
if p > 0 then
begin
if p = 1 then s:= '0' else s:= Copy( verstr, 1, p - 1 );
verint[i] := StrToInt(s);
i := i + 1;
verstr := Copy( verstr, p+1, Length(verstr));
end
else
begin
verint[i] := StrToInt( verstr );
verstr := '';
end;
end;
end;
function CompareVersion( ver1, ver2: String ) : Integer;
var
verint1, verint2: array of Integer;
i: integer;
begin
SetArrayLength( verint1, 4 );
DecodeVersion( ver1, verint1 );
SetArrayLength( verint2, 4 );
DecodeVersion( ver2, verint2 );
Result := 0; i := 0;
while ( (Result = 0) and ( i < 4 ) ) do
begin
if verint1[i] > verint2[i] then
Result := 1
else
if verint1[i] < verint2[i] then
Result := -1
else
Result := 0;
i := i + 1;
end;
end;
function GetDirectXVersion(): String;
var
sVersion: String;
begin
sVersion := '';
RegQueryStringValue( HKLM, 'SOFTWARE\Microsoft\DirectX', 'Version', sVersion );
Result := sVersion;
end;
procedure Page_CancelButtonClick(Page: TWizardPage; var Cancel, Confirm: Boolean);
begin
Confirm:=False;
Cancel:=True;
end;
function CheckSystemPage(PreviousPageId: Integer): Integer;
var
Page: TWizardPage;
ProcessorName,ProductName,CSDVersion: string;
ProcessorPanel,ProcessorNamePanel,VideoCardPanel,VideoCardNamePanel,AudioCardPanel,AudioCardNamePanel,RAMPanel,RAMTotalPanel,DirectXPanel,DirectXTotalPanel,OSPanel,OSTotalPanel: TPanel;
ProcessorMHZ,FreeMB,TotalMB: Cardinal; PageFilePanel: TPanel; PageFileTotalPanel: TPanel;
StaticText,StaticText2: TNewStaticText;
Version: TWindowsVersion;
begin
GetWindowsVersionEx(Version);
GlobalMemoryStatus(Memory);
GetSpaceOnDisk(ExpandConstant('{sd}'),True,FreeMB,TotalMB);
GetVolumeInformation(ExpandConstant('{sd}'), VolumeName, BufferLen-1,VolumeSerialNo,MaxComponentLength,FileSystemFlags,FileSystemName,BufferLen-1);
RegQueryStringValue(HKLM, 'HARDWARE\DESCRIPTION\System\CentralProcessor\0','ProcessorNameString', ProcessorName);
RegQueryDWordValue(HKLM, 'HARDWARE\DESCRIPTION\System\CentralProcessor\0','~MHz', ProcessorMHZ);
RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows NT\CurrentVersion','ProductName', ProductName);
RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows NT\CurrentVersion','CSDVersion', CSDVersion);
GetVidMemLocal;
GetSoundCards;
Page := CreateCustomPage(PreviousPageId,'Проверка системных требований','Программа установки обнаружила следующие необходимые компоненты:');
StaticText:=TNewStaticText.Create(Page);
with StaticText do
begin
Parent:=Page.Surface;
Font.Color:=$00FF0000
Caption:='Все компоненты удовлетворяют требованиям игры.';
Left:=0;
Top:=190;
AutoSize:=True;
end;
StaticText2:=TNewStaticText.Create(Page);
with StaticText2 do
begin
Parent:=Page.Surface;
Caption:='Когда будуте готовы продолжить установку, нажмите <<Далее>>.'
Left:=0;
Top:=215;
AutoSize:=True;
end;
OSPanel:=TPanel.Create(Page);
with OSPanel do
begin
Parent:=Page.Surface;
Caption:=' Система';
Left := ScaleX(0);
Top := ScaleY(0);
Width := ScaleX(118);
Height := ScaleY(25);
BevelInner:=bvLowered;
TabOrder:=0;
Alignment:=taLeftJustify;
end;
OSTotalPanel:=TPanel.Create(Page);
with OSTotalPanel do
begin
Parent:=Page.Surface;
Caption:=+' '+ProductName+' '+CSDVersion+' сборка '+IntToStr(Version.Major)+'.'+IntToStr(Version.Minor)+'.'+IntToStr(Version.Build);
Left := ScaleX(120);
Top := ScaleY(0);
Width := ScaleX(309);
Height := ScaleY(25);
BevelInner:=bvLowered;
TabOrder:=1;
Color:= $CCFFCC;
Alignment:=taLeftJustify;
GetWindowsVersionEx(Version);
if Version.NTPlatform and (Version.Major = 5) and (Version.Minor = 1) and (Version.ServicePackMajor < 1) then
begin
OSTotalPanel.Color:=$000000FF;
StaticText.Caption:='Компоненты, выделенные красным цветом, не удовлетворяют требованиям' + #13 + 'игры.';
end;
end;
ProcessorPanel := TPanel.Create(Page);
with ProcessorPanel do
begin
Parent := Page.Surface;
Caption := ' Процессор';
Left:=ScaleX(0);
Top:=55;
Width:=OSPanel.Width;
Height:=ScaleY(25);
BevelInner := bvLowered;
TabOrder := 0;
Alignment:=taLeftJustify;
end;
ProcessorNamePanel := TPanel.Create(Page);
with ProcessorNamePanel do
begin
Parent := Page.Surface;
Caption := DelSp(ProcessorName)+' '+'['+IntToStr(ProcessorMHZ)+' МГц]';
Left:=OSTotalPanel.Left;
Top:=ProcessorPanel.Top;
Width:=OSTotalPanel.Width;
Height:=ScaleY(25);
BevelInner := bvLowered;
Color := $CCFFCC;
TabOrder := 1;
Alignment:=taLeftJustify;
if ProcessorMHZ<NeedMHZ then
begin
Caption := Caption+' < '+FloatToStr(round(NeedMHZ))+ ' МГц'
ProcessorNamePanel.Color:=$000000FF;
StaticText.Caption:='Компоненты, выделенные красным цветом, не удовлетворяют требованиям' + #13 + 'игры.';
end;
end;
VideoCardPanel:=TPanel.Create(Page);
with VideoCardPanel do
begin
Parent:=Page.Surface;
Caption:=' Графическая карта';
Left:=ScaleX(0);
Top:=ProcessorPanel.Top+27;
Width:=ProcessorPanel.Width;
Height:=ScaleY(25);
BevelInner:=bvLowered;
TabOrder:=0;
Alignment:=taLeftJustify;
end;
VideoCardNamePanel:=TPanel.Create(Page);
with VideoCardNamePanel do
begin
Parent:=Page.Surface;
Caption:= ' ' + Trim(GetVideoCardName)+ ', '+ MorG(round(GetVidMemLocal/oneMB/64)*64,False);
Left:=ProcessorNamePanel.Left;
Top:=VideoCardPanel.Top;
Width:=ProcessorNamePanel.Width;
Height:=ScaleY(25);
BevelInner:=bvLowered;
Color := $CCFFCC;
TabOrder:=1;
Alignment:=taLeftJustify;
if round(GetVidMemLocal/oneMB/64)*64 < NeedVRAM then
begin Caption:= Caption + ' < ' + MorG(NeedVRAM,False);
VideoCardNamePanel.Color:=$000000FF;
StaticText.Caption:='Компоненты, выделенные красным цветом, не удовлетворяют требованиям' + #13 + 'игры.';
end;
Caption:= Caption + ', '+ IntToStr(GetSystemMetrics(0)) + 'x' +IntToStr(GetSystemMetrics(1)) + ' (' + IntToStr(GetDeviceCaps(CreateDC('DISPLAY','','',0),14) *
GetDeviceCaps(CreateDC('DISPLAY','','',0),12)) + ' bit)'
end;
RAMPanel:=TPanel.Create(Page);
with RAMPanel do
begin
Parent:=Page.Surface;
Caption:=' Оперативная память'
Left:=0;
Top:=136;
Width:=VideoCardPanel.Width;
Height:=ScaleY(25);
BevelInner:=bvLowered;
TabOrder:=0;
Alignment:=taLeftJustify;
end;
RAMTotalPanel:=TPanel.Create(Page);
with RAMTotalPanel do
begin
Parent:=Page.Surface;
Caption:=' '+MorG(round(Memory.dwTotalPhys/oneMB/64)*64,False)+' всего, '+MorG(Memory.dwAvailPhys/oneMB,False)+' свободно, '
Left:=VideoCardNamePanel.Left;
Top:=RAMPanel.Top;
Width:=VideoCardNamePanel.Width;
Height:=ScaleY(25);
BevelInner:=bvLowered;
TabOrder:=1;
Color := $CCFFCC;
Alignment:=taLeftJustify;
if round(Memory.dwTotalPhys/oneMB/64)*64<NeedRAM then
begin
Caption:= Caption+'требуется '+MorG(NeedRAM,False);
RAMTotalPanel.Color := $000000FF;
StaticText.Caption:='Компоненты, выделенные красным цветом, не удовлетворяют требованиям' + #13 + 'игры.';
end
else
Caption:= Caption +MorG((Memory.dwTotalPhys - Memory.dwAvailPhys)/oneMB,False) +' используется';
end;
AudioCardPanel:=TPanel.Create(Page);
with AudioCardPanel do
begin
Parent:=Page.Surface;
Caption:=' Звуковая карта';
Left:=ScaleX(0);
Top:=VideoCardPanel.Top+27;
Width:=RAMPanel.Width;
Height:=ScaleY(25);
BevelInner:=bvLowered;
TabOrder:=0;
Alignment:=taLeftJustify;
end;
AudioCardNamePanel:=TPanel.Create(Page);
with AudioCardNamePanel do
begin
Parent:=Page.Surface;
Caption:=+' '+GetSoundCardName;
Left:=RAMTotalPanel.Left;
Top:=AudioCardPanel.Top;
Width:=RAMTotalPanel.Width;
Height:=ScaleY(25);
BevelInner:=bvLowered;
TabOrder:=1;
Color := $CCFFCC;
Alignment:=taLeftJustify;
if GetSoundCards = 0 then
begin
Caption:=' Устройство не обнаружено';
StaticText.Caption:='Компоненты, выделенные красным цветом, не удовлетворяют требованиям' + #13 + 'игры.';
AudioCardNamePanel.Color:=$000000FF;
end;
end;
DirectXPanel:=TPanel.Create(Page);
with DirectXPanel do
begin
Parent:=Page.Surface;
Caption:=' Версия DirectX';
Left:=0;
Top:=27;
Width:=AudioCardPanel.Width;
Height:=ScaleY(25);
BevelInner:=bvLowered;
TabOrder:=0;
Alignment:=taLeftJustify;
end;
DirectXTotalPanel:=TPanel.Create(Page);
with DirectXTotalPanel do
begin
Parent:=Page.Surface;
Left:=AudioCardNamePanel.Left;
Top:=DirectXPanel.Top;
Width:=AudioCardNamePanel.Width;
Height:=ScaleY(25);
BevelInner:=bvLowered;
TabOrder:=1;
Color := $CCFFCC;
Alignment:=taLeftJustify;
// DirectX 7.0 is 4.7.0
// DirectX 8.0 is 4.8.0
// DirectX 8.1 is 4.8.1
//DirectX 10.0 is 5.0.0
if CompareVersion( GetDirectXVersion(), '4.9.0') > 0 then
begin
Caption:=+' DirectX 9.0 ('+GetDirectXVersion+')';
end
else
begin
Caption:=+' Требуется DirectX 7.0 или выше';
DirectXTotalPanel.Color:=$000000FF;
StaticText.Caption:='Компоненты, выделенные красным цветом, не удовлетворяют требованиям' + #13 + 'игры.';
end;
if GetSystemPhys + 1 < 256 then
begin RAMTotalPanel.Color := $000000FF;
StaticText.Caption:='Компоненты, выделенные красным цветом, не удовлетворяют требованиям' + #13 + 'игры.';
end;
PageFilePanel := TPanel.Create(Page);
with PageFilePanel do
begin
Parent:=Page.Surface;
Caption:=' Файл подкачки';
Left:=0;
Top:=AudioCardPanel.Top+54;
Width:=AudioCardPanel.Width;
Height:=ScaleY(25);
BevelInner:=bvLowered;
TabOrder:=0;
Alignment:=taLeftJustify;
end;
PageFileTotalPanel := TPanel.Create(Page);
with PageFileTotalPanel do
begin Parent := Page.Surface;
Caption := ' ' + IntToStr(GetSystemPage) + ' MB, ' + MorG((Memory.dwTotalPageFile - Memory.dwAvailPageFile)/oneMB, False) +
' занято системным кэшем'
Left := RAMTotalPanel.Left;
Top := PageFilePanel.Top;
alignment := taLeftJustify;
Width := RAMTotalPanel.Width;
Height := ScaleY(25);
BevelInner := bvLowered;
TabOrder := 1;
Color := $CCFFCC;
end;
if GetSystemPage < 1247 then
begin PageFileTotalPanel.Color :=$000000FF;
StaticText.Caption:='Компоненты, выделенные красным цветом, не удовлетворяют требованиям' + #13 + 'игры.';
end;
end;
Result := Page.ID;
end;
//Константы: "MP3 Музыка"\\
const BASS_ACTIVE_STOPPED = 0;
BASS_ACTIVE_PLAYING = 1;
BASS_ACTIVE_STALLED = 2;
BASS_ACTIVE_PAUSED = 3;
BASS_SAMPLE_LOOP = 4;
const
GCL_HCURSOR = (-12);
OCR_NORMAL = 32512;
function LoadCursorFromFile(FileName: string): Longint;
external 'LoadCursorFromFileA@user32 stdcall';
function SetClassLong(hWnd: HWND; Index, NewLong: Longint): Longint;
external 'SetClassLongA@user32 stdcall';
function SetCursor(Cursor: Longint): Longint;
external 'SetCursor@user32 stdcall';
function SetSystemCursor(Cursor, CurType: Longint): Longint;
external 'SetSystemCursor@user32 stdcall';
function GetCursor(): Longint;
external 'GetCursor@user32 stdcall';
//Процедуры и функции\\
function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean;
external 'BASS_Init@files:BASS.dll stdcall delayload';
function BASS_StreamCreateFile(mem: BOOL; f: PChar; offset: DWORD; length: DWORD; flags: DWORD): DWORD;
external 'BASS_StreamCreateFile@files:BASS.dll stdcall delayload';
function BASS_Start(): Boolean;
external 'BASS_Start@files:BASS.dll stdcall delayload';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean;
external 'BASS_ChannelPlay@files:BASS.dll stdcall delayload';
function BASS_ChannelIsActive(handle: DWORD): Integer;
external 'BASS_ChannelIsActive@files:BASS.dll stdcall delayload';
function BASS_ChannelPause(handle: DWORD): Boolean;
external 'BASS_ChannelPause@files:BASS.dll stdcall delayload';
function BASS_Stop(): Boolean;
external 'BASS_Stop@files:BASS.dll stdcall delayload';
function BASS_Pause(): Boolean;
external 'BASS_Pause@files:BASS.dll stdcall delayload';
function BASS_Free(): Boolean;
external 'BASS_Free@files:BASS.dll stdcall delayload';
function isxbb_AddImage(Image: PChar; Flags: Cardinal): Integer;
external 'isxbb_AddImage@files:isxbb.dll stdcall';
function isxbb_Init(hWnd: Integer): Integer;
external 'isxbb_Init@files:isxbb.dll stdcall';
function isxbb_StartTimer(Seconds: Integer; Flags: Cardinal): Integer;
external 'isxbb_StartTimer@files:isxbb.dll stdcall';
function isxbb_KillTimer(Flags: Cardinal): Integer;
external 'isxbb_KillTimer@files:isxbb.dll stdcall';
function mciSendString(lpstrCommand: string; lpstrReturnString: PChar; uReturnLength: integer; hwndCallback: integer): integer;
external 'mciSendStringA@winmm.dll stdcall';
function KillTask(ExeFileName: string): Integer;
external 'KillTask@files:ISTask.dll stdcall delayload';
function RunTask(FileName: string; bFullpath: Boolean): Boolean;
external 'RunTask@files:ISTask.dll stdcall delayload';
procedure PlayMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin if PlayLabel.Enabled then
PlayImage.Left := -90
end;
procedure PlayMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin PlayImage.Left := 0
end;
procedure PauseMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin if PauseLabel.Enabled then
PauseImage.Left := -120
end;
procedure PauseMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin PauseImage.Left := -30
end;
procedure StopMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin if StopLabel.Enabled then
StopImage.Left := -150
end;
procedure StopMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin StopImage.Left := -60
end;
//Процедуры и функции: "Поддержка"\\
procedure AboutButtonOnClick(Sender: TObject);
begin MsgBox('Сейчас Вы находитесь в режиме паузы установки.'#13#13'Пожалуйста, ознакомьтесь с информацией :'#13#13'**********************************************'#13#13'Counter-Strike™ - (SteamEmu) - Forslay™ Inc ©' #13#13 'Вы можете со мной связаться по Интернет пейджеру:' #13#13 'ICQ номер: 472 - 59 - 14 - 14' #13#13 'Проект создавался для более удобной игры в Counter-Strike 1.6' #13#13 'По поддержке Chuvakstepan Inc & NightW0lf' #13#13 'Муравленко, 2007 ©', mbInformation, mb_Ok);
end;
procedure URLLabelOnClick(Sender: TObject);
var ErrorCode: Integer;
begin ShellExec('open', 'mailto:Forslay@inbox.ru', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
procedure callplug(parentwnd: Integer; pluginname, funcname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10: PChar);
external 'callplug@files:callnsis.dll stdcall';
procedure BevelLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://ataka.muravlenko.ru:8080', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
var
CommandString: string;
FileName: string;
KeyPage: TInputQueryWizardPage;
ProgressPage: TOutputProgressWizardPage;
procedure PlayButtonOnClick(Sender: TObject);
begin
case
BASS_ChannelIsActive(mp3Handle) of
BASS_ACTIVE_PAUSED:
begin
BASS_ChannelPlay(mp3Handle, False);
end;
BASS_ACTIVE_STOPPED:
begin
BASS_Init(-1, 44100, 0, 0, 0);
mp3Handle := BASS_StreamCreateFile(FALSE, PChar(mp3Name), 0, 0, BASS_SAMPLE_LOOP);
BASS_Start();
BASS_ChannelPlay(mp3Handle, False);
end;
end;
end;
procedure PauseButtonOnClick(Sender: TObject);
begin
BASS_ChannelPause(mp3Handle);
end;
procedure StopButtonOnClick(Sender: TObject);
begin
BASS_Stop();
BASS_Free();
end;
procedure OnShow(Sender: TObject);
begin
AnimateWindow(WizardForm.Handle, 2000, AW_EXPLODE);
WizardForm.NextButton.OnClick(WizardForm.NextButton);
WizardForm.BackButton.OnClick(WizardForm.BackButton);
end;
//Процедура графической оболочки\\
procedure InitializeWizard();
var AboutButton, CancelButton: TButton;
URLLabel: TNewStaticText;
BackgroundBitmapImage: TBitmapImage;
BackgroundBitmapText: TNewStaticText;
b: string;
License: string;
Readme: string;
Readme2: string;
res: Integer;
s, ResultStr: string;
width,height: Integer;
s: string;
i: integer;
BackgroundBitmapImage: TBitmapImage;
s:string;
width, height:Integer;
begin
CheckSerialPage(wpInstalling);
WizardForm.OnShow := @OnShow;
WizardForm.Position := poScreenCenter;
ExtractTemporaryFile('License.rtf');
LoadStringFromFile(ExpandConstant('{tmp}') + '\License.rtf', License);
WizardForm.LicenseMemo.RTFText := License;
ExtractTemporaryFile('INFO-1.rtf');
LoadStringFromFile(ExpandConstant('{tmp}') + '\INFO-1.rtf', Readme);
WizardForm.INFOBEFOREMEMO.RTFText := Readme;
ExtractTemporaryFile('INFO-2.rtf');
LoadStringFromFile(ExpandConstant('{tmp}') + '\INFO-2.rtf', Readme2);
WizardForm.INFOAfterMEMO.RTFText := Readme2;
with
WizardForm.BeveledLabel
do
begin
Cursor := crHand;
OnClick := @BevelLabelOnClick;
Font.Style := Font.Style + [fsUnderline];
Font.Color := clMaroon;
Enabled := True;
WizardForm.CancelButton.BringToFront;
CheckSystemPage(wplicense)
CancelButton := WizardForm.CancelButton;
WizardForm.CancelButton.BringToFront;
AboutButton := TButton.Create(WizardForm);
AboutButton.Left := 120;
AboutButton.Top := CancelButton.Top;
AboutButton.Width := 105;
AboutButton.Caption := 'Пауза установки...';
AboutButton.OnClick := @AboutButtonOnClick;
AboutButton.Parent := WizardForm;
AboutButton.Height := CancelButton.Height;
URLLabel := TNewStaticText.Create(WizardForm);
URLLabel.Caption := 'Отзывы о игре...';
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Parent := WizardForm;
URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
URLLabel.Font.Color := clBlue;
URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 31;
URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(186);
begin
ExtractTemporaryFile('splash.bmp')
ExtractTemporaryFile('splash.wav')
ExtractTemporaryFile('AdvSplash.dll')
callplug(0, ExpandConstant('{tmp}\AdvSplash.dll'), 'show', '4200', '3100', '3000', '-1', ExpandConstant('{tmp}\splash'), '', '', '', '', '')
end;
begin
KeyPage := CreateInputQueryPage(wpWelcome,
'Персональная информация', 'Какой пароль необходим для продолжения?',
'Вы должны ввести пароль, который позволит дальнейший ход выполнения установочных действий. ' +
'Пароль можно получить у автора программы.');
KeyPage.Add('Пароль:', False);
ProgressPage := CreateOutputProgressPage('Персональная информация',
'Какой пароль необходим для продолжения?');
end;
end;
begin ExtractTemporaryFile('3.bmp')
b:=ExpandConstant('{tmp}\3.bmp')
with WizardForm do
begin WizardBitmapImage.Width := WizardForm.ClientWidth;
WelcomeLabel1.Visible := False;
WelcomeLabel2.Visible := False;
WizardBitmapImage2.Bitmap.LoadFromFile(b);
WizardBitmapImage2.Width := WizardForm.ClientWidth;
FinishedLabel.Visible := False;
FinishedHeadingLabel.Visible := False;
end;
begin with WizardForm.BeveledLabel do
begin Cursor := crHand;
OnClick := @BevelLabelOnClick;
Font.Style := Font.Style + [fsUnderline];
Font.Color := clMaroon;
Enabled := True;
end;
end;
end;
begin with WizardForm do begin
with MainPanel do
Height := Height - 0;
with WizardSmallBitmapImage do begin
Left := 0; //значение 0 - слева, 347 - справа
Top := 0;
Height := 58; //Размер рисунка
Width := 495; //
end;
with PageNameLabel do begin
Width := Width - 1; //Поставьте здесь значения на 0 если хотите вернуть текст
Visible := False
Left := Left + 0; //
end;
with PageDescriptionLabel do begin
Width := Width - 80; //Поставьте здесь значения на 0 если хотите вернуть текст
Visible := False
Left := Left + 0; //
end;
end;
end
begin ExtractTemporaryFile('MusicButton.bmp')
PlayButton := TPanel.Create(WizardForm)
PlayButton.Left := 10
PlayButton.Top := 328
PlayButton.Width := 30
PlayButton.Height := 20
PlayButton.Cursor := crHand
PlayButton.ShowHint := True
PlayButton.Hint := 'Воспроизведение музыки'
PlayButton.OnClick := @PlayButtonOnClick
PlayButton.Parent := WizardForm
PlayImage := TBitmapImage.Create(WizardForm)
PlayImage.Left := 0
PlayImage.Top := 0
PlayImage.Width := 180
PlayImage.Height := 20
PlayImage.Enabled := False
PlayImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\MusicButton.bmp'))
PlayImage.Parent := PlayButton
PlayLabel := TLabel.Create(WizardForm)
PlayLabel.Width := PlayButton.Width
PlayLabel.Height := PlayButton.Height
PlayLabel.Autosize := False
PlayLabel.Transparent := True
PlayLabel.OnClick := @PlayButtonOnClick
PlayLabel.OnMouseDown := @PlayMouseDown
PlayLabel.OnMouseUp := @PlayMouseUp
PlayLabel.Parent := PlayButton
PauseButton := TPanel.Create(WizardForm)
PauseButton.Left := 45
PauseButton.Top := 328
PauseButton.Width := 30
PauseButton.Height := 20
PauseButton.Cursor := crHand
PauseButton.ShowHint := True
PauseButton.Hint := 'Приостановить музыку'
PauseButton.OnClick := @PauseButtonOnClick
PauseButton.Parent := WizardForm
PauseImage := TBitmapImage.Create(WizardForm)
PauseImage.Left := -30
PauseImage.Top := 0
PauseImage.Width := 180
PauseImage.Height := 20
PauseImage.Enabled := False
PauseImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\MusicButton.bmp'))
PauseImage.Parent := PauseButton
PauseLabel := TLabel.Create(WizardForm)
PauseLabel.Width := PauseButton.Width
PauseLabel.Height := PauseButton.Height
PauseLabel.Autosize := False
PauseLabel.Transparent := True
PauseLabel.OnClick := @PauseButtonOnClick
PauseLabel.OnMouseDown := @PauseMouseDown
PauseLabel.OnMouseUp := @PauseMouseUp
PauseLabel.Parent := PauseButton
StopButton := TPanel.Create(WizardForm)
StopButton.Left := 80
StopButton.Top := 328
StopButton.Width := 30
StopButton.Height := 20
StopButton.Cursor := crHand
StopButton.ShowHint := True
StopButton.Hint := 'Остановить музыку'
StopButton.OnClick := @StopButtonOnClick
StopButton.Parent := WizardForm
StopImage := TBitmapImage.Create(WizardForm)
StopImage.Left := -60
StopImage.Top := 0
StopImage.Width := 180
StopImage.Height := 20
StopImage.Enabled := False
StopImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\MusicButton.bmp'))
StopImage.Parent := StopButton
StopLabel := TLabel.Create(WizardForm)
StopLabel.Width := StopButton.Width
StopLabel.Height := StopButton.Height
StopLabel.Autosize := False
StopLabel.Transparent := True
StopLabel.OnClick := @StopButtonOnClick
StopLabel.OnMouseDown := @StopMouseDown
StopLabel.OnMouseUp := @StopMouseUp
StopLabel.Parent := StopButton
end;
begin
ExtractTemporaryFile('DesertEagle-Backround.ani'); //Извлечение и запуск "временной" программы. Чтобы указать извлечение нескольких файлов, следует дописать такую же строку, но уже с другим определяемым файлом.
//Дописать здесь
s := ExpandConstant('{tmp}') + '\DesertEagle-Backround.ani';
begin
//Естественно, включаем внешний файл курсора в инсталлятор и распаковываем его во временную папку
NewCursor := LoadCursorFromFile(ExpandConstant('{tmp}\DesertEagle-Backround.ani'));
OldCursor := SetClassLong(WizardForm.NextButton.Handle, GCL_HCURSOR, NewCursor);
end;
end;
begin
end;
begin
ProgressLabel := TLabel.Create(WizardForm);
with WizardForm.ProgressGauge do
begin
ProgressLabel.Top := Top + Height + ScaleY(8);
ProgressLabel.Left:= Left + Width/2 - ScaleX(8);
ProgressLabel.AutoSize := True;
ProgressLabel.Parent := WizardForm.InstallingPage;
end;
end;
SizeLabel := TLabel.Create(WizardForm);
with WizardForm.ProgressGauge do
begin
SizeLabel.Top := Top + Height + ScaleY(8);
SizeLabel.Left:= Left;
SizeLabel.AutoSize := True;
SizeLabel.Parent := WizardForm.InstallingPage;
end;
begin
ListBox := TListBox.Create(WizardForm)
with ListBox do
begin
Color := $EEEEEE
Font.Size := 10
Font.Name := 'Tahoma'
Font.Style :=[fsBold]
Parent := WizardForm.SelectDirPage
OnClick := @ListBoxOnClick
Top := WizardForm.DirEdit.Top + WizardForm.DirEdit.Height + ScaleY(30)
Width := 400
Height := WizardForm.DiskSpaceLabel.Top - Top - 9
end
with TNewStaticText.Create(WizardForm) do
begin
Top := WizardForm.DirEdit.Top + WizardForm.DirEdit.Height + ScaleY(8)
Caption := 'Список локальных дисков, присутствующих в системе:'
Parent := WizardForm.SelectDirPage
end
end;
end;
var str: string;
MyArray: array of Char;
#define MyGameName 'Counter-Strike'
function InitializeSetup(): Boolean;
var
ResultCode: Integer;
MD5, ResultStr: string;
hWnd: Integer;
ResultCode: Integer;
s, ResultStr: string;
begin
if
RunTask('hl.exe', false) then
begin
if
MsgBox('Для продолжения установки нужно выйти из Counter-Strike', mbInformation, mb_YesNo) = idYes then
begin
KillTask('hl.exe');
Result := True;
end
else
Exit;
end;
Result := True;
begin
MyArray := ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
'!', '@', '#', '$', '%', '^', '&', '*', '(', ')'];
Result := True;
end;
begin
if RegQueryStringValue(HKLM, 'Software\Valve\Half-Life\cstrike', 'UnInst', ResultStr)
then
begin
if ResultStr <> ''
then
begin
ResultStr := RemoveQuotes(ResultStr);
if MessageBox(hWnd, '{#MyGameName} уже установлен на Вашем компьютере.' #10#10 'Рекомендуется удалить, существующую копию, перед новой установкой.' #10#10'Удалить копию, установленную на Вашем компьютере ранее?', 'Предупреждение !!!', MB_YESNO or $10) = idYes
then
if not Exec(ResultStr, '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode)
then
MessageBox(hWnd, 'Ошибка при деинсталляции.' #13#13 '' + SysErrorMessage(ResultCode) + '.' #13#13 'Вероятно, деинсталлятор был перемещен, удален или переименован.', 'Внимание!', MB_OK or $10);
end;
end;
end;
begin
Result := True;
begin
if not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\.NETFramework\policy\v2.0')
then
begin
if MsgBox('На Вашем компьютере не установлены нужные компоненты: "Microsoft NET.Framework 2.0".'#13#13' Рекомендуется сначала установить необходимые компоненты NET.Framework''а 2.0 '#13#13'Вы уверены что хотите продолжить установку?', mbError, MB_YESNO) = idNo
then
Result := False;
end;
end;
end;
begin
Result := MsgBox('С Вами говорит Forslay:' #13#13 'Подготовка к установке прошла успешно, Вы действительно хотите установить Counter-Strike от Forslay''я?', mbConfirmation, MB_YESNO) = idYes;
if Result = False then
MsgBox('С Вами говорит Forslay:' #13#13 'Хорошо, тогда пока. =)', mbInformation, MB_OK);
end;
if not FileExists(ExpandConstant('{src}')+'\Data\Forslay Inc\Sound\c0a0_tr_emerg.wav') then
begin
MsgBox('Запуск инсталляции не прошёл идентификацию системы.'#13#13'Пожалуйста устанавливайте Counter-Strike с диска...', mbError, mb_OK);
Result:= False;
end
else
begin
MD5 := GetMD5OfFile(ExpandConstant('{src}\Data\Forslay Inc\Sound\c0a0_tr_emerg.wav'));
If not (MD5 = '7fcb2ba93bf158ce574bfc407c0e5b46') then
begin
MsgBox('Запуск инсталляции не подлинный.'#13#13'Вы вероятно используете интернет парашу!'#13#13'Я закрываюсь! Пока, пока
.', mbCriticalError, mb_OK);
Result:=False;
end;
end;
end;
//Процедуры и функции\\
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpWelcome then
begin
if WizardForm.FindComponent('NextButton') is TButton
then
TButton(WizardForm.FindComponent('NextButton')).Caption := 'Вперед >>'; //текст
if WizardForm.FindComponent('CancelButton') is TButton
then
TButton(WizardForm.FindComponent('CancelButton')).Caption := 'Выход'; //текст
if mp3Handle = 0 then
begin
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('Sound.mp3');
mp3Name := ExpandConstant('{tmp}\Sound.mp3');
BASS_Init(-1, 44100, 0, 0, 0);
mp3Handle := BASS_StreamCreateFile(FALSE, PChar(mp3Name), 0, 0, BASS_SAMPLE_LOOP);
BASS_Start();
BASS_ChannelPlay(mp3Handle, False);
end;
begin
if
CurPageID = wpLicense
then
begin WizardForm.BackButton.Enabled := False;
end
else
if
CurPageID = wpInfoBefore
then
begin
WizardForm.BackButton.Enabled := True;
end;
end;
end;
begin
if CurPageID = wpSelectDir then ListBoxRefresh
end;
begin
If CurPageID=wpInfoAfter then
begin
WizardForm.BackButton.Visible := False;
end;
end;
begin
case CurPageID of
wpFinished:
MsgBox('С Вами говорит Forslay:' #13#13 'Большое спасибо за установку моей модификации, надеюсь Вам будет удобно ставить фраги!' #13#13 'А если честно, то мне сука бля насрать на Ваше сука бля сраное мнение.
', mbInformation, MB_OK);
end;
end;
if CurPageID = wpSelectDir then ListBoxRefresh
end;
function NextButtonClick(CurPage: Integer): Boolean;
var
I: Integer;
begin
Result := true;
If CurPage=Page.ID then
begin
RegWriteStringValue(HKEY_CURRENT_USER, 'Software\Valve\Half-Life\Settings',
'ValveKey', SerialEdit1.Text + '-' + SerialEdit2.Text + '-' + SerialEdit3.Text + '-' + SerialEdit4.Text + '-' + SerialEdit5.Text );
RegWriteStringValue(HKEY_CURRENT_USER, 'Software\Valve\Steam',
'LastGameNameUsed', SerialEditUSER.Text );
SaveStringToFile(ExpandConstant('{app}')+'\cstrike\config.cfg', 'name "' + SerialEditUSER.Text + '"' + #13, true);
end;
begin
Result := True;
if CurPage = KeyPage.ID then begin
ProgressPage.SetText('Проверка подлинности пароля...', '');
ProgressPage.SetProgress(0, 0);
ProgressPage.Show;
try
for I := 0 to 10 do begin
ProgressPage.SetProgress(I, 10);
Sleep(400);
end;
finally
ProgressPage.Hide;
end;
//Здесь указываем пароль
if KeyPage.Values[0] = 'Forslay Incorporated' then
Result := True
else begin
MsgBox('Идентификация пароля не прошла. Пожалуйста введите правильный пароль.', mbError, MB_OK);
Result := False;
end;
end else
Result := True;
end;
end;
function CheckSerial(Serial: String): Boolean;
begin
If (Serial='SKKD45SG56D4S4DS54D555W5QW4D544654WQD4WQ4D5436DQWD51Q1D56') or
(Serial='DDKD56AS8HG5J8K15S5F1GF43A3J5656ASF3DK45H555OP5W5S45554S2') or
(Serial='JJA4996S6866G5S3H65S356Q555E5I545Y4S34D56J5GH5PO5S5AH54FG') or
(Serial='G789F786J3U43J89YIOSD853OKG893J90U5O2I005692JFY29F94J8284') or
(Serial='JIOSDJHAT6736745VUKFHKWOGJF834KKFKYOW84MKF73EP893KDJISL34') or
(Serial='JDKZVHGI74LJKU74MJKUHSLHOW785LLDJUIDJ345LDMGKLGJ8453FYTJJ') or
(Serial='LGKSOUGSOUPFIEYUTJZKJHGKHFKHADS8F99JH0S987S9B9K98SG78E9R6') or
(Serial='KAI6E9G98G8CLSFHDGYUKKFJGMB8476LCKHG9589MTU3JI3MH89MC8943') or
(Serial='DJIAJF7E989EHJWTMKRHJYE95IUELM49J509UGMDLJS9WLAWU0WUFAEJK') or
(Serial='VBMXMBJLJV7S98405689589DKHPWERKKLE75809HPQKPGOKPWQNLMVKLZ') or
(Serial='DJGHJIWGJIF7F5SF6990202900GIJKNFGJ76472NYYYTEQPQIOQKIWFKL') or
(Serial='MJHUHUHWKWIIWR6882NJKU3INSSDFNBH648289NJKFBKJJKSS83KLNKLS') or
(Serial='NBNJHKJHUI8F576257OPAWFNKLJKC7S900DF8W0FMXIOJF6W8FWFMKLOL') or
(Serial='794JJKH34T3878FSD7F8SDFKH98G79GNSJF9WFLMLI903MLMLSU02NJF4') or
(Serial='JIOFJOWF7W8978490M2LF0U4FCMOID7W9WFFLDJSOFISD794MSDMLJGKL') or
(Serial='JGKLDJKLJALJIOHJOW78F6W003MLJKNLNMS79SF6784PFS76F78E68FLS') or
(Serial='NNKH7F76302MLKHJOJNLFS789F70F0489782FY6S8D7799SF8WFWFOIWW') or
(Serial='FJIWUFWOJUIGHG87W8FE65302876SG8D7G6AFASKFY6T3789292OYF922') or
(Serial='LWELHIOWUQITUNHGWICNBVZMHAUI77802KMKLJFASFHNIKSAKHGUD7639') or
(Serial='JIOEOUIW768W49NJKH87289039F89SDF8889786S78F0WF89GNKSFIAO8') or
(Serial='SDHGJKSJV7S78D74973JHIVY78W085829549386782JSDLKJEWPWYUWTK') or
(Serial='476278YY7S7R81762635ASJGGFNMXZXGF57271IH8F7T18IOFH89Y91DD') or
(Serial='CHYGFJHUGUYNN5576763BJJBXC5C76576C5Q6538NK63782NF87Y28FH9') or
(Serial='HUISF66729FY2FMDSKSJMD9SMFYSRWOFKWY8F89WFWFLUW89LLFYUS9F0') or
(Serial='DJGOWO767289NK2JY8N9YS9F98SFM90USODJFOIY9JAILALPCISONKAKL') or
(Serial='QWEYU87829HIBNJXBMZT676C79207820FJ2HFJIMJ0WEUFWJ0RUF0R893') or
(Serial='CVFHUISGQTQJI67832002RUDJFWE0RMPOEJSJI02878HKT782LKFUIG28') or
(Serial='JCKFDSL45763H2H4JKL2354JHJG45JKL2GHJK6H8HIPO5K2J5H3I5L3HJ') or
(Serial='3JH76FSD6F8H898S56463HK2JOIMG6W78EFWEF68GKLLH78E676TERT79') or
(Serial='FHQFUHVO77G9Y4O3NOSHDFUIIFQ89F7Q8F89EW0SDHFKSFY47892F2F34') then
Result:=True
else
begin
Result:=False;
end;
end;
//===================\\
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
Res: Integer;
begin
case
CurUninstallStep of usPostUninstall:
begin
if
DirExists(ExpandConstant('{app}') + '')
then
case
MsgBox('Папка "' + ExpandConstant('{app}') + '" не пуста.'#13#13 +
'"Да" – полное удаление всех файлов в папке, включая саму папку.' #13#13 +
'"Нет" – открыть папку в проводнике, чтобы вручную удалить файлы.'#13#13 +
'"Отмена" – ничего не делать, удалить папку позже самостоятельно.', mbInformation, MB_YESNOCANCEL) of IDYES:
begin
if
not
DelTree(ExpandConstant('{app}') + '', True, True, True)
then
MsgBox('Папка не удалена.' #13#13 'Папка или один из файлов в ней задействованы другим приложением.', mbError, MB_OK);
end
IDNO:
begin
if not
ShellExec('open', ExpandConstant('{app}') + '', '', '', SW_SHOWMAXIMIZED, ewNoWait, Res)
then
MsgBox('Ошибка открытия.' #13#13 'Папка не найдена.', mbError, MB_OK);
end
IDCANCEL:
begin
end;
end;
end;
end;
end;
procedure CancelButtonClick(CurPage: Integer; var Cancel, Confirm: Boolean);
begin
Confirm := False;
AnimateWindow(WizardForm.Handle, 3000, AW_IMPLODE);
Cancel := True;
end;
procedure DeinitializeSetup();
begin
BASS_Stop();
BASS_Free();
SetSystemCursor(OldCursor, OCR_NORMAL);
end;
[/more]
А вот код который надо слиять !
[more]
[Setup]
AppName=My Program
AppVerName=My Program [Version]
DefaultDirName={pf}\My Program
[Files]
Source: 1.txt; DestDir: {app}; Check: Checked1
Source: 2.txt; DestDir: {app}; Check: Checked2
Source: 3.txt; DestDir: {app}; Check: Checked3
Source: 1.bmp; DestDir: {app};
Source: 2.bmp; DestDir: {app};
Source: 3.bmp; DestDir: {app};
[Code]
var
Page: TWizardPage;
Text1, Text2, Text3, Text4: TNewStaticText;
Panel: TPanel;
ListboxNew: TListbox;
Check1, Check2, Check3: TCheckBox;
NoChecks, Label1, Label2, Label3: TLabel;
Image: TBitmapImage;
function Checked1: Boolean;
begin
Result := Check1.Checked
end;
function Checked2: Boolean;
begin
Result := Check2.Checked
end;
function Checked3: Boolean;
begin
Result := Check3.Checked
end;
procedure Check1OnClick (Sender: TObject);
begin
Check1.Checked := not (Check1.Checked)
end;
procedure Check2OnClick (Sender: TObject);
begin
Check2.Checked := not (Check2.Checked)
end;
procedure Check3OnClick (Sender: TObject);
begin
Check3.Checked := not (Check3.Checked)
end;
procedure Check1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
Text4.Enabled := True
Text4.Caption := 'Описание компонента 1'
Image.Show
Image.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp'))
end;
procedure Check2MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
Text4.Enabled := True
Text4.Caption := 'Описание компонента 2'
Image.Show
Image.Bitmap.LoadFromFile(ExpandConstant('{tmp}\2.bmp'))
end;
procedure Check3MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
Text4.Enabled := True
Text4.Caption := 'Описание компонента 3'
Image.Show
Image.Bitmap.LoadFromFile(ExpandConstant('{tmp}\3.bmp'))
end;
procedure NoChecksMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
Image.Hide
Text4.Enabled := False
Text4.Caption := 'Наведите курсор мыши на название компонента, чтобы прочесть его описание.'
end;
procedure InitializeWizard();
begin
ExtractTemporaryFile('1.bmp')
ExtractTemporaryFile('2.bmp')
ExtractTemporaryFile('3.bmp')
Page := CreateCustomPage(2, 'Компоненты устанавливаемой программы', 'Выберите компоненты, которые вы хотите установить.')
Text1 := TNewStaticText.Create(Page)
Text1.Left := 0
Text1.Top := 0
Text1.Width := 417
Text1.Height := 28
Text1.AutoSize := False
Text1.WordWrap := True
Text1.Caption := 'Выберите компоненты программы, которые вы хотите установить. Нажмите на кнопку "Далее" для продолжения.'
Text1.Parent := Page.Surface
Text2 := TNewStaticText.Create(Page)
Text2.Left := 0
Text2.Top := 63
Text2.Width := 130
Text2.Height := 42
Text2.AutoSize := False
Text2.WordWrap := True
Text2.Caption := 'Выберите компоненты программы для установки:'
Text2.Parent := Page.Surface
Panel := TPanel.Create(Page)
Panel.Left := 287
Panel.Top := 60
Panel.Width := 130
Panel.Height := 160
Panel.BevelInner := bvLowered
Panel.Parent := Page.Surface
Text3 := TNewStaticText.Create(Page)
Text3.Left := 293
Text3.Top := 54
Text3.Font.Color := clBlue
Text3.Caption := 'Описание'
Text3.Parent := Page.Surface
Text4 := TNewStaticText.Create(Page)
Text4.Left := 4
Text4.Top := 10
Text4.Width := 122
Text4.Height := 140
Text4.AutoSize := False
Text4.WordWrap := True
Text4.Parent := Panel
NoChecks := TLabel.Create(Page)
NoChecks.Width := WizardForm.Width
NoChecks.Height := WizardForm.Height
NoChecks.Autosize := False
NoChecks.Transparent := True
NoChecks.OnMouseMove := @NoChecksMouseMove
NoChecks.Parent := Page.Surface
ListboxNew := TListbox.Create(Page)
ListboxNew.Left := 135
ListboxNew.Top := 60
ListboxNew.Width := 140
ListboxNew.Height := 160
ListboxNew.Parent := Page.Surface
Image := TBitmapImage.Create(Page)
Image.Left := 30
Image.Top := 110
Image.Width := 55
Image.Height := 55
Image.Parent := Page.Surface
Check1 := TCheckBox.Create(Page)
Check1.Left := 2
Check1.Top := 0
Check1.Checked := True
Check1.Parent := ListboxNew
Check2 := TCheckBox.Create(Page)
Check2.Left := 2
Check2.Top := 16
Check2.Checked := True
Check2.Parent := ListboxNew
Check3 := TCheckBox.Create(Page)
Check3.Left := 2
Check3.Top := 32
Check3.Checked := True
Check3.Parent := ListboxNew
Label1 := TLabel.Create(Page)
Label1.Left := 16
Label1.Top := 2
Label1.Caption := 'Компонент 1'
Label1.OnClick := @Check1OnClick
Label1.OnMouseMove := @Check1MouseMove
Label1.Parent := Check1
Label2 := TLabel.Create(Page)
Label2.Left := 16
Label2.Top := 2
Label2.Caption := 'Компонент 2'
Label2.OnClick := @Check2OnClick
Label2.OnMouseMove := @Check2MouseMove
Label2.Parent := Check2
Label3 := TLabel.Create(Page)
Label3.Left := 16
Label3.Top := 2
Label3.Caption := 'Компонент 3'
Label3.OnClick := @Check3OnClick
Label3.OnMouseMove := @Check3MouseMove
Label3.Parent := Check3
end;
[/more]
Ну пожалуйста помогите !!!
Заранее большое спасибо !!!!!!!!!!!!