Скрипт создан при помощи мастера создания скриптов. ; СМ. ДОКУМЕНТАЦИЮ ДЛЯ ИЗУЧЕНИЯ ДЕТАЛЕЙ ОТНОСИТЕЛЬНО СОЗДАНИЯ ФАЙЛОВ СКРИПТА INNO SETUP! [Setup] AppName=WinRAR AppVerName=WinRAR 3.71 AppPublisher=A6opuGEN Edition© AppPublisherURL=http://www.tapochek.net/ AppSupportURL=http://www.tapochek.net/ AppUpdatesURL=http://www.tapochek.net/ DefaultDirName={pf}\WinRAR DefaultGroupName=WinRAR DisableProgramGroupPage=yes OutputDir=C:\Setup OutputBaseFilename=WinRAR Compression=lzma/ultra64 SolidCompression=true WizardImageFile=C:\Users\Абориген\Pictures\Rainbow_Six_Vegas_2_1280x1024 1.bmp WizardImageBackColor=clBlack WizardSmallImageFile=D:\x\Downloads\155057.bmp InternalCompressLevel=ultra64 [Languages] Name: russian; MessagesFile: compiler:Default.isl [Tasks] Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked [Files] Source: C:\Program Files\Inno Setup Scripting v5.0\Addons\Libraries\BASS.dll; DestDir: {tmp}; Flags: dontcopy Source: D:\Resurs\track.mp3; DestDir: {tmp}; Flags: dontcopy Source: C:\Program Files\WinRAR\WinRAR.exe; DestDir: {app}; Flags: ignoreversion Source: C:\Program Files\WinRAR\*; DestDir: {app}; Flags: ignoreversion Source: D:\Resurs\logo.bmp; DestDir: {tmp}; Flags: dontcopy nocompression solidbreak ; ОТМЕТЬТЕ: Не используйте "Флажки: Проигнорировать версию" на любых общедоступных системных файлах [Icons] Name: {group}\WinRAR; Filename: {app}\WinRAR.exe Name: {commondesktop}\WinRAR; Filename: {app}\WinRAR.exe; Tasks: desktopicon [Run] Filename: {app}\WinRAR.exe; Description: {cm:LaunchProgram,WinRAR}; Flags: nowait postinstall skipifsilent [UninstallDelete] Name: {app}\*; Type: filesandordirs [Code] const BASS_SAMPLE_LOOP = 4; //повторение type HSTREAM = DWORD; //тип звукового потока 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 InitializeWizard(); var Name1: string; i: Integer; LogoImage:TBitmapImage; LogoLabel: TLabel; LogoPanel : TPanel; LogoPanel : TPanel; begin ExtractTemporaryFile('logo.bmp'); LogoPanel := TPanel.Create(WizardForm); with LogoPanel do begin Parent := WizardForm; Left := ScaleX(5); Top := ScaleY(320); Width := ScaleX(165); Height := ScaleY(35); BevelOuter := bvNone; end; end; LogoImage := TBitmapImage.Create(WizardForm); with LogoImage do begin Parent := LogoPanel; Left := ScaleX(0); Top := ScaleY(0); AutoSize:=true; ReplaceColor:=clFuchsia; ReplaceWithColor:=clBtnFace; Bitmap.LoadFromFile(ExpandConstant('{tmp}\logo.bmp')); end; LogoLabel := TLabel.Create(WizardForm); with LogoLabel do begin Parent := LogoPanel; Width := LogoPanel.Width; Height := LogoPanel.Height; Transparent:=True; Cursor := crHand; OnClick:=@LogoOnClick; end; begin ExtractTemporaryFile('BASS.dll'); ExtractTemporaryFile('track.mp3'); if BASS_Init(-1, 44100, 0, 0, 0) then begin BASS_Start(); Name1:=ExpandConstant('{tmp}\track.mp3'); i:=BASS_StreamCreateFile(FALSE, PChar(Name1), 0, 0, 4); if i <> 0 then begin BASS_ChannelPlay(i, True); end; end; end; procedure LogoOnClick(Sender: TObject); var ReturnCode: Integer; begin ShellExec('open', 'http://www.tapochek.net/', '', '', SW_SHOWNORMAL, ewNoWait, ReturnCode) end; procedure DeInitializeSetup(); begin BASS_Stop(); //нужно для остановки проигрывания BASS_Free(); //нужно для быстрой выгрузки библиотеки вместе с муз. файлом end; |