Jump to content
Korean Random
EvilAlex

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

Recommended Posts

​У меня при выборе папки C:\Games\World_of_Tanks выбирает папку С:\Games\World_of_Tanks\World_of_Tanks 

В следующий раз задавайте вопрос полностью.

[Setup]
AppendDefaultDirName=no
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Всем привет , нужна помощь , вот у меня такая хрень как зделать вот такую меню как у джовы вот фоткака но у него там ютуб и вк 

 

Это лого (Мой канал на ютубе)

procedure LogoOnClick(Sender: TObject);

var ResCode: Integer;

begin

  ShellExec('', 'http://vk.com/public42043293' '' , '', SW_SHOW, ewNoWait, ResCode)

end;

 

procedure Logo();

var

  BtnPanel: TPanel;

  BtnImage: TBitmapImage;

begin

  ExtractTemporaryFile('logo.bmp')

    

  BtnPanel:=TPanel.Create(WizardForm)

  with BtnPanel do begin

    Left:=20

    Top:=325

    Width:=132

    Height:=27

    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

end;

 

 

как у амвея 

это сплеш

[Code]

procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';

procedure Splash();

begin

    ExtractTemporaryFile('Splash.png');

    ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\Splash.png',1000,3000,1000,0,255,False,$FFFFFF,10);

end;

Всем привет , С новым годом 2015 , Так у меня такая проблема я хочу создать свой модпак , мне надо такая херня так как у анвея в начале запуска идёт картинка а потом запускается модпак , 2  з делать что б выбирались моды по одному , и что б удалить все старые моды , хто может помогите буду очень благодарен)

Выбор модов по одному :

Name: KP; Description: Лучшие моды от клана KORM-;Types: tp; Flags: checkablealone

Name: KP\KP; Description:1.Прицелы.;Types: tp; Flags: checkablealone;

Name: KP\KP\1; Description: MeltyMap; Flags: exclusive

Name: KP\KP\2; Description: А-ля  Ghost Recon; Flags: exclusive

 

 

 

 

 

 

 

 

 

 

 

#define Patch                    "0.9.5"

//бекап

[Code]

var

  BackupPage: TWizardPage;

  DeleteRadioButton, MoveRadioButton, NoneRadioButton: TNewRadioButton;

const

  BackupDescText =

    'Во избежание проблем совместимости и конфликтов между модификациями рекомендуется удалить уже установленные на данный момент в игровом клиенте.' #13#13 'Выберите необходимый пункт из представленных. При этом будет очищено содержимое папки "res_mods\{#Patch}", удалена папка "res_mods\xvm" или созданы резервные копии Ваших файлов.';

  DeleteDescText =

    'Установщик удалит все файлы в папках.';

  MoveDescText =

    'Установщик сделает резервную копию всех файлов в папках.';

  NoneDescText =

    'Установщик оставит всё как есть.';

function BackupCheck_1(): Boolean;

var

  BackupDescLabel, DeleteDescLabel, MoveDescLabel, NoneDescLabel: TLabel;

begin

  BackupPage:=CreateCustomPage(wpWelcome, 'Создание резервных копий файлов перед установкой', 'Пожалуйста, прочтите следующую важную информацию перед тем, как продолжить.');

  BackupDescLabel:=TLabel.Create(WizardForm);

  BackupDescLabel.Parent:=BackupPage.Surface;

  BackupDescLabel.Left:=0;

  BackupDescLabel.Top:=0;

  BackupDescLabel.Width:=BackupPage.SurfaceWidth;

  BackupDescLabel.Height:=90;

  BackupDescLabel.AutoSize:=False;

  BackupDescLabel.Wordwrap:=True;

  BackupDescLabel.Caption:=BackupDescText;

  DeleteRadioButton:=TNewRadioButton.Create(WizardForm);

  DeleteRadioButton.Parent:=BackupPage.Surface;

  DeleteRadioButton.Checked:=False;

  DeleteRadioButton.Top:=95;

  DeleteRadioButton.Width:=BackupPage.SurfaceWidth;

  DeleteRadioButton.Font.Style:=[fsBold];

  DeleteRadioButton.Font.Size:=9;

  DeleteRadioButton.Caption:='Удалить файлы'

  DeleteDescLabel:=TLabel.Create(WizardForm);

  DeleteDescLabel.Parent:=BackupPage.Surface;

  DeleteDescLabel.Left:=18;

  DeleteDescLabel.Top:=DeleteRadioButton.Top + DeleteRadioButton.Height + 4;

  DeleteDescLabel.Width:=BackupPage.SurfaceWidth;

  DeleteDescLabel.Height:=40;

  DeleteDescLabel.AutoSize:=False;

  DeleteDescLabel.Wordwrap:=True;

  DeleteDescLabel.Caption:=DeleteDescText;

  MoveRadioButton:=TNewRadioButton.Create(WizardForm);

  MoveRadioButton.Parent:=BackupPage.Surface;

  MoveRadioButton.Checked:=True;

  MoveRadioButton.Top:=140;

  MoveRadioButton.Width:=BackupPage.SurfaceWidth;

  MoveRadioButton.Font.Style:=[fsBold];

  MoveRadioButton.Font.Size:=9;

  MoveRadioButton.Caption:='Сделать резервную копию файлов'

  MoveDescLabel:=TLabel.Create(WizardForm);

  MoveDescLabel.Parent:=BackupPage.Surface;

  MoveDescLabel.Left:=18;

  MoveDescLabel.Top:=MoveRadioButton.Top + MoveRadioButton.Height + 4;

  MoveDescLabel.Width:=BackupPage.SurfaceWidth;

  MoveDescLabel.Height:=40;

  MoveDescLabel.AutoSize:=False;

  MoveDescLabel.Wordwrap:=True;

  MoveDescLabel.Caption:=MoveDescText;

  NoneRadioButton:=TNewRadioButton.Create(WizardForm);

  NoneRadioButton.Parent:=BackupPage.Surface;

  NoneRadioButton.Checked:=False;

  NoneRadioButton.Top:=185;

  NoneRadioButton.Width:=BackupPage.SurfaceWidth;

  NoneRadioButton.Font.Style:=[fsBold];

  NoneRadioButton.Font.Size:=9;

  NoneRadioButton.Caption:='Ничего не трогать'

  NoneDescLabel:=TLabel.Create(WizardForm);

  NoneDescLabel.Parent:=BackupPage.Surface;

  NoneDescLabel.Left:=18;

  NoneDescLabel.Top:=NoneRadioButton.Top + NoneRadioButton.Height + 4;

  NoneDescLabel.Width:=BackupPage.SurfaceWidth;

  NoneDescLabel.Height:=40;

  NoneDescLabel.AutoSize:=False;

  NoneDescLabel.Wordwrap:=True;

  NoneDescLabel.Caption:=NoneDescText;

end;

function BackupCheck_2(): Boolean;

begin

  If DeleteRadioButton.Checked then

begin

  DelTree(ExpandConstant('{app}\res_mods\{#Patch}'), True, True, True);

  DelTree(ExpandConstant('{app}\res_mods\xvm'), True, True, True);

  CreateDir(ExpandConstant('{app}\res_mods\{#Patch}'));

end;

end;

function BackupCheck_3(): Boolean;

begin

  If MoveRadioButton.Checked then

begin

  CreateDir(ExpandConstant('{app}\res_mods\{#Patch}'));

  DelTree(ExpandConstant('{app}\res_mods\xvm'), True, True, True);

end;

end;

procedure CurStepChanged(CurStep: TSetupStep);

begin

  If CurStep=ssInstall then

begin

  BackupCheck_2();

  BackupCheck_3();

end;

end;

procedure InitializeWizard();

begin

  BackupCheck_1();

post-29771-0-87671400-1420746226_thumb.jpg

post-29771-0-49577400-1420746347_thumb.jpg

Share this post


Link to post

Short link
Share on other sites

Мужики, можно ли сделать так, чтобы текст в описании компонентов в определённом месте, а не только в конце строки можно было напечатать с абзаца? Пример:

CompDesc1=trwtqwrtqrwtqrwtqwrtqwr

Выводится как: trwtqwrtqrwt qrwtqwrt qwr

А нужно так:

trwtqwrtqrwt

qrwtqwrt

qwr

Возможно ли это?

Edited by Darksoul

Share this post


Link to post

Short link
Share on other sites

Это лого (Мой канал на ютубе)

procedure LogoOnClick(Sender: TObject);

var ResCode: Integer;

begin

  ShellExec('', 'http://vk.com/public42043293' '' , '', SW_SHOW, ewNoWait, ResCode)

end;

 

procedure Logo();

var

  BtnPanel: TPanel;

  BtnImage: TBitmapImage;

begin

  ExtractTemporaryFile('logo.bmp')

    

  BtnPanel:=TPanel.Create(WizardForm)

  with BtnPanel do begin

    Left:=20

    Top:=325

    Width:=132

    Height:=27

    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

end;  как у амвея это сплеш[code=auto:0]procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';procedure Splash();

begin

    ExtractTemporaryFile('Splash.png');

    ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\Splash.png',1000,3000,1000,0,255,False,$FFFFFF,10);

end;Выбор модов по одному :Name: KP; Description: Лучшие моды от клана KORM-;Types: tp; Flags: checkablealone

Name: KP\KP; Description:1.Прицелы.;Types: tp; Flags: checkablealone;

Name: KP\KP\1; Description: MeltyMap; Flags: exclusive

Name: KP\KP\2; Description: А-ля  Ghost Recon; Flags: exclusive           #define Patch                    "0.9.5"//бекап

[code=auto:0]

var

  BackupPage: TWizardPage;

  DeleteRadioButton, MoveRadioButton, NoneRadioButton: TNewRadioButton;const

  BackupDescText =

    'Во избежание проблем совместимости и конфликтов между модификациями рекомендуется удалить уже установленные на данный момент в игровом клиенте.' #13#13 'Выберите необходимый пункт из представленных. При этом будет очищено содержимое папки "res_mods\{#Patch}", удалена папка "res_mods\xvm" или созданы резервные копии Ваших файлов.';

  DeleteDescText =

    'Установщик удалит все файлы в папках.';

  MoveDescText =

    'Установщик сделает резервную копию всех файлов в папках.';

  NoneDescText =

    'Установщик оставит всё как есть.';function BackupCheck_1(): Boolean;

var

  BackupDescLabel, DeleteDescLabel, MoveDescLabel, NoneDescLabel: TLabel;

begin

  BackupPage:=CreateCustomPage(wpWelcome, 'Создание резервных копий файлов перед установкой', 'Пожалуйста, прочтите следующую важную информацию перед тем, как продолжить.');

  BackupDescLabel:=TLabel.Create(WizardForm);

  BackupDescLabel.Parent:=BackupPage.Surface;

  BackupDescLabel.Left:=0;

  BackupDescLabel.Top:=0;

  BackupDescLabel.Width:=BackupPage.SurfaceWidth;

  BackupDescLabel.Height:=90;

  BackupDescLabel.AutoSize:=False;

  BackupDescLabel.Wordwrap:=True;

  BackupDescLabel.Caption:=BackupDescText;  DeleteRadioButton:=TNewRadioButton.Create(WizardForm);

  DeleteRadioButton.Parent:=BackupPage.Surface;

  DeleteRadioButton.Checked:=False;

  DeleteRadioButton.Top:=95;

  DeleteRadioButton.Width:=BackupPage.SurfaceWidth;

  DeleteRadioButton.Font.Style:=[fsBold];

  DeleteRadioButton.Font.Size:=9;

  DeleteRadioButton.Caption:='Удалить файлы'

  DeleteDescLabel:=TLabel.Create(WizardForm);

  DeleteDescLabel.Parent:=BackupPage.Surface;

  DeleteDescLabel.Left:=18;

  DeleteDescLabel.Top:=DeleteRadioButton.Top + DeleteRadioButton.Height + 4;

  DeleteDescLabel.Width:=BackupPage.SurfaceWidth;

  DeleteDescLabel.Height:=40;

  DeleteDescLabel.AutoSize:=False;

  DeleteDescLabel.Wordwrap:=True;

  DeleteDescLabel.Caption:=DeleteDescText;  MoveRadioButton:=TNewRadioButton.Create(WizardForm);

  MoveRadioButton.Parent:=BackupPage.Surface;

  MoveRadioButton.Checked:=True;

  MoveRadioButton.Top:=140;

  MoveRadioButton.Width:=BackupPage.SurfaceWidth;

  MoveRadioButton.Font.Style:=[fsBold];

  MoveRadioButton.Font.Size:=9;

  MoveRadioButton.Caption:='Сделать резервную копию файлов'

  MoveDescLabel:=TLabel.Create(WizardForm);

  MoveDescLabel.Parent:=BackupPage.Surface;

  MoveDescLabel.Left:=18;

  MoveDescLabel.Top:=MoveRadioButton.Top + MoveRadioButton.Height + 4;

  MoveDescLabel.Width:=BackupPage.SurfaceWidth;

  MoveDescLabel.Height:=40;

  MoveDescLabel.AutoSize:=False;

  MoveDescLabel.Wordwrap:=True;

  MoveDescLabel.Caption:=MoveDescText;  NoneRadioButton:=TNewRadioButton.Create(WizardForm);

  NoneRadioButton.Parent:=BackupPage.Surface;

  NoneRadioButton.Checked:=False;

  NoneRadioButton.Top:=185;

  NoneRadioButton.Width:=BackupPage.SurfaceWidth;

  NoneRadioButton.Font.Style:=[fsBold];

  NoneRadioButton.Font.Size:=9;

  NoneRadioButton.Caption:='Ничего не трогать'

  NoneDescLabel:=TLabel.Create(WizardForm);

  NoneDescLabel.Parent:=BackupPage.Surface;

  NoneDescLabel.Left:=18;

  NoneDescLabel.Top:=NoneRadioButton.Top + NoneRadioButton.Height + 4;

  NoneDescLabel.Width:=BackupPage.SurfaceWidth;

  NoneDescLabel.Height:=40;

  NoneDescLabel.AutoSize:=False;

  NoneDescLabel.Wordwrap:=True;

  NoneDescLabel.Caption:=NoneDescText;

end;function BackupCheck_2(): Boolean;

begin

  If DeleteRadioButton.Checked then

begin

  DelTree(ExpandConstant('{app}\res_mods\{#Patch}'), True, True, True);

  DelTree(ExpandConstant('{app}\res_mods\xvm'), True, True, True);

  CreateDir(ExpandConstant('{app}\res_mods\{#Patch}'));

end;

end;function BackupCheck_3(): Boolean;

begin

  If MoveRadioButton.Checked then

begin

  CreateDir(ExpandConstant('{app}\res_mods\{#Patch}'));

  DelTree(ExpandConstant('{app}\res_mods\xvm'), True, True, True);

end;

end;procedure CurStepChanged(CurStep: TSetupStep);

begin

  If CurStep=ssInstall then

begin

  BackupCheck_2();

  BackupCheck_3();

end;

end;

procedure InitializeWizard();

begin

  BackupCheck_1();

что то не понятно,что вам нужно?

Share this post


Link to post

Short link
Share on other sites

Люди, имейте совесть, пользуйтесь

'Спойлерами блин'

И будет вам счастье;)

:heh:  :heh:

Share this post


Link to post

Short link
Share on other sites

Люди, имейте совесть, пользуйтесь

'Спойлерами блин'

И будет вам счастье;)

хАрАшо

Share this post


Link to post

Short link
Share on other sites

Как сделать так что бы сначала установщик скачивал моды из сети и распаковывал их,а уж патом те которые в установщике?

вместо wpInstalling написать wpSelectComponents или не так?

Edited by ♫♫♫Dark_Knight_MiX♫♫♫

Share this post


Link to post

Short link
Share on other sites

 

 

Как сделать так что бы сначала установщик скачивал моды из сети и распаковывал их,а уж патом те которые в установщике?
idpDownloadAfter(wpSelectComponents или wpReady);

И распаковку делать по факту скачивания:

if (CurPageID > wpSelectComponents или wpReady) and idpFileDownloaded(http://...) then

Share this post


Link to post

Short link
Share on other sites
idpDownloadAfter(wpSelectComponents или wpReady);

И распаковку делать по факту скачивания:

if (CurPageID > wpSelectComponents или wpReady) and idpFileDownloaded(http://...) then

ясно 

Share this post


Link to post

Short link
Share on other sites

Нужна помощь со скриптом IDP, нужно запилить:
1) Чтобы архивы качались не так как сейчас, в корневую папку с игрой, а в отдельную папку.
2) Можно было отменить нажатием на кнопку загрузку и установку модов, и соответственно архивы из той папки удалялись и папка рес модс очищалась, при этом в ней оставалась пустая папка с номером патча.idp.rar

Edited by Darksoul

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

Как в секции [CustomMessages] принудительно переводить текст на новую строку я нашел в справке.
А вот как в секции [CustomMessages]  строку выделить жирным шрифтом?

Share this post


Link to post

Short link
Share on other sites

Как в секции [CustomMessages] принудительно переводить текст на новую строку я нашел в справке.

А вот как в секции [CustomMessages]  строку выделить жирным шрифтом?

в секции кода  с помощью 

const
Mod1 =
  'Пожалуйста, прочтите следующее Лицензионное Соглашение.' + #13#10 +#13#10 +' Вы должны принять условия этого соглашения перед тем, как продолжить.';

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