#include "botva2.iss"
#include "BASS_Module.iss"
[Setup]
AppName={#MyAppName}
[Files]
Source: "b2p.dll"; DestDir : {tmp}; Flags: dontcopy
Source: "botva2.dll"; DestDir : {tmp}; Flags: dontcopy
Source: "bass.dll"; DestDir: {tmp}; Flags: dontcopy
Source: "CallbackCtrl.dll"; DestDir : {tmp}; Flags: dontcopy
Source: "music.mp3"; DestDir : {tmp}; Flags: dontcopy
Source: BASS_Files\*; DestDir : {tmp}; Flags: dontcopy
[code]
// Процедура для изменения громкости
// Можно добавить в сам модуль BASS_Module.iss
//------------------------------------------------------------------------------
procedure BASS_SetVolume(Pos: DWORD);
var
nLeft, bLeft, bTop, bWidth, bHeight: Integer;
begin
if (Pos >= 0) and (Pos <= 100) then begin
BASSChangePos(Pos);
nLeft:= BASS_VolBar.MinLeft + round(BASS_VolBar.BarWidth*BASS_Cfg.Volume/100);
if (nLeft<BASS_VolBar.MinLeft) then nLeft:= BASS_VolBar.MinLeft;
if (nLeft>BASS_VolBar.MaxLeft) then nleft:= BASS_VolBar.MaxLeft;
BtnGetPosition(BASS_VolBar.BarDote, bLeft, bTop, bWidth, bHeight);
BtnSetPosition(BASS_VolBar.BarDote, nLeft, bTop, bWidth, bHeight);
ImgApplyChanges(BASS_VolBar.Parent); // вроде не нужно, но навсякий написал
end;
end;
//------------------------------------------------------------------------------
procedure InitializeWizard();
begin
ExtractTemporaryFile('bass.dll');
ExtractTemporaryFile('music.mp3');
ExtractTemporaryFile('MusicButton.png')
ExtractTemporaryFile('volmax.png')
ExtractTemporaryFile('volmin.png')
ExtractTemporaryFile('volpb.png')
ExtractTemporaryFile('volpbt.png')
ExtractTemporaryFile('voldote.png')
ExtractTemporaryFile('botva2.dll')
ExtractTemporaryFile('CallbackCtrl.dll')
Bass_Init ('{tmp}\music.mp3');
BASS_CreateMediaPlayer(WizardForm, '{tmp}\volmax.png', '{tmp}\volmin.png', '{tmp}\volpb.png', '{tmp}\volpbt.png', '{tmp}\voldote.png', 20, 320, 150, True);
BASS_SetVolume(15);
end;
procedure DeinitializeSetup();
begin
Bass_DeInit;
gdipShutdown
end;
begin
WizardForm.TypesCombo.Visible:= False;
end.