FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   FMXInno - Windows Fluent Design Installer UI for Inno (https://fileforums.com/showthread.php?t=104852)

hitman797 09-10-2023 11:45

1 Attachment(s)
FLabel:
function GetText: WideString; don't work.
FTimer:
function GetObject: LongInt;
FFloatAnimation:
function GetObject: LongInt;

Code:

procedure OnTimer6(Sender: TObject);
var
  i: Integer;
  FindHandle: Longint;
begin
  FindHandle:= pFindFiles(FMXLabel[197].GetText, '*', '', ffrkRelative, False, True);
  if FindHandle <> 0 then
  begin
    SetArrayLength(ListBoxItems, pDirCount(FindHandle));
    FMXListBox[3].BeginUpdate;
    try
      for i:= 0 to pDirCount(FindHandle) -1 do
      begin
      ListBoxItems[i]:= InitListBoxItemHandle;
      ListBoxItems[i].FCreate(FMXListBox[3].Handle);
      ListBoxItems[i].Text(ExtractFileName(pPickDir(FindHandle, i)));
      FMXListBox[3].AddItem(ListBoxItems[i].Handle);
      end;
    finally
    pFindFree(FindHandle);
    FMXListBox[3].EndUpdate;
end;
  FMXTimer[6].Enabled(False);
end;
end;


BLACKFIRE69 09-10-2023 21:52

Quote:

Originally Posted by hitman797 (Post 502785)
FLabel:
function GetText: WideString; don't work.
FTimer:
function GetObject: LongInt;
FFloatAnimation:
function GetObject: LongInt;


in the next update of FMXInno, i'll add these missing properties. ;)



Quote:

Originally Posted by hitman797 (Post 502785)
Code:

procedure OnTimer6(Sender: TObject);
var
  i: Integer;
  FindHandle: Longint;
begin
  FindHandle:= pFindFiles(FMXLabel[197].GetText, '*', '', ffrkRelative, False, True);
  if FindHandle <> 0 then
  begin
    SetArrayLength(ListBoxItems, pDirCount(FindHandle));
    FMXListBox[3].BeginUpdate;
    try
      for i:= 0 to pDirCount(FindHandle) -1 do
      begin
      ListBoxItems[i]:= InitListBoxItemHandle;
      ListBoxItems[i].FCreate(FMXListBox[3].Handle);
      ListBoxItems[i].Text(ExtractFileName(pPickDir(FindHandle, i)));
      FMXListBox[3].AddItem(ListBoxItems[i].Handle);
      end;
    finally
    pFindFree(FindHandle);
    FMXListBox[3].EndUpdate;
end;
  FMXTimer[6].Enabled(False);
end;
end;




try this way...


Code:

procedure OnTimer6(Sender: TObject);
var
  ...
begin
  FindHandle:= pFindFiles(FMXLabel[197].GetText, '*', '', ffrkOnlyName, False, True);
  if FindHandle <> 0 then
  begin
    ...
    try
      for i:= 0 to pDirCount(FindHandle) -1 do
      begin
      ...
      ListBoxItems[i].Text(pPickDir(FindHandle, i));
      ...
      end;
    finally
    ...
end;
  ...
end;
end;


BLACKFIRE69 09-10-2023 23:46

FMXInno Updates
 
FMXInno Updates - [2023-Oct-10]

Code:

Changes:

* If someone experiences flickering when switching between dark mode and light mode,
  it has now been fixed.
* Added some missing properties.
* Made some improvements.



The first post has been updated.


.

ADMIRAL 11-10-2023 12:07

Quote:

Originally Posted by audiofeel (Post 502741)
Thanks for the hotfix. It seems that everything you need is working properly.

HI, Is it inno script project or compiler?

ADMIRAL 13-10-2023 06:37

Quote:

Originally Posted by audiofeel (Post 502799)
this will be a scenario for Inno Setup

I tried to make it once when the sample was just made, but I couldn't. Even now, if I want to make it, I won't succeed. If possible, please complete it and share the code so that I can increase my ability to make this type of script.
Thankful

hitman797 13-10-2023 09:41

Quote:

Originally Posted by ADMIRAL (Post 502806)
I tried to make it once when the sample was just made, but I couldn't. Even now, if I want to make it, I won't succeed. If possible, please complete it and share the code so that I can increase my ability to make this type of script.
Thankful

BLACKFIRE69, made this script possible by adding many of the components to this library.
and audiofeel, created this scenario using this library.
So, thanks to them

Jahan1373 13-10-2023 23:05

Icons
 
Hello, thank you for the initiative of this beautiful script and your round-the-clock effort, you can only make it so that you have more than one icon on the desktop, thank you very much.

hitman797 14-10-2023 08:28

6 Attachment(s)
Razor12911, He's going to kill me after this for stealing his work.

Jahan1373 14-10-2023 08:33

https://www.mediafire.com/file/2cddc...rpack.rar/file

Hello, I visited the site about the installation of the metro for almost a year, but it was not as good as this one, but it has problems and it is still not complete. I hope that this movie will solve some problems.

hitman797 14-10-2023 09:20

Quote:

Originally Posted by Jahan1373 (Post 502829)
https://www.mediafire.com/file/2cddc...rpack.rar/file

Hello, I visited the site about the installation of the metro for almost a year, but it was not as good as this one, but it has problems and it is still not complete. I hope that this movie will solve some problems.

...get the number of Files in the Recycle Bin and their total size?
Code:

                 
type
  PSHQueryRBInfo = ^TSHQueryRBInfo;
  TSHQueryRBInfo = packed record
    cbSize: DWORD;
    // Size of the structure, in bytes.
    // This member must be filled in prior to calling the function.
    i64Size: Int64;
    // Total size of all the objects in the specified Recycle Bin, in bytes.
    i64NumItems: Int64;
    // Total number of items in the specified Recycle Bin.
  end;

const
  shell32 = 'shell32.dll';

function SHQueryRecycleBin(szRootPath: PChar; SHQueryRBInfo: PSHQueryRBInfo): HResult;
  stdcall; external shell32 Name 'SHQueryRecycleBinA';

function GetDllVersion(FileName: string): Integer;
var
  InfoSize, Wnd: DWORD;
  VerBuf: Pointer;
  FI: PVSFixedFileInfo;
  VerSize: DWORD;
begin
  Result  := 0;
  InfoSize := GetFileVersionInfoSize(PChar(FileName), Wnd);
  if InfoSize <> 0 then
  begin
    GetMem(VerBuf, InfoSize);
    try
      if GetFileVersionInfo(PChar(FileName), Wnd, InfoSize, VerBuf) then
        if VerQueryValue(VerBuf, '\', Pointer(FI), VerSize) then
          Result := FI.dwFileVersionMS;
    finally
      FreeMem(VerBuf);
    end;
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  DllVersion: integer;
  SHQueryRBInfo: TSHQueryRBInfo;
  r: HResult;
begin
  DllVersion := GetDllVersion(PChar(shell32));
  if DllVersion >= $00040048 then
  begin
    FillChar(SHQueryRBInfo, SizeOf(TSHQueryRBInfo), #0);
    SHQueryRBInfo.cbSize := SizeOf(TSHQueryRBInfo);
    R := SHQueryRecycleBin(nil, @SHQueryRBInfo);
    if r = s_OK then
    begin
      label1.Caption := Format('Size:%d Items:%d',
        [SHQueryRBInfo.i64Size, SHQueryRBInfo.i64NumItems]);
    end
    else
      label1.Caption := Format('Err:%x', [r]);
  end;
end;

{
The SHQueryRecycleBin API used in this method is
only available on systems with the latest shell32.dll installed with IE4 /
Active Desktop.
}


ADMIRAL 14-10-2023 11:09

Quote:

Originally Posted by audiofeel (Post 502809)
To be honest, if I were Blackfire69, I'd tell us to go to hell. I do not know why, but he helps us and you all. And listen... let's all thank him for spending his time with us. Keep it if you can figure it out. I lost interest in him, all hope for Hitman797. And maybe Blackfire69 will hold it.
I warn you right away that he is not ready :o
Everything was pulled out by the hitman797 user with the help of dumps, etc. I immediately warn him that he is not ready, there is no animation of the transition from the waiting page and the directory selection page is not ready.
It completely repeats the original up to the X - Y coordinates
by the way, Razor12911 is a very kind person and has not once communicated with me and with many NPAs in this forum thread. I think he will come to a meeting in and reveal the raw materials of the project in Delphi
P.S a month ago I thought that my country had been minted now I think that everyone has been minted

I must say that you are absolutely right
No matter how much we thank all three of them, it is still not enough for their efforts
Thank you for sharing this script, I am trying to rewrite this script myself so that I can reach a level like I was able to do in React JS.

Jahan1373 15-10-2023 21:53

Hello, audiofeel you have worked hard, I hope you will complete this project, the important thing is you and those who accept you, please don't be offended by what others say and finish the work, hoping for bright days for you and all the friends of the site.

BLACKFIRE69 16-10-2023 06:53

Quote:

Originally Posted by hitman797 (Post 502830)
...get the number of Files in the Recycle Bin and their total size?


@hitman797,

ok, i'll add a new function to retrieve RecycleBin info in a future 'FMXInno' update.
currently, there are no new features or bug fixes to push an update.
so, feel free to use your own library until the next update, especially if you need it right now.


Delphi DLL:

Code:

library AMyDll;
{$R *.res}

const
  C_M_BYTES = 1024 * 1024;

type
  DWORDLONG = UInt64;
  DWORD = FixedUInt;
  LPCWSTR = PWideChar;
  LPSHQUERYRBINFO = ^SHQUERYRBINFO;
  SHQUERYRBINFO = packed record
    cbSize      : DWORD;    // Size of struct SHQUERYRBINFO.
    i64Size    : DWORDLONG; // Files size in Bytes.
    i64NumItems : DWORDLONG; // Files Count.
  end;

function SHQueryRecycleBinW(pszRootPath: LPCWSTR; pSHQueryRBInfo: LPSHQUERYRBINFO): HResult; stdcall;
  external 'shell32.dll' name 'SHQueryRecycleBinW';

function AGetRecycleBinInfo(ARootPath: WideString; var TotalSizeMB: extended;
  var FileCount: Integer): Boolean; stdcall;
var
  RBInfo: SHQUERYRBINFO; // Structure to store RecycleBin info
  RBRoot: LPCWSTR;      // Root path for the RecycleBin query
begin
  try
    // RBRoot <> nil --> Retrieve RecycleBin info from ARootPath.
    // RBRoot =  nil --> Retrieve RecycleBin info from All Drives.
    if Length(ARootPath) = 0 then RBRoot := nil else RBRoot := LPCWSTR(ARootPath);

    RBInfo.cbSize := SizeOf(RBInfo);  // Set the size of the structure

    if SHQueryRecycleBinW(RBRoot, @RBInfo) = S_OK then
    begin
      TotalSizeMB := RBInfo.i64Size / C_M_BYTES;
      FileCount  := RBInfo.i64NumItems;
      Result      := True;
    end else
      Result      := False;
  except
    Result        := False;
  end;
end;

exports
  AGetRecycleBinInfo;

begin
end.



InnoSetup:

Code:

function AGetRecycleBinInfo(ARootPath: WideString; var TotalSizeMB: Extended; var FileCount: Integer): Boolean;
  external 'AGetRecycleBinInfo@files:AMyDll.dll stdcall';


procedure TestBtnClick(Sender: TObject);
var
  TotalSizeMB: Extended;
  FileCount: Integer;
begin
  if AGetRecycleBinInfo('', TotalSizeMB, FileCount) then
  begin
    Memo.Lines.Add(format('RecycleBin Files Size:      < %0.2n GB >', [TotalSizeMB / 1024]));
    Memo.Lines.Add(format('RecycleBin Files Count:  < %d >', [FileCount]));
  end else
    Memo.Lines.Add('AGetRecycleBinInfo Error!')
end;


.

hitman797 16-10-2023 07:14

Quote:

Originally Posted by BLACKFIRE69 (Post 502852)

ok, i'll add a new function to retrieve RecycleBin info in a future 'FMXInno' update.
currently, there are no new features or bug fixes to push an update.
so, feel free to use your own library until the next update, especially if you need it right now.
.

Great work, thanks for the library.
I will use this library until the update is released to FMXInno. :rolleyes:

Tihiy_Don 16-10-2023 22:32

Quote:

Originally Posted by BLACKFIRE69 (Post 502852)
@hitman797,
ok, i'll add a new function to retrieve RecycleBin info in a future 'FMXInno' update.
currently, there are no new features or bug fixes to push an update.
so, feel free to use your own library until the next update, especially if you need it right now.


I have been using your library for a long time in my distributions, as well as repacks from FMXTeam.

P.S. I'm still waiting for the implementation of creating a form with a background in the form of a video.


All times are GMT -7. The time now is 08:16.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com