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

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

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

Widok (10-08-2009 22:13): Лимит страниц. Продолжаем здесь.  Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

   

chrome2006



Junior Member
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
[Setup]
AppName=Dark Sector
AppVerName=Dark Sector
DefaultDirName={pf}\Dark Sector
OutputDir=C:\Dark Sector
WizardImageFile=C:\ds\WizardImageFile.bmp
WizardSmallImageFile=C:\ds\WizardSmallImageFile.bmp
DisableReadyPage=true
UninstallFilesDir={app}\Uninstall
Compression=lzma/ultra64
DefaultGroupName=Dark Sector
DisableProgramGroupPage=true
InternalCompressLevel=ultra64
SolidCompression=true
DiskSpanning=true
SlicesPerDisk=1
DiskSliceSize=2100000000
DiskClusterSize=512
ReserveBytes=5120
 
 
 
 
[Languages]
Name: RUS; MessagesFile: compiler:Languages\Russian.isl
 
 
[Icons]
Name: {group}\Запустить игру; Filename: {app}\DS.exe; WorkingDir: {app}
Name: {group}\Руководство пользователя; Filename: {app}\manual.pdf; WorkingDir: {app}
Name: {group}\Readme; Filename: {app}\Readme.rtf; WorkingDir: {app}
Name: {group}\Удалить игру; Filename: {app}\Uninstall\unins000; WorkingDir: {app}
Name: {userdesktop}\Dark Sector; Filename: {app}\DS.exe; WorkingDir: {app}
 
[Files]
Source: C:\ds\ISSkin.dll; DestDir: {app}; Flags: dontcopy
Source: C:\Program Files\ISSkin\Styles\Vista.cjstyles; DestDir: {tmp}; Flags: dontcopy
Source: C:\ds\3.bmp; DestDir: {tmp}; Flags: dontcopy
Source: C:\ds\1.bmp; Flags: dontcopy
Source: D:\Dark Sector\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
 
 
 
[Run]
Filename: {src}\DirectX\DXSETUP.exe; StatusMsg: ExpandConstant('{cm:UP}'); Check: DirectX
Filename: {src}\Redist\PhysX_8.04.25_SystemSoftware.exe; WorkingDir: {src}\Redist; Check: PhysX1
 
[CustomMessages]
RUS.PAGE_CAPTION=Программа Dark Sector установлена на Ваш компютер.
RUS.STR=Нажмите «Завершить», чтобы выйти из программы установки.
RUS.BUT=Установить
RUS.SPACE=Доступно места на диске:
RUS.SPACE1=Требуется места на диске:
RUS.DRT=Обновить DirectX
RUS.UP=Идет обновление DirectX...
 
[Code]
var
  Upload, PhysX: TCheckBox;
  bottom_img:TBitmapImage;
  lblCheckBox, lblSelectDir, lblSelectDirBrowse, lblPhysX: TLabel;
  PageNameLabel, PageDescriptionLabel: TLabel;
  WLabel1, WLabel2,
  FLabel1, FLabel2, FLabel3: TLabel;
  NeedSize:Integer;
  FreeMB, TotalMB: Cardinal;
  NeedSpaceLabel,FreeSpaceLabel: TLabel;
  BmpFile: TBitmapImage;
 
function DirectX: Boolean;
begin
  Result:=Upload.Checked;
end;
 
function PhysX1: Boolean;
begin
  Result:=PhysX.Checked;
end;
 
 
procedure PhysXOnClick(Sender: TObject);
begin
  if PhysX.Checked = False then
    PhysX.Checked:= True else
  PhysX.Checked:= False;
end;
 
 
 
procedure GetFreeSpaceCaption(Sender: TObject);
var
  Path: String;
begin
  Path := ExtractFileDrive(WizardForm.DirEdit.Text);
  GetSpaceOnDisk(Path, True, FreeMB, TotalMB);
  if FreeMB > 1024 then
    FreeSpaceLabel.Caption := ExpandConstant('{cm:SPACE} ')+ FloatToStr(round(FreeMB/1024*100)/100) + ' GB' else
    FreeSpaceLabel.Caption := ExpandConstant('{cm:SPACE} ')+ IntToStr(FreeMB)+ ' MB';
  if FreeMB < NeedSize then
    WizardForm.NextButton.Enabled := False else
  WizardForm.NextButton.Enabled := True;
end;
 
procedure GetNeedSpaceCaption;
begin
  if NeedSize > 1024 then
    NeedSpaceLabel.Caption := ExpandConstant('{cm:SPACE1} ')+ FloatToStr(round(NeedSize/1024*100)/100) + ' GB' else
  NeedSpaceLabel.Caption := ExpandConstant('{cm:SPACE1} ')+ IntToStr(NeedSize)+ ' MB';
end;
 
// задал процедуру, чтоб отмечался чебокс еси кликнуть по надписи lblCheckBox
procedure lblCheckBoxOnClick(Sender: TObject);
begin
  if Upload.Checked = False then
    Upload.Checked:= True else
  Upload.Checked:= False;
end;
 
procedure LoadSkin(lpszPath: String; lpszIniFileName: String);
external 'LoadSkin@files:isskin.dll stdcall';
 
 
procedure UnloadSkin();
external 'UnloadSkin@files:isskin.dll stdcall';
 
 
function ShowWindow(hWnd: Integer; uType: Integer): Integer;
external 'ShowWindow@user32.dll stdcall';
 
function InitializeSetup(): Boolean;
begin
    ExtractTemporaryFile('Vista.cjstyles');
    LoadSkin(ExpandConstant('{tmp}\Vista.cjstyles'), '');
    Result := True;
end;
 
procedure DeinitializeSetup();
begin
 ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
    UnloadSkin();
end;
 
 
procedure InitializeWizard();
begin
  ExtractTemporaryFile('1.bmp');
  ExtractTemporaryFile('3.bmp');
 
  NeedSize:= 5580;
 
  BmpFile:= TBitmapImage.Create(WizardForm);
  BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp'));
  BmpFile.Width:= ScaleX(497);
  BmpFile.Height:= ScaleY(252);
  BmpFile.Parent:= WizardForm.SelectDirPage;
 
 
  bottom_img:= TBitmapImage.Create(WizardForm);
  bottom_img.Bitmap.LoadFromFile(ExpandConstant('{tmp}\3.bmp'));
{первые 2 параметра - координаты левогого верхнего угла по горизонтали и вертикали, дальше ширина и высота,
  до которой растянуть}
  bottom_img.SetBounds(0, 315, 497, 58);
  bottom_img.Parent:= WizardForm;
  bottom_img.Stretch:= True;
 
  with WizardForm do
  begin
    PageNameLabel.Hide;
    PageDescriptionLabel.Hide;
    WelcomeLabel1.Hide;
    WelcomeLabel2.Hide;
    DiskSpaceLabel.Hide;
    SelectDirBitmapImage.Hide;
    SelectDirBrowseLabel.Hide;
    SelectDirLabel.Hide;
    FinishedHeadingLabel.Hide;
    FinishedLabel.Hide;
 
    DirBrowseButton.Left:= DirBrowseButton.Left + ScaleX(40);
    DirBrowseButton.Top:= DirBrowseButton.Top + ScaleY(12);
    DirEdit.Left:= DirEdit.Left + ScaleX(40);
    DirEdit.Top:= DirEdit.Top + ScaleY(12);
 
    WizardBitmapImage.Width:= 497;
    WizardBitmapImage.Height:= 314;
    WizardBitmapImage2.Width:= 497;
    WizardBitmapImage2.Height:= 314;
    with MainPanel do
    begin
      with WizardSmallBitmapImage do
      begin
        Left:= Mainpanel.Left;
        Top:= Mainpanel.Top;
        Width:= Mainpanel.Width;
        Height:= MainPanel.Height;
      end;
    end;
  end;
 
  WLabel1:= TLabel.Create(WizardForm);
  with WLabel1 do
  begin
    Left:= ScaleX(176);
    Top:= ScaleY(16);
    Width:= ScaleX(301);
    Height:= ScaleY(54);
    AutoSize:= False;
 end;
 
  WLabel2:=TLabel.Create(WizardForm);
  with WLabel2 do
  begin
    Top:= ScaleY(76);
    Left:= ScaleX(176);
    Width:= ScaleX(301);
    Height:= ScaleY(234);
    AutoSize:= False;
end;
 
  FLabel1:= TLabel.Create(WizardForm);
  with FLabel1 do
  begin
    Left:= ScaleX(176);
    Top:= ScaleY(16);
    Width:= ScaleX(301);
    Height:= ScaleY(54);
    AutoSize:= False;
 end;
 
  FLabel2:=TLabel.Create(WizardForm);
  with FLabel2 do
  begin
    Top:= ScaleY(76);
    Left:= ScaleX(176);
    Width:= ScaleX(301);
    Height:= ScaleY(53);
    AutoSize:= False;
 end;
 
  FLabel3 :=TLabel.Create(WizardForm);
  with FLabel3 do
  begin
    Top := ScaleY(110);
    Left := ScaleX(176);
    Width := ScaleX(301);
    Height := ScaleY(53);
    AutoSize := False;
  end;
 
  // уменьшил размер CheckBox'а, по другому никак
  Upload:= TCheckBox.Create(WizardForm);
  with Upload do
  begin
    Parent:= WizardForm.SelectDirPage;
    Left:= WizardForm.DirEdit.Left;
    Top:= WizardForm.DirEdit.Top + 35;
    Width:= ScaleX(14);
    Height:= ScaleY(14);
    TabOrder:= 0;
    Checked:= False;
  end;
 
  // создаём надпись для CheckBox'а
  lblCheckBox:= TLabel.Create(WizardForm);
  with lblCheckBox do
  begin
    Caption:= ExpandConstant('{cm:DRT}');
    Left:= WizardForm.DirEdit.Left + 20;
    Top:= WizardForm.DirEdit.Top + 35;
    Width:= ScaleX(150);
    Height:= ScaleY(13);
    Transparent := True;
    Parent:= WizardForm.SelectDirPage;
    OnClick:= @lblCheckBoxOnClick;
  end;
 
PhysX:= TCheckBox.Create(WizardForm);
  with PhysX do
  begin
    Parent:= WizardForm.SelectDirPage;
    Left:= Upload.Left;
    Top:= Upload.Top + 35;
    Width:= ScaleX(14);
    Height:= ScaleY(14);
    TabOrder:= 0;
    Checked:= False;
  end;
 
lblPhysX:= TLabel.Create(WizardForm);
  with lblPhysX do
  begin
    Caption:=' Установить  PhysX';
    Left:= PhysX.Left + 15;
    Top:= PhysX.Top ;
    Width:= ScaleX(150);
    Height:= ScaleY(13);
    Transparent := True;
    Parent:= WizardForm.SelectDirPage;
    OnClick:= @PhysXOnClick;
  end;
 
 
 
  // создаём lblSelectDir
  lblSelectDir:= TLabel.Create(WizardForm);
  with lblSelectDir do
  begin
    Caption:= WizardForm.SelectDirLabel.Caption;
    Left:= ScaleX(40);
    Top:= WizardForm.SelectDirLabel.Top + ScaleY(12);
    Width:= WizardForm.SelectDirLabel.Width;
    Height:= WizardForm.SelectDirLabel.Height;
    Transparent := True;
    Parent:= WizardForm.SelectDirPage;
  end;
 
 // создаём lblSelectDirBrowse
  lblSelectDirBrowse:= TLabel.Create(WizardForm);
  with lblSelectDirBrowse do
  begin
    Caption:= WizardForm.SelectDirBrowseLabel.Caption;
    Left:= ScaleX(40);
    Top:= WizardForm.SelectDirBrowseLabel.Top + ScaleY(12);
    Width:= WizardForm.SelectDirBrowseLabel.Width;
    Height:= WizardForm.SelectDirBrowseLabel.Height;
    WordWrap:= True;
    Transparent:= True;
    Parent:= WizardForm.SelectDirPage;
  end;
 
  NeedSpaceLabel:= TLabel.Create(WizardForm);
  with NeedSpaceLabel do
  begin
    Parent:= WizardForm.SelectDirPage;
    Left:= WizardForm.DirEdit.Left;
    Top:= ScaleY(202);
    Width:= ScaleX(209);
    Height:= ScaleY(13);
    Transparent:= True;
  end;
 
  FreeSpaceLabel:= TLabel.Create(WizardForm);
  with FreeSpaceLabel do
  begin
    Parent:= WizardForm.SelectDirPage;
    Left:= WizardForm.DirEdit.Left;
    Top:= ScaleY(220);
    Width:= ScaleX(209);
    Height:= ScaleY(13);
    Transparent:= True;
  end;
 
  WizardForm.DirEdit.OnChange:= @GetFreeSpaceCaption;
  WizardForm.DirEdit.Text:= WizardForm.DirEdit.Text + #0;
 
  PageNameLabel:= TLabel.Create(WizardForm);
  with PageNameLabel do
  begin
    Left:= ScaleX(10);
    Top:= ScaleY(10);
    Width:= ScaleX(300);
    Height:= ScaleY(14);
    AutoSize:= False;
 end;
 
  PageDescriptionLabel:= TLabel.Create(WizardForm);
  with PageDescriptionLabel do
  begin
    Left:= ScaleX(15);
    Top:= ScaleY(25);
    Width:= ScaleX(475);
    Height:= ScaleY(30);
    AutoSize:= False;
      begin
    WizardForm.Font.Color:=clWhite;
    begin
    WizardForm.CancelButton.BringToFront;
    begin
    WizardForm.DirEdit.Color:=clBlack;
    begin
    BmpFile:= TBitmapImage.Create(WizardForm);
    BmpFile.Bitmap.LoadFromFile(ExpandConstant('{tmp}\1.bmp'));
    BmpFile.Width:= ScaleX(497);
    BmpFile.Height:= ScaleY(252);
    BmpFile.Parent:= WizardForm.InstallingPage;
    begin
    WizardForm.FilenameLabel.Hide;
WizardForm.StatusLabel.Hide;
WizardForm.ProgressGauge.Top:=ScaleY(220);
WizardForm.ProgressGauge.Left:=ScaleY(20);
WizardForm.ProgressGauge.Width:=260;
   end;
    end;
    end;
end;
 end;
 end;
end;
 
procedure CurPageChanged(CurPageID: Integer);
begin
  PageNameLabel.Caption:= WizardForm.PageNameLabel.Caption;
  PageDescriptionLabel.Caption:= WizardForm.PageDescriptionLabel.Caption;
  if CurPageID = wpSelectDir then
  begin
    WizardForm.NextButton.Caption:= ExpandConstant('{cm:BUT}');
    GetNeedSpaceCaption;
    if FreeMB < NeedSize then
    WizardForm.NextButton.Enabled:=False;
    with WizardForm do
    begin
      InnerNotebook.Left := ScaleX(0);
      InnerNotebook.Top := ScaleY(60);
      InnerNotebook.Width := ScaleX(497);
      InnerNotebook.Height := ScaleY(252)
      begin
if CurPageID=wpInstalling
then
if CurPageID=wpFinished
then
begin
WizardForm.Width:=497;
WizardForm.Height:=358;
WizardForm.Position:=poScreenCenter;
end
end;
end;
end;
end;

Всего записей: 50 | Зарегистр. 13-01-2009 | Отправлено: 20:11 18-06-2009 | Исправлено: chrome2006, 20:15 18-06-2009
   

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

Компьютерный форум Ru.Board » Компьютеры » Программы » Inno Setup (создание инсталяционных пакетов)
Widok (10-08-2009 22:13): Лимит страниц. Продолжаем здесь.


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

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

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru