Jump to content
Korean Random
EvilAlex

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

Recommended Posts

Попробуйте поиск по теме, потому как это сто раз обсуждалось, даже с примерами и готовы ми скриптами.

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

  • Downvote 1

Share this post


Link to post

Short link
Share on other sites

народ подскажите как добавить в установщик галочку " удаление установленных модификаций " и как сделать чтобы установщик делал проверку установленного клиента игры ? ну что бы установщик знал где не установлена и где установлена игра)) в теме как то видел но ша ни как не могу найти. глаза уже болят!!!

первые 10 стр прочти
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

первые 10 стр прочти

вот нашел эти два варианта. но чет не работают они у меня. установщик всё равно устанавливает моды в любую папку((

[Setup]
DefaultDirName={code:GetInstallDir}

[Code]
Function GetInstallDir(Path: String ): String;
var
  InsPath: String;
  er: boolean;
  myFile:String;
begin
Result:= Path;
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;
end;

и еще вот этот вариант

[Setup]
DefaultDirName={reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{1EAC1D02-C6AC-4FA6-9A44-96258C37C812RU%7d_is1,InstallLocation|{pf}\World_of_Tanks}

в данный момент у меня вот так..

[Setup]
WizardImageFile=a1nypics.ru-14007.bmp
; Примечание: Значение AppId идентифицирует это приложение.
; Не используйте одно и тоже значение в разных установках.
; (Для генерации значения GUID, нажмите Инструменты | Генерация GUID.)
AppId={{43FDCC9E-FDA9-4598-B083-D47E67D3D1AA}
AppName="666"
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
DefaultDirName=C:\Games\World_of_Tanks\
AppendDefaultDirName=no
DirExistsWarning=no
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
OutputDir=F:\А ДЛЯ СБОРКИ\ехе
OutputBaseFilename=666
SetupIconFile=F:\А ДЛЯ СБОРКИ\ПРОГА\ScriptModPack\Files\yahoo.ico
Compression=lzma
SolidCompression=yes
Uninstallable=yes
Edited by ЛОМ

Share this post


Link to post

Short link
Share on other sites

Так ты же суёшь автоматический поиск каталога с игрой через реестр. А тебе нужно проверка на файл в каталоге (или версию файла).

  • 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
[Code]
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;
end;
end;

самое оно))) спасибо тебе!!!  вам всем!!! 

и еще если не в лом подскажите одну вещь!!! чтобы без предупреждения удаляло папку ресмодс я нашел а как сделать так  чтобы была возможность выбора. типа хотите удалить?! ( отметил удалил не отметил не удалил )  только удалить папку ресмодс без всяких бэкапов, очистки хвм и т.д. 

Edited by ЛОМ

Share this post


Link to post

Short link
Share on other sites

 

Попробуйте вот этот вариант:

[Tasks]
Name: "deletemods"; Description: Удалить моды

[InstallDelete]
Type: filesandordirs; Name: "{app}\res_mods\0.9.15.1.1"; Tasks: deletemods
Type: filesandordirs; Name: "{app}\res_mods\configs"; Tasks: deletemods
Type: filesandordirs; Name: "{app}\res_mods\mods"; Tasks: deletemods

Если вам надо удалить саму папку res_mods, то попробуйте вот этот вариант:

[Tasks]
Name: "deletemods"; Description: Удалить моды

[InstallDelete]
Type: filesandordirs; Name: "{app}\res_mods"; Tasks: deletemods

спасибо братан!!!  2 вариант вполне!!! хотя я просто вписал 

[InstallDelete]
Type: filesandordirs; Name: "{app}\res_mods"; Tasks: deletemods

и так тоже все работает)) спасибо!!!

Share this post


Link to post

Short link
Share on other sites

Народ подскажите если не трудно почему очистка кеша не работает?  компилирует без ошибок все вроде

[Setup]
WizardImageFile=a1nypics.ru-14007.bmp
; Примечание: Значение AppId идентифицирует это приложение.
; Не используйте одно и тоже значение в разных установках.
; (Для генерации значения GUID, нажмите Инструменты | Генерация GUID.)
AppId={{43FDCC9E-FDA9-4598-B083-D47E67D3D1AA}
AppName="666"
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
DefaultDirName=C:\Games\World_of_Tanks\
AppendDefaultDirName=no
DirExistsWarning=no
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
OutputDir=F:\А ДЛЯ СБОРКИ\ехе
OutputBaseFilename=666
SetupIconFile=F:\А ДЛЯ СБОРКИ\ПРОГА\ScriptModPack\Files\yahoo.ico
Compression=lzma
SolidCompression=yes
Uninstallable=yes

[Languages]
Name: "default"; MessagesFile: "compiler:Default.isl"

[Files]
Source: compiler:Dll Pack\IsPicture_for_all.dll; Flags: dontcopy
Source: Fon.bmp; Flags: dontcopy
#ifdef Video
Source: XVID\fon.avi; Flags: dontcopy
#endif

;{ ISFormDesignerFilesBegin } // Не удалять эту строку!
;// Не изменять эту секцию. Она создана автоматически.
DestName: "WizardForm.SelectDirBitmapImage.bmp"; Source: "F:\А ДЛЯ СБОРКИ\ПРОГА\ScriptModPack\Files\ФОТО\иконки\10ввFon.bmp"; Flags: dontcopy solidbreak
;// Не изменять эту секцию. Она создана автоматически.
;{ ISFormDesignerFilesEnd } // Не удалять эту строку!

Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\1а battle-assistant\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\1;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\64а трейнер тундры\*"; DestDir: "{userdesktop}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\64;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\57а wot-tweaker-plus\*"; DestDir: "{userdesktop}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\57;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\58а Wot Ping Clusters\*"; DestDir: "{userdesktop}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\58;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\55а увеличение дальности видимости и удаления тумана\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\55;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\15а разрушенные объ.на мини-карте\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\15;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\18а удаление простр. объектов\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\18;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\2а мод тылы, разноцветный индикатор ближайших врагов\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\2;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\5а safeshot\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\5;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\10а тундра в снайперском прицеле\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\10;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\29а небо звездное\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\29;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\13а лазеры\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\13;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\17а статистика за сессию SeVeRRR\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\17;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\20а рентген желтый\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\20;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\21а аим САЕ 18,1\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\21;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\26а Белые трупы танков\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\26;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\27а светлячок\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\27;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\24а Оленемер\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\24;

Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\30а индикатор обстрела от  dikey93\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\30;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\32а направление стволов противника на мини-карте\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\32;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\38а мод винтик\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\38;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\42а оповешение о засвете\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\42;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\43а AutoEquip-автоматическая установка оборудования\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\43;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\34а автоприцел захвата за припятствиями(не чит)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\34;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\36а награды и медали в бою RTAN\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\36;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\54а небо черное без горизонта\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\54;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\22а отображение сферы на месте танка вне квадрата отрисовки\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\22;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\12а круг белый по попаданию без засвета\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\12;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\61а стволик хаоса\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\61;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\6а иконки танков\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\6;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\59а менеджер реплеев\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\59;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\37а Мод тень от Polar Fox (модель танка)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\37;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\48а Аим САЕ 27.2\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\48;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\25а шайтан 076\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\25;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\39а перезарядки танков (с флеш) от ZorroJan\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\39;

Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\47а Pro_Aim от Makct\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\47;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\52а прицел-Jimbo\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\52;


; Примечание: Не используйте "Flags: ignoreversion" для системных файлов

[Components]
Name: "KMP"; Description: "ОПТИМИЗАЦИЯ и..."
Name: "KMP\64"; Description: ". Трейнеры тундры-(копируется на рабочий стол)"
Name: "KMP\57"; Description: ". Tweaker Plus с обл.текстурами-(копируется на рабочий стол)"
Name: "KMP\58"; Description: ". Ping Clusters проверка пинга-(копируется на рабочий стол)"

Name: "KMP"; Description: "АИМ"
Name: "KMP\21"; Description: ". Аим САЕ 18,1"; Flags: exclusive
Name: "KMP\48"; Description: ". Аим САЕ 27.3"; Flags: exclusive
Name: "KMP\25"; Description: ". шайтан 076"; Flags: exclusive
Name: "KMP\47"; Description: ". Pro_Aim от Makct"; Flags: exclusive
Name: "KMP\34"; Description: ". автоприцел захвата за припятствиями(не чит) + safeshot"; Flags: exclusive



Name: "KMP"; Description: "ВЫБОР НЕБА"
Name: "KMP\29"; Description: ". небо звездное"; Flags: exclusive
Name: "KMP\54"; Description: ". небо черное"; Flags: exclusive

Name: "KMP"; Description: "ПРИЦЕЛЫ"
Name: "KMP\52"; Description: ". прицел-Jimbo"; Flags: exclusive


Name: "KMP"; Description: "ЧИТЫ И МОДЫ"
Name: "KMP\24"; Description: ". Оленемер"
Name: "KMP\20"; Description: ". рентген желтый"
Name: "KMP\42"; Description: ". оповешение о засвете в чате"
Name: "KMP\59"; Description: ". менеджер реплеев"
Name: "KMP\6"; Description: ". иконки танков"
Name: "KMP\61"; Description: ". стволик хаоса"
Name: "KMP\32"; Description: ". направление стволов противника на мини-карте"
Name: "KMP\39"; Description: ". перезарядки танков (с флеш) от ZorroJan"
Name: "KMP\10"; Description: ". тундра в снайперском прицеле"
Name: "KMP\55"; Description: ". увеличение дальности видимости и удаления тумана"
Name: "KMP\37"; Description: ". Мод тень от Polar Fox (модель танка)"
Name: "KMP\1"; Description: ". battle-assistant"
Name: "KMP\15"; Description: ". разрушенные объ.на мини-карте"
Name: "KMP\26"; Description: ". Белые трупы и гусеницы танков"
Name: "KMP\27"; Description: ". светлячок"
Name: "KMP\30"; Description: ". индикатор обстрела от  dikey93"
Name: "KMP\38"; Description: ". мод винтик + огнетушитель"
Name: "KMP\17"; Description: ". статистика за сессию SeVeRRR"
Name: "KMP\2"; Description: ". мод тылы, разноцветный индикатор ближайших врагов"
Name: "KMP\5"; Description: ". safeshot"
Name: "KMP\13"; Description: ". лазеры"
Name: "KMP\43"; Description: ". AutoEquip-автоматическая установка оборудования"
Name: "KMP\36"; Description: ". награды и медали в бою RTAN"
Name: "KMP\22"; Description: ". отображение сферы на месте танка вне квадрата отрисовки"
Name: "KMP\12"; Description: ". попадание без засвета"
Name: "KMP\18"; Description: ". удаление простр. объектов"

[Code]

{ RedesignWizardFormBegin } // Не удалять эту строку!
// Не изменять эту секцию. Она создана автоматически.
var
  Label1: TLabel;

procedure RedesignWizardForm;
begin
  with WizardForm do
  begin
    AutoScroll := False;
    ClientHeight := ScaleY(385);
    ClientWidth := ScaleX(640);
  end;

  with WizardForm.Bevel do
  begin
    Left := ScaleX(-490);
    Top := ScaleY(361);
    Width := ScaleX(490);
    Height := ScaleY(19);
  end;

  with WizardForm.CancelButton do
  begin
    Left := ScaleX(367);
    Top := ScaleY(357);
  end;

  with WizardForm.NextButton do
  begin
    Left := ScaleX(280);
    Top := ScaleY(357);
  end;

  with WizardForm.BackButton do
  begin
    Left := ScaleX(194);
    Top := ScaleY(357);
  end;

  with WizardForm.OuterNotebook do
  begin
    Width := ScaleX(640);
    Height := ScaleY(337);
  end;

  { Label1 }
  Label1 := TLabel.Create(WizardForm);
  with Label1 do
  begin
    Parent := WizardForm.WelcomePage;
    Caption := 'ПРИВЕТСТВУЮ!';
    Font.Color := clWindow;
    Font.Height := -24;
    Font.Name := 'Micra';
    Font.Style := [fsItalic];
    ParentFont := False;
    Left := ScaleX(171);
    Top := ScaleY(96);
    Width := ScaleX(308);
    Height := ScaleY(26);
  end;

  with WizardForm.WelcomeLabel2 do
  begin
    Caption := 'Программа вставит "666" версии 1.0 на ваш компьютер.' + #13#10 +
         '' + #13#10 +
         'Рекомендуется закрыть все прочие приложения перед тем, как продолжить.';
    Left := ScaleX(178);
    Top := ScaleY(130);
    Height := ScaleY(113);
  end;

  with WizardForm.WelcomeLabel1 do
  begin
    Left := ScaleX(637);
    Top := ScaleY(-52);
    Width := ScaleX(299);
    Height := ScaleY(51);
  end;

  with WizardForm.Bevel1 do
  begin
    Left := ScaleX(-486);
    Top := ScaleY(-9);
    Width := ScaleX(485);
    Height := ScaleY(8);
  end;

  with WizardForm.InnerNotebook do
  begin
    Width := ScaleX(562);
    Height := ScaleY(255);
  end;

  with WizardForm.SelectDirBitmapImage do
  begin
    Width := ScaleX(55);
    Height := ScaleY(53);
    ExtractTemporaryFile('WizardForm.SelectDirBitmapImage.bmp');
    Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.SelectDirBitmapImage.bmp'));
  end;

  with WizardForm.DiskSpaceLabel do
  begin
    Left := ScaleX(-413);
    Top := ScaleY(238);
    Width := ScaleX(412);
    Height := ScaleY(10);
  end;

  with WizardForm.DirBrowseButton do
  begin
    Left := ScaleX(477);
    Top := ScaleY(81);
  end;

  with WizardForm.DirEdit do
  begin
    Left := ScaleX(10);
    Width := ScaleX(460);
  end;

  with WizardForm.SelectDirBrowseLabel do
  begin
    Caption := 'Нажмите «Далее», чтобы продолжить...';
    Left := ScaleX(10);
    Top := ScaleY(52);
    Height := ScaleY(26);
  end;

  with WizardForm.SelectDirLabel do
  begin
    Caption := 'Программа вставит "666" в следующую папку.';
    Left := ScaleX(54);
    Top := ScaleY(10);
  end;

  with WizardForm.ComponentsDiskSpaceLabel do
  begin
    Left := ScaleX(-407);
    Top := ScaleY(252);
    Width := ScaleX(409);
    Height := ScaleY(3);
  end;

  with WizardForm.ComponentsList do
  begin
    Left := ScaleX(1);
    Top := ScaleY(39);
    Width := ScaleX(560);
    Height := ScaleY(147);
  end;

  with WizardForm.TypesCombo do
  begin
    Left := ScaleX(1);
    Top := ScaleY(17);
    Width := ScaleX(560);
    Color := clBlack;
  end;

  with WizardForm.SelectComponentsLabel do
  begin
    Caption := 'Выбери что надо и жми ...';
    Height := ScaleY(14);
  end;

  with WizardForm.ReadyMemo do
  begin
    Left := ScaleX(58);
    Top := ScaleY(25);
    Width := ScaleX(442);
    Height := ScaleY(160);
  end;

  with WizardForm.ReadyLabel do
  begin
    Left := ScaleX(58);
    Top := ScaleY(10);
  end;

  with WizardForm.ProgressGauge do
  begin
    Width := ScaleX(560);
    Height := ScaleY(27);
  end;

  with WizardForm.MainPanel do
  begin
    Left := ScaleX(-486);
    Top := ScaleY(-47);
    Width := ScaleX(485);
    Height := ScaleY(46);
  end;

  with WizardForm.WizardSmallBitmapImage do
  begin
    Left := ScaleX(401);
  end;

  with WizardForm.PageDescriptionLabel do
  begin
    Left := ScaleX(-383);
    Top := ScaleY(-24);
    Width := ScaleX(382);
    Height := ScaleY(23);
  end;

  with WizardForm.PageNameLabel do
  begin
    Left := ScaleX(-383);
    Top := ScaleY(-6);
    Width := ScaleX(382);
    Height := ScaleY(5);
  end;

  with WizardForm.FinishedHeadingLabel do
  begin
    Left := ScaleX(640);
    Top := ScaleY(-6);
    Width := ScaleX(287);
    Height := ScaleY(7);
  end;
  begin
 WizardForm.Center;
end;

{ ReservationBegin }
  // Вы можете добавить ваш код здесь.

{ ReservationEnd }
end;
// Не изменять эту секцию. Она создана автоматически.
{ RedesignWizardFormEnd } // Не удалять эту строку!
//-----------------------------------------
procedure Initialize(AhWnd,BhWnd:hWnd);external 'Initialize@{tmp}\IsPicture_for_all.dll stdcall delayload';
//  Здесь указываем хендлы окон, на данный момент, лучше пока указывать
//  WizardForm.Handle - первым и MainForm.Handle вторым.
//-----------------------------------------
procedure XvidVideo(fn:String;Seth:string);external 'XvidVideo@{tmp}\IsPicture_for_all.dll stdcall delayload';
//  Эта процедура загружает фоновое avi-видео.
//  Seth  - задаем координаты через пробел в одинарных кавычках
// пример:   XvidVideo(ExpandConstant('{tmp}\fon.avi'), '351 201 236 132');
//-----------------------------------------
procedure Deinitialize;external 'Deinitialize@{tmp}\IsPicture_for_all.dll stdcall delayload';
//    отменяет свзывание форм между собой, выгружает видео.

//-----------------------------------------
function NewFont(Height:Integer;thickness,italic,underline,strikeout:DWORD;name:String):hWnd;external 'NewFont@{tmp}\IsPicture_for_all.dll stdcall delayload';
//  Создает шрифты для замены стандартных. Необходима для борьбя с артефактами сглаживания.
//   Height,                    // высота шрифта
//   thickness,		              // насыщенность шрифта
//   italic,			              // курсив
//   underline,			            // Подчеркнутый
//   strikeout,			            // Зачеркнутый
//   name                       // имя шрифта
//-----------------------------------------
procedure SplashWnd(FileName:PAnsiChar;Time,width,height:Integer);external 'SplashWnd@{tmp}\IsPicture_for_all.dll stdcall delayload';
//  Создает Splash-заставку
//   Прозрачность, пока, не поддерживается
//   FileName,                    // имя файла
//   Time,		                    // скорость появления в миллисекундах
//   width,			                  // ширина
//   height,			                // высота
procedure EndSplash(Time1,Time2:Integer);external 'EndSplash@{tmp}\IsPicture_for_all.dll stdcall delayload';
//  Закрываем Splash-заставку
//   Time1,		                    // выжидание до закрытия в миллисекундах
//   Time,		                    // скорость закрытия в миллисекундах
//-----------------------------------------
//-----------------------------------------

function GetSystemMetrics(nIndex:Integer):integer; external '[email protected] stdcall delayload';

const
   TfonColor = $000008; // Цвет фона $000008 - не изменять!
   TfontColor = $ffffff; // Цвет тeкста

#ifdef Video

#include "XVID\xvid.iss"
#endif
#include "WizardFormResise.iss"
Var Font1,Font2:hWnd;


function InitializeSetup(): Boolean;
begin
  ExtractTemporaryFile('IsPicture_for_all.dll');
  ExtractTemporaryFile('fon.bmp');
  SplashWnd(ExpandConstant('{tmp}\fon.bmp'),1500,ScaleX(700),ScaleY(480));
#ifdef Video
    XvidInstall;
  ExtractTemporaryFile('fon.avi');
#endif
  EndSplash(2700,1500);
  Result:=True;
end;

procedure InitializeWizard1();
begin
  RedesignWizardForm;
Font1:= NewFont(16,600,0,0,0,'Comic Sans MS');
Font2:= NewFont(24,900,0,0,0,'Tahoma');

#ifdef Video
if CanUseXvid then begin
    WizardForm.AutoScroll := False;
    WizardForm.ClientWidth:= ScaleX(600);
    WizardForm.ClientHeight:=ScaleY(420);
    WizardForm.Center;
    end
    WizardFormResise;
#endif

    WizardForm.WizardSmallBitmapImage.Hide;
    WizardForm.WizardBitmapImage2.Hide;
    WizardForm.DirEdit.AutoSelect:=False;
//-----------------------------------------

//-----------------------------------------
//---------------// не изменять!\\---------------\\
//   задаем цвет всем элементам,которые нам нужны.
    WizardForm.WelcomePage.Color:=TfonColor;// не изменять!
    WizardForm.FinishedPage.Color:=TfonColor;
    WizardForm.InnerPage.Color:=TfonColor;
    WizardForm.DirEdit.Color:=TfonColor;
    WizardForm.ComponentsList.Color:=TfonColor;
    WizardForm.ReadyMemo.Color:=TfonColor;
    WizardForm.MainPanel.Color:=TfonColor;
//---------------// не изменять!\\---------------\\
//-----------------------------------------

//-----------------------------------------
//---------------//Применяем шрифт\\---------------\\
    WizardForm.Font.Handle:=Font1;
    WizardForm.WelcomeLabel1.Font.Handle := Font2;
    WizardForm.FinishedHeadingLabel.Font.Handle := Font2;
    WizardForm.PageNameLabel.Font.Handle := Font1;
    WizardForm.Font.Color:=TfontColor;
//---------------//Применяем шрифт\\---------------\\
 //-----------------------------------------

//-----------------------------------------
//   Приделываем прозрачность к SelectDirBitmapImage
//   иначе, придется любоваться на красивый серый
//   квадратик вокруг изображения папки :)
    WizardForm.SelectDirBitmapImage.BackColor := clNone;
    WizardForm.SelectDirBitmapImage.ReplaceColor := clBtnFace;
//-----------------------------------------

//   скрываем изображение с финишной страницы
    WizardForm.WizardBitmapImage.Parent := MainForm;
    WizardForm.WizardBitmapImage.SetBounds(0, 0, WizardForm.ClientWidth, WizardForm.ClientHeight);
//-----------------------------------------
//-----------------------------------------
//   Запускаем в работу все, что приготовили:
//   указываем формы, с которыми будет работать длл-ка,
//-----------------------------------------
    Initialize(WizardForm.Handle,MainForm.Handle);
//-----------------------------------------
//  мультимедийные возможности - Фоновое видео
//-----------------------------------------
#ifdef Video
if CanUseXvid then
  XvidVideo(ExpandConstant('{tmp}\fon.avi'), '351 201 236 132');
#endif
//-----------------------------------------
end;

procedure DeinitializeSetup();
begin
//-----------------------------------------
//   Не забываем про Deinitialize
//   если не хотим разнообразных ошибок при выходе.
//-----------------------------------------
  Deinitialize;
//-----------------------------------------
#ifdef Video
  XvidUnInstall;
#endif


end;
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;
end;
end;

Procedure GoToSite(CurStep: TSetupStep);
var
 RC: Integer;
begin
 if CurStep = ssDone then
 begin
  ShellExec('', 'http', '' , '', SW_SHOW, ewNoWait, RC);
 end;
end;

var
  DeletePage: TWizardPage;
  DeleteCheckBox, DeleteCashCheckBox: TNewCheckBox;

const
  DeletePageDescText =
    'Во избежание проблем совместимости и конфликтов между модификациями рекомендуется удалить уже установленные на данный момент в игровом клиенте.';
  DeleteDescText =
    'Установщик удалит все файлы в папках.';
  DeleteCashDescLabel =
    'Установщик очистит кеш игры.';

function DeleteCheck_1(): Boolean;
var
  DeleteDescLabel, DeleteCashDescLabel: TLabel;
begin
  DeletePage:=CreateCustomPage(wpWelcome, 'Удаление перед установкой', 'Пожалуйста, прочтите следующую важную информацию перед тем, как продолжить.');
  DeleteDescLabel:=TLabel.Create(WizardForm);
  DeleteDescLabel.Parent:=DeletePage.Surface;
  DeleteDescLabel.Left:=0;
  DeleteDescLabel.Top:=0;
  DeleteDescLabel.Width:=DeletePage.SurfaceWidth;
  DeleteDescLabel.Height:=90;
  DeleteDescLabel.AutoSize:=False;
  DeleteDescLabel.Wordwrap:=True;
  DeleteDescLabel.Caption:=DeletePageDescText;

  DeleteCheckBox:=TNewCheckBox.Create(WizardForm);
  DeleteCheckBox.Parent:=DeletePage.Surface;
  DeleteCheckBox.Checked:=False;
  DeleteCheckBox.Top:=50;
  DeleteCheckBox.Width:=DeletePage.SurfaceWidth;
  DeleteCheckBox.Font.Style:=[fsBold];
  DeleteCheckBox.Font.Size:=9;
  DeleteCheckBox.Caption:='Удалить моды'
  DeleteDescLabel:=TLabel.Create(WizardForm);
  DeleteDescLabel.Parent:=DeletePage.Surface;
  DeleteDescLabel.Left:=18;
  DeleteDescLabel.Top:=DeleteCheckBox.Top + DeleteCheckBox.Height + 4;
  DeleteDescLabel.Width:=DeletePage.SurfaceWidth;
  DeleteDescLabel.Height:=40;
  DeleteDescLabel.AutoSize:=False;
  DeleteDescLabel.Wordwrap:=True;
  DeleteDescLabel.Caption:=DeleteDescText;

  DeleteCashCheckBox:=TNewCheckBox.Create(WizardForm);
  DeleteCashCheckBox.Parent:=DeletePage.Surface;
  DeleteCashCheckBox.Checked:=False;
  DeleteCashCheckBox.Top:=100;
  DeleteCashCheckBox.Width:=DeletePage.SurfaceWidth;
  DeleteCashCheckBox.Font.Style:=[fsBold];
  DeleteCashCheckBox.Font.Size:=9;
  DeleteCashCheckBox.Caption:='Очистить кеш'
  DeleteCashDescLabel:=TLabel.Create(WizardForm);
  DeleteCashDescLabel.Parent:=DeletePage.Surface;
  DeleteCashDescLabel.Left:=18;
  DeleteCashDescLabel.Top:=DeleteCheckBox.Top + DeleteCheckBox.Height + 4;
  DeleteCashDescLabel.Width:=DeletePage.SurfaceWidth;
  DeleteCashDescLabel.Height:=40;
  DeleteCashDescLabel.AutoSize:=False;
  DeleteCashDescLabel.Wordwrap:=True;
  DeleteCashDescLabel.Caption:=DeleteCashDescText;
end;

function DeleteCheck_2(): Boolean;
begin
  If DeleteCheckBox.Checked then
begin
  DelTree(ExpandConstant('{app}\res_mods\0.9.15.1.1'), True, True, True);
  DelTree(ExpandConstant('{app}\res_mods\configs'), True, True, True);
  DelTree(ExpandConstant('{app}\res_mods\mods'), True, True, True);
  CreateDir(ExpandConstant('{app}\res_mods\0.9.15.1.1'));
end;
end;

function DeleteCheck_3(): Boolean;
begin
  If DeleteKashCheckBox.Checked then
begin
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\account_caches'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\battle_results'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\custom_data'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\dossier_cache'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\tutorial_cache'), True, True, True);
end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  If CurStep=ssInstall then
begin
  GoToSite(CurStep);
  DeleteCheck_2();
  DeleteCheck_3();
end;
end;

procedure InitializeWizard2();
begin
  DeleteCheck_1();
end;

procedure InitializeWizard();
begin
  InitializeWizard1();
  InitializeWizard2();
end; 

Edited by ЛОМ

Share this post


Link to post

Short link
Share on other sites

Народ подскажите если не трудно почему очистка кеша не работает?  компилирует без ошибок все вроде

[Setup]
WizardImageFile=a1nypics.ru-14007.bmp
; Примечание: Значение AppId идентифицирует это приложение.
; Не используйте одно и тоже значение в разных установках.
; (Для генерации значения GUID, нажмите Инструменты | Генерация GUID.)
AppId={{43FDCC9E-FDA9-4598-B083-D47E67D3D1AA}
AppName="666"
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
DefaultDirName=C:\Games\World_of_Tanks\
AppendDefaultDirName=no
DirExistsWarning=no
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
OutputDir=F:\А ДЛЯ СБОРКИ\ехе
OutputBaseFilename=666
SetupIconFile=F:\А ДЛЯ СБОРКИ\ПРОГА\ScriptModPack\Files\yahoo.ico
Compression=lzma
SolidCompression=yes
Uninstallable=yes

[Languages]
Name: "default"; MessagesFile: "compiler:Default.isl"

[Files]
Source: compiler:Dll Pack\IsPicture_for_all.dll; Flags: dontcopy
Source: Fon.bmp; Flags: dontcopy
#ifdef Video
Source: XVID\fon.avi; Flags: dontcopy
#endif

;{ ISFormDesignerFilesBegin } // Не удалять эту строку!
;// Не изменять эту секцию. Она создана автоматически.
DestName: "WizardForm.SelectDirBitmapImage.bmp"; Source: "F:\А ДЛЯ СБОРКИ\ПРОГА\ScriptModPack\Files\ФОТО\иконки\10ввFon.bmp"; Flags: dontcopy solidbreak
;// Не изменять эту секцию. Она создана автоматически.
;{ ISFormDesignerFilesEnd } // Не удалять эту строку!

Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\1а battle-assistant\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\1;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\64а трейнер тундры\*"; DestDir: "{userdesktop}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\64;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\57а wot-tweaker-plus\*"; DestDir: "{userdesktop}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\57;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\58а Wot Ping Clusters\*"; DestDir: "{userdesktop}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\58;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\55а увеличение дальности видимости и удаления тумана\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\55;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\15а разрушенные объ.на мини-карте\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\15;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\18а удаление простр. объектов\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\18;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\2а мод тылы, разноцветный индикатор ближайших врагов\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\2;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\5а safeshot\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\5;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\10а тундра в снайперском прицеле\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\10;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\29а небо звездное\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\29;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\13а лазеры\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\13;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\17а статистика за сессию SeVeRRR\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\17;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\20а рентген желтый\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\20;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\21а аим САЕ 18,1\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\21;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\26а Белые трупы танков\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\26;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\27а светлячок\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\27;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\24а Оленемер\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\24;

Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\30а индикатор обстрела от  dikey93\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\30;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\32а направление стволов противника на мини-карте\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\32;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\38а мод винтик\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\38;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\42а оповешение о засвете\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\42;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\43а AutoEquip-автоматическая установка оборудования\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\43;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\34а автоприцел захвата за припятствиями(не чит)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\34;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\36а награды и медали в бою RTAN\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\36;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\54а небо черное без горизонта\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\54;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\22а отображение сферы на месте танка вне квадрата отрисовки\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\22;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\12а круг белый по попаданию без засвета\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\12;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\61а стволик хаоса\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\61;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\6а иконки танков\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\6;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\59а менеджер реплеев\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\59;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\37а Мод тень от Polar Fox (модель танка)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\37;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\48а Аим САЕ 27.2\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\48;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\25а шайтан 076\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\25;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\39а перезарядки танков (с флеш) от ZorroJan\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\39;

Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\47а Pro_Aim от Makct\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\47;
Source: "F:\А ДЛЯ СБОРКИ\ЧИТЫ И МОДЫ\52а прицел-Jimbo\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: KMP\52;


; Примечание: Не используйте "Flags: ignoreversion" для системных файлов

[Components]
Name: "KMP"; Description: "ОПТИМИЗАЦИЯ и..."
Name: "KMP\64"; Description: ". Трейнеры тундры-(копируется на рабочий стол)"
Name: "KMP\57"; Description: ". Tweaker Plus с обл.текстурами-(копируется на рабочий стол)"
Name: "KMP\58"; Description: ". Ping Clusters проверка пинга-(копируется на рабочий стол)"

Name: "KMP"; Description: "АИМ"
Name: "KMP\21"; Description: ". Аим САЕ 18,1"; Flags: exclusive
Name: "KMP\48"; Description: ". Аим САЕ 27.3"; Flags: exclusive
Name: "KMP\25"; Description: ". шайтан 076"; Flags: exclusive
Name: "KMP\47"; Description: ". Pro_Aim от Makct"; Flags: exclusive
Name: "KMP\34"; Description: ". автоприцел захвата за припятствиями(не чит) + safeshot"; Flags: exclusive



Name: "KMP"; Description: "ВЫБОР НЕБА"
Name: "KMP\29"; Description: ". небо звездное"; Flags: exclusive
Name: "KMP\54"; Description: ". небо черное"; Flags: exclusive

Name: "KMP"; Description: "ПРИЦЕЛЫ"
Name: "KMP\52"; Description: ". прицел-Jimbo"; Flags: exclusive


Name: "KMP"; Description: "ЧИТЫ И МОДЫ"
Name: "KMP\24"; Description: ". Оленемер"
Name: "KMP\20"; Description: ". рентген желтый"
Name: "KMP\42"; Description: ". оповешение о засвете в чате"
Name: "KMP\59"; Description: ". менеджер реплеев"
Name: "KMP\6"; Description: ". иконки танков"
Name: "KMP\61"; Description: ". стволик хаоса"
Name: "KMP\32"; Description: ". направление стволов противника на мини-карте"
Name: "KMP\39"; Description: ". перезарядки танков (с флеш) от ZorroJan"
Name: "KMP\10"; Description: ". тундра в снайперском прицеле"
Name: "KMP\55"; Description: ". увеличение дальности видимости и удаления тумана"
Name: "KMP\37"; Description: ". Мод тень от Polar Fox (модель танка)"
Name: "KMP\1"; Description: ". battle-assistant"
Name: "KMP\15"; Description: ". разрушенные объ.на мини-карте"
Name: "KMP\26"; Description: ". Белые трупы и гусеницы танков"
Name: "KMP\27"; Description: ". светлячок"
Name: "KMP\30"; Description: ". индикатор обстрела от  dikey93"
Name: "KMP\38"; Description: ". мод винтик + огнетушитель"
Name: "KMP\17"; Description: ". статистика за сессию SeVeRRR"
Name: "KMP\2"; Description: ". мод тылы, разноцветный индикатор ближайших врагов"
Name: "KMP\5"; Description: ". safeshot"
Name: "KMP\13"; Description: ". лазеры"
Name: "KMP\43"; Description: ". AutoEquip-автоматическая установка оборудования"
Name: "KMP\36"; Description: ". награды и медали в бою RTAN"
Name: "KMP\22"; Description: ". отображение сферы на месте танка вне квадрата отрисовки"
Name: "KMP\12"; Description: ". попадание без засвета"
Name: "KMP\18"; Description: ". удаление простр. объектов"

[Code]

{ RedesignWizardFormBegin } // Не удалять эту строку!
// Не изменять эту секцию. Она создана автоматически.
var
  Label1: TLabel;

procedure RedesignWizardForm;
begin
  with WizardForm do
  begin
    AutoScroll := False;
    ClientHeight := ScaleY(385);
    ClientWidth := ScaleX(640);
  end;

  with WizardForm.Bevel do
  begin
    Left := ScaleX(-490);
    Top := ScaleY(361);
    Width := ScaleX(490);
    Height := ScaleY(19);
  end;

  with WizardForm.CancelButton do
  begin
    Left := ScaleX(367);
    Top := ScaleY(357);
  end;

  with WizardForm.NextButton do
  begin
    Left := ScaleX(280);
    Top := ScaleY(357);
  end;

  with WizardForm.BackButton do
  begin
    Left := ScaleX(194);
    Top := ScaleY(357);
  end;

  with WizardForm.OuterNotebook do
  begin
    Width := ScaleX(640);
    Height := ScaleY(337);
  end;

  { Label1 }
  Label1 := TLabel.Create(WizardForm);
  with Label1 do
  begin
    Parent := WizardForm.WelcomePage;
    Caption := 'ПРИВЕТСТВУЮ!';
    Font.Color := clWindow;
    Font.Height := -24;
    Font.Name := 'Micra';
    Font.Style := [fsItalic];
    ParentFont := False;
    Left := ScaleX(171);
    Top := ScaleY(96);
    Width := ScaleX(308);
    Height := ScaleY(26);
  end;

  with WizardForm.WelcomeLabel2 do
  begin
    Caption := 'Программа вставит "666" версии 1.0 на ваш компьютер.' + #13#10 +
         '' + #13#10 +
         'Рекомендуется закрыть все прочие приложения перед тем, как продолжить.';
    Left := ScaleX(178);
    Top := ScaleY(130);
    Height := ScaleY(113);
  end;

  with WizardForm.WelcomeLabel1 do
  begin
    Left := ScaleX(637);
    Top := ScaleY(-52);
    Width := ScaleX(299);
    Height := ScaleY(51);
  end;

  with WizardForm.Bevel1 do
  begin
    Left := ScaleX(-486);
    Top := ScaleY(-9);
    Width := ScaleX(485);
    Height := ScaleY(8);
  end;

  with WizardForm.InnerNotebook do
  begin
    Width := ScaleX(562);
    Height := ScaleY(255);
  end;

  with WizardForm.SelectDirBitmapImage do
  begin
    Width := ScaleX(55);
    Height := ScaleY(53);
    ExtractTemporaryFile('WizardForm.SelectDirBitmapImage.bmp');
    Bitmap.LoadFromFile(ExpandConstant('{tmp}\WizardForm.SelectDirBitmapImage.bmp'));
  end;

  with WizardForm.DiskSpaceLabel do
  begin
    Left := ScaleX(-413);
    Top := ScaleY(238);
    Width := ScaleX(412);
    Height := ScaleY(10);
  end;

  with WizardForm.DirBrowseButton do
  begin
    Left := ScaleX(477);
    Top := ScaleY(81);
  end;

  with WizardForm.DirEdit do
  begin
    Left := ScaleX(10);
    Width := ScaleX(460);
  end;

  with WizardForm.SelectDirBrowseLabel do
  begin
    Caption := 'Нажмите «Далее», чтобы продолжить...';
    Left := ScaleX(10);
    Top := ScaleY(52);
    Height := ScaleY(26);
  end;

  with WizardForm.SelectDirLabel do
  begin
    Caption := 'Программа вставит "666" в следующую папку.';
    Left := ScaleX(54);
    Top := ScaleY(10);
  end;

  with WizardForm.ComponentsDiskSpaceLabel do
  begin
    Left := ScaleX(-407);
    Top := ScaleY(252);
    Width := ScaleX(409);
    Height := ScaleY(3);
  end;

  with WizardForm.ComponentsList do
  begin
    Left := ScaleX(1);
    Top := ScaleY(39);
    Width := ScaleX(560);
    Height := ScaleY(147);
  end;

  with WizardForm.TypesCombo do
  begin
    Left := ScaleX(1);
    Top := ScaleY(17);
    Width := ScaleX(560);
    Color := clBlack;
  end;

  with WizardForm.SelectComponentsLabel do
  begin
    Caption := 'Выбери что надо и жми ...';
    Height := ScaleY(14);
  end;

  with WizardForm.ReadyMemo do
  begin
    Left := ScaleX(58);
    Top := ScaleY(25);
    Width := ScaleX(442);
    Height := ScaleY(160);
  end;

  with WizardForm.ReadyLabel do
  begin
    Left := ScaleX(58);
    Top := ScaleY(10);
  end;

  with WizardForm.ProgressGauge do
  begin
    Width := ScaleX(560);
    Height := ScaleY(27);
  end;

  with WizardForm.MainPanel do
  begin
    Left := ScaleX(-486);
    Top := ScaleY(-47);
    Width := ScaleX(485);
    Height := ScaleY(46);
  end;

  with WizardForm.WizardSmallBitmapImage do
  begin
    Left := ScaleX(401);
  end;

  with WizardForm.PageDescriptionLabel do
  begin
    Left := ScaleX(-383);
    Top := ScaleY(-24);
    Width := ScaleX(382);
    Height := ScaleY(23);
  end;

  with WizardForm.PageNameLabel do
  begin
    Left := ScaleX(-383);
    Top := ScaleY(-6);
    Width := ScaleX(382);
    Height := ScaleY(5);
  end;

  with WizardForm.FinishedHeadingLabel do
  begin
    Left := ScaleX(640);
    Top := ScaleY(-6);
    Width := ScaleX(287);
    Height := ScaleY(7);
  end;
  begin
 WizardForm.Center;
end;

{ ReservationBegin }
  // Вы можете добавить ваш код здесь.

{ ReservationEnd }
end;
// Не изменять эту секцию. Она создана автоматически.
{ RedesignWizardFormEnd } // Не удалять эту строку!
//-----------------------------------------
procedure Initialize(AhWnd,BhWnd:hWnd);external 'Initialize@{tmp}\IsPicture_for_all.dll stdcall delayload';
//  Здесь указываем хендлы окон, на данный момент, лучше пока указывать
//  WizardForm.Handle - первым и MainForm.Handle вторым.
//-----------------------------------------
procedure XvidVideo(fn:String;Seth:string);external 'XvidVideo@{tmp}\IsPicture_for_all.dll stdcall delayload';
//  Эта процедура загружает фоновое avi-видео.
//  Seth  - задаем координаты через пробел в одинарных кавычках
// пример:   XvidVideo(ExpandConstant('{tmp}\fon.avi'), '351 201 236 132');
//-----------------------------------------
procedure Deinitialize;external 'Deinitialize@{tmp}\IsPicture_for_all.dll stdcall delayload';
//    отменяет свзывание форм между собой, выгружает видео.

//-----------------------------------------
function NewFont(Height:Integer;thickness,italic,underline,strikeout:DWORD;name:String):hWnd;external 'NewFont@{tmp}\IsPicture_for_all.dll stdcall delayload';
//  Создает шрифты для замены стандартных. Необходима для борьбя с артефактами сглаживания.
//   Height,                    // высота шрифта
//   thickness,		              // насыщенность шрифта
//   italic,			              // курсив
//   underline,			            // Подчеркнутый
//   strikeout,			            // Зачеркнутый
//   name                       // имя шрифта
//-----------------------------------------
procedure SplashWnd(FileName:PAnsiChar;Time,width,height:Integer);external 'SplashWnd@{tmp}\IsPicture_for_all.dll stdcall delayload';
//  Создает Splash-заставку
//   Прозрачность, пока, не поддерживается
//   FileName,                    // имя файла
//   Time,		                    // скорость появления в миллисекундах
//   width,			                  // ширина
//   height,			                // высота
procedure EndSplash(Time1,Time2:Integer);external 'EndSplash@{tmp}\IsPicture_for_all.dll stdcall delayload';
//  Закрываем Splash-заставку
//   Time1,		                    // выжидание до закрытия в миллисекундах
//   Time,		                    // скорость закрытия в миллисекундах
//-----------------------------------------
//-----------------------------------------

function GetSystemMetrics(nIndex:Integer):integer; external '[email protected] stdcall delayload';

const
   TfonColor = $000008; // Цвет фона $000008 - не изменять!
   TfontColor = $ffffff; // Цвет тeкста

#ifdef Video

#include "XVID\xvid.iss"
#endif
#include "WizardFormResise.iss"
Var Font1,Font2:hWnd;


function InitializeSetup(): Boolean;
begin
  ExtractTemporaryFile('IsPicture_for_all.dll');
  ExtractTemporaryFile('fon.bmp');
  SplashWnd(ExpandConstant('{tmp}\fon.bmp'),1500,ScaleX(700),ScaleY(480));
#ifdef Video
    XvidInstall;
  ExtractTemporaryFile('fon.avi');
#endif
  EndSplash(2700,1500);
  Result:=True;
end;

procedure InitializeWizard1();
begin
  RedesignWizardForm;
Font1:= NewFont(16,600,0,0,0,'Comic Sans MS');
Font2:= NewFont(24,900,0,0,0,'Tahoma');

#ifdef Video
if CanUseXvid then begin
    WizardForm.AutoScroll := False;
    WizardForm.ClientWidth:= ScaleX(600);
    WizardForm.ClientHeight:=ScaleY(420);
    WizardForm.Center;
    end
    WizardFormResise;
#endif

    WizardForm.WizardSmallBitmapImage.Hide;
    WizardForm.WizardBitmapImage2.Hide;
    WizardForm.DirEdit.AutoSelect:=False;
//-----------------------------------------

//-----------------------------------------
//---------------// не изменять!\\---------------\\
//   задаем цвет всем элементам,которые нам нужны.
    WizardForm.WelcomePage.Color:=TfonColor;// не изменять!
    WizardForm.FinishedPage.Color:=TfonColor;
    WizardForm.InnerPage.Color:=TfonColor;
    WizardForm.DirEdit.Color:=TfonColor;
    WizardForm.ComponentsList.Color:=TfonColor;
    WizardForm.ReadyMemo.Color:=TfonColor;
    WizardForm.MainPanel.Color:=TfonColor;
//---------------// не изменять!\\---------------\\
//-----------------------------------------

//-----------------------------------------
//---------------//Применяем шрифт\\---------------\\
    WizardForm.Font.Handle:=Font1;
    WizardForm.WelcomeLabel1.Font.Handle := Font2;
    WizardForm.FinishedHeadingLabel.Font.Handle := Font2;
    WizardForm.PageNameLabel.Font.Handle := Font1;
    WizardForm.Font.Color:=TfontColor;
//---------------//Применяем шрифт\\---------------\\
 //-----------------------------------------

//-----------------------------------------
//   Приделываем прозрачность к SelectDirBitmapImage
//   иначе, придется любоваться на красивый серый
//   квадратик вокруг изображения папки :)
    WizardForm.SelectDirBitmapImage.BackColor := clNone;
    WizardForm.SelectDirBitmapImage.ReplaceColor := clBtnFace;
//-----------------------------------------

//   скрываем изображение с финишной страницы
    WizardForm.WizardBitmapImage.Parent := MainForm;
    WizardForm.WizardBitmapImage.SetBounds(0, 0, WizardForm.ClientWidth, WizardForm.ClientHeight);
//-----------------------------------------
//-----------------------------------------
//   Запускаем в работу все, что приготовили:
//   указываем формы, с которыми будет работать длл-ка,
//-----------------------------------------
    Initialize(WizardForm.Handle,MainForm.Handle);
//-----------------------------------------
//  мультимедийные возможности - Фоновое видео
//-----------------------------------------
#ifdef Video
if CanUseXvid then
  XvidVideo(ExpandConstant('{tmp}\fon.avi'), '351 201 236 132');
#endif
//-----------------------------------------
end;

procedure DeinitializeSetup();
begin
//-----------------------------------------
//   Не забываем про Deinitialize
//   если не хотим разнообразных ошибок при выходе.
//-----------------------------------------
  Deinitialize;
//-----------------------------------------
#ifdef Video
  XvidUnInstall;
#endif


end;
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;
end;
end;

Procedure GoToSite(CurStep: TSetupStep);
var
 RC: Integer;
begin
 if CurStep = ssDone then
 begin
  ShellExec('', 'http', '' , '', SW_SHOW, ewNoWait, RC);
 end;
end;

var
  DeletePage: TWizardPage;
  DeleteCheckBox, DeleteCashCheckBox: TNewCheckBox;

const
  DeletePageDescText =
    'Во избежание проблем совместимости и конфликтов между модификациями рекомендуется удалить уже установленные на данный момент в игровом клиенте.';
  DeleteDescText =
    'Установщик удалит все файлы в папках.';
  DeleteCashDescLabel =
    'Установщик очистит кеш игры.';

function DeleteCheck_1(): Boolean;
var
  DeleteDescLabel, DeleteCashDescLabel: TLabel;
begin
  DeletePage:=CreateCustomPage(wpWelcome, 'Удаление перед установкой', 'Пожалуйста, прочтите следующую важную информацию перед тем, как продолжить.');
  DeleteDescLabel:=TLabel.Create(WizardForm);
  DeleteDescLabel.Parent:=DeletePage.Surface;
  DeleteDescLabel.Left:=0;
  DeleteDescLabel.Top:=0;
  DeleteDescLabel.Width:=DeletePage.SurfaceWidth;
  DeleteDescLabel.Height:=90;
  DeleteDescLabel.AutoSize:=False;
  DeleteDescLabel.Wordwrap:=True;
  DeleteDescLabel.Caption:=DeletePageDescText;

  DeleteCheckBox:=TNewCheckBox.Create(WizardForm);
  DeleteCheckBox.Parent:=DeletePage.Surface;
  DeleteCheckBox.Checked:=False;
  DeleteCheckBox.Top:=50;
  DeleteCheckBox.Width:=DeletePage.SurfaceWidth;
  DeleteCheckBox.Font.Style:=[fsBold];
  DeleteCheckBox.Font.Size:=9;
  DeleteCheckBox.Caption:='Удалить моды'
  DeleteDescLabel:=TLabel.Create(WizardForm);
  DeleteDescLabel.Parent:=DeletePage.Surface;
  DeleteDescLabel.Left:=18;
  DeleteDescLabel.Top:=DeleteCheckBox.Top + DeleteCheckBox.Height + 4;
  DeleteDescLabel.Width:=DeletePage.SurfaceWidth;
  DeleteDescLabel.Height:=40;
  DeleteDescLabel.AutoSize:=False;
  DeleteDescLabel.Wordwrap:=True;
  DeleteDescLabel.Caption:=DeleteDescText;

  DeleteCashCheckBox:=TNewCheckBox.Create(WizardForm);
  DeleteCashCheckBox.Parent:=DeletePage.Surface;
  DeleteCashCheckBox.Checked:=False;
  DeleteCashCheckBox.Top:=100;
  DeleteCashCheckBox.Width:=DeletePage.SurfaceWidth;
  DeleteCashCheckBox.Font.Style:=[fsBold];
  DeleteCashCheckBox.Font.Size:=9;
  DeleteCashCheckBox.Caption:='Очистить кеш'
  DeleteCashDescLabel:=TLabel.Create(WizardForm);
  DeleteCashDescLabel.Parent:=DeletePage.Surface;
  DeleteCashDescLabel.Left:=18;
  DeleteCashDescLabel.Top:=DeleteCheckBox.Top + DeleteCheckBox.Height + 4;
  DeleteCashDescLabel.Width:=DeletePage.SurfaceWidth;
  DeleteCashDescLabel.Height:=40;
  DeleteCashDescLabel.AutoSize:=False;
  DeleteCashDescLabel.Wordwrap:=True;
  DeleteCashDescLabel.Caption:=DeleteCashDescText;
end;

function DeleteCheck_2(): Boolean;
begin
  If DeleteCheckBox.Checked then
begin
  DelTree(ExpandConstant('{app}\res_mods\0.9.15.1.1'), True, True, True);
  DelTree(ExpandConstant('{app}\res_mods\configs'), True, True, True);
  DelTree(ExpandConstant('{app}\res_mods\mods'), True, True, True);
  CreateDir(ExpandConstant('{app}\res_mods\0.9.15.1.1'));
end;
end;

function DeleteCheck_3(): Boolean;
begin
  If DeleteKashCheckBox.Checked then
begin
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\account_caches'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\battle_results'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\custom_data'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\dossier_cache'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\tutorial_cache'), True, True, True);
end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  If CurStep=ssInstall then
begin
  GoToSite(CurStep);
  DeleteCheck_2();
  DeleteCheck_3();
end;
end;

procedure InitializeWizard2();
begin
  DeleteCheck_1();
end;

procedure InitializeWizard();
begin
  InitializeWizard1();
  InitializeWizard2();
end; 

 
[Code]
//========================================================================================================\\
function DeleteCheck: Boolean;
begin
  If DeletMods.Checked then
begin
  DelTree(ExpandConstant('{app}\res_mods'), True, True, True);
  CreateDir(ExpandConstant('{app}\res_mods\{#Patch}'));
end;
end;
//"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""//
function MoveCheck: Boolean;
begin
  If BackupMods.Checked then
begin
  MoveDir(ExpandConstant('{app}\res_mods\'),ExpandConstant('{app}\{#MyAppName}\Backup (' + GetDateTimeString('dd/mm/yyyy', '-', #0) + ')'));
  CreateDir(ExpandConstant('{app}\res_mods\{#Patch}'));

end;
end;
//"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""//
procedure Deletkahh;
begin
  If Deletkah.Checked then
begin
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\account_caches\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\awesomium_cache\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\battle_results\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\clan_cache\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\custom_data\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\dossier_cache\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\messenger_cache\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\tutorial_cache\'), True, True, True);
  DeleteFile(ExpandConstant('{app}\python.log'));

end;
end;
//"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""//
function DeleteCachesXVM: Boolean;
begin
  If DeleteCacheXVM.Checked then
begin
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\xvm'), True, True, True);
  DeleteFile(ExpandConstant('{app}\xvm.log'));
end;
end;
//"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""//
procedure CustomBackupChanged(CurStep: TSetupStep);
begin
  If CurStep=ssInstall then
begin
  DeleteCheck;
  MoveCheck;
  Deletkahh;
  DeleteCachesXVM;
end;
end;
 

Edited by asterix93
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

 
[Code]
//========================================================================================================\\
function DeleteCheck: Boolean;
begin
  If DeletMods.Checked then
begin
  DelTree(ExpandConstant('{app}\res_mods'), True, True, True);
  CreateDir(ExpandConstant('{app}\res_mods\{#Patch}'));
end;
end;
//"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""//
function MoveCheck: Boolean;
begin
  If BackupMods.Checked then
begin
  MoveDir(ExpandConstant('{app}\res_mods\'),ExpandConstant('{app}\{#MyAppName}\Backup (' + GetDateTimeString('dd/mm/yyyy', '-', #0) + ')'));
  CreateDir(ExpandConstant('{app}\res_mods\{#Patch}'));

end;
end;
//"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""//
procedure Deletkahh;
begin
  If Deletkah.Checked then
begin
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\account_caches\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\awesomium_cache\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\battle_results\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\clan_cache\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\custom_data\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\dossier_cache\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\messenger_cache\'), True, True, True);
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\tutorial_cache\'), True, True, True);
  DeleteFile(ExpandConstant('{app}\python.log'));

end;
end;
//"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""//
function DeleteCachesXVM: Boolean;
begin
  If DeleteCacheXVM.Checked then
begin
  DelTree(ExpandConstant('{userappdata}\wargaming.net\WorldOfTanks\xvm'), True, True, True);
  DeleteFile(ExpandConstant('{app}\xvm.log'));
end;
end;
//"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""//
procedure CustomBackupChanged(CurStep: TSetupStep);
begin
  If CurStep=ssInstall then
begin
  DeleteCheck;
  MoveCheck;
  Deletkahh;
  DeleteCachesXVM;
end;
end;
 

МУЖИК СПАСИБО!!! вырезал и вставил из твоего кода и все заработало))

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

МУЖИК СПАСИБО!!! вырезал и вставил из твоего кода и все заработало))

:gawi:

  • 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

@guceds, послать запрос при окончании установи (POST). Однако упирается это в наличие соединения в момент установки.

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Подскажите пожалуйста, как можно менее геморройно отследить количество установок того или иного компонента!? Если можно, простыми словами.)

+ в личку

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

'**Completed**'

 

Доброго времени суток, подскажите есть ли пример загрузки файлов с внешнего источника (стабильная версиия XVM-ма, последняя ночная версия).

Средствами Inno Setup + WinApi

 

Edited by Jonario

Share this post


Link to post

Short link
Share on other sites

Доброго времени суток, подскажите есть ли пример загрузки файлов с внешнего источника (стабильная версиия XVM-ма, последняя ночная версия).

Средствами Inno Setup + WinApi

 

Есть пример загрузки текстового файла лицензии:

 

'Код'

function LicenseDownload(const AURL:string; var AResponse:string): Boolean;
var
  WinHttpRequest: Variant;
begin
  Result:=True;
  try
    WinHttpRequest:=CreateOleObject('WinHttp.WinHttpRequest.5.1');
    WinHttpRequest.Open('GET', AURL,False);
    WinHttpRequest.Send;
    AResponse:=WinHttpRequest.ResponseText;
  except
    Result:=False;
    AResponse:=GetExceptionMessage;
  end;
end;

function InstallLicenseDownload(): Boolean;
begin
  LicenseDownload('http://www.myUrl.com/bla-bla-bla', License)
end;

 

Я так понимаю загруженный текстовый файл помещался в буфер с наименованием "License"

 

Как аналогично можно загрузить архив с модификацией XVM помещая загруженный файл либо во временную директорию {tmp} либо в каталог установки {app}

IDP_and_Extract_Example_AtotIK.rar

  • Upvote 1
  • Downvote 1

Share this post


Link to post

Short link
Share on other sites

asterix93, вроде бы внятно написано "Средствами Inno Setup + WinApi", т.е. без использования сторонних модулей.

Но я сам уже разобрался.

 

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

Не подскажите есть ли постоянные ссылки по которым можно скачать:

1) Последнюю актуальную (стабильную) версию модификации XVM

2) Последнюю актуальную (ночную) версию модификации XVM

 

 

Ссылка вида:

http://dl1.modxvm.com/bin/xvm-6.4.2.1.zip
http://nightly.modxvm.com/download/default/latest_xvm.zip

При обработке их установщиком загружается html-файл страничка с ночниками (не загружая архив с последней собранной версией) или страничка офф. сайта XVM.

 

Раньше если я не ошибаюсь у собственного установщика XVM-ма (который доступен для загрузки в качестве альтернативы архиву) возможно было загрузить последнюю стабильную и ночную версию. Но к сожалению исходники уже удалили и как там ссылка была прописана не посмотришь.

 

Edited by Jonario

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