Ru-Board.club
← Вернуться в раздел «Программы»

» КАК совместить скрипт

Автор: KoMepcaHT
Дата сообщения: 08.02.2013 08:19
[more] делаю свой скрипт в inno setup у меня полная версия и хачю совместить свой скрипт с скриптами botva2 вроде бы совместил но при компиляции вылазит ошибка
Строка 133
[setup] section derective "AppName" already specified
http://s017.radikal.ru/i401/1302/df/d3844e59817f.jpg
я допустим убрал эту строку
появляется такаяже ошибка только в другой
строке как мне это исправить вы опытные подскажите

"вот ПЕРВЫЙ скрипт"



Код:
[Setup]
SourceDir=.
OutputDir=Setup
AppName=Counter-Strike 1.6 [JG]
AppVerName=Counter-Strike 1.6 [JG]
AppVersion=Counter-Strike 1.6 [JG]
AppPublisher=[JG] ЦРМ
AppCopyright=[JG] ЦРМ
AppPublisherURL=www.tobolsk-server.ru
AppSupportURL=www.tobolsk-server.ru
AppUpdatesURL=www.tobolsk-server.ru
DefaultDirName={pf}\Counter-Strike 1.6 [JG]
DefaultGroupName=Counter-Strike 1.6 [JG]
AllowNoIcons=yes
OutputBaseFilename=setup
SetupIconFile=C:\Users\Ataka\Desktop\favicon.ico
WindowVisible=no
WindowShowCaption=no
WindowResizable=no
Compression=lzma/normal
DiskSpanning=yes
DiskSliceSize=2100000000
SlicesPerDisk=1

[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"

[Files]
Source: ISSkin.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: steam.cjstyles; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "C:\Users\Ataka\Desktop\cs.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "isgsg.dll"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "bass.dll"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "innocallback.dll"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "D:\Программы\Музыка\музыка\новая 2013\клуб\08. Darius & Finlay feat. Daz - Here Comes The Night (Club Mix).mp3"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression

Source: "D:\ZBoRkA CS 1.6\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension

[Icons]
Name: "{group}\Counter-Strike"; Filename: "{app}\hl.exe"; WorkingDir: "{app}"; Parameters: -game cstrike -steam;
Name: "{userdesktop}\Counter-Strike"; Filename: "{app}\hl.exe"; WorkingDir: "{app}"; Tasks: desktopicon; Parameters: -game cstrike -steam;
Name: "{group}\{cm:UninstallProgram,Counter-Strike 1.6 [JG]}"; Filename: "{uninstallexe}"

[Run]
Description: "{cm:LaunchProgram, Counter-Strike}"; Filename: "{app}\hl.exe"; WorkingDir: "{app}"; Parameters: -game cstrike -steam; Flags: nowait postinstall skipifsilent unchecked

[UninstallDelete]
Type: filesandordirs; Name: "{app}"


Код:
type
HSTREAM=DWORD;
TTimerProc=procedure(uTimerID,uMessage:UINT;dwUser,dw1,dw2:DWORD);
const
dURL=2;

var
URLLabel,URLLabelShadow:TLabel;
MP3List:TStringList;
CurrentMP3:integer;
hMP3:HWND;
TimerID:LongWord;

function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLongA@user32.dll stdcall delayload';
function ssInitialize(hParent:HWND;ssTimeShow:integer;FadeOut:boolean;StretchMode:integer;BkgColor:DWORD):boolean; external 'ssInitialize@files:isgsg.dll stdcall delayload';
procedure ssDeInitialize; external 'ssDeInitialize@files:isgsg.dll stdcall delayload';
procedure ssSetBkgImage(FileName:PChar); external 'ssSetBkgImage@files:isgsg.dll stdcall delayload';
function SetTimer(hWnd:HWND;nIDEvent,uElapse:UINT;lpTimerFunc:LongWord{TFNTimerProc}):UINT; external 'SetTimer@user32.dll stdcall delayload';
function KillTimer(hWnd:HWND;uIDEvent:UINT):BOOL; external 'KillTimer@user32.dll stdcall delayload';
function BASS_ChannelIsActive(Handle:HWND):DWORD; external 'BASS_ChannelIsActive@files:bass.dll stdcall';
function BASS_SetConfig(Option,Value:DWORD):DWORD; external 'BASS_SetConfig@files:bass.dll 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';
function BASS_StreamFree(Handle:HWND):boolean; external 'BASS_StreamFree@files:bass.dll stdcall';
function BASS_ChannelPlay(Handle:HWND;Restart:boolean):boolean; external 'BASS_ChannelPlay@files:bass.dll stdcall';
function BASS_Start: Boolean; external 'BASS_Start@files:bass.dll stdcall';
function BASS_Stop: Boolean; external 'BASS_Stop@files:bass.dll stdcall';
function BASS_Free: Boolean; external 'BASS_Free@files:bass.dll stdcall delayload';
function WrapTimerProc(CallBack:TTimerProc;ParamCount:integer):LongWord; external 'wrapcallback@files:innocallback.dll stdcall';
procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';

procedure TimerTick(uTimerID,uMessage:UINT;dwUser,dw1,dw2:DWORD);
begin
if BASS_ChannelIsActive(hMP3)=0 then begin
BASS_Stop;
BASS_StreamFree(hMP3);
hMP3:=BASS_StreamCreateFile(False,PChar(MP3List.Strings[CurrentMP3]),0,0,0);
BASS_Start;
if hMP3<>0 then
if BASS_ChannelPlay(hMP3,True) then begin
CurrentMP3:=CurrentMP3+1;
if CurrentMP3>MP3List.Count-1 then CurrentMP3:=0;
end;
end;
end;

procedure URLLabelClick(Sender: TObject);
var
ErrorCode:integer;
begin
ShellExec('open','www.tobolsk-server.ru','','',SW_SHOWNORMAL,ewNoWait,ErrorCode);
end;

procedure URLLabelMouseDown(Sender:TObject;Button:TMouseButton;Shift:TShiftState;X,Y:Integer);
begin
URLLabel.Top:=URLLabel.Top+dURL;
URLLabel.Left:=URLLabel.Left+dURL;
URLLabel.Font.Style:=URLLabel.Font.Style+[fsUnderline];
URLLabel.Font.Color:=$50B5C4;
URLLabelShadow.Visible:=False;
end;

procedure URLLabelMouseUp(Sender:TObject;Button:TMouseButton;Shift:TShiftState;X,Y:Integer);
begin
URLLabel.Top:=URLLabel.Top-dURL;
URLLabel.Left:=URLLabel.Left-dURL;
URLLabel.Font.Style:=URLLabel.Font.Style-[fsUnderline];
URLLabel.Font.Color:=$708A7A;
URLLabelShadow.Visible:=True;
end;

function InitializeSetup:boolean;
begin
ExtractTemporaryFile('08. Darius & Finlay feat. Daz - Here Comes The Night (Club Mix).mp3');
MP3List:=TStringList.Create;
MP3List.Add(ExpandConstant('{tmp}')+'\08. Darius & Finlay feat. Daz - Here Comes The Night (Club Mix).mp3');
CurrentMP3:=0;
ExtractTemporaryFile('steam.cjstyles');
LoadSkin(ExpandConstant('{tmp}')+'\steam.cjstyles', '');
Result:=True;
end;

procedure InitializeWizard;
begin
URLLabelShadow:=TLabel.Create(WizardForm);
with URLLabelShadow do begin
Top:=ScaleY(331);
Left:=ScaleX(25);
Caption:='www.tobolsk-server.ru';
AutoSize:=True;
Parent:=WizardForm;
Transparent:=True;
Font.Color:=$041207;
Font.Size:=9;
Font.Style:=Font.Style+[fsBold];
end;
URLLabel:=TLabel.Create(WizardForm);
with URLLabel do begin
Top:=ScaleY(331)-dURL;
Left:=ScaleX(25)-dURL;
Caption:='www.tobolsk-server.ru';
AutoSize:=True;
Parent:=WizardForm;
Cursor:=crHand;
Transparent:=True;
Font.Color:=$708A7A;
Font.Size:=9;
Font.Style:=Font.Style+[fsBold];
BringToFront;
OnClick:=@URLLabelClick;
OnMouseDown:=@URLLabelMouseDown;
OnMouseUp:=@URLLabelMouseUp;
end;
TimerID:=SetTimer(0,0,500,WrapTimerProc(@TimerTick,5));
BASS_Init(-1,44100,0,0,0);
BASS_SetConfig(5,100);
BASS_SetConfig(6,100);
ssInitialize(GetWindowLong(MainForm.Handle,-8),0,False,1,$FF000000);
ExtractTemporaryFile('cs.jpg');
ssSetBkgImage(ExpandConstant('{tmp}')+'\cs.jpg');
WizardForm.BeveledLabel.Enabled:=True;
end;

procedure DeinitializeSetup;
begin
KillTimer(0,TimerID);
BASS_Stop;
BASS_Free;
MP3List.Free;
ShowWindow(WizardForm.Handle,0);
UnloadSkin();
ssDeInitialize;
end;

Страницы: 1

Предыдущая тема: Постраничная разбивка и склеивание PDF


Форум Ru-Board.club — поднят 15-09-2016 числа. Цель - сохранить наследие старого Ru-Board, истории становления российского интернета. Сделано для людей.