Jump to content
Korean Random
EvilAlex

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

Recommended Posts

Можно даже создавать ярлык из секции [~Code~].

это как?

Share this post


Link to post

Short link
Share on other sites

Ребзя , дико извиняюсь , дайте скрипт с фишкой  , что можно из сети скачивать !Очень срочно !!!

Edited by Pokaritel_VBR

Share this post


Link to post

Short link
Share on other sites

Ребзя , дико извиняюсь , дайте скрипт с фишкой  , что можно из сети скачивать !Очень срочно !!!

вроде 65 стр

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Ребята , а дайте скрипт  , чтобы превью вот так высвечивалось :

[Setup]
AppName=Моя программа
AppVersion=1.5
DefaultDirName={pf}\Моя программа

[CustomMessages]
CompName1=Компонент 1
CompName2=Компонент 2

ComponentsImgInfo=Наведите курсор мыши на компонент, чтобы посмотреть его превью.

CompDesc1=Описание первого компонента
CompDesc2=Описание второго компонента

[Files]
Source: "compiler:WizModernImage.bmp"; DestName: "CompDescImg1.bmp"; Flags: dontcopy
Source: "compiler:WizModernImage-IS.bmp"; DestName: "CompDescImg2.bmp"; Flags: dontcopy
Source: "compiler:WizModernImage.bmp"; DestName: "MainPic.bmp"; Flags: dontcopy

[Types]
Name: full; Description: Full installation; Flags: iscustom

[Components]
Name: comp1; Description: "{cm:CompName1}"; Types: full
Name: comp2; Description: "{cm:CompName2}"; Types: full
Name: comp3; Description: "{cm:CompName1}"; Types: full
Name: comp4; Description: "{cm:CompName2}"; Types: full
Name: comp5; Description: "{cm:CompName1}"; Types: full
Name: comp6; Description: "{cm:CompName2}"; Types: full
Name: comp7; Description: "{cm:CompName1}"; Types: full
Name: comp8; Description: "{cm:CompName2}"; Types: full

[Code]
type
  TComponentDesc = record
    ImageName: String;
    Index: Integer;
  end;

var
  CompDescs: array of TComponentDesc;
  CompDescImgPanel: TPanel;
  CompIndex, LastIndex: Integer;
  CompDescImg: TBitmapImage;

procedure ShowCompDescription(Sender: TObject; X, Y, Index: Integer; Area: TItemArea);
var
  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;
end else
begin
CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\MainPic.bmp'));
end;
LastIndex := Index;
end;

procedure CompListMouseLeave(Sender: TObject);
begin
  LastIndex := -1;
 CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\MainPic.bmp'));
end;

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

function GetComponentIndex(Name: String): Integer;
var
  i: Integer;
begin
  Result:= -1;
  for i:= 0 to WizardForm.ComponentsList.ItemCount-1 do begin
    if (WizardForm.ComponentsList.ItemCaption[i] = Name) then begin
      Result:= i + 1;
      Break;
    end;
  end;
end;

procedure InitializeWizard();
begin
  ExtractTemporaryFile('MainPic.bmp');
  WizardForm.SelectComponentsLabel.Hide;
  WizardForm.TypesCombo.Hide;
  WizardForm.ComponentsList.SetBounds(ScaleX(0), ScaleY(0), ScaleX(184), ScaleY(200));
  WizardForm.ComponentsList.OnItemMouseMove:= @ShowCompDescription;
  WizardForm.ComponentsList.OnMouseLeave := @CompListMouseLeave;

  CompDescImgPanel := TPanel.Create(WizardForm);
  with CompDescImgPanel do
  begin
    Parent := WizardForm.SelectComponentsPage;
    SetBounds(ScaleX(192), ScaleY(0), ScaleX(225), ScaleY(120));
    BevelInner := bvLowered;
  end;

  CompDescImg := TBitmapImage.Create(WizardForm);
  with CompDescImg do
  begin
    Parent := CompDescImgPanel;
    SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));
    Stretch := True;
    Bitmap.LoadFromFile(ExpandConstant('{tmp}\MainPic.bmp'));
  end;

  AddCompDescription(1, 'CompDescImg1.bmp');
  AddCompDescription(2, 'CompDescImg2.bmp');
  /////////////////////////////////////////
  //AddCompDescription(GetComponentIndex(CustomMessage('CompName1')), 'CompDescImg1.bmp');  //по названию компонента
  //AddCompDescription(GetComponentIndex(CustomMessage('CompName2')), 'CompDescImg2.bmp');  //по названию компонента
end; 

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Благодарю!

Я решил моды для корбаликов забацать!

могу готовый дать, ток в лс

Share this post


Link to post

Short link
Share on other sites

Благодарю!

Я решил моды для корбаликов забацать!

моды или модпак?

если модпак то там их и так больше чем модов ))

Share this post


Link to post

Short link
Share on other sites

моды или модпак?

если модпак то там их и так больше чем модов ))

смотрел твой, прикольно сделан :)

Share this post


Link to post

Short link
Share on other sites

Оцените , как получается ?Говорите всё , что думаете , пока это пробная версия !

post-28876-0-67801800-1435868881_thumb.jpg

моды или модпак?

если модпак то там их и так больше чем модов ))

Модпак.

Share this post


Link to post

Short link
Share on other sites

Оцените , как получается ?Говорите всё , что думаете , пока это пробная версия !

Ничего особенного\интересного.

Share this post


Link to post

Short link
Share on other sites

 

 

как получается

Тихий ужас в плане дизайна.

Share this post


Link to post

Short link
Share on other sites

Оцените , как получается ?Говорите всё , что думаете , пока это пробная версия !

 

дизайн ггг, особенно верхнее лого

Edited by Dark_Knight_MiX

Share this post


Link to post

Short link
Share on other sites

А что в верхнем лого поставить? 


Тихий ужас в плане дизайна.

А что заменить , помогите , пожалуйста, я не мастер фотошопа

Share this post


Link to post

Short link
Share on other sites

смотрел твой, прикольно сделан :)

0_0  хде?  мои модпаки засекречены  :)

Share this post


Link to post

Short link
Share on other sites

ааа, это на половину мой )))   просто посильная помощь альянсу ))

ясно

Share this post


Link to post

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...