Inno Setup. Сделайте за меня

Статус
В этой теме нельзя размещать новые ответы.

Ckau

Мимокрокодил
может ктонить сделать скрипт, чтоб оформление осталось такое же http://rghost.ru/42362655
и убрать окошко выбора компонентов
так чисто:
1. окно приветсвия
2. окно выбора пути установки
3. сама установка
4. окно завершения
на выходе чтобы получился 1 файл exe без всяких побочных файлов.
Заранее большое спасибо!
 

audiofeel

Старожил
Добрый вечер всем. Как сделать так что бы после установки игры папка обретала иконку установленной игры, пытался копировать "desktop.ini" заменяя как мне казалось нужные значения , но ноль эмоций. наверна надо прописать нужное в секции "ini" но че та тоже не выходит. спасибо.
 

urban

Старожил
пишет вот такие вот ошибки при распаковки архивов:( как исправить?

 
Последнее редактирование:

audiofeel

Старожил
Помогите. кто не очень занят = не пойму где и как поднять кнопку "завершения" (скрипт обьеденил при помощи "joined" = цель (глупая) - хоть не много повторить инсталлшилд для баттлфронта2)
Код:
 ; --- Generated by InnoSetup Script Joiner version 3.0, Jul 22 2009, (c) Bulat Ziganshin <Bulat.Ziganshin@gmail.com>. More info at http://issjoiner.codeplex.com/

; --- Source: 1.iss ------------------------------------------------------------

[Files]
Source: D:\test battlefront 2\Installer_Background.bmp; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: D:\test battlefront 2\bmp\Bbrd1.bmp; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: D:\test battlefront 2\bmp\Bbrd2.bmp; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: D:\test battlefront 2\bmp\Bbrd3.bmp; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: D:\test battlefront 2\bmp\Bbrd4.bmp; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: D:\test battlefront 2\bmp\Bbrd5.bmp; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: D:\test battlefront 2\bmp\Bbrd6.bmp; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: D:\test battlefront 2\splash.bmp; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: isgsg.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression


[Icons]
Name: {group}\{cm:UninstallProgram,1}; Filename: {uninstallexe}

[UninstallDelete]
Type: filesandordirs; Name: {app}

[Code]
const
  Indent=25;

function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; external 'GetWindowLongA@user32.dll stdcall delayload';
function ssInitialize(hParent:HWND;ssTimeShow:integer;FadeOut:boolean;StretchMode:integer;BkgColor:DWORD):boolean; external 'ssInitialize@files:isgsg.dll stdcall delayload';
procedure ssDeInitialize; external 'ssDeInitialize@files:isgsg.dll stdcall delayload';
procedure ssSetBkgImage(FileName:PChar); external 'ssSetBkgImage@files:isgsg.dll stdcall delayload';
procedure ssAddImage(FileName:PChar); external 'ssAddImage@files:isgsg.dll stdcall delayload';
procedure ssStartShow; external 'ssStartShow@files:isgsg.dll stdcall delayload';
procedure ssStopShow; external 'ssStopShow@files:isgsg.dll stdcall delayload';
procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
function GetSystemMetrics(nIndex:Integer):integer; external 'GetSystemMetrics@user32.dll stdcall delayload';

procedure InitializeWizard1;
begin
  ExtractTemporaryFile('splash.bmp');
  ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\splash.bmp',0000,3000,0000,0,255,False,$FFFFFF,10);
  ssInitialize(GetWindowLong(MainForm.Handle,-8),15,False,0,$FF000000);
  ExtractTemporaryFile('Installer_Background.bmp');
  ssSetBkgImage(ExpandConstant('{tmp}')+'\Installer_Background.bmp');
end;

procedure CurStepChanged1(CurStep: TSetupStep);
begin
  if CurStep=ssInstall then begin
    ExtractTemporaryFile('Bbrd1.bmp');
    ssAddImage(ExpandConstant('{tmp}')+'\Bbrd1.bmp');
    ExtractTemporaryFile('Bbrd2.bmp');
    ssAddImage(ExpandConstant('{tmp}')+'\Bbrd2.bmp');
    ExtractTemporaryFile('Bbrd3.bmp');
    ssAddImage(ExpandConstant('{tmp}')+'\Bbrd3.bmp');
    ExtractTemporaryFile('Bbrd4.bmp');
    ssAddImage(ExpandConstant('{tmp}')+'\Bbrd4.bmp');
    ExtractTemporaryFile('Bbrd5.bmp');
    ssAddImage(ExpandConstant('{tmp}')+'\Bbrd5.bmp');
    ExtractTemporaryFile('Bbrd6.bmp');
    ssAddImage(ExpandConstant('{tmp}')+'\Bbrd6.bmp');
    ssStartShow;
  end;
  if CurStep=ssPostInstall then ssStopShow;
end;

procedure CurPageChanged1(CurPageID: Integer);
begin
  if CurPageID=wpInstalling then begin
    WizardForm.MainPanel.Visible:=False;
    WizardForm.Bevel1.Visible:=False;
    WizardForm.Width:=ScaleX(395);
    WizardForm.Height:=ScaleY(142);
    WizardForm.Left:=ScaleX(GetSystemMetrics(0)-WizardForm.Width-Indent);
    WizardForm.Top:=ScaleY(GetSystemMetrics(1)-WizardForm.Height-Indent);
    WizardForm.InnerNotebook.Left:=ScaleX(10);
    WizardForm.InnerNotebook.Top:=ScaleY(10);
    WizardForm.InnerNotebook.Width:=ScaleX(370);
    WizardForm.StatusLabel.Left:=ScaleX(0);
    WizardForm.StatusLabel.Top:=ScaleY(0);
    WizardForm.StatusLabel.Width:=WizardForm.InnerNotebook.Width;
    WizardForm.FileNameLabel.Left:=ScaleX(0);
    WizardForm.FileNameLabel.Top:=ScaleY(20);
    WizardForm.FileNameLabel.Width:=WizardForm.InnerNotebook.Width;
    WizardForm.ProgressGauge.Top:=ScaleY(40);
    WizardForm.ProgressGauge.Width:=WizardForm.InnerNotebook.Width;
    WizardForm.CancelButton.Left:=ScaleX(154);
    WizardForm.CancelButton.Top:=ScaleY(80);
  end;
  if (CurPageID=wpFinished) or (CurPageID=wpInfoAfter) then begin
    if WizardForm.Width<>690 then begin
      WizardForm.Visible:=False;
      WizardForm.Width:=ScaleX(690);
      WizardForm.Height:=ScaleY(496);
      WizardForm.Left:=(GetSystemMetrics(0)-WizardForm.Width) div 2;
      WizardForm.Top:=(GetSystemMetrics(1)-WizardForm.Height) div 2;
      WizardForm.MainPanel.Visible:=True;
      WizardForm.Bevel1.Visible:=True;
      WizardForm.InnerNotebook.Left:=205 //ScaleX(40);
      WizardForm.InnerNotebook.Top:=58 //ScaleY(72);
      WizardForm.InnerNotebook.Width:=499 //ScaleX(417);
      WizardForm.Visible:=True;
      WizardForm.NextButton.Left:=430 //ScaleX(154);
      WizardForm.NextButton.Top:=464 //ScaleY(80);


    end;
  end;
end;

procedure DeinitializeSetup1;
begin
  ssDeInitialize;
end;

Procedure InitializeWizard2();
begin
with WizardForm do begin
  Position:=poScreenCenter
  ClientWidth:=690
  ClientHeight:=496
  Font.Color:=15389620
  Font.Name:='MS Sans Serif'
  Font.Style:=[]
  with Bevel do begin
    Left:=0
    Top:=313
    Width:=497
    Height:=2
    Visible:=False
  end
  with CancelButton do begin
    Left:=580
    Top:=464
    Width:=90
    Height:=25
    BringToFront
  end
  with NextButton do begin
    Left:=430
    Top:=464
    Width:=90
    Height:=25
    BringToFront
  end
  with BackButton do begin
    Left:=330
    Top:=464
    Width:=90
    Height:=25
    BringToFront
  end
  with OuterNotebook do begin
    Left:=0
    Top:=0
    Width:=690
    Height:=496
    with WelcomePage do begin
      Color:=3881787
      with WizardBitmapImage do begin
        Left:=0
        Top:=0
        Width:=690
        Height:=496
      end
      with WelcomeLabel2 do begin
        Left:=205
        Top:=230
        Width:=465
        Height:=200
      end
      with WelcomeLabel1 do begin
        Left:=205
        Top:=190
        Width:=465
        Height:=28
        Font.Color:=15389620
        Font.Size:=8
      end
    end
    with InnerPage do begin
      with Bevel1 do begin
        Left:=0
        Top:=58
        Width:=499
        Height:=3
        Visible:=False
      end
      with InnerNotebook do begin
        Left:=205
        Top:=79
        Width:=465
        Height:=354
        BringToFront
        Color:=3881787
        with LicensePage do begin
          with LicenseNotAcceptedRadio do begin
            Left:=0
            Top:=338
            Width:=465
            Height:=17
            Checked:=True
          end
          with LicenseAcceptedRadio do begin
            Left:=0
            Top:=318
            Width:=465
            Height:=17
          end
          with LicenseMemo do begin
            Left:=0
            Top:=38
            Width:=465
            Height:=266
            ReadOnly:=True
            ScrollBars:=ssVertical
          end
          with LicenseLabel1 do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=28
          end
        end
        with PasswordPage do begin
          with PasswordEdit do begin
            Left:=0
            Top:=50
            Width:=465
            Height:=21
            Font.Color:=clWindowText
          end
          with PasswordEditLabel do begin
            Left:=0
            Top:=34
            Width:=465
            Height:=14
          end
          with PasswordLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=28
          end
        end
        with InfoBeforePage do begin
          with InfoBeforeMemo do begin
            Left:=0
            Top:=24
            Width:=465
            Height:=327
            ScrollBars:=ssVertical
          end
          with InfoBeforeClickLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=14
          end
        end
        with UserInfoPage do begin
          with UserInfoSerialEdit do begin
            Left:=0
            Top:=120
            Width:=465
            Height:=21
            Font.Color:=clWindowText
          end
          with UserInfoSerialLabel do begin
            Left:=0
            Top:=104
            Width:=465
            Height:=14
          end
          with UserInfoOrgEdit do begin
            Left:=0
            Top:=68
            Width:=465
            Height:=21
            Font.Color:=clWindowText
          end
          with UserInfoOrgLabel do begin
            Left:=0
            Top:=52
            Width:=465
            Height:=14
          end
          with UserInfoNameEdit do begin
            Left:=0
            Top:=16
            Width:=465
            Height:=21
            Font.Color:=clWindowText
          end
          with UserInfoNameLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=14
          end
        end
        with SelectDirPage do begin
          with SelectDirBitmapImage do begin
            Left:=0
            Top:=0
            Width:=32
            Height:=32
            Visible:=False
          end
          with DiskSpaceLabel do begin
            Left:=0
            Top:=340
            Width:=465
            Height:=14
          end
          with DirBrowseButton do begin
            Left:=375
            Top:=288
            Width:=90
            Height:=25
          end
          with DirEdit do begin
            Left:=0
            Top:=290
            Width:=365
            Height:=21
            Font.Color:=clWindowText
          end
          with SelectDirBrowseLabel do begin
            Left:=0
            Top:=24
            Width:=465
            Height:=28
          end
          with SelectDirLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=14
          end
        end
        with SelectComponentsPage do begin
          with ComponentsDiskSpaceLabel do begin
            Left:=0
            Top:=340
            Width:=417
            Height:=14
          end
          with ComponentsList do begin
            Left:=0
            Top:=48
            Width:=465
            Height:=275
            Font.Color:=15389620
            Color:=3881787
          end
          with TypesCombo do begin
            Left:=0
            Top:=24
            Width:=465
            Height:=21
            Font.Color:=15389620
            Color:=3881787
           end
          with SelectComponentsLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=14
          end
        end
        with SelectProgramGroupPage do begin
          with SelectGroupBitmapImage do begin
            Left:=0
            Top:=0
            Width:=32
            Height:=32
            Visible:=False
          end
          with NoIconsCheck do begin
            Left:=0
            Top:=337
            Width:=465
            Height:=17
          end
          with GroupBrowseButton do begin
            Left:=375
            Top:=288
            Width:=90
            Height:=25
          end
          with GroupEdit do begin
            Left:=0
            Top:=290
            Width:=365
            Height:=21
            Font.Color:=clWindowText
          end
          with SelectStartMenuFolderBrowseLabel do begin
            Left:=0
            Top:=24
            Width:=465
            Height:=28
          end
          with SelectStartMenuFolderLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=14
          end
        end
        with SelectTasksPage do begin
          with TasksList do begin
            Left:=0
            Top:=34
            Width:=465
            Height:=317
            Color:=3881787
          end
          with SelectTasksLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=28
          end
        end
        with ReadyPage do begin
          with ReadyMemo do begin
            Left:=0
            Top:=34
            Width:=465
            Height:=317
            Color:=3881787
          end
          with ReadyLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=28
          end
        end
        with PreparingPage do begin
          with PreparingErrorBitmapImage do begin
            Left:=0
            Top:=0
            Width:=16
            Height:=16
            Visible:=False
          end
          with PreparingLabel do begin
            Left:=24
            Top:=0
            Width:=393
            Height:=14
            Visible:=False
          end
        end
        with InstallingPage do begin
          with FilenameLabel do begin
            Left:=0
            Top:=16
            Width:=465
            Height:=16
          end
          with StatusLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=16
          end
          with ProgressGauge do begin
            Left:=0
            Top:=42
            Width:=465
            Height:=21
            Min:=0
            Max:=100
          end
        end
        with InfoAfterPage do begin
          with InfoAfterMemo do begin
            Left:=0
            Top:=24
            Width:=465
            Height:=327
            ScrollBars:=ssVertical
          end
          with InfoAfterClickLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=14
          end
        end
      end
      with MainPanel do begin
        Left:=0
        Top:=0
        Width:=690
        Height:=496
        Color:=clWindow
        with WizardSmallBitmapImage do begin
          Left:=0
          Top:=0
          Width:=690
          Height:=496
          BackColor:=clWindow
        end
        with PageDescriptionLabel do begin
          Left:=25
          Top:=19
          Width:=500
          Height:=14
          Color:=8483693
          Font.Color:=15389620
        end
        with PageNameLabel do begin
          Left:=15
          Top:=4
          Width:=500
          Height:=14
          Color:=8483693
          Font.Color:=15389620
        end
      end
    end
    with FinishedPage do begin
      Color:=3881787
      with WizardBitmapImage2 do begin
        Left:=0
        Top:=0
        Width:=690
        Height:=496
      end
      with NoRadio do begin
        Left:=205
        Top:=227
        Width:=465
        Height:=17
      end
      with YesRadio do begin
        Left:=205
        Top:=199
        Width:=465
        Height:=17
      end
      with RunList do begin
        Left:=205
        Top:=199
        Width:=465
        Height:=149
        BorderStyle:=bsNone
      end
      with FinishedLabel do begin
        Left:=205
        Top:=119
        Width:=465
        Height:=53
      end
      with FinishedHeadingLabel do begin
        Left:=205
        Top:=79
        Width:=465
        Height:=24
        Font.Color:=15389620
        Font.Size:=8
      end
    end
  end
  with BeveledLabel do begin
    Left:=10
    Top:=468
    Width:=150
    Height:=14
    Enabled:=False
    Color:=8483693
  end
end
end;



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

procedure CurStepChanged(CurStep: TSetupStep);
begin
  CurStepChanged1(CurStep);
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  CurPageChanged1(CurPageID);
end;

procedure DeinitializeSetup();
begin
  DeinitializeSetup1();
end;


[Setup]


; --- Source: 2.iss ------------------------------------------------------------
AppName=My Program
AppVerName=My Program 1.5
DefaultDirName={pf}\My Program

Compression=lzma
WizardImageFile=Midnight.bmp
WizardSmallImageFile=Midnight.bmp
; --- Dispatching code ------------------------------------------------------------
P.S. так и не понял как под спойлер прятать
 

Вложения

  • 9.7 KB Просмотры: 55

audiofeel

Старожил
nazbek010, если меняю значения = только на кнопку далее влияет и на кнопку установить
 

Adil

Старожил
nazbek010, если меняю значения = только на кнопку далее влияет и на кнопку установить
if (CurPageID=wpFinished) or (CurPageID=wpInfoAfter) then begin
if WizardForm.Width<>690 then begin
WizardForm.Visible:=False;
WizardForm.Width:=ScaleX(690);
WizardForm.Height:=ScaleY(496);
WizardForm.Left:=(GetSystemMetrics(0)-WizardForm.Width) div 2;
WizardForm.Top:=(GetSystemMetrics(1)-WizardForm.Height) div 2;
WizardForm.MainPanel.Visible:=True;
WizardForm.Bevel1.Visible:=True;
WizardForm.InnerNotebook.Left:=205 //ScaleX(40);
WizardForm.InnerNotebook.Top:=58 //ScaleY(72);
WizardForm.InnerNotebook.Width:=499 //ScaleX(417);
WizardForm.Visible:=True;
WizardForm.NextButton.Left:=430 //ScaleX(154);
WizardForm.NextButton.Top:=464 //ScaleY(80);
end;
Здесь тоже поменяй
 

audiofeel

Старожил
Здравствуйте, помогите если есть желание = хочу сделать прогресс бар другого цвета - все получилось (примеры брал в справке и на этом сайте) но стоило приделать isdone как тут же все пропало (прогресс бар стал "обычный")
Код:
#include "ISDone.iss"
#include "pb.iss"

[Setup]
AppName=BioShock 2
AppVerName=BioShock 2
DefaultDirName={pf}\2K Games\BioShock 2
Compression=none
WizardImageFile=Blue.bmp
WizardSmallImageFile=Blue.bmp
PrivilegesRequired=none
LicenseFile=EULA.rtf
OutputDir=output\d1
AppID={{4A8B461A-9336-4CF9-98F4-14DD38E673F0}
UninstallDisplayName=BioShock 2
DisableProgramGroupPage=true
ShowLanguageDialog=auto
AppPublisher=2K Games
AppVersion=1.00.0000
AppUpdatesURL=http://www.2kgames.com/bioshock2/support
AppSupportURL=http://www.2kgames.com/bioshock2/support
AppPublisherURL=http://www.2KGames.com
AppComments=При обращении в службу технической поддержки, будьте готовы назвать код активации программы. Его можно найти в упаковке с игрой.
AppContact=Служба техподдержки компании 2K Games и 1С-Софтклаб
AppSupportPhone=Техподдержка в США: +1-866-219-9839, техподдержка в России: +7-495-981-23-72.
AppReadmeFile={app}\Readme.txt
UninstallFilesDir={commonappdata}\Bio2
UninstallDisplayIcon={app}\SP\Builds\Binaries\Bioshock2GFW.dll
SetupIconFile=setup.ico
VersionInfoCopyright=Copyright (c) 2009 Acresso Software Inc. and/or InstallShield Co. Inc. All Rights Reserved.
VersionInfoVersion=16.0.328
VersionInfoCompany=Acresso Software Inc.
VersionInfoDescription=InstallScript Setup Launcher
VersionInfoProductName=InstallShield
VersionInfoProductVersion=16.0
UsePreviousGroup=false
AppendDefaultGroupName=false
MinVersion=,6.1.7601sp1

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

[Registry]
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2; ValueType: string; ValueName: InstallPath; ValueData: {app}; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\1.00.0000; ValueType: string; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\MP; ValueType: string; ValueName: InstallPath; ValueData: {app}\MP; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\MP; ValueType: string; ValueName: Working; ValueData: {app}\MP\Builds\Binaries; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\MP; ValueType: string; ValueName: Launcher; ValueData: {app}\MP\Builds\Binaries\Bioshock2Launcher.exe; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\SP; ValueType: string; ValueName: InstallPath; ValueData: {app}; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\SP; ValueType: string; ValueName: Working; ValueData: {app}\SP\Builds\Binaries; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\2K Games\BioShock 2\SP; ValueType: string; ValueName: Launcher; ValueData: {app}\SP\Builds\Binaries\Bioshock2Launcher.exe; Flags: uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: string; ValueName: InstallLocation; ValueData: {app}; Flags: uninsdeletekeyifempty uninsdeletevalue createvalueifdoesntexist
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: string; ValueName: ProductGuid; ValueData: {{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; Flags: createvalueifdoesntexist uninsdeletekeyifempty uninsdeletevalue
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: string; ValueName: InstallSource; ValueData: {src}\; Flags: uninsdeletekeyifempty uninsdeletevalue createvalueifdoesntexist
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: string; ValueName: DisplayName; ValueData: BioShock 2; Flags: uninsdeletekeyifempty uninsdeletevalue createvalueifdoesntexist
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: string; ValueName: RegOwner; ValueData: maratrepack; Flags: uninsdeletekeyifempty uninsdeletevalue createvalueifdoesntexist
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: dword; ValueName: Language; ValueData: $00000419; Flags: uninsdeletekeyifempty uninsdeletevalue createvalueifdoesntexist
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{4A8B461A-9336-4CF9-98F4-14DD38E673F0}; ValueType: string; ValueName: DisplayVersion; ValueData: 1.00.0000; Flags: uninsdeletekeyifempty uninsdeletevalue createvalueifdoesntexist

[Icons]
Name: {commondesktop}\BioShock 2; Filename: {app}\SP\Builds\Binaries\Bioshock2Launcher.exe; WorkingDir: {app}\SP\Builds\Binaries; IconFilename: {app}\SP\Builds\Binaries\Bioshock2GFW.dll; Flags: createonlyiffileexists

[Files]

[UninstallDelete]
Name: {app}; Type: filesandordirs


[Code]

procedure CurPageChanged1(CurPageID: Integer);
begin
if CurPageID = wpWelcome then
begin
  WizardForm.NextButton.Width  :=77
  WizardForm.NextButton.Left   :=375
  WizardForm.NextButton.Caption:='Принять'
 end
end;

procedure CurStepChanged1(CurStep: TSetupStep);
var
ResultCode:Integer;
begin
  if CurStep = ssPostInstall then
begin
  WizardForm.StatusLabel.Caption:='Установка дополнительного програмного обеспечения'+ #13#10 +
         + #13#10 +
         + #13#10 +
         + #13#10 +
         + #13#10 +
         'Обновление компонентов библиотеки DirectX';
  WizardForm.StatusLabel.Font.Color:= ClWindow;
  WizardForm.StatusLabel.Font.Name := 'MS Sans Serif';
  WizardForm.StatusLabel.Font.Size := 8;
  Exec(ExpandConstant('{src}\Support\Redist\DirectX\DXSETUP.exe'), '/silent', ExpandConstant('{src}\Support\Redist\DirectX'), SW_SHOW, ewWaitUntilTerminated, ResultCode);
  WizardForm.StatusLabel.Caption:='Установка дополнительного програмного обеспечения'+ #13#10 +
         + #13#10 +
         + #13#10 +
         + #13#10 +
         + #13#10 +
         'Установка обновлений для службы Games for Windows - LIVE';
  WizardForm.StatusLabel.Font.Color:= ClWindow;
  WizardForm.StatusLabel.Font.Name := 'MS Sans Serif';
  WizardForm.StatusLabel.Font.Size := 8;
  Exec(ExpandConstant('{src}\Support\Redist\G4WL\gfwlivesetup.exe'), '/Q', ExpandConstant('{src}\Support\Redist\G4WL'), SW_SHOW, ewWaitUntilTerminated, ResultCode);
  Exec(ExpandConstant('{src}\Support\Redist\vcredist_x86.exe'), '/Q', ExpandConstant('{src}\Support\Redist'), SW_SHOW, ewWaitUntilTerminated, ResultCode);
end;
end;

Procedure InitializeWizard1();
begin
with WizardForm do begin
  Position    :=poScreenCenter
  ClientWidth :=690
  ClientHeight:=496
  Font.Color  :=clWindow
  Font.Name   :='MS Sans Serif'
  Font.Style  :=[]
  with Bevel do begin
    Left   :=0
    Top    :=313
    Width  :=497
    Height :=2
    Visible:=False
  end
  with CancelButton do begin
    Left  :=600
    Top   :=462
    Width :=77
    Height:=25
    BringToFront
  end
  with NextButton do begin
    Left  :=375
    Top   :=462
    Width :=77
    Height:=25
    BringToFront
  end
  with BackButton do begin
    Left  :=293
    Top   :=462
    Width :=77
    Height:=25
    BringToFront
  end
  with OuterNotebook do begin
    Left  :=0
    Top   :=0
    Width :=690
    Height:=496
    with WelcomePage do begin
      Color:=11232829
      with WizardBitmapImage do begin
        Left  :=0
        Top   :=0
        Width :=690
        Height:=496
      end
      with WelcomeLabel2 do begin
        Left  :=205
        Top   :=225
        Width :=465
        Height:=200
      end
      with WelcomeLabel1 do begin
        Font.Name := 'MS Sans Serif';
        Left      :=205
        Top       :=158
        Width     :=465
        Height    :=28
        Font.Color:=clWindow
        Font.Size :=8
      end
    end
    with InnerPage do begin
      with Bevel1 do begin
        Left   :=0
        Top    :=58
        Width  :=499
        Height :=3
        Visible:=False
      end
      with InnerNotebook do begin
        Left  :=205
        Top   :=79
        Width :=465
        Height:=354
        BringToFront
        Color :=11232829
        with LicensePage do begin
          with LicenseNotAcceptedRadio do begin
            Left   :=22
            Top    :=329
            Width  :=465
            Height :=17
            Checked:=True
          end
          with LicenseAcceptedRadio do begin
            Left  :=22
            Top   :=309
            Width :=465
            Height:=17
          end
          with LicenseMemo do begin
            Left      :=22
            Top       :=4
            Width     :=445
            Height    :=281
            ReadOnly  :=True
            ScrollBars:=ssVertical
          end
          with LicenseLabel1 do begin
            Enabled:=False
            Visible:=False
          end
        end
        with SelectDirPage do begin
          with SelectDirBitmapImage do begin
            Left   :=0
            Top    :=0
            Width  :=32
            Height :=32
            Visible:=False
          end
          with DiskSpaceLabel do begin
            Enabled:=False
            Visible:=False
          end
          with DirBrowseButton do begin
            Left  :=380
            Top   :=100
            Width :=77
            Height:=25
          end
          with DirEdit do begin
            Left      :=20
            Top       :=70
            Width     :=445
            Height    :=20
            Font.Color:=clWindowText
          end
          with SelectDirBrowseLabel do begin
            Left  :=0
            Top   :=0
            Width :=0
            Height:=0
          end
          with SelectDirLabel do begin
            Left  :=0
            Top   :=0
            Width :=465
            Height:=26
          end
        end
        with ReadyPage do begin
          with ReadyMemo do begin
            Left  :=0
            Top   :=0
            Width :=0
            Height:=0
            Color :=11232829
          end
          with ReadyLabel do begin
            Left  :=0
            Top   :=0
            Width :=465
            Height:=28
          end
        end
        with PreparingPage do begin
          with PreparingErrorBitmapImage do begin
            Left   :=0
            Top    :=0
            Width  :=16
            Height :=16
            Visible:=False
          end
          with PreparingLabel do begin
            Left   :=24
            Top    :=0
            Width  :=393
            Height :=14
            Visible:=False
          end
        end
        with InstallingPage do begin
          with FilenameLabel do begin
            Left  :=0
            Top   :=16
            Width :=465
            Height:=16
          end
          with StatusLabel do begin
            Left  :=25
            Top   :=5
            Width :=435
            Height:=78
          end
          with ProgressGauge do begin
            Left  :=25
            Top   :=115
            Width :=435
            Height:=21
            Min   :=0
            Max   :=100
          end
        end
        with InfoAfterPage do begin
        end
      end
      with MainPanel do begin
        Left  :=0
        Top   :=0
        Width :=690
        Height:=496
        Color :=clWindow
        with WizardSmallBitmapImage do begin
          Left     :=0
          Top      :=0
          Width    :=690
          Height   :=496
          BackColor:=clWindow
        end
        with PageDescriptionLabel do begin
          Left      :=25
          Top       :=25
          Width     :=500
          Height    :=14
          Color     :=6697728
          Font.Color:=clWindow
        end
        with PageNameLabel do begin
          Left      :=15
          Top       :=7
          Width     :=500
          Height    :=14
          Color     :=6697728
          Font.Color:=clWindow
        end
      end
    end
    with FinishedPage do begin
      Color:=11232829
      with WizardBitmapImage2 do begin
        Left  :=0
        Top   :=0
        Width :=690
        Height:=496
      end
      with NoRadio do begin
        Left  :=205
        Top   :=227
        Width :=465
        Height:=17
      end
      with YesRadio do begin
        Left  :=205
        Top   :=199
        Width :=465
        Height:=17
      end
      with RunList do begin
        Left       :=205
        Top        :=199
        Width      :=465
        Height     :=149
        BorderStyle:=bsNone
      end
      with FinishedLabel do begin
        Left  :=205
        Top   :=119
        Width :=465
        Height:=53
      end
      with FinishedHeadingLabel do begin
        Font.Name := 'MS Sans Serif';
        Left      :=205
        Top       :=79
        Width     :=465
        Height    :=24
        Font.Color:=clWindow
        Font.Size :=8
      end
    end
  end
  with BeveledLabel do begin
    Left   :=10
    Top    :=468
    Width  :=150
    Height :=14
    Enabled:=False
    Color  :=14405068
  end
 end
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  CurStepChanged1(CurStep);
  CurStepChanged2(CurStep);
  CurStepChanged3(CurStep);
end;

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

procedure CurPageChanged(CurPageID: Integer);
begin
  CurPageChanged1(CurPageID);
  CurPageChanged2(CurPageID);
end;

////////////////////////////////////////////////////////////////////////

#define NeedMem 512
;#define records
#define facompress
#define PrecompInside
#define SrepInside

[Files]
Source: Include\Russian.ini; DestDir: {tmp}; Flags: dontcopy
Source: Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif

#ifdef PrecompInside
Source: Include\CLS-precomp.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\packjpg_dll1.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\precomp.exe; DestDir: {tmp}; Flags: dontcopy
Source: Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef SrepInside
Source: Include\CLS-srep.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef facompress
Source: Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy
#endif

[CustomMessages]
russian.ExtractedFile=

[Code]
const
  PCFonFLY=true;
  notPCFonFLY=false;
var
  LabelCurrFileName: TLabel;
  ISDoneProgressBar1: TNewProgressBar;
  MyCancelButton: TButton;
  ISDoneCancel:integer;
  ISDoneError:boolean;
  PCFVer:double;

type
  TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;

function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';

function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';

function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer; external 'ISFindFiles@files:ISDone.dll stdcall delayload';
function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean; external 'ISPickFilename@files:ISDone.dll stdcall delayload';
function ISGetName(TypeStr:integer):PAnsichar; external 'ISGetName@files:ISDone.dll stdcall delayload';
function ISFindFree(FindHandle:integer):boolean; external 'ISFindFree@files:ISDone.dll stdcall delayload';
function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString;Show:boolean):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';

function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
function SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';

function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
  if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
  LabelCurrFileName.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
  Result := ISDoneCancel;                                        //MinimizePathName
end;

procedure CancelButtonOnClick(Sender: TObject);
begin
  SuspendProc;
  if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
  ResumeProc;
end;

procedure HideControls;
begin
  WizardForm.FileNamelabel.Hide;
  ISDoneProgressBar1.Hide;
  LabelCurrFileName.Hide;
  MyCancelButton.Hide;
end;

procedure CreateControls;
var PBTop:integer;
begin
  PBTop:=ScaleY(50);
  ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
  with ISDoneProgressBar1 do begin
    Parent   := WizardForm.InstallingPage;
    Left     := ScaleX(25);
    Top      := 115;
    Width    := ScaleX(435);
    Height   := 21;
    Max      := 1000;
  end;

  LabelCurrFileName := TLabel.Create(WizardForm);
  with LabelCurrFileName do begin
    Parent   := WizardForm.InstallingPage;
    AutoSize := False;
    Left     := ScaleX(25);
    Top      := ScaleX(99);
    Width    := ScaleX(435);
    Height   := 16;
    Font.Name:= 'MS Sans Serif';
    Font.Size:= 8;
  end;

  MyCancelButton:=TButton.Create(WizardForm);
  with MyCancelButton do begin
    Parent := WizardForm;
    Width  := ScaleX(77);
    Caption:= ExpandConstant('Отмена');
    Left   := ScaleX(600);
    Top    := WizardForm.cancelbutton.top;
    OnClick:= @CancelButtonOnClick;
  end;
end;

Procedure CurPageChanged2(CurPageID: Integer);
Begin
  if (CurPageID = wpFinished) and ISDoneError then
  begin
    WizardForm.Caption:= ExpandConstant('Ошибка распаковки!');
    WizardForm.FinishedLabel.Font.Color:= clRed;
    WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
  end;
end;

function CheckError:boolean;
begin
  result:= not ISDoneError;
end;

procedure CurStepChanged2(CurStep: TSetupStep);
var Comps1,Comps2,Comps3, TmpValue:cardinal;
    FindHandle1,ColFiles1,CurIndex1,tmp:integer;
    ExecError:boolean;
    InFilePath,OutFilePath,OutFileName:PAnsiChar;
begin
  if CurStep = ssInstall then begin  //ssPostInstall
    WizardForm.ProgressGauge.Hide;
    WizardForm.CancelButton.Hide;
    CreateControls;
    WizardForm.StatusLabel.Caption:='Программа InstallShield Wizard выполняет установку BioShock 2'+ #13#10 +
         + #13#10 +
         + #13#10 +
         + #13#10 +
         + #13#10 +
         'Установка';
    ISDoneCancel:=0;

ExtractTemporaryFile('unarc.dll');

#ifdef PrecompInside
ExtractTemporaryFile('CLS-precomp.dll');
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('packjpg_dll1.dll');
ExtractTemporaryFile('precomp.exe');
ExtractTemporaryFile('zlib1.dll');
#endif
#ifdef SrepInside
ExtractTemporaryFile('CLS-srep.dll');
#endif
#ifdef facompress
    ExtractTemporaryFile('facompress.dll');
#endif
#ifdef records
    ExtractTemporaryFile('records.inf');
#endif

    ExtractTemporaryFile('Russian.ini');

    Comps1:=0; Comps2:=0; Comps3:=0;

#ifdef precomp
  PCFVer:={#precomp};
#else
  PCFVer:=0;
#endif
    ISDoneError:=true;
    if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, MainForm.Handle, {#NeedMem}, @ProgressCallback) then begin
      repeat
        if not SrepInit   (ExpandConstant('{app}'),512,0) then break;
        if not PrecompInit(ExpandConstant('{app}'),128,PCFVer) then break;
        if not FileSearchInit(true) then break;

        if not ISArcExtract ( 0, 0, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY) then break;

//        if not ShowChangeDiskWindow ('Пожалуйста, вставьте второй диск и дождитесь его инициализации.', ExpandConstant('{src}'),'CODMW_2.arc') then break;


        ISDoneError:=false;
      until true;
      ISDoneStop;
    end;
    HideControls;
    WizardForm.CancelButton.Visible:=true;
    WizardForm.CancelButton.Enabled:=false;
  end;
  if (CurStep=ssPostInstall) and ISDoneError then begin
    Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
  end;
end;

///////////////////////////////////////////////////////////////////////////////



[Files]
Source: InnoCallBack.dll; DestDir: {tmp}
Source: progress.bmp; DestDir: {tmp}

[Code]
type
  TProc = procedure(HandleW, msg, idEvent, TimeSys: LongWord);
  TPBInfo = record ProgressBarName: TNewProgressBar ; ImageHeight, LastWidth, MaxWidth: Integer; end;

var
ProgressBarEdit: array of TEdit;
ProgressBarImage: array of TBitmapImage;
PBBuff: array of TPBInfo;
ProgressTimer: Longword; PBCount: Integer;

function WrapTimerProc(callback:TProc; paramcount:integer):longword; external 'wrapcallback@files:innocallback.dll stdcall';
function SetTimer(hWnd: LongWord; nIDEvent, uElapse: LongWord; lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd: LongWord; nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall';

procedure TextureProgressBar(ProgressBar:TNewProgressBar);
var n: Integer;
begin
n:= PBCount; SetArrayLength(ProgressBarEdit, n+1); SetArrayLength(ProgressBarImage, n+1)
SetArrayLength(PBBuff, n+1);

ProgressBarEdit[n]:= TEdit.Create(WizardForm)
ProgressBarEdit[n].SetBounds(ProgressBar.Left, ProgressBar.Top, ProgressBar.Width, ProgressBar.Height);
ProgressBarEdit[n].Enabled:= False;
ProgressBarEdit[n].Parent:= ProgressBar.Parent;
ProgressBarEdit[n].Visible:= ProgressBar.Visible;

PBBuff[n].LastWidth:= ProgressBar.Position;
PBBuff[n].ImageHeight:= ProgressBarEdit[n].Height - ScaleY(2);
PBBuff[n].ProgressBarName:= ProgressBar ;
PBBuff[n].MaxWidth:= ScaleX(ProgressBar.Width);

ProgressbarImage[n]:= TBitmapImage.Create(WizardForm);
ProgressbarImage[n].Stretch:= True;
ProgressbarImage[n].Parent:= ProgressBarEdit[n];
ProgressbarImage[n].SetBounds(ScaleX(0), ScaleY(0), ScaleX(0), ScaleY(0))
ProgressbarImage[n].Bitmap.LoadFromFile(ExpandConstant('{tmp}\progress.bmp'));

ProgressBar.Width:= ScaleX(0); ProgressBar.Height:= ScaleY(0);

PBCount:= PBCount+1
end;

procedure HideAllTexturedPB();
var n: integer;
begin
for n:=0 to PBCount-1 do begin ProgressBarEdit[n].Hide; ProgressBarImage[n].Hide; end;
end;

procedure UpdateAllTexturedPB();
var n: integer;
begin
for n:=0 to PBCount-1 do begin
ProgressBarEdit[n].Visible:= PBBuff[n]. ProgressBarName.Visible;
ProgressBarImage[n].Visible:= PBBuff[n].ProgressBarName.Visible; end;
end;

procedure UpdatePB(HandleW, msg, idEvent, TimeSys: LongWord);
var f: integer; CurWidth: single;
begin
for f:=0 to PBCount-1 do begin
UpdateAllTexturedPB
with PBBuff[f].ProgressBarName do begin
  CurWidth := (Position*PBBuff[f].MaxWidth)/Max;
  if PBBuff[f].LastWidth <> Round(CurWidth) then begin
    PBBuff[f].LastWidth:= Round(CurWidth);
    ProgressBarImage[f].SetBounds(ScaleX(0), ScaleY(0), PBBuff[f].LastWidth, PBBuff[f].ImageHeight); end;
  end;
end;
end;

procedure InitializeWizard2();
begin
ExtractTemporaryFile('progress.bmp');

TextureProgressBar(WizardForm.ProgressGauge)
end;

procedure CurStepChanged3(CurStep: TSetupStep);
begin
//if CurStep=ssInstall then ProgressTimer:= SetTimer(0,0, 200, WrapTimerProc(@UpdatePB, 4));
if CurStep=ssPostInstall then KillTimer(0, ProgressTimer);
end;
 

LexBell

Борода
Супер модератор
ISDoneProgressBar1: TNewProgressBar;
его-то ты делал нужного тебе цвета? Или забил, в надежде, что он сам перекрасится?
 

audiofeel

Старожил
Gnom, Я цвет менял при помощи "вашего" примера в справке в инно ультра (при помощи картинки "*.bmp" и не большого скрипта в качестве самого примера). в принципе мне нужно поменять только цвет, как я понял из твоего ответа возможно его поменять и без картинки. если это возможно - подскажите где что мне "переделать" или "подправить". (смогу ли? )
 

LexBell

Борода
Супер модератор
audiofeel, во первых, это не мой пример. во вторых, ты меняешь родной прогрессбар. просто сменить цвет, есть пример от nik1969
[SOURCE="iss"][*Code]
function SetWindowTheme(hwnd: HWND; pszSubAppName: pchar; pszSubIdList: pchar): Longint;
external 'SetWindowTheme@uxtheme.dll stdcall delayload';

Procedure InitializeWizard();
begin
try
SetWindowTheme(wizardform.progressgauge.Handle, ' ', ' ');
except
end
end;

procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID=wpInstalling then
SendMessage(wizardform.progressgauge.Handle, $0409, 0, clBlack);
end;[/SOURCE]

вместо родного wizardform.progressgauge указываешь тот прогрессбар, который тебе нужен.
вместо clBlack, укажешь цвет, который тебе нужен.
 

nik1967

Old Men
Проверенный
Ну, блин, Саша, и ник мой переврал (моложе сделал :)), и пример то не мой :)
 

audiofeel

Старожил
Gnom, ну вобщем как я его только не называл и ISDoneProgressBar1 и TNewProgressBar ноль эмоций (подсказка нужна без нее ни как). ошибка вылазит - когда пишеш "SendMessage(ISDoneProgressBar1.Handle, $0409, 0, clBlue);" (не при компиляции, а когда запускаешь) что то типа "runtime error couldn not proc". и вот этот пример мне поможет или нет - или он только на стандартный прогрес (без исдон работает)
Код:
[Files]
Source: InnoCallBack.dll; DestDir: {tmp}
Source: progress.bmp; DestDir: {tmp}

[-Code]
type
  TProc = procedure(HandleW, msg, idEvent, TimeSys: LongWord);
  TPBInfo = record ProgressBarName: TNewProgressBar ; ImageHeight, LastWidth, MaxWidth: Integer; end;

var
ProgressBarEdit: array of TEdit;
ProgressBarImage: array of TBitmapImage;
PBBuff: array of TPBInfo;
ProgressTimer: Longword; PBCount: Integer;

function WrapTimerProc(callback:TProc; paramcount:integer):longword; external 'wrapcallback@files:innocallback.dll stdcall';
function SetTimer(hWnd: LongWord; nIDEvent, uElapse: LongWord; lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd: LongWord; nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall';

procedure TextureProgressBar(ProgressBar:TNewProgressBar);
var n: Integer;
begin
n:= PBCount; SetArrayLength(ProgressBarEdit, n+1); SetArrayLength(ProgressBarImage, n+1)
SetArrayLength(PBBuff, n+1);

ProgressBarEdit[n]:= TEdit.Create(WizardForm)
ProgressBarEdit[n].SetBounds(ProgressBar.Left, ProgressBar.Top, ProgressBar.Width, ProgressBar.Height);
ProgressBarEdit[n].Enabled:= False;
ProgressBarEdit[n].Parent:= ProgressBar.Parent;
ProgressBarEdit[n].Visible:= ProgressBar.Visible;

PBBuff[n].LastWidth:= ProgressBar.Position;
PBBuff[n].ImageHeight:= ProgressBarEdit[n].Height - ScaleY(2);
PBBuff[n].ProgressBarName:= ProgressBar ;
PBBuff[n].MaxWidth:= ScaleX(ProgressBar.Width);

ProgressbarImage[n]:= TBitmapImage.Create(WizardForm);
ProgressbarImage[n].Stretch:= True;
ProgressbarImage[n].Parent:= ProgressBarEdit[n];
ProgressbarImage[n].SetBounds(ScaleX(0), ScaleY(0), ScaleX(0), ScaleY(0))
ProgressbarImage[n].Bitmap.LoadFromFile(ExpandConstant('{tmp}\progress.bmp'));

ProgressBar.Width:= ScaleX(0); ProgressBar.Height:= ScaleY(0);

PBCount:= PBCount+1
end;

procedure HideAllTexturedPB();
var n: integer;
begin
for n:=0 to PBCount-1 do begin ProgressBarEdit[n].Hide; ProgressBarImage[n].Hide; end;
end;

procedure UpdateAllTexturedPB();
var n: integer;
begin
for n:=0 to PBCount-1 do begin
ProgressBarEdit[n].Visible:= PBBuff[n]. ProgressBarName.Visible;
ProgressBarImage[n].Visible:= PBBuff[n].ProgressBarName.Visible; end;
end;

procedure UpdatePB(HandleW, msg, idEvent, TimeSys: LongWord);
var f: integer; CurWidth: single;
begin
for f:=0 to PBCount-1 do begin
UpdateAllTexturedPB
with PBBuff[f].ProgressBarName do begin
  CurWidth := (Position*PBBuff[f].MaxWidth)/Max*10;
  if PBBuff[f].LastWidth <> Round(CurWidth) then begin
    PBBuff[f].LastWidth:= Round(CurWidth);
    ProgressBarImage[f].SetBounds(ScaleX(0), ScaleY(0), PBBuff[f].LastWidth, PBBuff[f].ImageHeight); end;
  end;
end;
end;

procedure InitializeWizard2();
begin
ExtractTemporaryFile('progress.bmp');

TextureProgressBar(WizardForm.ProgressGauge)
end;

procedure CurStepChanged3(CurStep: TSetupStep);
begin
if CurStep=ssInstall then ProgressTimer:= SetTimer(0,0, 200, WrapTimerProc(@UpdatePB, 4));
if CurStep=ssPostInstall then KillTimer(0, ProgressTimer);
end;
 
Последнее редактирование:

Лёха

Участник
Товарищи, может кто нибудь сделать в этом скрипте компоненты и Доп.ПО так же как в том что я прикрепил ниже, а то очень геморно постоянно пол кода менять.
 

Вложения

audiofeel

Старожил
Здравствуйте, можно ли сделать маленькое окошко "DirEdit" прозрачным и чтобы пользователь смог сменить папку установки только нажав на кнопку "изменить" - то есть строчку о конечной папки не редактируемой = как то так
 

Вложения

LexBell

Борода
Супер модератор
не при компиляции, а когда запускаешь) что то типа "runtime error couldn not proc"
Потому, что нужно сначала создать прогрессбар, а уж потом слать ему сообщение. Однако твоя ошибка говорит о том, что поступаешь ты наоборот - шлешь сообщение до создания прогрессбара.
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху