drakula 666
Newbie | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору народ помогите новичку в inno setup вот скрипт ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! [Setup] AppName=My Program AppVerName=My Program 1.5 AppPublisher=My Company, Inc. AppPublisherURL=http://www.example.com/ AppSupportURL=http://www.example.com/ AppUpdatesURL=http://www.example.com/ DefaultDirName={pf}\My Program DefaultGroupName=My Program OutputBaseFilename=setup Compression=lzma SolidCompression=yes WindowVisible=yes WindowResizable=no WindowShowCaption=no [Languages] Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] Source: "E:\Program Files\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] Name: "{group}\My Program"; Filename: "{app}\MyProg.exe" Name: "{group}\{cm:UninstallProgram,My Program}"; Filename: "{uninstallexe}" Name: "{commondesktop}\My Program"; Filename: "{app}\MyProg.exe"; Tasks: desktopicon [Run] Filename: "{app}\MyProg.exe"; Description: "{cm:LaunchProgram,My Program}"; Flags: nowait postinstall skipifsilent [Files] Source: E:\Program Files\Inno Setup 5\isxbb.dll; DestDir: {tmp}; Flags: dontcopy Source: E:\Program Files\Inno Setup 5\1.jpg; DestDir: {tmp}; Flags: dontcopy Source: E:\Program Files\Inno Setup 5\2.jpg; DestDir: {tmp}; Flags: dontcopy Source: E:\Program Files\Inno Setup 5\3.jpg; DestDir: {tmp}; Flags: dontcopy Source: E:\Program Files\Inno Setup 5\4.jpg; DestDir: {tmp}; Flags: dontcopy Source: "E:\Program Files\Inno Setup 5\BASS.dll"; DestDir: "{tmp}"; Flags: dontcopy Source: "E:\Program Files\Inno Setup 5\06-static_x_-_the_only-ost-2003-djn.mp3"; DestDir: "{tmp}"; Flags: dontcopy [Code] const BACKGROUND=6; TIMER=16; BASS_SAMPLE_LOOP = 4; type HSTREAM = DWORD; 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 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; begin WizardForm.CancelButton.BringToFront; begin ExtractTemporaryFile('1.jpg'); isxbb_AddImage(ExpandConstant('{tmp}')+'\1.jpg',BACKGROUND); isxbb_Init(StrToInt(ExpandConstant('{hwnd}'))); end; end; procedure DeInitializeSetup(); begin BASS_Stop(); BASS_Free(); end; procedure CurStepChanged(CurStep: TSetupStep); begin if CurStep=ssInstall then begin ExtractTemporaryFile('2.jpg'); ExtractTemporaryFile('3.jpg'); ExtractTemporaryFile('4.jpg'); isxbb_AddImage(ExpandConstant('{tmp}')+'\2.jpg',BACKGROUND or TIMER); isxbb_AddImage(ExpandConstant('{tmp}')+'\3.jpg',BACKGROUND or TIMER); isxbb_AddImage(ExpandConstant('{tmp}')+'\4.jpg',BACKGROUND or TIMER); isxbb_Init(StrToInt(ExpandConstant('{hwnd}'))); isxbb_StartTimer(3,BACKGROUND) end else if CurStep=ssPostInstall then isxbb_KillTimer(BACKGROUND); end; begin ExtractTemporaryFile('BASS.dll'); ExtractTemporaryFile('01-OVERSEER-Doomsday.mp3'); if BASS_Init(-1, 44100, 0, 0, 0) then begin BASS_Start(); Name1:=ExpandConstant('{tmp}\01-OVERSEER-Doomsday.mp3'); i:=BASS_StreamCreateFile(FALSE, PChar(Name1), 0, 0, 4); if i <> 0 then begin BASS_ChannelPlay(i, True); end; end; end; procedure CurPageChanged(CurPageID: Integer); begin if CurPageID=wpInstalling then begin WizardForm.MainPanel.Visible:=False; WizardForm.Bevel1.Visible:=False; WizardForm.Width:=ScaleX(395); WizardForm.Height:=ScaleY(142); WizardForm.Left:=ScaleX(MainForm.Width-420); WizardForm.Top:=ScaleY(MainForm.Height-170); WizardForm.InnerNotebook.Left:=ScaleX(10); WizardForm.InnerNotebook.Top:=ScaleY(10); WizardForm.InnerNotebook.Width:=ScaleX(370); WizardForm.StatusLabel.Left:=ScaleX(0); WizardForm.StatusLabel.Top:=ScaleY(0); WizardForm.StatusLabel.Width:=WizardForm.InnerNotebook.Width; WizardForm.FileNameLabel.Left:=ScaleX(0); WizardForm.FileNameLabel.Top:=ScaleY(20); WizardForm.FileNameLabel.Width:=WizardForm.InnerNotebook.Width; WizardForm.ProgressGauge.Top:=ScaleY(40); WizardForm.ProgressGauge.Width:=WizardForm.InnerNotebook.Width; WizardForm.CancelButton.Left:=ScaleX(154); WizardForm.CancelButton.Top:=ScaleY(80); end if CurPageID=wpFinished then begin WizardForm.Width:=502; WizardForm.Height:=392; WizardForm.Position:=poScreenCenter; end; end; end; end; Добавлено: народ помогите новичкув inno setup ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! [Setup] AppName=My Program AppVerName=My Program 1.5 AppPublisher=My Company, Inc. AppPublisherURL=http://www.example.com/ AppSupportURL=http://www.example.com/ AppUpdatesURL=http://www.example.com/ DefaultDirName={pf}\My Program DefaultGroupName=My Program OutputBaseFilename=setup Compression=lzma SolidCompression=yes WindowVisible=yes WindowResizable=no WindowShowCaption=no [Languages] Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] Source: "E:\Program Files\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] Name: "{group}\My Program"; Filename: "{app}\MyProg.exe" Name: "{group}\{cm:UninstallProgram,My Program}"; Filename: "{uninstallexe}" Name: "{commondesktop}\My Program"; Filename: "{app}\MyProg.exe"; Tasks: desktopicon [Run] Filename: "{app}\MyProg.exe"; Description: "{cm:LaunchProgram,My Program}"; Flags: nowait postinstall skipifsilent [Files] Source: E:\Program Files\Inno Setup 5\isxbb.dll; DestDir: {tmp}; Flags: dontcopy Source: E:\Program Files\Inno Setup 5\1.jpg; DestDir: {tmp}; Flags: dontcopy Source: E:\Program Files\Inno Setup 5\2.jpg; DestDir: {tmp}; Flags: dontcopy Source: E:\Program Files\Inno Setup 5\3.jpg; DestDir: {tmp}; Flags: dontcopy Source: E:\Program Files\Inno Setup 5\4.jpg; DestDir: {tmp}; Flags: dontcopy Source: "E:\Program Files\Inno Setup 5\BASS.dll"; DestDir: "{tmp}"; Flags: dontcopy Source: "E:\Program Files\Inno Setup 5\06-static_x_-_the_only-ost-2003-djn.mp3"; DestDir: "{tmp}"; Flags: dontcopy [Code] const BACKGROUND=6; TIMER=16; BASS_SAMPLE_LOOP = 4; type HSTREAM = DWORD; 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 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; begin WizardForm.CancelButton.BringToFront; begin ExtractTemporaryFile('1.jpg'); isxbb_AddImage(ExpandConstant('{tmp}')+'\1.jpg',BACKGROUND); isxbb_Init(StrToInt(ExpandConstant('{hwnd}'))); end; end; procedure CurStepChanged(CurStep: TSetupStep); begin if CurStep=ssInstall then begin ExtractTemporaryFile('2.jpg'); ExtractTemporaryFile('3.jpg'); ExtractTemporaryFile('4.jpg'); isxbb_AddImage(ExpandConstant('{tmp}')+'\2.jpg',BACKGROUND or TIMER); isxbb_AddImage(ExpandConstant('{tmp}')+'\3.jpg',BACKGROUND or TIMER); isxbb_AddImage(ExpandConstant('{tmp}')+'\4.jpg',BACKGROUND or TIMER); isxbb_Init(StrToInt(ExpandConstant('{hwnd}'))); isxbb_StartTimer(3,BACKGROUND) end else if CurStep=ssPostInstall then isxbb_KillTimer(BACKGROUND); end; begin ExtractTemporaryFile('BASS.dll'); ExtractTemporaryFile('01-OVERSEER-Doomsday.mp3'); if BASS_Init(-1, 44100, 0, 0, 0) then begin BASS_Start(); Name1:=ExpandConstant('{tmp}\01-OVERSEER-Doomsday.mp3'); i:=BASS_StreamCreateFile(FALSE, PChar(Name1), 0, 0, 4); if i <> 0 then begin BASS_ChannelPlay(i, True); end; end; end; procedure CurPageChanged(CurPageID: Integer); begin if CurPageID=wpInstalling then begin WizardForm.MainPanel.Visible:=False; WizardForm.Bevel1.Visible:=False; WizardForm.Width:=ScaleX(395); WizardForm.Height:=ScaleY(142); WizardForm.Left:=ScaleX(MainForm.Width-420); WizardForm.Top:=ScaleY(MainForm.Height-170); WizardForm.InnerNotebook.Left:=ScaleX(10); WizardForm.InnerNotebook.Top:=ScaleY(10); WizardForm.InnerNotebook.Width:=ScaleX(370); WizardForm.StatusLabel.Left:=ScaleX(0); WizardForm.StatusLabel.Top:=ScaleY(0); WizardForm.StatusLabel.Width:=WizardForm.InnerNotebook.Width; WizardForm.FileNameLabel.Left:=ScaleX(0); WizardForm.FileNameLabel.Top:=ScaleY(20); WizardForm.FileNameLabel.Width:=WizardForm.InnerNotebook.Width; WizardForm.ProgressGauge.Top:=ScaleY(40); WizardForm.ProgressGauge.Width:=WizardForm.InnerNotebook.Width; WizardForm.CancelButton.Left:=ScaleX(154); WizardForm.CancelButton.Top:=ScaleY(80); end if CurPageID=wpFinished then begin WizardForm.Width:=502; WizardForm.Height:=392; WizardForm.Position:=poScreenCenter; end; end; end; end; procedure DeInitializeSetup(); begin BASS_Stop(); BASS_Free(); end; |