Jump to content
Korean Random
EvilAlex

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

Recommended Posts

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

Dark_Knight_MiX, мая есть не уметь читать буква?

 

---> ВТОРОЙ <---

ааа, этот чтоль 

function SetupConfigLoad_1(const TagName, CompNo: String): Boolean;
var
  I, CompDigit, TagPos: Integer;
  SetupConfig: TStringList;
  SetupConfigDir, Tmp, Tag, Line, FilePath: String;
begin
  Result:=False;
  FilePath:=ExpandConstant('C:\Setup.ini');
  If FileExists(FilePath) then
begin

  Tag:=TagName;
  SetupConfigDir:=ExpandConstant('C:\');
  SetupConfig:=TStringList.Create;
  try
  SetupConfig.LoadFromFile(SetupConfigDir + '\Setup.ini');
  for I:=0 to SetupConfig.Count - 1 do
  begin
  Line:=SetupConfig[I];
  TagPos:=Pos(Tag, Line);
  if TagPos > 0 then
  begin
  Result:=True;
  CompDigit:=StrToInt(CompNo);
  CustomPage_1ComponentsList.CheckItem(CompDigit, coCheck);
  end;
  Log(Line);
  end;
  finally
  SetupConfig.Free;
end;
end;

Share this post


Link to post

Short link
Share on other sites

Dark_Knight_MiX, троллишь меня? Второй вариант решения проблемы.

 

Kotyarko_O, мне захотелось ввести именно идентификатор. "St4\Hangar\Statistics\Day" для меня более удобночитаемые данные.

Share this post


Link to post

Short link
Share on other sites

Dark_Knight_MiX, троллишь меня? Второй вариант решения проблемы.

 

Kotyarko_O, мне захотелось ввести именно идентификатор. "St4\Hangar\Statistics\Day" для меня более удобночитаемые данные.

ну уже вариантов нет, наверно это 

function SearchValues(file,sValue:Ansistring): Boolean;
var
  ss: TArrayOfString;
  i: Integer;
begin
  LoadStringsFromFile(file, ss);
  for i:=0 to GetArrayLength(ss)-1 do begin
  if Pos(sValue, ss[i])>0 then begin
  Result := true;
  Exit;
  end else Result := false;
  end;
end;

procedure InitializeWizard();
begin
 WizardForm.ComponentsList.Checked[0]:= SearchValues(ExpandConstant('{src}\1.txt'),'тополя ля ля ля');
end; 

Так как мне прикрутить пост

Share this post


Link to post

Short link
Share on other sites

Отвёрткой.

 

Думай логически.

не доходит  :ic:  :ic:  :flag:

помогите пожалуйста

Edited by Dark_Knight_MiX

Share this post


Link to post

Short link
Share on other sites

Всем привет! как правильно прописать в скрипте компоненты? как начинаю ставить инсталлятор тупо не открывает

'Вот как тут не открывает инсталлятор'


//====={ Сюда прописываешь те файлы и папки которые закинул в Mods }=====\\
[Types]
Name: custom; Description: Full installation; Flags: iscustom
[Components]
Name: KMP; Description: KPAH Mod Pack; Types: custom; Flags: fixed
Name: KMP\P; Description: 1. Прицел.; Flags: disablenouninstallwarning
Name: KMP\DP; Description: 2. Дамаг панель.; Flags: disablenouninstallwarning
Name: KMP\ZK; Description: 2. Звуковой мод звонок при крите модуля.; Flags: disablenouninstallwarning
Name: KMP\Z; Description: 3. Zoom.; Flags: disablenouninstallwarning
Name: KMP\Z\NS; Description: а. NoScroll- колёсико не переключает в снайперский режим; Flags: checkablealone
Name: KMP\Z\ZX4; Description: б. 4-х позиционный снайперский прицел; Flags: checkablealone
Name: KMP\T; Description: 4. Дерево развития.
Name: KMP\I; Description: 5. Информационная панель выбранной цели.
Name: KMP\CM; Description: 6. Цветные сообщения(ЯсенКрасен).
Name: KMP\CLOCK; Description: 7. Часы в ангаре.
Name: KMP\A; Description: 8. Ангар.
Name: KMP\XVM; Description: 9. Пользомер(Оленемер).
[Files]
Source: MODS\PRICEL\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\P
Source: MODS\DAMAGEPANEL\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\DP
//=== звонок крита ===///=== ставить вначале команду копирование файлов, а уже потом установку мода ===\\:
Source: {app}\res\audio\*; DestDir: {app}\res_mods\0.8.6\audio\; Flags: external recursesubdirs skipifsourcedoesntexist; Components: KMP\ZK
Source: MODS\ZVONOK\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\ZK
Source: MODS\ZOOM\COMANDOR\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\Z
Source: MODS\ZOOM\NOSCROLL\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\Z\NS
Source: MODS\ZOOM\ZOOM4X\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\Z\ZX4
Source: MODS\TREE\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\T
Source: MODS\INFO\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\I
Source: MODS\COLORMESENGER\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\CM
Source: MODS\CLOCK\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\CLOCK
Source: MODS\ANGAR\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\A
Source: MODS\XVM\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\XVM

'Когда так нормально все запускает'

[Components]
Name: text; Description: Язык субтитров; Types: full; Flags: fixed
Name: text\rus; Description: Русский; Flags: exclusive
Name: text\eng; Description: Английский; Flags: exclusive
Name: voice; Description: Язык озвучки; Types: full; Flags: fixed
Name: voice\rus; Description: Русский; Flags: exclusive
Name: voice\eng; Description: Английский; Flags: exclusive

Share this post


Link to post

Short link
Share on other sites

Fenixx, всё прекрасно работает:

post-12922-0-82348900-1429433941_thumb.png

Но всё же порекомендовал бы использовать такой формат и привести всё в более удобочитаемый вид:

[Types]
Name: "full"; Description: "Полная установка"; Flags: iscustom;

[Components]
Name: "XVM"; Description: "XVM: расширенные маркеры, отлетающий урон, модификация захвата базы, миникарты и лог нанесённого урона"; Flags: disablenouninstallwarning; Types: full;
Name: "XVM\Color"; Description: "Цветовая схема конфигурации:"; Flags: exclusive disablenouninstallwarning; Types: full;
Name: "XVM\Color\Normal"; Description: "Стандартные цвета"; Flags: exclusive disablenouninstallwarning; Types: full;
Name: "XVM\Color\Blindness"; Description: "Режим цветовой слепоты"; Flags: exclusive disablenouninstallwarning;
Name: "XVM\Carousel"; Description: "Расширенная карусель танков:"; Flags: disablenouninstallwarning; Types: full;
Name: "XVM\Carousel\1"; Description: "В 1 ряд"; Flags: exclusive disablenouninstallwarning;
Name: "XVM\Carousel\2"; Description: "В 2 ряда"; Flags: exclusive disablenouninstallwarning;

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

AtotIK, вот то что твое скопировал нормально все заработало!

Edited by Fenixx

Share this post


Link to post

Short link
Share on other sites

К примеру есть 2 чекбокса, если выбрал первый чек то 2 должен быть не активен, как это сделать?

Share this post


Link to post

Short link
Share on other sites

спасибо

Учись просто нажимать зелёную стрелку вверх под сообщением.

Edited by Kotyarko_O
  • 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

Добрый день! 
Как поменять их место положения?

в свой скрипт вставил картинки и описание не видно.

'картинка инста стандартого скрипта'

df1cc8f07edf.png

'Обычный тут скрипт с картинками на компонненты и описание к ним'


[setup]
AppName=Моя программа
AppVersion=1.5
AppPublisher=YURSHAT
AppPublisherURL=
DefaultDirName={pf}\Моя программа
[Languages]
Name: RU; MessagesFile: compiler:Languages\Russian.isl
[CustomMessages]
RU.ComponentsInfo=Наведите курсор мыши на компонент, чтобы прочитать его описание.
RU.ComponentsImgInfo=Наведите курсор мыши на компонент, чтобы посмотреть его превью.
RU.CompDesc1=Описание первого компонента
RU.CompDesc2=Описание второго компонента
RU.CompDesc3=Описание первого компонента
RU.CompDesc4=Описание второго компонента
RU.CompDesc5=Описание первого компонента
RU.CompDesc6=Описание второго компонента
RU.CompDesc7=Описание первого компонента
RU.CompDesc8=Описание второго компонента
RU.CompDesc9=Описание первого компонента
RU.CompDesc10=Описание второго компонента
RU.CompDesc11=Описание первого компонента
RU.CompDesc12=Описание второго компонента
//************************************************ [Описание к модам] ***************************************************//
//************************************************ [Конец модам] ***************************************************//
[Files]
Source: img_mod\1.bmp; DestName: CompDescImg1.bmp; Flags: dontcopy
Source: img_mod\2.bmp; DestName: CompDescImg2.bmp; Flags: dontcopy
Source: img_mod\3.bmp;  DestName: MainPic.bmp; Flags: dontcopy
[Components]
Name: comp1; Description: 1. Mod Pack ; Types: custom; Flags: fixed
Name: KMP\P; Description: 1. Прицел.; Flags: disablenouninstallwarning
Name: KMP\DP; Description: 2. Дамаг панель.; Flags: disablenouninstallwarning
Name: KMP\ZK; Description: 2. Звуковой мод звонок при крите модуля.; Flags: disablenouninstallwarning
Name: KMP\Z; Description: 3. Zoom.; Flags: disablenouninstallwarning
Name: KMP\Z\NS; Description: а. NoScroll- колёсико не переключает в снайперский режим; Flags: checkablealone ;
Name: KMP\Z\ZX4; Description: б. 4-х позиционный снайперский прицел ; Flags: checkablealone ;
Name: KMP\T; Description: 4. Дерево развития.;
Name: KMP\I; Description: 5. Информационная панель выбранной цели.;
Name: KMP\CM; Description: 6. Цветные сообщения(ЯсенКрасен).;
Name: KMP\CLOCK; Description: 7. Часы в ангаре.;
Name: KMP\A; Description: 8. Ангар.;
Name: KMP\XVM; Description: 9. Пользомер(Оленемер).;
typeTComponentDesc = recordDescription: String;ImageName: String;Index: Integer;end;varCompDescs: array of TComponentDesc;CompDescPanel, CompDescImgPanel: TPanel;CompDescText: array[1..2] of TLabel;CompIndex, LastIndex: Integer;CompDescImg: TBitmapImage;procedure ShowCompDescription(Sender: TObject; X, Y, Index: Integer; Area: TItemArea);vari: Integer;beginif Index = LastIndex then Exit;CompIndex := -1;for i := 0 to GetArrayLength(CompDescs) -1 dobeginif (CompDescs[i].Index = Index) thenbeginCompIndex := i;Break;end;end;if (CompIndex >= 0) and (Area = iaItem) thenbeginif not FileExists(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName) thenExtractTemporaryFile(CompDescs[CompIndex].ImageName);CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName);CompDescImg.Show;CompDescText[2].Caption := CompDescs[CompIndex].Description;CompDescText[2].Enabled := True;end elsebeginCompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\MainPic.bmp'));CompDescText[2].Caption := CustomMessage('ComponentsInfo');CompDescText[2].Enabled := False;end;LastIndex := Index;end;procedure CompListMouseLeave(Sender: TObject);beginCompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\MainPic.bmp'));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
ExtractTemporaryFile('MainPic.bmp');
WizardForm.SelectComponentsLabel.Hide;
WizardForm.TypesCombo.Hide;
WizardForm.ComponentsList.SetBounds(ScaleX(0), ScaleY(0), ScaleX(184), ScaleY(205));
WizardForm.ComponentsList.OnItemMouseMove:= @ShowCompDescription;
WizardForm.ComponentsList.OnMouseLeave := @CompListMouseLeave;
CompDescImgPanel := TPanel.Create(WizardForm);
with CompDescImgPanel do
begin
Parent := WizardForm.SelectComponentsPage;
SetBounds(ScaleX(40), ScaleY(0), ScaleX(225), ScaleY(100));
BevelInner := 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(10), ScaleY(10), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));
Stretch := True;
Bitmap.LoadFromFile(ExpandConstant('{tmp}\MainPic.bmp'));
end;
CompDescPanel := TPanel.Create(WizardForm);
with CompDescPanel do
begin
Parent := WizardForm.SelectComponentsPage;
SetBounds(ScaleX(192), ScaleY(125), ScaleX(225), ScaleY(80));
BevelInner := 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;
AddCompDescription(1, CustomMessage('CompDesc1'), 'CompDescImg1.bmp');
AddCompDescription(2, CustomMessage('CompDesc2'), 'CompDescImg2.bmp');
AddCompDescription(3, CustomMessage('CompDesc3'), 'CompDescImg1.bmp');
AddCompDescription(4, CustomMessage('CompDesc4'), 'CompDescImg2.bmp');
AddCompDescription(5, CustomMessage('CompDesc5'), 'CompDescImg1.bmp');
AddCompDescription(6, CustomMessage('CompDesc6'), 'CompDescImg2.bmp');
AddCompDescription(7, CustomMessage('CompDesc7'), 'CompDescImg1.bmp');
AddCompDescription(8, CustomMessage('CompDesc8'), 'CompDescImg2.bmp');
AddCompDescription(9, CustomMessage('CompDesc9'), 'CompDescImg1.bmp');
AddCompDescription(10, CustomMessage('CompDesc10'), 'CompDescImg2.bmp');
AddCompDescription(11, CustomMessage('CompDesc11'), 'CompDescImg1.bmp');
AddCompDescription(12, CustomMessage('CompDesc12'), 'CompDescImg2.bmp');
end;

'Хотелось бы что бы было так '

54323a761d55.jpg
Edited by Fenixx

Share this post


Link to post

Short link
Share on other sites

Fenixx, играйся с параметрами:

WizardForm.ComponentsList.SetBounds(ScaleX(0), ScaleY(0), ScaleX(184), ScaleY(205));
CompDescImgPanel.SetBounds(ScaleX(40), ScaleY(0), ScaleX(225), ScaleY(100));
CompDescPanel.SetBounds(ScaleX(192), ScaleY(125), ScaleX(225), ScaleY(80));

И хватит задавать глупые вопросы. Я вижу, что ты даже не пытаешься что-то понимать.

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

AtotIK, хоть и поменял координаты все равно не видно их.

если бы знал все, я бы не спрашивал

 

67bd2fe00aae9825fe21301910e3d184.jpg

Edited by Fenixx

Share this post


Link to post

Short link
Share on other sites

AtotIK, хоть и поменял координаты все равно не видно их.

если бы знал все, я бы не спрашивал

 

67bd2fe00aae9825fe21301910e3d184.jpg

код скинь(в архиве)

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

Edited by Dark_Knight_MiX
  • Upvote 1

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