Свободное общение

Petrarca

Мимокрокодил
Добрый день, мне нужно создать простенький инсталлер для мода. Юзер должен выбрать папку игры и чек боксы с вариантами установки (несколько взаимозаменяемых версий). Что можете посоветовать?
 

Andreo Fadio

Старожил
Добрый день, мне нужно создать простенький инсталлер для мода. Юзер должен выбрать папку игры и чек боксы с вариантами установки (несколько взаимозаменяемых версий). Что можете посоветовать?
Используй стандартный мастер сценария и в справке почитай про использование секций - [Types] и [Components]
 

dixen18

Ветеран
А это нормально если все уведомления и пункты стали на английском?)
 

Edison007

Ветеран
Модератор
В настройках профиля поменять можно.
Ваш аккаунт > настройки > язык (в самом вверху)
 

Nemko

Дилетант
Модератор
День добрый, помогите побороть, все перепробовал (что на ум пришло). Не могу придумать другой метод создания списковых Control'ов, а тут засада, уже несколько дней ничего не выходит(грубый пример прикрепляю):

12.png
 

Вложения

  • 27.9 KB Просмотры: 20

ffmla

Участник
Guys, Need to know some installer information from RG Revenants.
Installer from RG Revenants for the Wolfenstein 2009 Repack, shown in the attached image.
if it use inno script, then which function use to create the Thumbnails.

PS. Installer heavily modified with custom bevels(support Gradient outlines),Custom AppOnMessage with icons,Working thumbnails without wintb.dll.All the libraries hidden in temp location.
 
Последнее редактирование:

Shegorat

Lord of Madness
Администратор
В ней слишком скромно расписано с учетом лишь того, что ты уже знаешь как бы что и чем пользоваться, но не для новичков.
Да как бэ нет. Справка вполне подробно описывает необходимую информацию.

А этот "гайд" берёт инфу в основном с той же самой справки
 

Хамик

Старожил
С какой точки зрения посмотреть - со стороны новичка, который только скачал программу - справка не всегда понятная.
Я начинал из справки, если что-то не получалось, то спрашивал на форуме. Так что не нужно рассказывать про "новичек", "не новичек". Справки как раз и создаются для новичков.
 

ffmla

Участник
Greeting guys,
Need to know some details about wizardform.statuslabel.?
I have seen this Topic Status label hooking. Is it really working? if so, kindly give practical example using default CallbackAddr method or using CallbackCtrl.dll.

Thanks in advance...
 

Nemko

Дилетант
Модератор
ffmla, found to Internet, this with InnoCallback.dll, possible with CallbackCtrl.dll by analogy:
Код:
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program
OutputDir=userdocs:Inno Setup Examples Output

[Files]
Source: "InnoCallback.dll"; DestDir: "{tmp}"; Flags: dontcopy

[*Code]
#ifdef UNICODE
  #define AW "W"
#else
  #define AW "A"
#endif
const
  GWL_WNDPROC = -4;
  WM_MOUSEMOVE = $0200;

type
  WPARAM = UINT_PTR;
  LPARAM = LongInt;
  LRESULT = LongInt;
  TWindowProc = function(hwnd: HWND; uMsg: UINT; wParam: WPARAM;
    lParam: LPARAM): LRESULT;

function SetCapture(hWnd: HWND): HWND; external 'SetCapture@user32.dll stdcall';
function ReleaseCapture: BOOL; external 'ReleaseCapture@user32.dll stdcall';
function GetMessagePos: DWORD; external 'GetMessagePos@user32.dll stdcall';
function GetWindowRect(hWnd: HWND; out lpRect: TRect): BOOL; external 'GetWindowRect@user32.dll stdcall';
function CallWindowProc(lpPrevWndFunc: LongInt; hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; external 'CallWindowProc{#AW}@user32.dll stdcall';
function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: LongInt): LongInt; external 'SetWindowLong{#AW}@user32.dll stdcall';

function WrapWindowProc(Callback: TWindowProc; ParamCount: Integer): LongWord; external 'wrapcallback@files:InnoCallback.dll stdcall';

type
  TControlRec = record
    Hovered: Boolean;     // hovering state
    WndProc: LongInt;     // original window proc
    Control: TWinControl; // control instance
  end;

var
  StaticText1: TNewStaticText;
  StaticText2: TNewStaticText;
  ControlList: array of TControlRec;

// helper function for finding control by handle
function GetControlRec(Handle: HWND): TControlRec;
var
  I: Integer;
begin
  for I := 0 to High(ControlList) do
    if ControlList[I].Control.Handle = Handle then
    begin
      Result := ControlList[I];
      Exit;
    end;
end;

// function which attaches the intercepting window procedure to the control
// and creates and adds the control record to the control list
procedure AttachWndProc(Control: TWinControl; WindowProc: TWindowProc);
begin
  SetArrayLength(ControlList, GetArrayLength(ControlList) + 1);
  ControlList[High(ControlList)].Hovered := False;
  ControlList[High(ControlList)].Control := Control;
  ControlList[High(ControlList)].WndProc := SetWindowLong(Control.Handle,
    GWL_WNDPROC, WrapWindowProc(WindowProc, 4));
end;

// function to restore windows procedures to all controls in the list
procedure RestoreWndProcs;
var
  I: Integer;
begin
  for I := 0 to High(ControlList) do
    SetWindowLong(ControlList[I].Control.Handle, GWL_WNDPROC, ControlList[I].WndProc);
end;

// helper function to create a TPoint structure from the result of GetMessagePos
// function call
function MakePoint(Value: DWORD): TPoint;
begin
  Result.X := Value and $FFFF;
  Result.Y := Value shr 16;
end;

// helper function which substitutes PtInRect Windows API function which I wasn't
// able to import for some reason
function PointInRect(const Rect: TRect; const Point: TPoint): Boolean;
begin
  Result := (Point.X >= Rect.Left) and (Point.X <= Rect.Right) and
    (Point.Y >= Rect.Top) and (Point.Y <= Rect.Bottom);
end;

// interceptor window procedure
function StaticTextWndProc(hwnd: HWND; uMsg: UINT; wParam: WPARAM;
  lParam: LPARAM): LRESULT;
var
  P: TPoint;
  R: TRect;
  ControlRec: TControlRec;
begin
  // get control record
  ControlRec := GetControlRec(hwnd);
  // if the cursor moves, then...
  if uMsg = WM_MOUSEMOVE then
  begin
    // set mouse capture for this control to be notified by the WM_MOUSEMOVE even if
    // we leave the control
    SetCapture(ControlRec.Control.Handle);
    // get the current cursor position and control rectangle (both screen relative)
    P := MakePoint(GetMessagePos);
    GetWindowRect(ControlRec.Control.Handle, R);
    // check if the cursor is inside the control; if yes, then...
    if PointInRect(R, P) then
    begin
      // if the hovering flag was not yet set, it means we just entered the control
      // with the mouse, so let's change the style and remember the hovering state
      if not ControlRec.Hovered then
      begin
        if ControlRec.Control is TNewStaticText then
          TNewStaticText(ControlRec.Control).Font.Style := [fsBold];
        ControlRec.Hovered := True;
      end;
    end
    else
    begin
      // the cursor is not over the control, so let's release the mouse capture, set
      // the style and remember the hovering state
      ReleaseCapture;
      if ControlRec.Control is TNewStaticText then
        TNewStaticText(ControlRec.Control).Font.Style := [];
      ControlRec.Hovered := False;
    end;
  end;
  // call the original window procedure
  Result := CallWindowProc(ControlRec.WndProc, hwnd, uMsg, wParam, lParam);
end;

procedure InitializeWizard;
begin
  with WizardForm do begin
    OuterNotebook.Hide;
    StatusLabel.Caption:='123';
    StatusLabel.Parent:=WizardForm;
    AttachWndProc(StatusLabel, @StaticTextWndProc);
  end;
end;

procedure DeinitializeSetup;
begin
  RestoreWndProcs;
end;

P.S.: on CallbackCtrl.dll see this.
 
Последнее редактирование:

ffmla

Участник
ffmla, found to Internet, this with InnoCallback.dll, possible with CallbackCtrl.dll by analogy:
Код:
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program
OutputDir=userdocs:Inno Setup Examples Output

[Files]
Source: "InnoCallback.dll"; DestDir: "{tmp}"; Flags: dontcopy

[*Code]
#ifdef UNICODE
  #define AW "W"
#else
  #define AW "A"
#endif
const
  GWL_WNDPROC = -4;
  WM_MOUSEMOVE = $0200;

type
  WPARAM = UINT_PTR;
  LPARAM = LongInt;
  LRESULT = LongInt;
  TWindowProc = function(hwnd: HWND; uMsg: UINT; wParam: WPARAM;
    lParam: LPARAM): LRESULT;

function SetCapture(hWnd: HWND): HWND; external 'SetCapture@user32.dll stdcall';
function ReleaseCapture: BOOL; external 'ReleaseCapture@user32.dll stdcall';
function GetMessagePos: DWORD; external 'GetMessagePos@user32.dll stdcall';
function GetWindowRect(hWnd: HWND; out lpRect: TRect): BOOL; external 'GetWindowRect@user32.dll stdcall';
function CallWindowProc(lpPrevWndFunc: LongInt; hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; external 'CallWindowProc{#AW}@user32.dll stdcall';
function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: LongInt): LongInt; external 'SetWindowLong{#AW}@user32.dll stdcall';

function WrapWindowProc(Callback: TWindowProc; ParamCount: Integer): LongWord; external 'wrapcallback@files:InnoCallback.dll stdcall';

type
  TControlRec = record
    Hovered: Boolean;     // hovering state
    WndProc: LongInt;     // original window proc
    Control: TWinControl; // control instance
  end;

var
  StaticText1: TNewStaticText;
  StaticText2: TNewStaticText;
  ControlList: array of TControlRec;

// helper function for finding control by handle
function GetControlRec(Handle: HWND): TControlRec;
var
  I: Integer;
begin
  for I := 0 to High(ControlList) do
    if ControlList[I].Control.Handle = Handle then
    begin
      Result := ControlList[I];
      Exit;
    end;
end;

// function which attaches the intercepting window procedure to the control
// and creates and adds the control record to the control list
procedure AttachWndProc(Control: TWinControl; WindowProc: TWindowProc);
begin
  SetArrayLength(ControlList, GetArrayLength(ControlList) + 1);
  ControlList[High(ControlList)].Hovered := False;
  ControlList[High(ControlList)].Control := Control;
  ControlList[High(ControlList)].WndProc := SetWindowLong(Control.Handle,
    GWL_WNDPROC, WrapWindowProc(WindowProc, 4));
end;

// function to restore windows procedures to all controls in the list
procedure RestoreWndProcs;
var
  I: Integer;
begin
  for I := 0 to High(ControlList) do
    SetWindowLong(ControlList[I].Control.Handle, GWL_WNDPROC, ControlList[I].WndProc);
end;

// helper function to create a TPoint structure from the result of GetMessagePos
// function call
function MakePoint(Value: DWORD): TPoint;
begin
  Result.X := Value and $FFFF;
  Result.Y := Value shr 16;
end;

// helper function which substitutes PtInRect Windows API function which I wasn't
// able to import for some reason
function PointInRect(const Rect: TRect; const Point: TPoint): Boolean;
begin
  Result := (Point.X >= Rect.Left) and (Point.X <= Rect.Right) and
    (Point.Y >= Rect.Top) and (Point.Y <= Rect.Bottom);
end;

// interceptor window procedure
function StaticTextWndProc(hwnd: HWND; uMsg: UINT; wParam: WPARAM;
  lParam: LPARAM): LRESULT;
var
  P: TPoint;
  R: TRect;
  ControlRec: TControlRec;
begin
  // get control record
  ControlRec := GetControlRec(hwnd);
  // if the cursor moves, then...
  if uMsg = WM_MOUSEMOVE then
  begin
    // set mouse capture for this control to be notified by the WM_MOUSEMOVE even if
    // we leave the control
    SetCapture(ControlRec.Control.Handle);
    // get the current cursor position and control rectangle (both screen relative)
    P := MakePoint(GetMessagePos);
    GetWindowRect(ControlRec.Control.Handle, R);
    // check if the cursor is inside the control; if yes, then...
    if PointInRect(R, P) then
    begin
      // if the hovering flag was not yet set, it means we just entered the control
      // with the mouse, so let's change the style and remember the hovering state
      if not ControlRec.Hovered then
      begin
        if ControlRec.Control is TNewStaticText then
          TNewStaticText(ControlRec.Control).Font.Style := [fsBold];
        ControlRec.Hovered := True;
      end;
    end
    else
    begin
      // the cursor is not over the control, so let's release the mouse capture, set
      // the style and remember the hovering state
      ReleaseCapture;
      if ControlRec.Control is TNewStaticText then
        TNewStaticText(ControlRec.Control).Font.Style := [];
      ControlRec.Hovered := False;
    end;
  end;
  // call the original window procedure
  Result := CallWindowProc(ControlRec.WndProc, hwnd, uMsg, wParam, lParam);
end;

procedure InitializeWizard;
begin
  with WizardForm do begin
    OuterNotebook.Hide;
    StatusLabel.Caption:='123';
    StatusLabel.Parent:=WizardForm;
    AttachWndProc(StatusLabel, @StaticTextWndProc);
  end;
end;

procedure DeinitializeSetup;
begin
  RestoreWndProcs;
end;

P.S.: on CallbackCtrl.dll see this.
thanks @Nemko ,
But the above mentioned post @Avengerz13 use only a callback to grab the wizardform.Statuslabel. And to feed the caption into TLabel.Is it realy possible?
Exact thing is Posted by @Veskella on this POST
i try to make installer with wizardform as a background and hide the OuterNotebook and InnerNotebook.Then how can i use the Wizardform.statuslabel.caption on (TLabel or label with sprite library ) installtion page.
 
Сверху