но когда снимаю галочки с 2 или 1 программ выдаёт ошибку (типо не найдена программа с которых снял галочки)
скрипт
[Setup]
AppName=Браузеры
AppVersion=2.0
AppVerName=2.0
SetupIconFile=C:\Users\WWW\Desktop\скрипт\image\1.ico
VersionInfoDescription=Браузеры 2.0
OutputDir=C:\Users\WWW\Desktop\скрипт
Compression=lzma2/ultra64
SolidCompression=true
InternalCompressLevel=ultra
WizardImageFile=image\portable.bmp
WizardSmallImageFile=image\portable2.bmp
Uninstallable=IsChecked
CreateUninstallRegKey=IsChecked
DisableReadyPage=True
DisableReadyMemo=True
CreateAppDir=False
UsePreviousGroup=False
DisableProgramGroupPage=yes
CompressionThreads=2
[Languages]
Name: ru; MessagesFile: compiler:Languages\Russian.isl;
[Files]
;Source: "C:\Users\WWW\Desktop\скрипт\soft\*"; DestDir: "{app}"; Check: "not IsChecked"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: dll\BASS.dll; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
Source: Sound\sound.mp3; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
Source: image\Splash.png; Flags: dontcopy
Source: dll\isgsg.dll; Flags: dontcopy
Source: dll\VclStylesinno.dll; DestDir: {app}; Flags: dontcopy
Source: CobaltXEMedia.vsf; DestDir: {app}; Flags: dontcopy
Source: image\portable.bmp; DestDir: {tmp}; Flags: dontcopy
Source: soft\Chromodo Browser 44.5.7.268.exe; Components: ChromodoBrowser; DestDir: "{tmp}"
Source: soft\Google Chrome 44.0.2403.157 Stable 64.exe; Components: GoogleChrome; DestDir: "{tmp}"
Source: soft\Google Chrome 44.0.2403.157 Stable.exe; Components: GoogleChrome; DestDir: "{tmp}"
[CustomMessages]
MyRadioCaption_1=Распаковка
MyText_1=Будет произведена распаковка в паку,%nуказанную на следующей странице
Extracted=Распаковка — %1
ExtractedFolder=Выбор папки распаковки
ExtractedFolder2=В какую папку вы хотите распаковать %1?
ExtractedFolder3=Программа распакует %1 в следующую папку.
Installing=Распаковка...
InstallingLabel=Пожалуйста, подождите, пока %1 установится на ваш компьютер.
FinishedHeadingLabel=Завершение распаковки%n%1
FinishedLabelNoIcons=Программа %1 распакована на Ваш компьютер.%n%nНажмите «Завершить», чтобы выйти из программы распаковки.
[UninstallDelete]
Type: filesandordirs; Name: {app}
[Types]
Name: "polnaya"; Description: "Полная установка"
Name: "viborochnaya"; Description: "Выборочная установка"; Flags: iscustom
[Components]
Name: "ChromodoBrowser"; Description: "Chromodo Browser 44.5.7.268"; Types: polnaya viborochnaya
Name: "GoogleChrome"; Description: "Google Chrome 44.0.2403.157 Stable 64"; Types: polnaya viborochnaya
Name: "GoogleChrome"; Description: "Google Chrome 44.0.2403.157 Stable"; Types: polnaya viborochnaya
[Run]
FileName: "{tmp}\Chromodo Browser 44.5.7.268.exe"; StatusMsg: "Выполнение программы Chromodo Browser 44.5.7.268"; Flags: skipifsilent hidewizard
FileName: "{tmp}\Google Chrome 44.0.2403.157 Stable 64.exe"; StatusMsg: "Выполнение программы Google Chrome 44.0.2403.157 Stable 64"; Flags: skipifsilent hidewizard
FileName: "{tmp}\Google Chrome 44.0.2403.157 Stable.exe"; StatusMsg: "Выполнение программы Google Chrome 44.0.2403.157 Stable"; Flags: skipifsilent hidewizard
[code]
{ RedesignWizardFormBegin } // Не удалять эту строку!
// Не изменять эту секцию. Она создана автоматически.
procedure RedesignWizardForm;
begin
with WizardForm.WelcomeLabel2 do
begin
Caption := '';
end;
with WizardForm.WelcomeLabel1 do
begin
Caption := '';
end;
with WizardForm.WizardBitmapImage2 do
begin
Width := ScaleX(500);
end;
with WizardForm.RunList do
begin
Left := ScaleX(477);
Top := ScaleY(299);
Width := ScaleX(0);
Height := ScaleY(6);
end;
with WizardForm.NoRadio do
begin
Left := ScaleX(16);
Top := ScaleY(313);
Width := ScaleX(13);
Height := ScaleY(9);
Caption := '';
end;
with WizardForm.YesRadio do
begin
Left := ScaleX(477);
Width := ScaleX(3);
Caption := '';
end;
with WizardForm.FinishedLabel do
begin
Caption := '';
Left := ScaleX(477);
Top := ScaleY(151);
Width := ScaleX(0);
Height := ScaleY(12);
end;
with WizardForm.FinishedHeadingLabel do
begin
Caption := '';
Left := ScaleX(477);
Top := ScaleY(312);
Width := ScaleX(12);
Height := ScaleY(2);
end;
{ ReservationBegin }
// Вы можете добавить ваш код здесь.
{ ReservationEnd }
end;
// Не изменять эту секцию. Она создана автоматически.
{ RedesignWizardFormEnd } // Не удалять эту строку!
//картинка
var
WelcomeLabel1, WelcomeLabel2, FinishedLabel, FinishedHeadingLabel: TLabel;
procedure InitializeWizard3();
begin
ExtractTemporaryFile('portable.bmp');
WizardForm.WizardBitmapImage.Width:= ScaleX(500);
WizardForm.WizardBitmapImage2.Width:= ScaleX(314);
WizardForm.WizardBitmapImage2.Bitmap.LoadFromFile(ExpandConstant('{tmp}\portable.bmp'));
WelcomeLabel1:= TLabel.Create(WizardForm);
WelcomeLabel1.AutoSize:= False;
with WizardForm.WelcomeLabel1 do
WelcomeLabel1.SetBounds(Left, Top, Width, Height);
WelcomeLabel1.Font:= WizardForm.WelcomeLabel1.Font
WelcomeLabel1.Font.Color:= clWhite;
WelcomeLabel1.Transparent:= True;
WelcomeLabel1.WordWrap:= true;
WelcomeLabel1.Caption:= WizardForm.WelcomeLabel1.Caption;
WelcomeLabel1.Parent:= WizardForm.WelcomePage
WelcomeLabel2:= TLabel.Create(WizardForm);
WelcomeLabel2.AutoSize:= False;
with WizardForm.WelcomeLabel2 do
WelcomeLabel2.SetBounds(Left, Top, Width, Height);
WelcomeLabel2.Font:= WizardForm.WelcomeLabel2.Font
WelcomeLabel2.Font.Color:= clWhite;
WelcomeLabel2.Transparent:= True;
WelcomeLabel2.WordWrap:= true;
WelcomeLabel2.Caption:= WizardForm.WelcomeLabel2.Caption;
WelcomeLabel2.Parent:= WizardForm.WelcomePage
FinishedHeadingLabel:= TLabel.Create(WizardForm);
FinishedHeadingLabel.AutoSize:= False;
with WizardForm.FinishedHeadingLabel do
FinishedHeadingLabel.SetBounds(Left, Top, Width, Height);
FinishedHeadingLabel.Font:= WizardForm.FinishedHeadingLabel.Font
FinishedHeadingLabel.Font.Color:= clWhite;
FinishedHeadingLabel.Transparent:= True;
FinishedHeadingLabel.WordWrap:= true;
FinishedHeadingLabel.Caption:= WizardForm.FinishedHeadingLabel.Caption;
FinishedHeadingLabel.Parent:= WizardForm.FinishedPage
FinishedLabel:= TLabel.Create(WizardForm);
FinishedLabel.AutoSize:= False;
with WizardForm.FinishedLabel do
FinishedLabel.SetBounds(Left, Top, Width, Height);
FinishedLabel.Font:= WizardForm.FinishedLabel.Font
FinishedLabel.Font.Color:= clWhite;
FinishedLabel.Transparent:= True;
FinishedLabel.WordWrap:= true;
FinishedLabel.Caption:= WizardForm.FinishedLabel.Caption;
FinishedLabel.Parent:= WizardForm.FinishedPage
WizardForm.WelcomeLabel1.Hide;
WizardForm.WelcomeLabel2.Hide;
WizardForm.FinishedLabel.Hide;
WizardForm.FinishedHeadingLabel.Hide;
end;
procedure CurPageChanged1(CurPageID: Integer);
begin
FinishedLabel.Caption:= WizardForm.FinishedLabel.Caption;
end;
//
procedure WelcomeLabel1Click(Sender: TObject); forward;
procedure RedesignWizardForm6;
begin
with WizardForm do
begin
Caption := 'Dilan';
end;
with WizardForm.WelcomeLabel2 do
begin
Top := ScaleY(310);
Width := ScaleX(101);
Height := ScaleY(1);
end;
with WizardForm.WelcomeLabel1 do
begin
Caption := 'Распаковка программы' + #13#10 +
'';
OnClick := @WelcomeLabel1Click;
Top := ScaleY(72);
end;
end;
procedure WelcomeLabel1Click(Sender: TObject);
begin
end;
const
DI_NORMAL = 3;
var
MyNewPage: TWizardPage;
Rect: TRect;
HIcon: LongInt;
AIconFileName: String;
MyRadioBtn_1, MyRadioBtn_2: TNewRadioButton;
function GetModuleHandle(lpModuleName: LongInt): LongInt; external 'GetModuleHandleA@kernel32.dll stdcall';
function ExtractIcon(hInst: LongInt; lpszExeFileName: AnsiString; nIconIndex: LongInt): LongInt; external 'ExtractIconA@shell32.dll stdcall';
function DrawIconEx(hdc: LongInt; xLeft, yTop: Integer; hIcon: LongInt; cxWidth, cyWidth: Integer; istepIfAniCur: LongInt; hbrFlickerFreeDraw, diFlags: LongInt): LongInt;external 'DrawIconEx@user32.dll stdcall';
function DestroyIcon(hIcon: LongInt): LongInt; external 'DestroyIcon@user32.dll stdcall';
function IsChecked: Boolean;
begin
Result:= MyRadioBtn_1.checked;
end;
procedure RadBtnOnClick(Sender: TObject);
begin
case Sender of
MyRadioBtn_1: begin
WizardForm.Caption:= FmtMessage(ExpandConstant('{cm:Extracted}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
WizardForm.SelectDirLabel.Caption:= FmtMessage(ExpandConstant('{cm:ExtractedFolder3}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
end;
end;
end;
procedure GetInstTypePage();
begin
try
AIconFileName:= ExpandConstant('{sys}\shell32.dll');
Rect.Left:= 0;
Rect.Top:= 0;
Rect.Right:= 32;
Rect.Bottom:= 32;
hIcon:= ExtractIcon(GetModuleHandle(0), AIconFileName, 26);
try
with TBitmapImage.Create(WizardForm) do begin
Left:= ScaleX(15);
Top:= ScaleY(68);
Width:= 32;
Height:= 32;
with Bitmap do begin
Width:= 32;
Height:= 32;
Canvas.Brush.Color:= clBtnFace;
Canvas.FillRect(Rect);
DrawIconEx(Canvas.Handle, 0, 0, HIcon, 32, 32, 0, 0, DI_NORMAL);
end;
end;
finally
DestroyIcon(hIcon);
end;
finally
DestroyIcon(hIcon);
end;
with TNewStaticText.Create(WizardForm) do begin
Width:= WizardForm.InnerNotebook.Width;
Height:= ScaleY(26);
WordWrap:= True;
end;
MyRadioBtn_1:= TNewRadioButton.Create(WizardForm);
with MyRadioBtn_1 do begin
Top:= ScaleY(50);
Width:= ScaleX(150);
Caption:= ExpandConstant('{cm:MyRadioCaption_1}');
OnClick:= @RadBtnOnClick;
end;
with TNewStaticText.Create(WizardForm) do begin
Left:= ScaleX(60);
Top:= ScaleY(68);
Width:= WizardForm.InnerNotebook.Width - ScaleX(60);
Height:= ScaleY(26);
WordWrap:= True;
Caption:= ExpandConstant('{cm:MyText_1}');
end;
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if (PageID > wpSelectDir) and (PageID < wpInstalling) and (MyRadioBtn_1.Checked) then
Result:= True;
end;
procedure InitializeWizard5();
begin
RedesignWizardForm;
GetInstTypePage();
WizardForm.DiskSpaceLabel.Hide;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if not IsChecked then begin
case CurPageID of
wpSelectDir: begin
WizardForm.Caption:= FmtMessage(ExpandConstant('{cm:Extracted}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
WizardForm.PageNameLabel.Caption:= ExpandConstant('{cm:ExtractedFolder}');
WizardForm.PageDescriptionLabel.Caption:= FmtMessage(ExpandConstant('{cm:ExtractedFolder2}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
WizardForm.SelectDirLabel.Caption:= FmtMessage(ExpandConstant('{cm:ExtractedFolder3}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
if IsChecked then
WizardForm.DirEdit.Text := ExpandConstant( '{pf}\{#SetupSetting("AppName")}' ) else
WizardForm.DirEdit.Text := ExpandConstant( '{src}\{#SetupSetting("AppName")}' );
end;
wpInstalling: begin
WizardForm.PageNameLabel.Caption:= ExpandConstant('{cm:Installing}');
WizardForm.PageDescriptionLabel.Caption:= FmtMessage(ExpandConstant('{cm:InstallingLabel}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
end;
wpFinished: begin
WizardForm.FinishedHeadingLabel.Caption:= FmtMessage(ExpandConstant('{cm:FinishedHeadingLabel}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
WizardForm.FinishedLabel.Caption:= FmtMessage(ExpandConstant('{cm:FinishedLabelNoIcons}'), [ExpandConstant('{#SetupSetting("AppName")}')]);
end;
end;
end;
end;
// переход на сайт
procedure CurStepChanged(CurStep: TSetupStep);
var
ErrorCode: Integer;
begin
If CurStep = ssDone then
begin
ShellExec('open', 'http://dilan.at.ua/', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)
end;
end;
// скин
procedure LoadVCLStyle(VClStyleFile: String); external 'LoadVCLStyleW@files:VclStylesInno.dll stdcall';
procedure UnLoadVCLStyles; external 'UnLoadVCLStyles@files:VclStylesInno.dll stdcall';
function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('CobaltXEMedia.vsf');
LoadVCLStyle(ExpandConstant('{tmp}\CobaltXEMedia.vsf'));
Result := True;
end;
var MouseLabel,SiteLabel: TLabel;
procedure SiteLabelOnClick(Sender: TObject); var ErrorCode: Integer;
begin
ShellExec('open', 'http://dilan.at.ua/', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)
end;
procedure SiteLabelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
SiteLabel.Font.Color:=clRed
end;
procedure SiteLabelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
SiteLabel.Font.Color:=clBlue
end;
procedure SiteLabelMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
SiteLabel.Font.Color:=clGreen
end;
procedure SiteLabelMouseMove2(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
SiteLabel.Font.Color:=clBlue
end;
procedure InitializeWizard1();
begin
MouseLabel:=TLabel.Create(WizardForm)
MouseLabel.Width:=WizardForm.Width
MouseLabel.Height:=WizardForm.Height
MouseLabel.Autosize:=False
MouseLabel.Transparent:=True
MouseLabel.OnMouseMove:=@SiteLabelMouseMove2
MouseLabel.Parent:=WizardForm
SiteLabel:=TLabel.Create(WizardForm)
SiteLabel.Left:=10
SiteLabel.Top:=330
SiteLabel.Cursor:=crHand
SiteLabel.Font.Color:=clBlue
SiteLabel.Caption:='RePack by Dilan'
SiteLabel.OnClick:=@SiteLabelOnClick
SiteLabel.OnMouseDown:=@SiteLabelMouseDown
SiteLabel.OnMouseUp:=@SiteLabelMouseUp
SiteLabel.OnMouseMove:=@SiteLabelMouseMove
SiteLabel.Parent:=WizardForm
end;
// Splash
procedure ShowSplashScreen(p1:HWND;p2:AnsiString;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer);
external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
procedure InitializeWizard2;
begin
ExtractTemporaryFile('Splash.png');
ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'),1000,3000,1000,0,255,True,$FFF FFF,10);
end;
const
BASS_SAMPLE_LOOP = 4;
var
mp3Handle: HWND;
mp3Name: String;
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: PAnsiChar; offset1: DWORD; offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): DWORD; 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';
function InitializeSetup4(): Boolean;
begin
ExtractTemporaryFile('BASS.dll');
ExtractTemporaryFile('sound.mp3');
mp3Name := ExpandConstant('{tmp}\sound.mp3');
BASS_Init(-1, 44100, 0, 0, 0);
mp3Handle := BASS_StreamCreateFile(FALSE, PAnsiChar(mp3Name), 0, 0, 0, 0, BASS_SAMPLE_LOOP);
BASS_Start();
BASS_ChannelPlay(mp3Handle, False);
Result := True;
end;
procedure InitializeWizard7();
begin
WizardForm.FilenameLabel.Hide //Прячем извлекаемые файлы
WizardForm.ProgressGauge.Hide //Прячем прогресс-бар
end;
procedure InitializeWizard();
begin
RedesignWizardForm;
InitializeWizard1();
InitializeWizard2;
InitializeWizard3();
InitializeSetup4()
InitializeWizard5();
RedesignWizardForm6;
InitializeWizard7();
end;
procedure DeinitializeSetup();
begin
BASS_Stop();
BASS_Free();
UnLoadVCLStyles;
end;
[ISFormDesigner]
WizardForm=FF0A005457495A415244464F524D0030100505000054504630F10B5457697A617264466F726D0A57697A61726 4466F726D0C436C69656E744865696768740368010B436C69656E74576964746803F1010C4578706C696369744C656674020 00B4578706C69636974546F7002000D4578706C6963697457696474680301020E4578706C69636974486569676874038F010 D506978656C73506572496E636802600A54657874486569676874020D00F10C544E65774E6F7465626F6F6B0D4F757465724 E6F7465626F6F6B00F110544E65774E6F7465626F6F6B506167650B57656C636F6D65506167650D4578706C6963697457696 4746803F1010E4578706C6963697448656967687403390100F10E544E6577537461746963546578740D57656C636F6D654C6 162656C320743617074696F6E12000000000000F10E544E6577537461746963546578740D57656C636F6D654C6162656C310 743617074696F6E1200000000000000F110544E65774E6F7465626F6F6B5061676509496E6E6572506167650D4578706C696 36974576964746803F1010E4578706C6963697448656967687403390100F10C544E65774E6F7465626F6F6B0D496E6E65724 E6F7465626F6F6B00F110544E65774E6F7465626F6F6B506167650E496E7374616C6C696E67506167650D4578706C6963697 4576964746803A1010E4578706C6963697448656967687403ED0000000000F110544E65774E6F7465626F6F6B506167650C4 6696E6973686564506167650B4578706C69636974546F7002400D4578706C69636974576964746803F1010E4578706C69636 97448656967687403390100F10C544269746D6170496D6167651257697A6172644269746D6170496D6167653205576964746 803F4010D4578706C69636974576964746803F4010000F110544E6577436865636B4C697374426F780752756E4C697374044 C65667403DD0103546F70032B0105576964746802000648656967687402060C4578706C696369744C65667403DD010B45787 06C69636974546F70032B010D4578706C69636974576964746802000E4578706C6963697448656967687402060000F10F544 E6577526164696F427574746F6E074E6F526164696F044C656674021003546F70033901055769647468020D0648656967687 402090743617074696F6E12000000000C4578706C696369744C65667402100B4578706C69636974546F700339010D4578706 C696369745769647468020D0E4578706C6963697448656967687402090000F10F544E6577526164696F427574746F6E08596 573526164696F044C65667403DD0105576964746802030743617074696F6E12000000000C4578706C696369744C65667403D D010D4578706C69636974576964746802030000F10E544E6577537461746963546578740D46696E69736865644C6162656C0 44C65667403DD0103546F70039700055769647468020006486569676874020C0743617074696F6E12000000000C4578706C6 96369744C65667403DD010B4578706C69636974546F700397000D4578706C69636974576964746802000E4578706C6963697 4486569676874020C0000F10E544E6577537461746963546578741446696E697368656448656164696E674C6162656C044C6 5667403DD0103546F70033801055769647468020C0648656967687402020743617074696F6E12000000000C4578706C69636 9744C65667403DD010B4578706C69636974546F700338010D4578706C696369745769647468020C0E4578706C69636974486 56967687402020000000000