Jump to content
Korean Random
EvilAlex

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

Recommended Posts

Список загружается постепенно 

Покажи готовый инсталл.

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

Надо суда

function NextButtonClick(CurPage: Integer): Boolean;
begin
   Result:=True;
   If CurPage=6 then
      begin
        If not FileExists(ExpandConstant('{app}\WorldOfTanks.exe')) then
          begin
            MsgBox(ExpandConstant('{cm:FileNotFoundLabel}'), mbError, MB_OK);
            Result:=False;
          end;
            If FileExists(ExpandConstant('{app}')+'\WorldOfTanks.exe') then
          begin
            If FileVersion(ExpandConstant('{app}')+'\WorldOfTanks.exe') <> '{#PackForVersion}' then
              begin
                MsgBox(ExpandConstant('{cm:FileVersionWrongLabel}'), mbError, MB_OK);
                Result:=False;
              end;
          end;
      end;
end;

Внедрить это:

Выручайте)

function NextButtonClick(CurPage: Integer): Boolean;
begin
  Result:=True;
If CurPage=1 then
begin
  if IsAppRunning() then
  begin
    MsgBox('Клиент игры World of Tanks в настоящее время запущен.' #13#13 'Необходимо закрыть его перед продолжением установки.', mbError, MB_OK);
    Result:=False;
  end
  else
    Result:=True;
end;
end;

Edited by TneRED

Share this post


Link to post

Short link
Share on other sites

 

Надо суда

function NextButtonClick(CurPage: Integer): Boolean;
begin
   Result:=True;
   If CurPage=6 then
      begin
        If not FileExists(ExpandConstant('{app}\WorldOfTanks.exe')) then
          begin
            MsgBox(ExpandConstant('{cm:FileNotFoundLabel}'), mbError, MB_OK);
            Result:=False;
          end;
            If FileExists(ExpandConstant('{app}')+'\WorldOfTanks.exe') then
          begin
            If FileVersion(ExpandConstant('{app}')+'\WorldOfTanks.exe') <> '{#PackForVersion}' then
              begin
                MsgBox(ExpandConstant('{cm:FileVersionWrongLabel}'), mbError, MB_OK);
                Result:=False;
              end;
          end;
      end;
end;

Внедрить это:

Выручайте)

function NextButtonClick(CurPage: Integer): Boolean;
begin
  Result:=True;
If CurPage=1 then
begin
  if IsAppRunning() then
  begin
    MsgBox('Клиент игры World of Tanks в настоящее время запущен.' #13#13 'Необходимо закрыть его перед продолжением установки.', mbError, MB_OK);
    Result:=False;
  end
  else
    Result:=True;
end;
end;

#define Patch               "0.9.7"
[Code]
function FileVersion(const FilePath: String): String;
var
  oFS: Variant;
begin
  oFS:= CreateOleObject('Scripting.FileSystemObject');
    try
      Result:= oFS.GetFileVersion(FilePath);
    except
  end;
end;
//"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""//
Function NextButtonClick(CurPageID: Integer): Boolean;
begin
 Result := True;
 case CurPageID of
 wpSelectDir:
  begin
   if not FileExists(ExpandConstant('{app}\WorldOfTanks.exe')) then begin
    MsgBoxEx(0, 'Установка модов невозможна, так как по выбранному пути отсутствует клиент игры World of Tanks. Выберите правильный путь и продолжайте установку!','Внимание!!',MB_OK or MB_ICONERROR, 0, 0);
    Result := False;
   end;
   if FileExists(ExpandConstant('{app}')+'\WorldOfTanks.exe') then begin
    if FileVersion(ExpandConstant('{app}')+'\WorldOfTanks.exe') < '{#Patch}' then begin
     MsgBoxEx(WizardForm.Handle, 'Моды не будут работать на данной версии игры! Моды предназначены для версии патча {#Patch} ', 'Моды не подходят к данному патчу World of Tanks', MB_OK or MB_ICONWARNING, 0, 0);
     Result:= false;
    end;
   end;
  end;

 end;
end;

Share this post


Link to post

Short link
Share on other sites
#define Patch               "0.9.7"
[Code]
function FileVersion(const FilePath: String): String;
var
  oFS: Variant;
begin
  oFS:= CreateOleObject('Scripting.FileSystemObject');
    try
      Result:= oFS.GetFileVersion(FilePath);
    except
  end;
end;
//"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""//
Function NextButtonClick(CurPageID: Integer): Boolean;
begin
 Result := True;
 case CurPageID of
 wpSelectDir:
  begin
   if not FileExists(ExpandConstant('{app}\WorldOfTanks.exe')) then begin
    MsgBoxEx(0, 'Установка модов невозможна, так как по выбранному пути отсутствует клиент игры World of Tanks. Выберите правильный путь и продолжайте установку!','Внимание!!',MB_OK or MB_ICONERROR, 0, 0);
    Result := False;
   end;
   if FileExists(ExpandConstant('{app}')+'\WorldOfTanks.exe') then begin
    if FileVersion(ExpandConstant('{app}')+'\WorldOfTanks.exe') < '{#Patch}' then begin
     MsgBoxEx(WizardForm.Handle, 'Моды не будут работать на данной версии игры! Моды предназначены для версии патча {#Patch} ', 'Моды не подходят к данному патчу World of Tanks', MB_OK or MB_ICONWARNING, 0, 0);
     Result:= false;
    end;
   end;
  end;

 end;
end;

Я имел ввиду что мне надо скретить два скрипта)

И уже ненадо сделал)

 

image.png

Edited by TneRED

Share this post


Link to post

Short link
Share on other sites

Я имел ввиду что мне надо скретить два скрипта)

И уже ненадо сделал)

 

image.png

Не надо такие кнопки большие делать и шрифт не очень на мой взгляд 

Share this post


Link to post

Short link
Share on other sites

Не надо такие кнопки большие делать и шрифт не очень на мой взгляд 

 

Надо же как выделиться среди толпы)

Шрифт взял с офф сайта танков)

 

image.png

Edited by TneRED

Share this post


Link to post

Short link
Share on other sites

Уже что то :)

Просто на первом скриншоте картинка изказилась

Осталось сделать скриншоты а структуру папок уже сделал и моды залил обновленные большая сборка получиться)

скоро еще выпущу 2 версию где будет все читерские моды и программы)

Edited by TneRED

Share this post


Link to post

Short link
Share on other sites

Просто на первом скриншоте картинка изказилась

Осталось сделать скриншоты а структуру папок уже сделал и моды залил обновленные большая сборка получиться)

скоро еще выпущу 2 версию где будет все читерские моды и программы)

ай ай ай, ща в цпп напишу, ахаха  :ok:

Share this post


Link to post

Short link
Share on other sites

Все настроил и т.д.
Но есть проблема, почему то при выборе например одного компонента, устанавливаются все. Как с этим бороться ? пути и т.д. все прописано.

Edited by guceds

Share this post


Link to post

Short link
Share on other sites

Все настроил и т.д.

Но есть проблема, почему то при выборе например одного компонента, устанавливаются все. Как с этим бороться ? пути и т.д. все прописано.

компоненты покажи 

Share this post


Link to post

Short link
Share on other sites
[Types]
Name: custom; Description: Full installation; Flags: iscustom

[Components]
Name: KMP; Description: *** Mod Pack; Types: custom; Flags: exclusive
Name: KMP\P; Description: "1. ****; Flags: disablenouninstallwarning
Name: KMP\DP; Description: "2. ***"; Flags: disablenouninstallwarning
Name: KMP\ZK; Description: "3. ***"; Flags: disablenouninstallwarning
Name: KMP\PZ; Description: "4. **"; Flags: disablenouninstallwarning
Name: KMP\PO; Description: "5. **"; Flags: disablenouninstallwarning
Name: KMP\RG; Description: "6. ***"; Flags: disablenouninstallwarning

[Files]
Source: "MODS\****\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\P;
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\DP;
Source: "MODS\DESTRUCTIVE\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\ZK;
Source: "MODS\****\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\PZ;
Source: "MODS\POZICII\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\PO;
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\RG;

Вот

Share this post


Link to post

Short link
Share on other sites

ай ай ай, ща в цпп напишу, ахаха  :ok:

Сам стопудова пользуешься гарантию даю!

Share this post


Link to post

Short link
Share on other sites

Сам стопудова пользуешься гарантию даю!

нет

 

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

[Components]
Name: KMP; Description: *** Mod Pack; Types: custom; Flags: exclusive
Name: KMP\P; Description: "1. ****; Flags: disablenouninstallwarning
Name: KMP\DP; Description: "2. ***"; Flags: disablenouninstallwarning
Name: KMP\ZK; Description: "3. ***"; Flags: disablenouninstallwarning
Name: KMP\PZ; Description: "4. **"; Flags: disablenouninstallwarning
Name: KMP\PO; Description: "5. **"; Flags: disablenouninstallwarning
Name: KMP\RG; Description: "6. ***"; Flags: disablenouninstallwarning

у меня все ок работает 

Share this post


Link to post

Short link
Share on other sites

Странно, я указываю путь (свою пустую папку), выбираю допустим последний компонент. И у меня устанавливается все


не то скинул, вот..

 


[Components]
Name: KMP; Description: "{cm:CompName1}";
Name: KMP\P; Description: "{cm:CompName2}";
Name: KMP\DP; Description: "{cm:CompName3}";
Name: KMP\ZK; Description: "{cm:CompName4}";
Name: KMP\PZ; Description: "{cm:CompName5}";
Name: KMP\PO; Description: "{cm:CompName6}";
Name: KMP\RG; Description: "{cm:CompName7}";

[Files]
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "MODS\DESTRUCTIVE\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "MODS\POZICII\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;

Share this post


Link to post

Short link
Share on other sites

 

Странно, я указываю путь (свою пустую папку), выбираю допустим последний компонент. И у меня устанавливается все

не то скинул, вот..

 

 


[Components]
Name: KMP; Description: "{cm:CompName1}";
Name: KMP\P; Description: "{cm:CompName2}";
Name: KMP\DP; Description: "{cm:CompName3}";
Name: KMP\ZK; Description: "{cm:CompName4}";
Name: KMP\PZ; Description: "{cm:CompName5}";
Name: KMP\PO; Description: "{cm:CompName6}";
Name: KMP\RG; Description: "{cm:CompName7}";

[Files]
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "MODS\DESTRUCTIVE\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "MODS\POZICII\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;

ааххаха

Name: KMP; Description: "{cm:CompName1}";
Name: KMP\P; Description: "{cm:CompName2}";
Name: KMP\DP; Description: "{cm:CompName3}";
Name: KMP\ZK; Description: "{cm:CompName4}";
Name: KMP\PZ; Description: "{cm:CompName5}";
Name: KMP\PO; Description: "{cm:CompName6}";
Name: KMP\RG; Description: "{cm:CompName7}";

[Files]
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\P;
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\DP;
Source: "MODS\DESTRUCTIVE\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\ZK;
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\PZ;
Source: "MODS\POZICII\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\PO;
Source: "MODS\***\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\RG;
  • 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...