я уже нашел последнюю версию http://uk.un4seen.com/files/bass23.zip (это офф релиз вроде)
вот держи, не знаю че ты парился, там на 1 минуту копи-паста
Код: Выделить всё
[Setup]
SourceDir=.
OutputDir=setup
AppName=Counter-Strike Source
AppVerName=Counter-Strike Source
AppPublisher=South
DefaultDirName={pf}\Counter-Strike Source
DefaultGroupName=Counter-Strike Source
AllowNoIcons=yes
;InfoBeforeFile=resources\BeforeInstall.rtf
OutputBaseFilename=setup
;WizardImageFile=resources\css_two_small.bmp
;WizardSmallImageFile=resources\css_one_bw_small.bmp
WindowVisible=no
WindowShowCaption=no
WindowResizable=no
Compression=lzma/normal
SolidCompression=yes
DiskSpanning=yes
DiskSliceSize=731906048
SlicesPerDisk=1
;Password=111
;SetupIconFile=resources\game.ico
[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[Types]
Name: "full"; Description: "Полная установка"
Name: "custom"; Description: "Выборочная установка"; Flags: iscustom
[Components]
Name: "main"; Description: "Counter-Strike:Source"; Types: full custom; Flags: fixed disablenouninstallwarning
Name: "lang"; Description: "Версия"; Types: full custom; Flags: fixed disablenouninstallwarning
Name: "lang\rus"; Description: "Русская"; Flags: exclusive disablenouninstallwarning
Name: "lang\rus\rus_sounds"; Description: "Установить русскую озвучку (только 'cstrike\sound\radio\')"; Flags: dontinheritcheck
Name: "lang\eng"; Description: "Английская"; Flags: exclusive disablenouninstallwarning
Name: "background_pict"; Description: "Заменить фоновый рисунок в меню"; Types: full
Name: "background_sound"; Description: "Добавить фоновую музыку в меню"; Types: full
Name: "add_maps"; Description: "Установить дополнительные карты"; Types: full
Name: "add_mod"; Description: "Установить мод 'замедление времени'"; Types: full
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
[Files]
;временные файлы для инсталятора
Source: resources\*; DestDir: "{tmp}"; Flags: ignoreversion dontcopy nocompression
[Icons]
Name: "{group}\Counter-Strike Source"; Filename: "{app}\cssource.exe"
Name: "{group}\{cm:UninstallProgram,Counter-Strike Source}"; Filename: "{uninstallexe}"
Name: "{userdesktop}\Counter-Strike Source"; Filename: "{app}\cssource.exe"; Tasks: desktopicon
[Run]
Filename: "{app}\cssource.exe"; Description: "{cm:LaunchProgram,CS Source}"; Flags: nowait postinstall skipifsilent
[Registry]
Root: HKCU; Subkey: "Software\Valve\Steam"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\Valve\Steam"; ValueType: string; ValueName: "Path"; ValueData: "{app}"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\Valve\Steam"; ValueType: string; ValueName: "Language"; ValueData: "russian"; Components: "lang\rus"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\Valve\Steam"; ValueType: string; ValueName: "Language"; ValueData: "english"; Components: "lang\eng"; Flags: uninsdeletekey
[UninstallDelete]
Type: filesandordirs; Name: "{app}"
[_ISTool]
EnableISX=True
; убери подчеркивание в названии секции, это чтобы на форуме теги не путались
[Code_]
const
BASS_SAMPLE_LOOP = 4; //повторение
type
HSTREAM = DWORD; //тип звукового потока
var
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
function GetSystemMetrics(nIndex:Integer):Integer; external '[email protected] 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): HSTREAM; 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_Stop(): Boolean; external 'BASS_Stop@files:BASS.dll stdcall delayload';
function BASS_Free(): Boolean; external 'BASS_Free@files:BASS.dll stdcall delayload';
procedure URLLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://csmania.ru/', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
procedure InitializeWizard();
var
BackgroundBitmapImage: TBitmapImage;
s:string;
width, height:Integer;
URLLabel: TNewStaticText;
mp3file:string;
i:integer;
begin
RadioButton1 := TRadioButton.Create(WizardForm.FinishedPage);
with RadioButton1 do begin
Parent := WizardForm.FinishedHeadingLabel.Parent;
Caption := 'Запуск Half-Life 2 Episode 2';
Left := ScaleX(180);
Top := ScaleY(155);
Width := ScaleX(177);
Height := ScaleY(17);
TabOrder := 0;
end;
RadioButton2 := TRadioButton.Create(WizardForm.FinishedPage);
with RadioButton2 do begin
Parent := WizardForm.FinishedHeadingLabel.Parent;
Caption := 'Запуск Team Fortress 2';
Left := ScaleX(180);
Top := ScaleY(175);
Width := ScaleX(177);
Height := ScaleY(17);
TabOrder := 1;
end;
RadioButton3 := TRadioButton.Create(WizardForm.FinishedPage);
with RadioButton3 do begin
Parent := WizardForm.FinishedHeadingLabel.Parent;
Caption := 'Запуск Portal';
Left := ScaleX(180);
Top := ScaleY(195);
Width := ScaleX(177);
Height := ScaleY(17);
TabOrder := 2;
end;
WizardForm.Position:=poScreenCenter;
MainForm.BORDERSTYLE:=bsNone;
width:=GetSystemMetrics(0);
height:=GetSystemMetrics(1);
MainForm.Left := 0;
MainForm.Top := 0;
MainForm.Width:=width;
MainForm.Height:=height;
width:=MainForm.ClientWidth;
height:=MainForm.ClientHeight;
ExtractTemporaryFile('background.bmp');
s:=ExpandConstant('{tmp}')+'\background.bmp';
BackgroundBitmapImage := TBitmapImage.Create(MainForm);
BackgroundBitmapImage.Bitmap.LoadFromFile(s);
BackgroundBitmapImage.Align := alClient;
BackgroundBitmapImage.Parent := MainForm;
BackgroundBitmapImage.Stretch:=True;
MainForm.Visible:=True;
URLLabel := TNewStaticText.Create(WizardForm);
URLLabel.Caption := 'www.csmania.ru %)';
URLLabel.Parent := WizardForm;
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Font.Style := [fsUnderline];
URLLabel.Top := ScaleY(331);
URLLabel.Left := ScaleX(25);
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('clawfinger.mp3');
if BASS_Init(-1,44100,0,0,0) then begin
BASS_Stop(); //это на всякий случай, вдруг что-нибудь уже проигрывается (хотя откуда ему здесь взяться)
BASS_Start();
mp3file:=ExpandConstant('{tmp}\clawfinger.mp3');
i:=BASS_StreamCreateFile(FALSE, PChar(mp3file), 0, 0, 4);
if i<>0 then BASS_ChannelPlay(i, True);
end;
end;
function NextButtonClick(CurPageID: Integer): Boolean;
var
ResultCode: Integer;
begin
Result:=True;
if CurPageID=wpFinished then begin
if RadioButton1.Checked then
Exec(ExpandConstant('{app}\RUN_EP2.exe'), '', '', SW_SHOW,ewNoWait, ResultCode)
else
if RadioButton2.Checked then
Exec(ExpandConstant('{app}\RUN_TF2.exe'), '', '', SW_SHOW,ewNoWait, ResultCode)
else
if RadioButton3.Checked then Exec(ExpandConstant('{app}\RUN_PORTAL.exe'), '', '', SW_SHOW,ewNoWait, ResultCode)
end
end;
procedure DeInitializeSetup();
begin
BASS_Stop(); //нужно для остановки проигрывания
BASS_Free(); //нужно для быстрой выгрузки библиотеки вместе с муз. файлом
end;
это мой бывший скрипт установки CSSource, я из него поудалял все ненужное
в папке "путь_к_скрипту\resources\" должны лежать bass.dll, clawfinger.mp3 и background.bmp
в такой комплектации этот скрипт работает :) (проверено с bass.dll по моей ссылке)
думаю с секцией
Код: Выделить всё
[/b] разберешься
кстати есть у кого-нибудь описание по использованию bass.dll на русском? если есть киньтесь ссылкой буду признателен