Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Компьютеры » Программы » Inno Setup (создание инсталяционных пакетов)

Модерирует : gyra, Maz

articlebot (13-10-2013 23:33): продолжение темы - №15
 Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

   

lmiol

Newbie
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору


Код:
 
[Setup]
AppName=Quake Live
AppVerName="Quake Live"
AppPublisher=Mio Dark Project
CreateAppDir=no
DefaultGroupName=Mio Dark Project\Quake Live
AllowNoIcons=yes
OutputDir=Output
OutputBaseFilename=Quake Live
SetupIconFile=setup.ico
Compression=lzma/ultra
SolidCompression=yes
ShowTasksTreeLines=yes
DisableProgramGroupPage=yes
WizardImageFile=Big.bmp
WizardSmallImageFile=Small.bmp
UninstallDisplayIcon={app}\Uninstall\uninstall.ico
UninstallFilesDir={app}\Uninstall
WizardImageStretch=no
AlwaysShowComponentsList=no
 
[Languages]
Name: ru; MessagesFile: compiler:Languages\Russian.isl;
 
[Types]
Name: "full"; Description: "Все компоненты";
Name: "custom"; Description: "Выбрать компоненты"; Flags:  iscustom
 
[Components]
Name: "main"; Description: "Cтандартные файлы Quake Live"; Types: full custom; Flags: fixed
Name: "main2"; Description: "Премиум файлы Quake Live"; Types: full custom; Flags: fixed
Name: "plug"; Description: "Плагин Quake Live"; Types: full custom
Name: "browser"; Description: "Портативный Firefox под Quake Live"; Types: full custom
Name: "manual"; Description: "Руководство и Награды"; Types: full custom
Name: "anti"; Description: "Античит PunkBuster"; Types: full custom
 
[CustomMessages]
HeaderLabelPage=Выберите тип вашего аккаунта
MyRadioCaption_1=Standart
MyRadioCaption_2=Premium / Pro
PageTextHeader=На этой странице Вы можете выбрать тип вашего аккаунта, который вы используете в игре.
MyText_1=Будут установлены файлы которые доступны для игроков без подписки.
MyText_2=Будут установлены файлы которые доступны для игроков с Premium/Pro подпиской.
 
 
[Tasks]
Name: "desktopicon"; Description: "Создать ярлык на Рабочем Столе"; GroupDescription: "{cm:AdditionalIcons}"
 
[Files]
;source: "uninstall.ico"; Components: main; DestDir: "{code:DetectWindows}\uninstall"; Flags: ignoreversion
;Source: "usercur\*"; Components: main; DestDir: "{code:DetectWindows}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension
;Source: "usercur2\*"; Components: manual; DestDir: "{code:DetectWindows}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension
;Source: "programfiles\*"; Components: browser; DestDir: "{pf}\"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension
Source: "pk31\*"; Components: main; DestDir: "{code:DetectWindows}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension nocompression
;Source: "pbsvc.exe" ;Components: anti;DestDir: "{tmp}"; Flags: ignoreversion
;Source: "QuakeLiveNP_433.msi" ;Components: plug;DestDir: "{tmp}"; Flags: ignoreversion
 
[code]
var
  MyNewPage: TWizardPage;
  Rect: TRect;
  HIcon: LongInt;
  AIconFileName: String;
  MyRadioBtn_1, MyRadioBtn_2: TNewRadioButton;
 
procedure GetInstTypePage();
begin
  MyNewPage := CreateCustomPage(wpWelcome,
    ExpandConstant('{cm:HeaderLabelPage}'), '');
 
 
 
  with TNewStaticText.Create(WizardForm) do
  begin
    Width := WizardForm.InnerNotebook.Width;
    Height := ScaleY(26);
    WordWrap := True;
    Caption := ExpandConstant('{cm:PageTextHeader}');
    Parent := MyNewPage.Surface;
  end;
 
  MyRadioBtn_1 := TNewRadioButton.Create(WizardForm);
  with MyRadioBtn_1 do
  begin
    Top := ScaleY(50);
    Width := ScaleX(150);
    Caption := ExpandConstant('{cm:MyRadioCaption_1}');
    Checked := True;
    Parent := MyNewPage.Surface;
  end;
 
  with TNewStaticText.Create(WizardForm) do
  begin
    Left := ScaleX(16);
    Top := ScaleY(68);
    Width := WizardForm.InnerNotebook.Width - ScaleX(60);
    Height := ScaleY(26);
    WordWrap := True;
    Caption := ExpandConstant('{cm:MyText_1}');
    Parent := MyNewPage.Surface;
  end;
 
  MyRadioBtn_2 := TNewRadioButton.Create(WizardForm);
  with MyRadioBtn_2 do
  begin
    Top := ScaleY(120);
    Width := ScaleX(150);
    Caption := ExpandConstant('{cm:MyRadioCaption_2}');
    Parent := MyNewPage.Surface;
  end;
 
  with TNewStaticText.Create(WizardForm) do
  begin
    Left := ScaleX(16);
    Top := ScaleY(138);
    Width := WizardForm.InnerNotebook.Width - ScaleX(60);
    Height := ScaleY(26);
    WordWrap := True;
    Caption := ExpandConstant('{cm:MyText_2}');
    Parent := MyNewPage.Surface;
  end;
end;
 
function ShouldSkipPage(PageID: Integer): Boolean;
begin
  if (PageID <= wpSelectDir) and (PageID = wpReady) and (MyRadioBtn_2.Checked) then
     Result := True;
end;
 
procedure InitializeWizard();
begin
  GetInstTypePage();
end;
function DetectWindows(s: string): string;
var
  SubKeyName, ResultStr: string;
begin
  SubKeyName:= 'Software\Microsoft\Windows NT\CurrentVersion';
  RegQueryStringValue(HKLM, SubKeyName, 'ProductName', ResultStr);
  if Pos('XP', ResultStr) > 0 then
    Result:= ExpandConstant('{%APPDATA}\id Software')
  else
  if Pos('Vista', ResultStr) > 0 then
    // не знаю, будет ли это C:\Users\Ваше_имя_пользователя\AppData\LocalLow\id Software
    // проверить не где
    Result:= ExpandConstant('{%APPDATA}\LocalLow\id Software')
  else Result:= '{%APPDATA}\LocalLow\id Software'; // сюда нужно вписать путь по дефолту, т.е. если не XP или Vista
end;
 


Всего записей: 10 | Зарегистр. 29-07-2007 | Отправлено: 12:52 30-01-2012 | Исправлено: lmiol, 13:13 30-01-2012
   

На первую страницук этому сообщениюк последнему сообщению

Компьютерный форум Ru.Board » Компьютеры » Программы » Inno Setup (создание инсталяционных пакетов)
articlebot (13-10-2013 23:33): продолжение темы - №15


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru