Jump to content
Korean Random

Создание инсталляторов для модпаков на базе Inno Setup


Recommended Posts

Как запретить этим нубарям пользователям запускать игровой клиент до полной установки и распаковки скачанных модов? А то есть уникумы оказывается:(

если так то надо сделать так чтобы инсталлятор не давал запустить лончер игры пока идет установка

Есть способ, он надежный, но если блокировку не снять после установки мод пака, то фиг чего нубаря пользователь запустить. Так что палка о двух концах.

это не подходит 

Edited by Ekspoint
Link to comment
Short link
Share on other sites

Доброго времени суток, хочу поинтересоваться. Можно ли как то делать GET-запрос на определенный URL при установке модпака? В идеале еще и количество выбранных модификаций добавлять в запрос :)

Копай в сторону IssSurvey. Серверная часть там, в принципе, уже есть (в виде *.php).

Edited by Kotyarko_O
Link to comment
Short link
Share on other sites

Поключил ботву, но теперь нужно, что бы на месте бывшей bmp картинки появлялась jpg? Пробывал менять WizardForm.Handle, не помогает.

type
  TComponentDesc = record
    Description: String;
    ImageName: String;
    Index: Integer;
  end;

var
  CompDescs: array of TComponentDesc;
  CompDescPanel, CompDescImgPanel: TPanel;
  BackupPanel, BackupPanel1, BackupPanel2, BackupPanel3: TBevel;
  CompDescText: array[1..2] of TLabel;
  CompIndex, LastIndex: Integer;
  CompDescImg: TBitmapImage;

procedure ShowCompDescription(Sender: TObject; X, Y, Index: Integer; Area: TItemArea);
var
  img:Longint;
  i: Integer;
begin
  if Index = LastIndex then Exit;
  CompIndex := -1;
  for i := 0 to GetArrayLength(CompDescs) -1 do
  begin
    if (CompDescs[i].Index = Index) then
    begin
      CompIndex := i;
      Break;
    end;
  end;
  if (CompIndex >= 0) and (Area = iaItem) then
  begin
    if not FileExists(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName) then
    //ExtractTemporaryFile(CompDescs[CompIndex].ImageName);
    //CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName);
    //CompDescImg.Show;
      ExtractTemporaryFile(CompDescs[CompIndex].ImageName);
      img:=ImgLoad(WizardForm.Handle,ExpandConstant(('{tmp}\') + CompDescs[CompIndex].ImageName),0,0,WizardForm.ClientWidth,WizardForm.ClientHeight,True,True);
      ImgApplyChanges(WizardForm.Handle);
      CompDescImg.Show;
    CompDescText[2].Caption := CompDescs[CompIndex].Description;
    CompDescText[2].Enabled := True;
  end else
  begin
    CompDescText[2].Caption := CustomMessage('ComponentsInfo');
    CompDescText[2].Enabled := False;
    CompDescImg.Hide;
  end;
  LastIndex := Index;
end;

procedure CompListMouseLeave(Sender: TObject);
begin
  CompDescImg.Hide;
  CompDescText[2].Caption := CustomMessage('ComponentsInfo');
  CompDescText[2].Enabled := False;
  LastIndex := -1;
end;

procedure AddCompDescription(AIndex: Integer; ADescription: String; AImageName: String);
var
  i: Integer;
begin
  i := GetArrayLength(CompDescs);
  SetArrayLength(CompDescs, i + 1);
  CompDescs[i].Description := ADescription;
  CompDescs[i].ImageName := AImageName;
  CompDescs[i].Index := AIndex - 1
end;

procedure InitializeWizard();
begin
  RedesignWizardForm;

  idpAddFileComp('http://xxx/mods/vspishka.7z',  ExpandConstant('{tmp}\vspishka.7z'),  'dmp\pricels\vspishka');
  idpAddFileComp('http://xxx/mods/murazor.7z', ExpandConstant('{tmp}\murazor.7z'), 'dmp\pricels\murazor');

  idpDownloadAfter(wpReady);
  idpSetOption('DetailedMode', '1');
  idpSetOption('DetailsButton', 'no');
  InitializeWizard1(); {èç BackUpPage.iss}
  RedesignWizardForm;
  WindowResize();

begin
  WizardForm.TypesCombo.Hide;
  WizardForm.ComponentsDiskSpaceLabel.Hide;
  WizardForm.ComponentsList.SetBounds(ScaleX(255), ScaleY(20), ScaleX(265), ScaleY(301));
  WizardForm.ComponentsList.OnItemMouseMove:= @ShowCompDescription;
  WizardForm.ComponentsList.OnMouseLeave := @CompListMouseLeave;

  BackupPanel := TBevel.Create(WizardForm);
  with BackupPanel do
  begin
    Parent := WizardForm.SelectDirPage;
    SetBounds(ScaleX(0), ScaleY(170), ScaleX(520), ScaleY(148));
    Shape:= bsFrame;
  end;

  CompDescImgPanel := TPanel.Create(WizardForm);
  with CompDescImgPanel do
  begin
    Parent := WizardForm.SelectComponentsPage;
    SetBounds(ScaleX(0), ScaleY(20), ScaleX(250), ScaleY(233));  
    BevelInner := bvRaised;
    BeveLouter := bvLowered;
  end;

  CompDescText[1] := TLabel.Create(WizardForm);
  with CompDescText[1] do
  begin
    Parent := CompDescImgPanel;
    SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));
    AutoSize := False;
    WordWrap := True;
    Enabled := False;
    Caption := CustomMessage('ComponentsImgInfo');
  end;

  CompDescImg := TBitmapImage.Create(WizardForm);
  with CompDescImg do
  begin
    Parent := CompDescImgPanel;
    SetBounds(ScaleX(2), ScaleY(2), CompDescImgPanel.Width - ScaleX(5), CompDescImgPanel.Height - ScaleY(5));
    Stretch := True;
    Hide;
  end;

  CompDescPanel := TPanel.Create(WizardForm);
  with CompDescPanel do
  begin
    Parent := WizardForm.SelectComponentsPage;
    SetBounds(ScaleX(0), ScaleY(258), ScaleX(250), ScaleY(64));  
    BevelInner := bvRaised;
    BeveLouter := bvLowered;
  end;

  CompDescText[2] := TLabel.Create(WizardForm);
  with CompDescText[2] do
  begin
    Parent := CompDescPanel;
    SetBounds(ScaleX(5), ScaleY(5), CompDescPanel.Width - ScaleX(10), CompDescPanel.Height - ScaleY(10));
    AutoSize := False;
    WordWrap := True;
    Enabled := False;
    Caption := CustomMessage('ComponentsInfo');
  end;

Link to comment
Short link
Share on other sites

@AtotIK, Вы про это CompDescImg.Show;? То когда меняю на это img.Show; выдае сообщение что ожидается точка с запятой. И вообще он отображает картинку но в другом месте ImgApplyChanges(WizardForm.Handle);

Link to comment
Short link
Share on other sites

Flags: exclusive;

не это

я имел ввиду когда выбрал хвм то допустим отключается альтернативная миникарта и ее нельзя поставить,так понятней?

как к  этому коду привязать ботву?

Edited by Ekspoint
Link to comment
Short link
Share on other sites

Кто поможет?

Поиск. В этой теме всё, что вы перечислили, есть.

 

я имел ввиду когда выбрал хвм то допустим отключается альтернативная миникарта и ее нельзя поставить,так понятней?

Сделать эти компоненты последовательны, относительно друг-друга. И приписать эксклюзивный флаг.

* не стоит забывать о том, что родительский компонент, имея дочерние компоненты, может быть эксклюзивным.

Edited by Kotyarko_O
Link to comment
Short link
Share on other sites

Поиск. В этой теме всё, что вы перечислили, есть.

 

Сделать эти компоненты последовательны, относительно друг-друга. И приписать эксклюзивный флаг.

* не стоит забывать о том, что родительский компонент, имея дочерние компоненты, может быть эксклюзивным.

а именно вы можете кинуть скрипт я уже страниц 60 перелистал , с фак

Edited by Pokaritel_VBR
Link to comment
Short link
Share on other sites

это чуть другое

вот 

#define Faq  "Часто задаваемые вопросы.rtf" //меняешь на свой файл,формат должен быть такой же 
[Files]
Source: "файлы модпака\{#Faq}";  Flags: dontcopy;
[code]
var
  infoPage: TOutputMsgMemoWizardPage;
  InfoForm: TSetupForm;
  RichEditViewer: TRichEditViewer;
  NewButton: TNewButton;
  Readme: ansistring;
  info_Button:TButton;
function info(): Boolean;
var
  infoText: String;
begin
  infoPage:=CreateOutputMsgMemoPage(wpWelcome, '', '', SetupMessage(msgInfoBeforeClickLabel), '');
  ExtractTemporaryFile('{#Faq}');
  LoadStringFromFile(ExpandConstant('{tmp}/{#Faq}'), infoText);
  infoPage.RichEditViewer.RTFText:=infoText;
end;
 
procedure info_Button_Click(Sender:Tobject);
begin
  ExtractTemporaryFile('{#Faq}');
  LoadStringFromFile(ExpandConstant('{tmp}')+'\{#Faq}', Readme);
  InfoForm := CreateCustomForm();
with InfoForm do
begin
  ClientWidth:=ScaleX(700);
  ClientHeight:=ScaleY(570);
  Caption := 'Часто задаваемые вопросы';
  CenterInsideControl(WizardForm, False);
  RichEditViewer := TRichEditViewer.Create(InfoForm);
with RichEditViewer do
begin
  SetBounds(ScaleX(10),ScaleY(10),ScaleX(680),ScaleY(530));
  Parent := InfoForm;
  Font.Size := 8;
  RTFText:= Readme;
  ReadOnly := True;

end;
  NewButton := TNewButton.Create(InfoForm);
with NewButton do
begin
  SetBounds(ScaleX(315),ScaleY(542),ScaleX(75),ScaleY(28));
  Parent := InfoForm;
  Font.Size:=10;
  Font.Style := [fsItalic];
  Caption := 'Закрыть'
  ModalResult := mrOk;
end;
  ShowModal;
  Free;
end;
end;
procedure Buttons;
begin

info_Button:=TButton.Create(WizardForm);
with info_Button do
begin
info_Button.Left := 98;
info_Button.Top := 520;
info_Button.Height:= 32;
info_Button.Width := 75;
Caption:='F.A.Q.';
Font.Size:=10;
Font.Style := [fsItalic];
Parent:=WizardForm;
OnClick:=@info_Button_Click
end;
end;
procedure InitializeWizard6();
begin
Buttons;
end;

вот окно поддержки

#define BitmapImage1           "webmoney.bmp"

#define BitmapImage2           "qiwi.bmp"

#define BitmapImage3           "яндекс.bmp"

[Files]

DestName: "WizardForm.BitmapImage1.bmp"; Source: "файлы модпака\картинки\{#BitmapImage1}"; Flags: dontcopy solidbreak

DestName: "WizardForm.BitmapImage2.bmp"; Source: "файлы модпака\картинки\{#BitmapImage2}"; Flags: dontcopy solidbreak

DestName: "WizardForm.BitmapImage3.bmp"; Source: "файлы модпака\картинки\{#BitmapImage3}"; Flags: dontcopy solidbreak

Var

NewForm: TSetupForm;

NewButton1: TNewButton;

//""""""""""""""""""""""""""""""""""""""""""""""//

procedure OnClick1(Sender: TObject);

var

ErrorCode: Integer;

begin

ShellExec('open', 'http://www.webmoney.ru/' '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)

end;

procedure OnClick2(Sender: TObject);

var

ErrorCode: Integer;

begin

ShellExec('open', 'https://qiwi.ru/' '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)

end;

procedure OnClick3(Sender: TObject);

var

ErrorCode: Integer;

begin

ShellExec('open', 'https://money.yandex.ru/' '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)

end;

//""""""""""""""""""""""""""""""""""""""""""""""//

Procedure NewFormClose(Sender: TObject);

begin

NewForm.Close;

end;

//""""""""""""""""""""""""""""""""""""""""""""""//

Procedure CreateForm(Sender: TObject);

var

  Label1: TLabel;

  Label2: TLabel;

  Label3: TLabel;

  Label4: TLabel;

  Label5: TLabel;

  Label6: TLabel;

  Label7: TLabel;

  Label8: TLabel;

  Label9: TLabel;

  Label10: TLabel;

//""""""""""""""""""""""""""""""""""""""""""""""//

  BitmapImage1: TBitmapImage;

  BitmapImage2: TBitmapImage;

  BitmapImage3: TBitmapImage;

//""""""""""""""""""""""""""""""""""""""""""""""//

  NewEdit1: TNewEdit;

  NewEdit2: TNewEdit;

  NewEdit3: TNewEdit;

  NewEdit4: TNewEdit;

  NewEdit5: TNewEdit;

//""""""""""""""""""""""""""""""""""""""""""""""//

  NewButton2: TNewButton;

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

NewForm := CreateCustomForm;

NewForm.FormStyle := bsNone;

NewForm.Position := poScreenCenter;

NewForm.Width := 460;

NewForm.Height := 275;

NewForm.Show;

NewForm.Caption:= 'Помочь проекту';

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

     Label1 := TLabel.Create(NewForm);//Label1

     Label1.Parent := NewForm;

     Label1.Caption := '__________________________________________________________';

     Label1.Font.Color := clWindowText;

     Label1.Font.Height := -13;

     Label1.Font.Name := 'Tahoma';

     Label1.Font.Style := [fsBold];

     Label1.ParentFont := False;

     Label1.Transparent := False;

     Label1.Left := ScaleX(0);

     Label1.Top := ScaleY(88);

     Label1.Width := ScaleX(464);

     Label1.Height := ScaleY(16);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

     Label2 := TLabel.Create(NewForm); // Label2

     Label2.Parent := NewForm;

     Label2.Caption := '__________________________________________________________';

     Label2.Font.Color := clWindowText;

     Label2.Font.Height := -13;

     Label2.Font.Name := 'Tahoma';

     Label2.Font.Style := [fsBold, fsItalic];

     Label2.ParentFont := False;

     Label2.Transparent := False;

     Label2.Left := ScaleX(0);

     Label2.Top := ScaleY(11);

     Label2.Width := ScaleX(464);

     Label2.Height := ScaleY(16);

//""""""""""""""""""""""""""""""""""""""""""""""//

  begin

    Label3 := TLabel.Create(NewForm); //Label3.

    Label3.Parent := NewForm;

    Label3.Caption := 'Поддержать автора:';

    Label3.Font.Color := clWindowText;

    Label3.Font.Height := -15;

    Label3.Font.Name := 'Tahoma';

    Label3.Font.Style := [fsBold, fsItalic];

    Label3.ParentFont := False;

    Label3.Transparent := False;

    Label3.Left := ScaleX(144);

    Label3.Top := ScaleY(3);

    Label3.Width := ScaleX(163);

    Label3.Height := ScaleY(18);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label4 := TLabel.Create(NewForm);  // Label4.

    Label4.Parent := NewForm;

    Label4.Caption := 'Webmoney кошилек:';

    Label4.Font.Color := clWindowText;

    Label4.Font.Height := -13;

    Label4.Font.Name := 'Tahoma';

    Label4.Font.Style := [fsBold];

    Label4.ParentFont := False;

    Label4.Transparent := False;

    Label4.Left := ScaleX(152);

    Label4.Top := ScaleY(32);

    Label4.Width := ScaleX(140);

    Label4.Height := ScaleY(16);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label5 := TLabel.Create(NewForm); // Label5.

    Label5.Parent := NewForm;

    Label5.Caption := 'WMR:';

    Label5.Font.Color := clWindowText;

    Label5.Font.Height := -12;

    Label5.Font.Name := 'Tahoma';

    Label5.Font.Style := [fsBold, fsUnderline];

    Label5.ParentFont := False;

    Label5.Transparent := False;

    Label5.Left := ScaleX(32);

    Label5.Top := ScaleY(68);

    Label5.Width := ScaleX(36);

    Label5.Height := ScaleY(14);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label6 := TLabel.Create(NewForm); // Label6.

    Label6.Parent := NewForm;

    Label6.Caption := 'WMZ:';

    Label6.Font.Color := clWindowText;

    Label6.Font.Height := -12;

    Label6.Font.Name := 'Tahoma';

    Label6.Font.Style := [fsBold, fsUnderline];

    Label6.ParentFont := False;

    Label6.Transparent := False;

    Label6.Left := ScaleX(264);

    Label6.Top := ScaleY(68);

    Label6.Width := ScaleX(34);

    Label6.Height := ScaleY(14);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label7 := TLabel.Create(NewForm); // Label7.

    Label7.Parent := NewForm;

    Label7.Caption := 'Qiwi:';

    Label7.Font.Color := clWindowText;

    Label7.Font.Height := -12;

    Label7.Font.Name := 'Tahoma';

    Label7.Font.Style := [fsBold, fsUnderline];

    Label7.ParentFont := False;

    Label7.Transparent := False;

    Label7.Left := ScaleX(32);

    Label7.Top := ScaleY(122);

    Label7.Width := ScaleX(30);

    Label7.Height := ScaleY(14);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label8 := TLabel.Create(NewForm);  // Label8.

    Label8.Parent := NewForm;

    Label8.Caption := 'Яндекс.деньги:';

    Label8.Font.Color := clWindowText;

    Label8.Font.Height := -12;

    Label8.Font.Name := 'Tahoma';

    Label8.Font.Style := [fsBold, fsUnderline];

    Label8.ParentFont := False;

    Label8.Transparent := False;

    Label8.Left := ScaleX(32);

    Label8.Top := ScaleY(177);

    Label8.Width := ScaleX(98);

    Label8.Height := ScaleY(28);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label9 := TLabel.Create(NewForm); // Label9.

    Label9.Parent := NewForm;

    Label9.Caption := '__________________________________________________________';

    Label9.Font.Color := clWindowText;

    Label9.Font.Height := -13;

    Label9.Font.Name := 'Tahoma';

    Label9.Font.Style := [fsBold];

    Label9.ParentFont := False;

    Label9.Transparent := False;

    Label9.Left := ScaleX(0);

    Label9.Top := ScaleY(200);

    Label9.Width := ScaleX(464);

    Label9.Height := ScaleY(16);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label10 := TLabel.Create(NewForm); // Label10.

    Label10.Parent := NewForm;

    Label10.Caption := 'Qiwi:';

    Label10.Font.Color := clWindowText;

    Label10.Font.Height := -12;

    Label10.Font.Name := 'Tahoma';

    Label10.Font.Style := [fsBold, fsUnderline];

    Label10.ParentFont := False;

    Label10.Transparent := False;

    Label10.Left := ScaleX(264);

    Label10.Top := ScaleY(122);

    Label10.Width := ScaleX(34);

    Label10.Height := ScaleY(14);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    BitmapImage1 := TBitmapImage.Create(NewForm); // BitmapImage1.

    BitmapImage1.Parent := NewForm;

    BitmapImage1.Left := ScaleX(192);

    BitmapImage1.Top := ScaleY(60);

    BitmapImage1.Width := ScaleX(48);

    BitmapImage1.Height := ScaleY(32);

    BitmapImage1.Cursor:=crHand

    BitmapImage1.OnClick:=@OnClick1

    ExtractTemporaryFile('WizardForm.BitmapImage1.bmp');

    BitmapImage1.Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage1.bmp'));

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    BitmapImage2 := TBitmapImage.Create(NewForm); //BitmapImage2.

    BitmapImage2.Parent := NewForm;

    BitmapImage2.Left := ScaleX(192);

    BitmapImage2.Top := ScaleY(112);

    BitmapImage2.Width := ScaleX(48);

    BitmapImage2.Height := ScaleY(31);

    BitmapImage2.Cursor:=crHand

    BitmapImage2.OnClick:=@OnClick2

    ExtractTemporaryFile('WizardForm.BitmapImage2.bmp');

    BitmapImage2.Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage2.bmp'));

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    BitmapImage3 := TBitmapImage.Create(NewForm); //BitmapImage3.

    BitmapImage3.Parent := NewForm;

    BitmapImage3.Left := ScaleX(336);

    BitmapImage3.Top := ScaleY(168);

    BitmapImage3.Width := ScaleX(48);

    BitmapImage3.Height := ScaleY(32);

    BitmapImage3.Cursor:=crHand

    BitmapImage3.OnClick:=@OnClick3

    ExtractTemporaryFile('WizardForm.BitmapImage3.bmp');

    BitmapImage3.Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage3.bmp'));

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    NewEdit1 := TNewEdit.Create(NewForm); //NewEdit1.

    NewEdit1.Parent := NewForm;

    NewEdit1.Left := ScaleX(80);

    NewEdit1.Top := ScaleY(66);

    NewEdit1.Width := ScaleX(89);

    NewEdit1.Height := ScaleY(21);

    NewEdit1.Text := ' R916701849909';

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    NewEdit2 := TNewEdit.Create(NewForm); //NewEdit2.

    NewEdit2.Parent := NewForm;

    NewEdit2.Left := ScaleX(312);

    NewEdit2.Top := ScaleY(66);

    NewEdit2.Width := ScaleX(89);

    NewEdit2.Height := ScaleY(21);

    NewEdit2.Text := ' Z713896358532';

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    NewEdit3 := TNewEdit.Create(NewForm); //NewEdit3.

    NewEdit3.Parent := NewForm;

    NewEdit3.Left := ScaleX(80);

    NewEdit3.Top := ScaleY(120);

    NewEdit3.Width := ScaleX(89);

    NewEdit3.Height := ScaleY(21);

    NewEdit3.Text := ' +79045539422';

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    NewEdit4 := TNewEdit.Create(NewForm); //NewEdit4.

    NewEdit4.Parent := NewForm;

    NewEdit4.Left := ScaleX(168);

    NewEdit4.Top := ScaleY(175);

    NewEdit4.Width := ScaleX(104);

    NewEdit4.Height := ScaleY(21);

    NewEdit4.Text := ' 410011920888488';

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    NewEdit5 := TNewEdit.Create(NewForm); //NewEdit5.

    NewEdit5.Parent := NewForm;

    NewEdit5.Left := ScaleX(312);

    NewEdit5.Top := ScaleY(120);

    NewEdit5.Width := ScaleX(89);

    NewEdit5.Height := ScaleY(21);

    NewEdit5.Text := ' +79516784859';

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    NewButton2 := TNewButton.Create(NewForm); //NewButton2.

    NewButton2.Parent := NewForm;

    NewButton2.Left := ScaleX(190);

    NewButton2.Top := ScaleY(215);

    NewButton2.Width := ScaleX(75);

    NewButton2.Height := ScaleY(30);

    NewButton2.Caption := 'Закрыть';

    NewButton2.Font.Color := clWindowText;

    NewButton2.Font.Height := -12;

    NewButton2.Font.Name := '@Arial Unicode MS';

    NewButton2.ParentFont := False;

    NewButton2.OnClick := @NewFormClose;

//""""""""""""""""""""""""""""""""""""""""""""""//

end;end;end;end;end;end;end;end;end;end;

end;end;end;end;end;end;end;end;end;end;

//""""""""""""""""""""""""""""""""""""""""""""""//

Procedure InitializeWizard();

begin

NewButton1 := TNewButton.Create(WizardForm);

NewButton1.Parent := WizardForm;

NewButton1.Left := ScaleX(120);

NewButton1.Top := ScaleY(327);

NewButton1.Width := ScaleX(75);

NewButton1.Height := ScaleY(25);

NewButton1.Font.Color := clWindowText;

NewButton1.Font.Height := -12;

NewButton1.Font.Name := '@Arial Unicode MS';

NewButton1.Font.Style := [fsItalic];

NewButton1.ParentFont := False;

NewButton1.Caption := '?';

NewButton1.OnClick := @CreateForm;

end;

 

Edited by Ekspoint
  • Upvote 1
  • Downvote 1
Link to comment
Short link
Share on other sites

вот окно поддержки

Ты бы хоть визуально бы что-то сам сделал.. А то как-то не красиво с таким копипастом.

 

это чуть другое

Что фак, что эта "помощь" - одно и тоже. Та же самая форма, то же самое построение. Только текст заменить.

Edited by Kotyarko_O
Link to comment
Short link
Share on other sites

это чуть другое

вот 

#define Faq  "Часто задаваемые вопросы.rtf" //меняешь на свой файл,формат должен быть такой же 
[Files]
Source: "файлы модпака\{#Faq}";  Flags: dontcopy;
[code]
var
  infoPage: TOutputMsgMemoWizardPage;
  InfoForm: TSetupForm;
  RichEditViewer: TRichEditViewer;
  NewButton: TNewButton;
  Readme: ansistring;
  info_Button:TButton;
function info(): Boolean;
var
  infoText: String;
begin
  infoPage:=CreateOutputMsgMemoPage(wpWelcome, '', '', SetupMessage(msgInfoBeforeClickLabel), '');
  ExtractTemporaryFile('{#Faq}');
  LoadStringFromFile(ExpandConstant('{tmp}/{#Faq}'), infoText);
  infoPage.RichEditViewer.RTFText:=infoText;
end;
 
procedure info_Button_Click(Sender:Tobject);
begin
  ExtractTemporaryFile('{#Faq}');
  LoadStringFromFile(ExpandConstant('{tmp}')+'\{#Faq}', Readme);
  InfoForm := CreateCustomForm();
with InfoForm do
begin
  ClientWidth:=ScaleX(700);
  ClientHeight:=ScaleY(570);
  Caption := 'Часто задаваемые вопросы';
  CenterInsideControl(WizardForm, False);
  RichEditViewer := TRichEditViewer.Create(InfoForm);
with RichEditViewer do
begin
  SetBounds(ScaleX(10),ScaleY(10),ScaleX(680),ScaleY(530));
  Parent := InfoForm;
  Font.Size := 8;
  RTFText:= Readme;
  ReadOnly := True;

end;
  NewButton := TNewButton.Create(InfoForm);
with NewButton do
begin
  SetBounds(ScaleX(315),ScaleY(542),ScaleX(75),ScaleY(28));
  Parent := InfoForm;
  Font.Size:=10;
  Font.Style := [fsItalic];
  Caption := 'Закрыть'
  ModalResult := mrOk;
end;
  ShowModal;
  Free;
end;
end;
procedure Buttons;
begin

info_Button:=TButton.Create(WizardForm);
with info_Button do
begin
info_Button.Left := 98;
info_Button.Top := 520;
info_Button.Height:= 32;
info_Button.Width := 75;
Caption:='F.A.Q.';
Font.Size:=10;
Font.Style := [fsItalic];
Parent:=WizardForm;
OnClick:=@info_Button_Click
end;
end;
procedure InitializeWizard6();
begin
Buttons;
end;

вот окно поддержки

#define BitmapImage1           "webmoney.bmp"

#define BitmapImage2           "qiwi.bmp"

#define BitmapImage3           "яндекс.bmp"

[Files]

DestName: "WizardForm.BitmapImage1.bmp"; Source: "файлы модпака\картинки\{#BitmapImage1}"; Flags: dontcopy solidbreak

DestName: "WizardForm.BitmapImage2.bmp"; Source: "файлы модпака\картинки\{#BitmapImage2}"; Flags: dontcopy solidbreak

DestName: "WizardForm.BitmapImage3.bmp"; Source: "файлы модпака\картинки\{#BitmapImage3}"; Flags: dontcopy solidbreak

Var

NewForm: TSetupForm;

NewButton1: TNewButton;

//""""""""""""""""""""""""""""""""""""""""""""""//

procedure OnClick1(Sender: TObject);

var

ErrorCode: Integer;

begin

ShellExec('open', 'http://www.webmoney.ru/' '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)

end;procedure OnClick2(Sender: TObject);

var

ErrorCode: Integer;

begin

ShellExec('open', 'https://qiwi.ru/' '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)

end;procedure OnClick3(Sender: TObject);

var

ErrorCode: Integer;

begin

ShellExec('open', 'https://money.yandex.ru/' '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)

end;

//""""""""""""""""""""""""""""""""""""""""""""""//

Procedure NewFormClose(Sender: TObject);

begin

NewForm.Close;

end;

//""""""""""""""""""""""""""""""""""""""""""""""//

Procedure CreateForm(Sender: TObject);

var

  Label1: TLabel;

  Label2: TLabel;

  Label3: TLabel;

  Label4: TLabel;

  Label5: TLabel;

  Label6: TLabel;

  Label7: TLabel;

  Label8: TLabel;

  Label9: TLabel;

  Label10: TLabel;

//""""""""""""""""""""""""""""""""""""""""""""""//

  BitmapImage1: TBitmapImage;

  BitmapImage2: TBitmapImage;

  BitmapImage3: TBitmapImage;

//""""""""""""""""""""""""""""""""""""""""""""""//

  NewEdit1: TNewEdit;

  NewEdit2: TNewEdit;

  NewEdit3: TNewEdit;

  NewEdit4: TNewEdit;

  NewEdit5: TNewEdit;

//""""""""""""""""""""""""""""""""""""""""""""""//

  NewButton2: TNewButton;

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

NewForm := CreateCustomForm;

NewForm.FormStyle := bsNone;

NewForm.Position := poScreenCenter;

NewForm.Width := 460;

NewForm.Height := 275;

NewForm.Show;

NewForm.Caption:= 'Помочь проекту';//""""""""""""""""""""""""""""""""""""""""""""""//

begin

     Label1 := TLabel.Create(NewForm);//Label1

     Label1.Parent := NewForm;

     Label1.Caption := '__________________________________________________________';

     Label1.Font.Color := clWindowText;

     Label1.Font.Height := -13;

     Label1.Font.Name := 'Tahoma';

     Label1.Font.Style := [fsBold];

     Label1.ParentFont := False;

     Label1.Transparent := False;

     Label1.Left := ScaleX(0);

     Label1.Top := ScaleY(88);

     Label1.Width := ScaleX(464);

     Label1.Height := ScaleY(16);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

     Label2 := TLabel.Create(NewForm); // Label2

     Label2.Parent := NewForm;

     Label2.Caption := '__________________________________________________________';

     Label2.Font.Color := clWindowText;

     Label2.Font.Height := -13;

     Label2.Font.Name := 'Tahoma';

     Label2.Font.Style := [fsBold, fsItalic];

     Label2.ParentFont := False;

     Label2.Transparent := False;

     Label2.Left := ScaleX(0);

     Label2.Top := ScaleY(11);

     Label2.Width := ScaleX(464);

     Label2.Height := ScaleY(16);

//""""""""""""""""""""""""""""""""""""""""""""""//

  begin

    Label3 := TLabel.Create(NewForm); //Label3.

    Label3.Parent := NewForm;

    Label3.Caption := 'Поддержать автора:';

    Label3.Font.Color := clWindowText;

    Label3.Font.Height := -15;

    Label3.Font.Name := 'Tahoma';

    Label3.Font.Style := [fsBold, fsItalic];

    Label3.ParentFont := False;

    Label3.Transparent := False;

    Label3.Left := ScaleX(144);

    Label3.Top := ScaleY(3);

    Label3.Width := ScaleX(163);

    Label3.Height := ScaleY(18);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label4 := TLabel.Create(NewForm);  // Label4.

    Label4.Parent := NewForm;

    Label4.Caption := 'Webmoney кошилек:';

    Label4.Font.Color := clWindowText;

    Label4.Font.Height := -13;

    Label4.Font.Name := 'Tahoma';

    Label4.Font.Style := [fsBold];

    Label4.ParentFont := False;

    Label4.Transparent := False;

    Label4.Left := ScaleX(152);

    Label4.Top := ScaleY(32);

    Label4.Width := ScaleX(140);

    Label4.Height := ScaleY(16);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label5 := TLabel.Create(NewForm); // Label5.

    Label5.Parent := NewForm;

    Label5.Caption := 'WMR:';

    Label5.Font.Color := clWindowText;

    Label5.Font.Height := -12;

    Label5.Font.Name := 'Tahoma';

    Label5.Font.Style := [fsBold, fsUnderline];

    Label5.ParentFont := False;

    Label5.Transparent := False;

    Label5.Left := ScaleX(32);

    Label5.Top := ScaleY(68);

    Label5.Width := ScaleX(36);

    Label5.Height := ScaleY(14);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label6 := TLabel.Create(NewForm); // Label6.

    Label6.Parent := NewForm;

    Label6.Caption := 'WMZ:';

    Label6.Font.Color := clWindowText;

    Label6.Font.Height := -12;

    Label6.Font.Name := 'Tahoma';

    Label6.Font.Style := [fsBold, fsUnderline];

    Label6.ParentFont := False;

    Label6.Transparent := False;

    Label6.Left := ScaleX(264);

    Label6.Top := ScaleY(68);

    Label6.Width := ScaleX(34);

    Label6.Height := ScaleY(14);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label7 := TLabel.Create(NewForm); // Label7.

    Label7.Parent := NewForm;

    Label7.Caption := 'Qiwi:';

    Label7.Font.Color := clWindowText;

    Label7.Font.Height := -12;

    Label7.Font.Name := 'Tahoma';

    Label7.Font.Style := [fsBold, fsUnderline];

    Label7.ParentFont := False;

    Label7.Transparent := False;

    Label7.Left := ScaleX(32);

    Label7.Top := ScaleY(122);

    Label7.Width := ScaleX(30);

    Label7.Height := ScaleY(14);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label8 := TLabel.Create(NewForm);  // Label8.

    Label8.Parent := NewForm;

    Label8.Caption := 'Яндекс.деньги:';

    Label8.Font.Color := clWindowText;

    Label8.Font.Height := -12;

    Label8.Font.Name := 'Tahoma';

    Label8.Font.Style := [fsBold, fsUnderline];

    Label8.ParentFont := False;

    Label8.Transparent := False;

    Label8.Left := ScaleX(32);

    Label8.Top := ScaleY(177);

    Label8.Width := ScaleX(98);

    Label8.Height := ScaleY(28);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label9 := TLabel.Create(NewForm); // Label9.

    Label9.Parent := NewForm;

    Label9.Caption := '__________________________________________________________';

    Label9.Font.Color := clWindowText;

    Label9.Font.Height := -13;

    Label9.Font.Name := 'Tahoma';

    Label9.Font.Style := [fsBold];

    Label9.ParentFont := False;

    Label9.Transparent := False;

    Label9.Left := ScaleX(0);

    Label9.Top := ScaleY(200);

    Label9.Width := ScaleX(464);

    Label9.Height := ScaleY(16);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    Label10 := TLabel.Create(NewForm); // Label10.

    Label10.Parent := NewForm;

    Label10.Caption := 'Qiwi:';

    Label10.Font.Color := clWindowText;

    Label10.Font.Height := -12;

    Label10.Font.Name := 'Tahoma';

    Label10.Font.Style := [fsBold, fsUnderline];

    Label10.ParentFont := False;

    Label10.Transparent := False;

    Label10.Left := ScaleX(264);

    Label10.Top := ScaleY(122);

    Label10.Width := ScaleX(34);

    Label10.Height := ScaleY(14);

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    BitmapImage1 := TBitmapImage.Create(NewForm); // BitmapImage1.

    BitmapImage1.Parent := NewForm;

    BitmapImage1.Left := ScaleX(192);

    BitmapImage1.Top := ScaleY(60);

    BitmapImage1.Width := ScaleX(48);

    BitmapImage1.Height := ScaleY(32);

    BitmapImage1.Cursor:=crHand

    BitmapImage1.OnClick:=@OnClick1

    ExtractTemporaryFile('WizardForm.BitmapImage1.bmp');

    BitmapImage1.Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage1.bmp'));

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    BitmapImage2 := TBitmapImage.Create(NewForm); //BitmapImage2.

    BitmapImage2.Parent := NewForm;

    BitmapImage2.Left := ScaleX(192);

    BitmapImage2.Top := ScaleY(112);

    BitmapImage2.Width := ScaleX(48);

    BitmapImage2.Height := ScaleY(31);

    BitmapImage2.Cursor:=crHand

    BitmapImage2.OnClick:=@OnClick2

    ExtractTemporaryFile('WizardForm.BitmapImage2.bmp');

    BitmapImage2.Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage2.bmp'));

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    BitmapImage3 := TBitmapImage.Create(NewForm); //BitmapImage3.

    BitmapImage3.Parent := NewForm;

    BitmapImage3.Left := ScaleX(336);

    BitmapImage3.Top := ScaleY(168);

    BitmapImage3.Width := ScaleX(48);

    BitmapImage3.Height := ScaleY(32);

    BitmapImage3.Cursor:=crHand

    BitmapImage3.OnClick:=@OnClick3

    ExtractTemporaryFile('WizardForm.BitmapImage3.bmp');

    BitmapImage3.Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.BitmapImage3.bmp'));

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    NewEdit1 := TNewEdit.Create(NewForm); //NewEdit1.

    NewEdit1.Parent := NewForm;

    NewEdit1.Left := ScaleX(80);

    NewEdit1.Top := ScaleY(66);

    NewEdit1.Width := ScaleX(89);

    NewEdit1.Height := ScaleY(21);

    NewEdit1.Text := ' R916701849909';

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    NewEdit2 := TNewEdit.Create(NewForm); //NewEdit2.

    NewEdit2.Parent := NewForm;

    NewEdit2.Left := ScaleX(312);

    NewEdit2.Top := ScaleY(66);

    NewEdit2.Width := ScaleX(89);

    NewEdit2.Height := ScaleY(21);

    NewEdit2.Text := ' Z713896358532';

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    NewEdit3 := TNewEdit.Create(NewForm); //NewEdit3.

    NewEdit3.Parent := NewForm;

    NewEdit3.Left := ScaleX(80);

    NewEdit3.Top := ScaleY(120);

    NewEdit3.Width := ScaleX(89);

    NewEdit3.Height := ScaleY(21);

    NewEdit3.Text := ' +79045539422';

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    NewEdit4 := TNewEdit.Create(NewForm); //NewEdit4.

    NewEdit4.Parent := NewForm;

    NewEdit4.Left := ScaleX(168);

    NewEdit4.Top := ScaleY(175);

    NewEdit4.Width := ScaleX(104);

    NewEdit4.Height := ScaleY(21);

    NewEdit4.Text := ' 410011920888488';

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    NewEdit5 := TNewEdit.Create(NewForm); //NewEdit5.

    NewEdit5.Parent := NewForm;

    NewEdit5.Left := ScaleX(312);

    NewEdit5.Top := ScaleY(120);

    NewEdit5.Width := ScaleX(89);

    NewEdit5.Height := ScaleY(21);

    NewEdit5.Text := ' +79516784859';

//""""""""""""""""""""""""""""""""""""""""""""""//

begin

    NewButton2 := TNewButton.Create(NewForm); //NewButton2.

    NewButton2.Parent := NewForm;

    NewButton2.Left := ScaleX(190);

    NewButton2.Top := ScaleY(215);

    NewButton2.Width := ScaleX(75);

    NewButton2.Height := ScaleY(30);

    NewButton2.Caption := 'Закрыть';

    NewButton2.Font.Color := clWindowText;

    NewButton2.Font.Height := -12;

    NewButton2.Font.Name := '@Arial Unicode MS';

    NewButton2.ParentFont := False;

    NewButton2.OnClick := @NewFormClose;

//""""""""""""""""""""""""""""""""""""""""""""""//

end;end;end;end;end;end;end;end;end;end;

end;end;end;end;end;end;end;end;end;end;

//""""""""""""""""""""""""""""""""""""""""""""""//

Procedure InitializeWizard();

begin

NewButton1 := TNewButton.Create(WizardForm);

NewButton1.Parent := WizardForm;

NewButton1.Left := ScaleX(120);

NewButton1.Top := ScaleY(327);

NewButton1.Width := ScaleX(75);

NewButton1.Height := ScaleY(25);

NewButton1.Font.Color := clWindowText;

NewButton1.Font.Height := -12;

NewButton1.Font.Name := '@Arial Unicode MS';

NewButton1.Font.Style := [fsItalic];

NewButton1.ParentFont := False;

NewButton1.Caption := '?';

NewButton1.OnClick := @CreateForm;

end;

attachicon.gif4.png

 

Спасибо огромное !

Link to comment
Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...