Jump to content
Korean Random
EvilAlex

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

Recommended Posts

begin

if CurStep = ssDone then

If CurStep=ssInstall then

begin

апхахпа. Без комментариев.

Хотя нет, один коммент всё-таки есть: изучай справку.

 

з.ы. Если прочитать хотя бы четверть этой темы - таких шняг не будет.

Edited by Kotyarko_O
  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

Опубликовано 9 минут назад
Kotyarko_O, on 09 Nov 2014 - 18:24, said:
Загрузчик модов. Если у тебя на каждый мод по загрузчику - это неправильно.



Используют одни и те же скрипты, кажется. Отличаются только наличием конфига в папке gui.

И как же исправить это ? чтобы некоторые моды были совместимы, чтобы вобщем мод с модом не конфликтовали


Загрузчик модов. Если у тебя на каждый мод по загрузчику - это неправильно.
 

 

Используют одни и те же скрипты, кажется. Отличаются только наличием конфига в папке gui.

И как же исправить это ? чтобы некоторые моды были совместимы, чтобы вобщем мод с модом не конфликтовали

Share this post


Link to post

Short link
Share on other sites
[Code]
Procedure CurStepChanged(CurStep: TSetupStep);
var
 Rslt: Integer;
begin
 if CurStep = ssDone then
 begin
  ShellExec('', 'http://.....', '' , '', SW_SHOW, ewNoWait, Rstl);
 end;
end;

Procedure GoToSite(CurStep: TSetupStep);

var

Rslt: Integer;

begin

if CurStep = ssDone then

begin

  ShellExec('', 'http://сайт.ru/' '' , '', SW_SHOW, ewNoWait, Rslt);

end;

end;

 

procedure CurStepChanged(CurStep: TSetupStep);

begin

  If CurStep=ssInstall then

begin

  BackupCheck_2();

  BackupCheck_3();

end;

end;

 

Так тоже не работает(

Share this post


Link to post

Short link
Share on other sites

 

 

Так тоже не работает(
И не должно.
Procedure GoToSite(CurStep: TSetupStep);
var
Rslt: Integer;
begin
if CurStep = ssDone then
begin
  ShellExec('', 'http://сайт.ru/' '' , '', SW_SHOW, ewNoWait, Rslt);
end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  If CurStep=ssInstall then
begin
  BackupCheck_2();
  BackupCheck_3();
end;
 GoToSite(CurStep);
end;

Share this post


Link to post

Short link
Share on other sites

 

[code]
Procedure CurStepChanged(CurStep: TSetupStep);
var
 Rslt: Integer;
begin
 if CurStep = ssDone then
 begin
  ShellExec('', 'http://.....', '' , '', SW_SHOW, ewNoWait, Rstl);
 end;
end;

 

А куда это вставить?

 

вот код

function MyDirName(S:String): String;

var

InsPath: String;

er: boolean;

myFile:String;

begin

Result:=ExpandConstant('C:\Games\World_of_Tanks\'); //если ключа нет то будем ставить сюда

er := RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{1EAC1D02-C6AC-4FA6-9A44-96258C37C812RU}_is1', 'InstallLocation', InsPath);

if er and (InsPath<>'') then //если ключ существует и там что-то записано

begin

Result := InsPath;

end;

end;

 

 

#ifdef DateToEnd

Function InitializeSetup(): Boolean;

begin

Result := CompareStr(GetDateTimeString('dd.mm.yyyy hh:nn', '.', ':'), '{#DateToEnd}') <= 0;

If not Result then

begin

MsgBox('Install time limit, it is not possible to install this program.', mbError, MB_OK);

end;

end;

#endif

 

Function NextButtonClick(CurPageID: Integer): Boolean;

begin

Result := True;

case CurPageID of

wpSelectDir:

if not FileExists(ExpandConstant('{app}\WorldOfTanks.exe')) then

begin

MsgBox('Не верно указана папка World of Tanks!', mbError, MB_OK);

Result := False;

end

else

begin

Result := True;

end;

end;

end;

 

 

 

procedure LogoOnClick(Sender: TObject);

var ResCode: Integer;

begin

ShellExec('', '{#MyAppURL}', '' , '', SW_SHOW, ewNoWait, ResCode)

end;

var

BitmapImage1: TBitmapImage;

procedure RedesignWizardForm;

var

i: integer;

BtnPanel: TPanel;

BtnImage: TBitmapImage;

begin

ExtractTemporaryFile('logo.bmp')

BtnPanel:=TPanel.Create(WizardForm)

with BtnPanel do begin

Left:=20

Top:=487

Width:=200

Height:=41

Cursor:=crHand

OnClick:=@logoOnClick

Parent:=WizardForm

end;

BtnImage:=TBitmapImage.Create(WizardForm)

with BtnImage do begin

AutoSize:=True;

Enabled:=False;

Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\logo.bmp')

Parent:=BtnPanel

end;

{ BitmapImage1 }

BitmapImage1 := TBitmapImage.Create(WizardForm);

with BitmapImage1 do

begin

Parent := WizardForm.SelectDirPage;

Left := ScaleX(0);

Top := ScaleY(115);

Width := ScaleX(620);

Height := ScaleY(260);

ExtractTemporaryFile('WizardForm.BitmapImage1.bmp');

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

end;

end;

 

function WindowResize(): Boolean;

var

HeightOffset, WidthOffset: Integer;

begin

HeightOffset:=170;

WidthOffset:=200;

 

WizardForm.Height:=WizardForm.Height + HeightOffset;

WizardForm.Width:=WizardForm.Width + WidthOffset;

 

WizardForm.NextButton.Top:=WizardForm.NextButton.Top + HeightOffset;

WizardForm.BackButton.Top:=WizardForm.BackButton.Top + HeightOffset;

WizardForm.CancelButton.Top:=WizardForm.CancelButton.Top + HeightOffset;

WizardForm.NextButton.Left:=WizardForm.NextButton.Left + WidthOffset;

WizardForm.BackButton.Left:=WizardForm.BackButton.Left + WidthOffset;

WizardForm.CancelButton.Left:=WizardForm.CancelButton.Left + WidthOffset;

 

WizardForm.OuterNotebook.Height:=WizardForm.OuterNotebook.Height + HeightOffset;

WizardForm.InnerNotebook.Height:=WizardForm.InnerNotebook.Height + HeightOffset;

WizardForm.OuterNotebook.Width:=WizardForm.OuterNotebook.Width + WidthOffset;

WizardForm.InnerNotebook.Width:=WizardForm.InnerNotebook.Width + WidthOffset;

WizardForm.WizardSmallBitmapImage.Left:= WizardForm.WizardSmallBitmapImage.Left + WidthOffset;

WizardForm.Bevel.Top:=WizardForm.Bevel.Top + HeightOffset;

WizardForm.BeveledLabel.Top:=WizardForm.BeveledLabel.Top + HeightOffset;

WizardForm.Bevel.Width:=WizardForm.Bevel.Width + WidthOffset;

WizardForm.Bevel1.Width:=WizardForm.Bevel1.Width + WidthOffset;

WizardForm.MainPanel.Width:=WizardForm.MainPanel.Width + WidthOffset;

WizardForm.BeveledLabel.Width:=WizardForm.BeveledLabel.Width + WidthOffset;

WizardForm.Center;

 

{ /// --- Раскомментировать при желании ---- ///

WizardForm.WelcomeLabel1.Hide;

WizardForm.WelcomeLabel2.Hide;

WizardForm.FinishedLabel.Hide;

WizardForm.FinishedHeadingLabel.Hide;

WizardForm.WizardBitmapImage.Width:=600;

WizardForm.WizardBitmapImage.Height:=400;

WizardForm.WizardBitmapImage2.Width:=600;

WizardForm.WizardBitmapImage2.Height:=400;

WizardForm.PageNameLabel.Hide;

WizardForm.PageDescriptionLabel.Hide;

WizardForm.WizardSmallBitmapImage.Top:=0;

WizardForm.WizardSmallBitmapImage.Left:=0;

WizardForm.WizardSmallBitmapImage.Width:=WizardForm.Width;

WizardForm.WizardSmallBitmapImage.Height:=58;

/// --- Конец ---- ///

}

WizardForm.WelcomeLabel1.Hide;

WizardForm.WelcomeLabel2.Hide;

WizardForm.WizardBitmapImage.Width:=697;

WizardForm.WizardBitmapImage.Height:=483;

 

WizardForm.FinishedHeadingLabel.Hide;

WizardForm.FinishedLabel.Hide;

WizardForm.YesRadio.Hide;

WizardForm.NoRadio.Hide;

WizardForm.WizardBitmapImage2.Width:=697;

WizardForm.WizardBitmapImage2.Height:=483;

 

WizardForm.PageNameLabel.Hide;

WizardForm.PageDescriptionLabel.Hide;

WizardForm.WizardSmallBitmapImage.Top:=0;

WizardForm.WizardSmallBitmapImage.Left:=0;

WizardForm.WizardSmallBitmapImage.Width:=697;

WizardForm.WizardSmallBitmapImage.Height:=58;

 

WizardForm.WelcomeLabel1.Width:=WizardForm.WelcomeLabel1.Width + WidthOffset;

WizardForm.WelcomeLabel1.Height:=WizardForm.WelcomeLabel1.Height + HeightOffset;

WizardForm.WelcomeLabel1.Width:=WizardForm.WelcomeLabel1.Width + WidthOffset;

 

WizardForm.WelcomeLabel2.Width:=WizardForm.WelcomeLabel2.Width + WidthOffset;

WizardForm.WelcomeLabel2.Height:=WizardForm.WelcomeLabel2.Height + HeightOffset;

WizardForm.WelcomeLabel2.Width:=WizardForm.WelcomeLabel2.Width + WidthOffset;

 

 

WizardForm.LicenseLabel1.Width:=WizardForm.LicenseLabel1.Width + WidthOffset;

WizardForm.LicenseMemo.Height:=WizardForm.LicenseMemo.Height + HeightOffset;

WizardForm.LicenseMemo.Width:=WizardForm.LicenseMemo.Width + WidthOffset;

WizardForm.LicenseNotAcceptedRadio.Top:=WizardForm.LicenseNotAcceptedRadio.Top + HeightOffset;

WizardForm.LicenseAcceptedRadio.Top:=WizardForm.LicenseAcceptedRadio.Top + HeightOffset;

 

WizardForm.InfoBeforeClickLabel.Width:=WizardForm.InfoBeforeClickLabel.Width + WidthOffset;

WizardForm.InfoBeforeMemo.Height:=WizardForm.InfoBeforeMemo.Height + HeightOffset;

WizardForm.InfoBeforeMemo.Width:=WizardForm.InfoBeforeMemo.Width + WidthOffset;

 

WizardForm.SelectDirLabel.Width:=WizardForm.SelectDirLabel.Width + WidthOffset;

WizardForm.SelectDirBrowseLabel.Width:=WizardForm.SelectDirBrowseLabel.Width + WidthOffset;

WizardForm.DiskSpaceLabel.Top:=WizardForm.DiskSpaceLabel.Top + HeightOffset;

WizardForm.DirBrowseButton.Left:=WizardForm.DirBrowseButton.Left + HeightOffset;

WizardForm.DirEdit.Width:=WizardForm.DirEdit.Width + HeightOffset;

 

WizardForm.ComponentsDiskSpaceLabel.Top:=WizardForm.ComponentsDiskSpaceLabel.Top + HeightOffset;

WizardForm.SelectComponentsLabel.Width:=WizardForm.SelectComponentsLabel.Width + WidthOffset;

WizardForm.ComponentsList.Height:=WizardForm.ComponentsList.Height + HeightOffset;

WizardForm.ComponentsList.Width:=WizardForm.ComponentsList.Width + WidthOffset;

 

WizardForm.ReadyLabel.Width:=WizardForm.ReadyLabel.Width + WidthOffset;

WizardForm.ReadyMemo.Height:=WizardForm.ReadyMemo.Height + HeightOffset;

WizardForm.ReadyMemo.Width:=WizardForm.ReadyMemo.Width + WidthOffset;

 

WizardForm.ProgressGauge.Width:=WizardForm.ProgressGauge.Width + HeightOffset;

WizardForm.FilenameLabel.Width:=WizardForm.FilenameLabel.Width + HeightOffset;

WizardForm.StatusLabel.Width:=WizardForm.StatusLabel.Width + HeightOffset;

end;

 

/// --- /// --- /// --- /// --- /// --- /// --- /// --- /// --- /// --- /// --- /// --- ///

 

type

TComponentDesc = record

Description: String;

ImageName: String;

Index: Integer;

end;

 

var

CompDescs: 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);

var

i: Integer;

begin

if Index = LastIndex then Exit;

CompIndex := -1;

for i := 0 to GetArrayLength(CompDescs) -1 do

begin

if (CompDescs.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;

 

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.Description := ADescription;

CompDescs.ImageName := AImageName;

CompDescs.Index := AIndex - 1

end;

 

procedure InitializeWizard();

begin

InitializeWizard1(); {из BackUpPage.iss}

// InitializeWizard2(); {из Music.iss}

RedesignWizardForm;

WindowResize();

 

begin

WizardForm.SelectComponentsLabel.Hide;

WizardForm.TypesCombo.Hide;

WizardForm.ComponentsList.SetBounds(ScaleX(260), ScaleY(20), ScaleX(357), ScaleY(333));

WizardForm.ComponentsList.OnItemMouseMove:= @ShowCompDescription;

WizardForm.ComponentsList.OnMouseLeave := @CompListMouseLeave;

 

CompDescImgPanel := TPanel.Create(WizardForm);

with CompDescImgPanel do

begin

Parent := WizardForm.SelectComponentsPage;

SetBounds(ScaleX(0), ScaleY(20), ScaleX(253), ScaleY(203)); //рамка картинки

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(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));

Stretch := True;

Hide;

end;

 

CompDescPanel := TPanel.Create(WizardForm);

with CompDescPanel do

begin

Parent := WizardForm.SelectComponentsPage;

SetBounds(ScaleX(0), ScaleY(230), ScaleX(253), ScaleY(123)); //Нижния рамка

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 := True;

Caption := CustomMessage('ComponentsInfo');

end;

 

AddCompDescription(1, CustomMessage('CompDesc1'), 'CompDescImg1.bmp');

AddCompDescription(2, CustomMessage('CompDesc2'), 'CompDescImg2.bmp');

AddCompDescription(3, CustomMessage('CompDesc3'), 'CompDescImg3.bmp');

AddCompDescription(4, CustomMessage('CompDesc4'), 'CompDescImg4.bmp');

AddCompDescription(5, CustomMessage('CompDesc5'), 'CompDescImg5.bmp');

AddCompDescription(6, CustomMessage('CompDesc6'), 'CompDescImg6.bmp');

AddCompDescription(7, CustomMessage('CompDesc7'), 'CompDescImg7.bmp');

AddCompDescription(8, CustomMessage('CompDesc8'), 'CompDescImg8.bmp');

AddCompDescription(9, CustomMessage('CompDesc9'), 'CompDescImg9.bmp');

AddCompDescription(10, CustomMessage('CompDesc10'), 'CompDescImg10.bmp');

AddCompDescription(11, CustomMessage('CompDesc11'), 'CompDescImg11.bmp');

 

 

end;

end;

 

 

Edited by noob_modpack

Share this post


Link to post

Short link
Share on other sites

 

 

вот код
Я его и не буду смотреть.

Куда хочешь, туда и добавляй.

Share this post


Link to post

Short link
Share on other sites

Лень искать в теме,знаю что уже было но ответьте как сделать всплывающую картинку при наведении на текст,как это реализовано у Jove

post-26154-0-77512300-1415643404_thumb.png

 

Share this post


Link to post

Short link
Share on other sites
Лень искать в теме

Лень вам подсказывать.

До чего все обленились и обнаглели :ok:

А чё у Джова не спросишь? :)

Edited by Kotyarko_O

Share this post


Link to post

Short link
Share on other sites

Лень вам подсказывать.

До чего все обленились и обнаглели :ok:

А чё у Джова не спросишь? :)

Не так уж это и просто спросить у самого J O V E

Не так уж это и просто спросить у самого J O V E

Да и врятле отпишет

Не так уж это и просто спросить у самого J O V E

Да и врятле отпишет

Кстати этот коммент все таки был здесь?

К сожалению не нашел в теме подходящего коммента...

Edited by Feniks_tm

Share this post


Link to post

Short link
Share on other sites

 

 

К сожалению не нашел в теме подходящего коммента...
Ищи на 1-5 страницах.

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

Не так уж это и просто спросить у самого J O V E

Да и врятле отпишет

Кстати этот коммент все таки был здесь?

К сожалению не нашел в теме подходящего коммента...

А мы не люди чтоли?;)

Share this post


Link to post

Short link
Share on other sites

Suspicious.Cloud.9 и Suspicious.Cloud.7.F, не подскажеш, что эти два вируса в проге делают? :exc:

Share this post


Link to post

Short link
Share on other sites

timagst, спроси у своего параноидального антивируса. Религия не позволяет закинуть файл на virustotal.com и посмотреть отчёты?

Edited by AtotIK

Share this post


Link to post

Short link
Share on other sites

Suspicious.Cloud.9 и Suspicious.Cloud.7.F, не подскажеш, что эти два вируса в проге делают? :exc:

Кому вообще адресован ваш вопрос?

Share this post


Link to post

Short link
Share on other sites

Kotyarko_O извини за беспокойство, но я не такой уж уверенный пользователь ПК, поэтому в версии 0,9,3 случайно наткнулся на твой оленемер, и мне очень он понравился, особенно в плане установки, но вот теперь проблема, найти его не могу чтоб скачать для версии 0,9,4 - подскажи где можно его теперь скачать??? Мод пак видел, а пользомера нет!

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