ТОВАРИЩИ ПОДСКАЖИТЕ!))) И сильно не бейте!!) Суть вопроса:
Есть вот это :
читать дальше »
[Setup]
AppName=$RUS_PROJECT_NAME
AppVerName=$RUS_PROJECT_NAME
AppPublisher=Текст
DefaultDirName={pf}\Текст\$PROJECT_NAME
DefaultGroupName=$RUS_PROJECT_NAME
;LicenseFile=license_rus.txt
DisableStartupPrompt=yes
OutputDir=Output
OutputBaseFilename=$DISTRIBUTIVE_OUTPUT
[Languages]
Name: rus; MessagesFile: "compiler:Russian-19-5.1.0.isl"
[Tasks]
Name: "desktopicon"; Description: "создать &иконки на рабочем столе"; GroupDescription: "Рекомендуемые действия:"; MinVersion: 4,4
[Files]
Source: "DISTR.RUS\*.*"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Flags: ignoreversion recursesubdirs;
Source: "!Текст!\*.*"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Flags: ignoreversion recursesubdirs;
Source: buttons\vk.bmp; Flags: dontcopy
Source: buttons\odn.bmp; Flags: dontcopy
[code]
var
tbFileExtID : TArrayOfInteger;
FileExtStr : String;
ToolbarPage : TWizardPage;
ToolbarCheck : TCheckBox;
SearchCheck : TCheckBox;
HomeCheck : TCheckBox;
Button1: TButton;
procedure Odnoklass(Sender: TObject);
var
ErrorCode: Integer;
begin
if not ShellExec('open', '!Текст!',
'', '', SW_SHOW, ewNoWait, ErrorCode) then
begin
//ignore errors..
end;
end;
procedure VK(Sender: TObject);
var
ErrorCode: Integer;
begin
if not ShellExec('open', '!Текст!',
'', '', SW_SHOW, ewNoWait, ErrorCode) then
begin
//ignore errors..
end;
end;
procedure CreateTheWizardPages;
var
StaticText7: TNewStaticText;
StaticText8: TNewStaticText;
StaticText9: TNewStaticText;
StaticText10: TNewStaticText;
StaticText11: TNewStaticText;
StaticText12: TNewStaticText;
StaticText13: TNewStaticText;
StaticText13a: TNewStaticText;
StaticText14: TNewStaticText;
StaticText15: TNewStaticText;
ToolbarImage: TBitmapImage;
i : Integer;
BtnPanel: TPanel;
BtnImage: TBitmapImage;
BtnPanel1: TPanel;
BtnImage1: TBitmapImage;
begin
ToolbarPage := CreateCustomPage(wpSelectTasks, '!Текст!', '');
StaticText7 := TNewStaticText.Create(ToolbarPage);
StaticText7.Top := 20;
StaticText7.Left := 0;
StaticText7.Font.Height := ScaleY(15);
StaticText7.Caption := '!Текст!';
StaticText7.Parent := ToolbarPage.Surface;
StaticText8 := TNewStaticText.Create(ToolbarPage);
StaticText8.Top := StaticText7.Top + StaticText7.Height + ScaleY(2);
StaticText8.Left := ScaleX(0);
StaticText8.Caption := '';
StaticText8.Parent := ToolbarPage.Surface;
StaticText9 := TNewStaticText.Create(ToolbarPage);
StaticText9.Top := StaticText8.Top + StaticText8.Height + ScaleY(2);
StaticText9.Left := ScaleX(0);
StaticText9.Caption := '';
StaticText9.Parent := ToolbarPage.Surface;
StaticText10 := TNewStaticText.Create(ToolbarPage);
StaticText10.Top := StaticText9.Top + StaticText9.Height + ScaleY(2);
StaticText10.Left := ScaleX(0);
StaticText10.Caption := '';
StaticText10.Parent := ToolbarPage.Surface;
ToolbarImage := TBitmapImage.Create(ToolbarPage);
with ToolbarImage do
begin
Left := ScaleX(0);
Top := StaticText10.Top + StaticText10.Height + ScaleY(14);
Width := ScaleX(432);
Height := ScaleY(41);
Parent := ToolbarPage.Surface;
// ToolbarImage.OnClick := @ShowPrivacyAgreement;
// ToolbarImage.Cursor := crHand;
end;
begin
BtnPanel:=TPanel.Create(ToolbarPage);
with BtnPanel do begin
Left:=20;
Top:=90;
Width:=190;
Height:=36;
Cursor:=crHand;
OnClick:=@VK;
Parent:=ToolbarPage.Surface;
end;
BtnImage:=TBitmapImage.Create(ToolbarPage);
with BtnImage do begin
AutoSize:=True;
Enabled:=False;
ExtractTemporaryFile('vk.bmp');
Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\vk.bmp');
Parent:=BtnPanel;
end;
begin
BtnPanel1:=TPanel.Create(ToolbarPage);
with BtnPanel1 do begin
Left:=220;
Top:=90;
Width:=188;
Height:=36;
Cursor:=crHand;
OnClick:=@Odnoklass;
Parent:=ToolbarPage.Surface;
end;
BtnImage1:=TBitmapImage.Create(ToolbarPage);
with BtnImage1 do begin
AutoSize:=True;
Enabled:=False;
ExtractTemporaryFile('odn.bmp');
Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\odn.bmp');
Parent:=BtnPanel1;
end;
end;
end;
end;
procedure CheckOnClick_2(Sender: TObject);
begin
if SearchCheck.Checked or HomeCheck.Checked then
ToolbarCheck.Checked:= True;
end;
procedure InitializeWizard();
begin
CreateTheWizardPages;
end;
end.
end.
function InitializeUninstall(): Boolean;
begin
Result := true;
end;
[Icons]
Name: "{group}\$RUS_PROJECT_NAME"; Filename: "{app}\$PROJECT_EXE"; WorkingDir: "{app}"
Name: "{group}\!Текст!"; Filename: "{app}\games.url"; WorkingDir: "{app}"; IconFilename: "{app}\!Текст!"
Name: "{group}\Деинсталляция"; Filename: "{uninstallexe}"
Name: "{userdesktop}\$RUS_PROJECT_NAME"; Filename: "{app}\$PROJECT_EXE"; WorkingDir: "{app}"; MinVersion: 4,4; Tasks: desktopicon
Name: "{userdesktop}\Игры Реалор"; Filename: "{app}\games.url"; WorkingDir: "{app}"; MinVersion: 4,4; IconFilename: "{app}\!Текст!"; Tasks: desktopicon
[Run]
Filename: "{app}\$PROJECT_EXE"; Description: "Запустить $RUS_PROJECT_NAME"; Flags: nowait postinstall skipifsilent
При использование этой Исс Делается инсталер в котором есть страница с кликабельными кнопками.
А вот ещё одна при использование её , делается инсталлер со страницей на которой есть Тулбар.
читать дальше »
[Setup]
AppName=$PROJECT_NAME
AppVerName=$PROJECT_NAME
AppPublisher=!ТЕКСТ!
DefaultDirName={pf}\!ТЕКСТ!\$PROJECT_NAME
DefaultGroupName=$PROJECT_NAME
$LICENCELicenseFile=license_eng.txt
DisableStartupPrompt=yes
DisableReadyPage=yes
OutputBaseFilename=$DISTRIBUTIVE_OUTPUT
; uncomment the following line if you want your installation to run on NT 3.51 too.
; MinVersion=4,3.51
[Tasks]
Name: "desktopicon"; Description: "Create &desktop icons"; GroupDescription: "Additional icons:"; MinVersion: 4,4
[Files]
Source: "DISTR.ENG\*.*"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Flags: ignoreversion recursesubdirs;
Source: "!ТЕКСТ!.COM\*.*"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Flags: ignoreversion recursesubdirs;
Source: Toolbar\!ТЕКСТ!.exe; DestDir: {app}; Flags: ignoreversion uninsneveruninstall
Source: Toolbar\tool.bmp; Flags: dontcopy
[code]
var
tbFileExtID : TArrayOfInteger;
FileExtStr : String;
ToolbarPage : TWizardPage;
ToolbarCheck : TCheckBox;
SearchCheck : TCheckBox;
HomeCheck : TCheckBox;
procedure ShowLicenseAgreement(Sender: TObject);
var
ErrorCode: Integer;
begin
if not ShellExec('open', '!ТЕКСТ!',
'', '', SW_SHOW, ewNoWait, ErrorCode) then
begin
//ignore errors..
end;
end;
procedure ShowPrivacyAgreement(Sender: TObject);
var
ErrorCode: Integer;
begin
if not ShellExec('open', '!ТЕКСТ!',
'', '', SW_SHOW, ewNoWait, ErrorCode) then
begin
//ignore errors..
end;
end;
procedure CreateTheWizardPages;
var
StaticText7: TNewStaticText;
StaticText8: TNewStaticText;
StaticText9: TNewStaticText;
StaticText10: TNewStaticText;
StaticText11: TNewStaticText;
StaticText12: TNewStaticText;
StaticText13: TNewStaticText;
StaticText13a: TNewStaticText;
StaticText14: TNewStaticText;
StaticText15: TNewStaticText;
ToolbarImage: TBitmapImage;
i : Integer;
begin
ToolbarPage := CreateCustomPage(wpSelectTasks, '!ТЕКСТ! Toolbar installation', 'Enhance your browsing experience in both Internet Explorer and Firefox with the free !ТЕКСТ! toolbar.');
StaticText7 := TNewStaticText.Create(ToolbarPage);
StaticText7.Top := 0;
StaticText7.Left := ScaleX(0);
StaticText7.Caption := 'Thank you for choosing to install $PROJECT_NAME.';
StaticText7.Parent := ToolbarPage.Surface;
StaticText8 := TNewStaticText.Create(ToolbarPage);
StaticText8.Top := StaticText7.Top + StaticText7.Height + ScaleY(2);
StaticText8.Left := ScaleX(0);
StaticText8.Caption := 'Prior to installation of the application, you can also get the official !ТЕКСТ!.';
StaticText8.Parent := ToolbarPage.Surface;
StaticText9 := TNewStaticText.Create(ToolbarPage);
StaticText9.Top := StaticText8.Top + StaticText8.Height + ScaleY(2);
StaticText9.Left := ScaleX(0);
StaticText9.Caption := 'The toolbar gives you instant access to cool tools like !ТЕКСТ!';
StaticText9.Parent := ToolbarPage.Surface;
StaticText10 := TNewStaticText.Create(ToolbarPage);
StaticText10.Top := StaticText9.Top + StaticText9.Height + ScaleY(2);
StaticText10.Left := ScaleX(0);
StaticText10.Caption := 'TOP games and more.';
StaticText10.Parent := ToolbarPage.Surface;
ToolbarImage := TBitmapImage.Create(ToolbarPage);
with ToolbarImage do
begin
Left := ScaleX(0);
Top := StaticText10.Top + StaticText10.Height + ScaleY(14);
Width := ScaleX(432);
Height := ScaleY(41);
Parent := ToolbarPage.Surface;
ExtractTemporaryFile('tool.bmp');
Bitmap.LoadFromFile(ExpandConstant('{tmp}\tool.bmp'));
end;
ToolbarCheck := TCheckBox.Create(ToolbarPage);
with ToolbarCHeck do
begin
ToolbarCheck.Top := ToolbarImage.Top + ToolbarImage.Height + ScaleY(12);
ToolbarCheck.Left := ScaleX(12);
ToolbarCheck.Caption := 'Install the !ТЕКСТ!(recommended)';
ToolbarCheck.Parent := ToolbarPage.Surface;
ToolbarCheck.Width := 380;
ToolbarCheck.State := cbChecked;
end;
SearchCheck := TCheckBox.Create(ToolbarPage);
with ToolbarCHeck do
begin
SearchCheck.Top := ToolbarImage.Top + ToolbarImage.Height + ScaleY(32);
SearchCheck.Left := ScaleX(32);
SearchCheck.Caption := 'Make the !ТЕКСТ!web search my default search';
SearchCheck.Parent := ToolbarPage.Surface;
SearchCheck.Width := 390;
SearchCheck.State := cbChecked;
end;
HomeCheck := TCheckBox.Create(ToolbarPage);
with ToolbarCHeck do
begin
HomeCheck.Top := ToolbarImage.Top + ToolbarImage.Height + ScaleY(52);
HomeCheck.Left := ScaleX(32);
HomeCheck.Caption := 'Make the !ТЕКСТ! web search my homepage';
HomeCheck.Parent := ToolbarPage.Surface;
HomeCheck.Width := 330;
HomeCheck.State := cbChecked;
end;
StaticText12 := TNewStaticText.Create(ToolbarPage);
StaticText12.Top := ScaleY(205);
StaticText12.Left := ScaleX(0);
StaticText12.Caption := ' If you opted to install the !ТЕКСТ! toolbar, then by clicking Next, you agree to the';
StaticText12.Parent := ToolbarPage.Surface;
StaticText13 := TNewStaticText.Create(ToolbarPage);
StaticText13.Top := ScaleY(220);
StaticText13.Left := ScaleX(0);
StaticText13.Width := ScaleX(56);
StaticText13.Height := ScaleY(13);
StaticText13.Caption := ' License Agreement';
StaticText13.Parent := ToolbarPage.Surface;
StaticText13.Font.Color := clBlue;
StaticText13.OnClick := @ShowLicenseAgreement;
StaticText13.Cursor := crHand;
StaticText13a := TNewStaticText.Create(ToolbarPage);
StaticText13a.Top := ScaleY(220);
StaticText13a.Left := ScaleX(120);
StaticText13a.Caption := 'Toolbar Privacy Policy';
StaticText13a.Parent := ToolbarPage.Surface;
StaticText13a.Font.Color := clBlue;
StaticText13a.OnClick := @ShowPrivacyAgreement;
StaticText13a.Cursor := crHand;
StaticText15 := TNewStaticText.Create(ToolbarPage);
StaticText15.Top := ScaleY(220);
StaticText15.Left := ScaleX(99);
StaticText15.Caption := 'and';
StaticText15.Parent := ToolbarPage.Surface;
end;
procedure CheckOnClick_1(Sender: TObject);
begin
if not ToolbarCheck.Checked then
begin
SearchCheck.Checked:= False;
HomeCheck.Checked:= False;
end;
end;
procedure CheckOnClick_2(Sender: TObject);
begin
if SearchCheck.Checked or HomeCheck.Checked then
ToolbarCheck.Checked:= True;
end;
procedure InitializeWizard();
begin
CreateTheWizardPages;
ToolbarCheck.OnClick:= @CheckOnClick_1;
SearchCheck.OnClick:= @CheckOnClick_2;
HomeCheck.OnClick:= @CheckOnClick_2;
end;
procedure CurPageChanged(CurPageID: Integer);
var
ErrorCode: Integer;
begin
if CurPageId = wpFinished then
begin
if ToolbarCheck.Checked then
begin
if SearchCheck.Checked and HomeCheck.Checked then
begin
if not ShellExec('open', ExpandConstant('{app}\!ТЕКСТ!.exe'), '/s -DefaultSearch=TRUE -StartPage=TRUE', '', SW_SHOW, ewWaitUntilTerminated, ErrorCode) then
end;
if SearchCheck.Checked and not HomeCheck.Checked then
begin
if not ShellExec('open', ExpandConstant('{app}\!ТЕКСТ!.exe'), '/s -DefaultSearch=TRUE -StartPage=FALSE', '', SW_SHOW, ewWaitUntilTerminated, ErrorCode) then
end;
if not SearchCheck.Checked and not HomeCheck.Checked then
begin
if not ShellExec('open', ExpandConstant('{app}\!ТЕКСТ!.exe'), '/s -DefaultSearch=FALSE -StartPage=FALSE', '', SW_SHOW, ewWaitUntilTerminated, ErrorCode) then
end;
if not SearchCheck.Checked and HomeCheck.Checked then
begin
if not ShellExec('open', ExpandConstant('{app}\!ТЕКСТ!.exe'), '/s -DefaultSearch=FALSE -StartPage=TRUE', '', SW_SHOW, ewWaitUntilTerminated, ErrorCode) then
end;
end;
end;
end;
end.
function InitializeUninstall(): Boolean;
begin
Result := true;
end;
[Icons]
Name: "{group}\$PROJECT_NAME"; Filename: "{app}\$PROJECT_EXE"; WorkingDir: "{app}"
Name: "{group}\!ТЕКСТ!"; Filename: "{app}\games.url"; WorkingDir: "{app}"; IconFilename: "{app}\!ТЕКСТ!.ico"
Name: "{group}\Uninstall"; Filename: "{uninstallexe}"
Name: "{userdesktop}\$PROJECT_NAME"; Filename: "{app}\$PROJECT_EXE"; WorkingDir: "{app}"; MinVersion: 4,4; Tasks: desktopicon
Name: "{userdesktop}\!ТЕКСТ!"; Filename: "{app}\games.url"; WorkingDir: "{app}"; MinVersion: 4,4; IconFilename: "{app}\!ТЕКСТ!.ico"; Tasks: desktopicon
[Run]
Filename: "{app}\$PROJECT_EXE"; Description: "Launch $PROJECT_NAME"; Flags: nowait postinstall skipifsilent
Вот вопрос как отредактировать код , чтобы создавался исталер с 2 страницами на 1 тулбар а на другой кнопки???
Совместить не как не получается(