Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Ветеран


Сообщения: 1133
Благодарности: 581

Профиль | Отправить PM | Цитировать


R.i.m.s.k.y., накидал вам пример, как это делается:
читать дальше »
Код: Выделить весь код
; здесь указываем какая версия
# define IsLite = True
; задаём описания компонентов
# define kmpDesc "The KMPlayer 2.9.4.1437"
# define gomDesc "GOM Player 2.1.23.5007 Rus"
# define mpcDesc "Media Player Classic Home Cinema 1.3.1249.0"
# define aDesc "Зарегестрировать файлы на:"
# define kDesc "The KMPlayer"
# define gDesc "GOM Player"
# define mDesc "Media Player Classic Home Cinema"

[Setup]
AppName=My Program
AppVerName=My Program v 1.5
DefaultDirName={pf}\My Program
OutputDir=.
Compression=lzma/ultra64
InternalCompressLevel=ultra64
SolidCompression=yes

[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl

[Types]
Name: full; Description: Полная установка
Name: recom; Description: Выборочная установка; Flags: iscustom

[Components]
Name: pl; Description: Плееры; Types: full
#if IsLite == True
  Name: pl\kmp; Description: {#kmpDesc}; Types: full recom
  Name: pl\gom; Description: {#gomDesc}; Types: full
#endif
Name: pl\mpc; Description: {#mpcDesc}; Types: full
Name: pl\mpc\mpcdxva; Description: Аппаратное ускорение воспроизведения h264 и VC-1; Flags: checkablealone dontinheritcheck
Name: pl\fl; Description: {#aDesc}; Types: full
#if IsLite == True
  Name: pl\fl\kmp; Description: {#kDesc}; Flags: exclusive; Types: full recom
  Name: pl\fl\gom; Description: {#gDesc}; Flags: exclusive
#endif
Name: pl\fl\mpc; Description: {#mDesc}; Flags: exclusive

[Files]
#if IsLite == True
  Source: compiler:Examples\MyProg.exe; DestDir: {app}; Components: pl\kmp; Flags: ignoreversion
  Source: compiler:Examples\Readme-ru.txt; DestDir: {app}; Components: pl\gom; Flags: ignoreversion
#endif
Source: compiler:Examples\Readme-en.txt; DestDir: {app}; Components: pl\mpc; Flags: ignoreversion

[Code]
var
  kmp, gom, mpc, aReg, kReg, gReg, mReg: Integer;

procedure CorCheck;
{ корректируем отмеченность радиобатонов }
var
  i: Integer;
begin
  for i := kReg to mReg do
    if WizardForm.ComponentsList.ItemEnabled[i] then
      begin
        WizardForm.ComponentsList.Checked[i] := True;
        Break;
      end;
end;

procedure ComponentsListClick(Sender: TObject);
var
  Correct: Boolean;
begin
  Correct := True;
  { сразу проверим, все ли интиресующие компоненты доступны... }
  if not WizardForm.ComponentsList.Checked[kmp] and
    not WizardForm.ComponentsList.Checked[gom] and
    not WizardForm.ComponentsList.Checked[mpc] then
  { если нет, снимем отметку с aDesc }
    WizardForm.ComponentsList.Checked[aReg] := False;
  { в зависимости от того на кого кликнули, производим действия }
  case WizardForm.ComponentsList.ItemIndex of
    kmp: WizardForm.ComponentsList.ItemEnabled[kReg] := WizardForm.ComponentsList.Checked[kmp];
    gom: WizardForm.ComponentsList.ItemEnabled[gReg] := WizardForm.ComponentsList.Checked[gom];
    mpc: WizardForm.ComponentsList.ItemEnabled[mReg] := WizardForm.ComponentsList.Checked[mpc];
    else Correct := False;
  end;
  if Correct then
    CorCheck;
  { перерисуем лист компонентов }
  WizardForm.ComponentsList.Repaint;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  if CurPageID = wpSelectComponents then
    begin
{ выполняем в случае если IsLite := True }
#if IsLite == True
      { узнаем порядковые номера наших компонентов... }
      kmp := WizardForm.ComponentsList.Items.IndexOf('{#kmpDesc}');
      gom := WizardForm.ComponentsList.Items.IndexOf('{#gomDesc}');
      mpc := WizardForm.ComponentsList.Items.IndexOf('{#mpcDesc}');
      aReg := WizardForm.ComponentsList.Items.IndexOf('{#aDesc}');
      kReg := WizardForm.ComponentsList.Items.IndexOf('{#kDesc}');
      gReg := WizardForm.ComponentsList.Items.IndexOf('{#gDesc}');
      mReg := WizardForm.ComponentsList.Items.IndexOf('{#mDesc}');
      WizardForm.ComponentsList.OnClick := @ComponentsListClick;
#endif
    end;
end;


Цитата medved_orbitel:
на протяжении всего процесса установки в инсталле стояла моя картинка »
в шапке темы есть ссылка на пример, "Ссылки на примеры скриптов:" > "Картинка на страницах инсталлятора"

Цитата SkarM:
как использовать два раза функцию InitializeSetup? »
никак, одинаковых процедур быть не может, делается путём объединения кода, либо руками, либо InnoSetup Script Joiner из шапки темы.
Вы откуда брали код? просто первая function InitializeSetup, там всегда результат True. т.е. будет запускаться инстал всегда, а вторая function InitializeSetup не рабочая.

-------
Книги нужны, чтобы напоминать человеку, что его оригинальные мысли не так уж новы... Авраам Линкольн.

Это сообщение посчитали полезным следующие участники:

Отправлено: 23:56, 16-08-2010 | #2196