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)

BLACKFIRE69 24-02-2024 05:40

FMXInno - Updates
 
1 Attachment(s)
* FMXInno - Updates [2024-Feb-24]


Code:

1. Integrated all updates up to this point.
2. Removed FMXInno's memory (RAM) truncation.
3. Fixed issues with invalid handles and owners.
4. Resolved some memory leaks.
5. Addressed previously encountered issues.
6. Implemented various improvements.
7. Updated all examples to Inno Setup 6.2.2.
8. Compiled with RadStudio 12 Athens + Patch 01.
9. This build is free from false positive trojans.



The first post has been updated; check it out.



.

BLACKFIRE69 26-02-2024 06:44

FMXInno - Final Release: Hotfix_01
 
FMXInno - Final Release: Hotfix_01


* The FMXInno final build includes three main types of FMXInno libs. (yes, i should have mentioned these facts earlier; i really forgot, sorry.)


Code:

1. FMXInno Standard:
  - Contains all FMXInno features.
  - Path1: .\Files\FMXInno.dll
  - Path2: .\FMXInno+FXPacker\Files\FMXInno.dll

2. FMXInno Standard + SKIA:
  - Includes all Standard features and SKIA features.
  - Path: .\SKIA\FMXInno.dll
  - Requires 'sk4d.dll' to be next to 'FMXInno.dll'.

3. FMXInno Standard + Blend2D:
  - Combines Standard features with Blend2D features.
  - Path: .\_Blend2D\Files\FMXInno.dll
  - Requires 'blend2d_win32.dll' to be next to 'FMXInno.dll'.



================================================== =========

* in the latest final release (FMXInno + SKIA + Blend2D - Final Release [2024-Feb-24]), i also forgot the following:

Code:

1. For SKIA:
  a. To replace Firemonkey canvas with SKIA canvas.
  b. To enable GPU Acceleration.

  >> Resulting in the lowest FPS rate and the experience of slow animations and lags.

2. For XBass_F:
  a. To adjust to be compatible with new changes.

  >> Resulting in unexpected behavior and crashes when closing the 'setup.exe'.

3. Additionally, i slightly sped up the Dark-Light mode transition.



thanks to @audiofeel for reporting these bugs.



================================================== =========

* to apply Hotfix_01:

Code:

1. Just replace the old files with the new ones.



.

BLACKFIRE69 27-02-2024 17:30

FMXInno - News
 
FMXInno - News


Quote:

1. just uploaded the FMXInno project to GitHub, but it's not published yet. it'll be available for everyone someday (, or perhaps never). ;)




.

hitman797 01-03-2024 02:29

FMXInno features
 
1 Attachment(s)
HI, @BLACKFIRE69, :o can you add Radiant Shapes to the FMXInno. ;)
  • Radiant Parallelogram.
  • Radiant Hexagon.

Fak Eid 05-03-2024 11:21

Auto Update Directory Space on Directory Edit
 
1 Attachment(s)
Code for Edit Box
Code:

  Page2Edit.FCreate(Page2.Handle);
  Page2Edit.SetBounds(NSSX(100), NSSY(190), NSSX(520), NSSY(35));
  Page2Edit.FontSetting('{#FontName}', VCLFontSizeToFMX2(13), ALGainsBoro);
  Page2Edit.CanFocus(True);
  Page2Edit.Enabled(True);
  Page2Edit.Text(MinimizePathName(WizardForm.DirEdit.Text, WizardForm.DirEdit.Font, WizardForm.DirEdit.Width));
  Page2Edit.OnTyping(@BrowseEditOnChange);


Logic for procedure
Code:

procedure BrowseEditOnChange(Sender: TObject);
var
  PrevDrive, CurrentDrive: String;
begin
  PrevDrive := ExtractFileDrive(WizardForm.DirEdit.Text);
  CurrentDrive := ExtractFileDrive(Page2Edit.GetText);

  // Set the installation path to the edited text value
  WizardForm.DirEdit.Text := Page2Edit.GetText;

  if PrevDrive <> CurrentDrive then
    DirUpdateProc(nil);
end;

Logic for Directory Update Procedure:
Code:

procedure DirUpdateProc(Sender: TObject);
begin
  DiskUsage.SetDir(WizardForm.DirEdit.Text);
  SelectDirLabel[3].Text('Total Space - ' + MbOrTb(DiskUsage.TotalSpace, 1) + #13 +
                        'Available Space - '+ MbOrTb(DiskUsage.FreeSpace, 1) + #13 +
                        'Repack Size - ' + MbOrTb({#RepackSize}, 1));
  if Round(DiskUsage.FreeSpace) > StrToInt('{#RequiredSpace}') then
  begin
    WizardBtn[4].Enabled(True);  //Install Button enabled if there is space
  end else
  begin
    WizardBtn[4].Enabled(False); //Install Button disabled if no space
    ShowMessage('Not Enough Space', 'Selected Directory does not have required space. Please select a different directory location.');
  end;
end;


Fak Eid 05-03-2024 11:34

Common Code to extract Data/Component Files
 
Declare a global variable DiskSkip in the top
Code:

var
DiskSkip: Boolean;

Updated changes here:
Code:

procedure CurStepChanged(CurStep: TSetupStep);
var
  i: Integer;
begin
  DiskSkip:= False;
  if CurStep = ssInstall then begin
    ISArcExCancel := 0;
    ISArcExDiskCount := 0;
    ISArcDiskAddingSuccess := False;
    ISArcExError := True;

    #include "Game/UnpackTools_Init.iss"
    { - ADDING DISKS: BEGIN -}
    repeat
      {< Main Archives >}
      #ifdef Data1
        VerifyFileExist('Data-01.bin');
        if DiskSkip then break;
      #endif
      #ifdef Data2
        VerifyFileExist('Data-02.bin');
        if DiskSkip then break;
      #endif

      {< Components >}
      #ifdef Component1
        if Checkbox[8].ISChecked then
        VerifyFileExist('selective-english.bin');
      #endif
      #ifdef Component2
        if Checkbox[9].ISChecked then
        VerifyFileExist('selective-bonus.bin');
      #endif
      until true;
    { - ADDING DISKS: END -}

      ISArcExStop;
      if ISArcExError then
        ShowMessage('Installation was interrupted', 'Either the installation has been cancelled by the user,' +#13+ 'or the files are corrupted.');
      end else if not (ISArcDiskAddingSuccess) and (DiskSkip) then
        ShowMessage('Installation is corrupted', 'Required disks could not be located.');


Common procedure to handle all Data files
Code:

procedure VerifyFileExist(FilePath: WideString);
var
  sPath, sFile: WideString;
  sExt: String;
begin
  sPAth := AddBackslash(ExpandConstant('{src}'));
  if FileExists(sPAth + FilePath) then begin
    ISArcDiskAddingSuccess:= ISArcExAddDisks(sPAth + FilePath, '{#DiskPassword}', ExpandConstant('{app}'));
    if not ISArcDiskAddingSuccess then begin
      DiskSkip:= True;
      Exit;
    end;
    ISArcExDiskCount := ISArcExDiskCount + 1;
  end else
    begin
    ShowMessage('Setup Needs the Next Disk', 'Please browse Disk: [ ' + FilePath +  ' ] after closing this prompt'#13#10'If this disk can be found in another folder, browse to the correct path.');
    sExt:= ExtractFileExt(FilePath); StringChange(sExt, '.', '');
    if OpenFileModern(FMXForm.HandleHWND, sExt, FilePath,  sPAth, 'Please specify the location of the next disk', sFile) then
    begin
      sPAth := ExtractFilePath(sFile);
      ISArcDiskAddingSuccess:= ISArcExAddDisks(sPAth + FilePath, '{#DiskPassword}', ExpandConstant('{app}'));
      if not ISArcDiskAddingSuccess then begin
        DiskSkip:= True;
        Exit;
      end;
      ISArcExDiskCount := ISArcExDiskCount + 1;
    end else begin
      ISArcDiskAddingSuccess := False;
      DiskSkip:= True;
      Exit;
    end;
  end;
end;


Fak Eid 08-03-2024 03:09

Issue with FCustomFluentWindow
 
1 Attachment(s)
Hi @BlackFire,

I have identified that in 1080p the Form doesn't pop-up at the center of the screen, it is slightly to the left. This is not happening with everyone.

Another issue with FCustomFluentWindow is if once triggered it keeps on popping-up repeatedly and cannot be closed.

Code:

MessageForm.FCreate(FMXForm.HandleHWND, True, False, 0.56, 0);
Temporary fix where it doesn't happen
Code:

MessageForm.FCreateBlankForm(FMXForm.HandleHWND, ALBlack, '');
This is also happening for few people. I'm using a gaming mouse but macro is not enabled. Can you please take a look or let me know the reason or fix?

I've created two videos associated to this. Copy-paste the link after 'youtube.com/' as I'm unable to post the link because they get automatically parsed.
Code:

watch?v=lKhINB7hyBY&ab_channel=FaKEid
Issue notified at 00:40 - 1:30
Code:

watch?v=xopBfI90T-g&ab_channel=FaKEid
Edit : Added GIF to display the issue

Fak Eid 08-03-2024 06:48

Yes the issue is the resolution scale. In 100%, it comes completely in the center of the screen, but in 125%, it is slightly to the left.

I'm not using any custom theme file here. No code changes here, just the default template shared by @Blackfire for WPI Corepack and the issue is happening for FCustomFluentWindow for me.

BLACKFIRE69 12-03-2024 03:52

FMXInno Dev
 
2 Attachment(s)
Hola everyone,

This is the FMXInno official development library, encompassing all features. my intention with this update is to address known issues so far. therefore, i need your assistance in testing it, especially in this development build. i intend to ensure the correct behavior of forms, including proper scaling and positioning.

Code:

1. Note: This is in the development stage and not recommended for use in production.

2. Don't forget to share your feedback and feel free to report any bugs you discover.



Quote:

* Information:

1. Rewrote some core/fundamental code, including forms, etc.:

-- Ensures correct scaling and positioning of forms and FMX objects.
-- All forms will now be centered on the screen.

-- Disabled file size reduction tricks and temporary memory management.
-- Replaced all animations with TAnimator for better performance.

-- Some features (e.g., MinimizeWindowCustomAnimated) have been deprecated due to issues; they can still be called but will have no effect.
-- NewScaller is no longer part of FMXInno, so make sure to remove all related functions (NS, NSS, etc.) from your scripts.

-- The new FForm will be slightly shorter in width/height as the extra frame width is not added to it.
-- When testing with higher DPI values and using .style files, ensure the .style file is HigherDPI-Aware.

-- Some features may not function properly on older systems like Windows 7. Since many developers, including Microsoft, have ceased support for outdated systems, my priority is to ensure compatibility with currently active systems such as Windows 10 and Windows 11.

-- Additionally, there's no guarantee that any issues encountered through virtual machines (VMware, etc.) will be resolved.

-- For 'FCustomPage', use 'Page#.Visible(False)' in 'FMXDesigning' to avoid visibility of all pages at setup startup.
Code:

Example:

procedure FMXDesigning;
begin
  {...}
  Page1.FCreate(FMXForm.Handle);
  Page1.Visible(False);
 
  {...}
 
  Page2.FCreate(FMXForm.Handle);
  Page2.Visible(False);
  {...}
end;


Quote:

2. Rewrote some fluent effects code:

-- Ensures FluentForms react only to system color mode (light/dark) changes.
-- 'SetActiveThemeModeAwareness' will be ignored if the form is minimized.


3. Download the attachment below and perform tests under the following conditions:

OS:

- Windows 11
- Windows 10
- Windows 8 / 8.1 ( Optional )
- Windows 7 ( Optional )

DPI:

- 100%
- 125%
- 150%, etc.



4. Also, test with your own scripts:
-- Replace your current 'FMXInno.dll' and 'FMXInnoHandle.iss' with the provided ones.


5. Some users have reported that it takes a bit of time to compile their scripts. this is because it takes time to read the default 'FMXInnoHandle.iss', which contains declarations of all features. if you have enough experience to deal with it, you can remove unused code from it for your specific script, which may help.

Code:

* FMXInno Form Types:

1. Normal Form:
  -- This is just an FMX layer; you can create any FMX object over it.
  -- You can still see through and access every InnoSetup object as this is a layer.

2. Blank Form:
  -- A standard FMX form filled with a solid color or an image by default.

3. Fluent Form / Fluent Color Form / Fluent Null (no-color) Form:
  -- FMX forms that have enabled Windows Fluent (or Acrylic/Aero) effects by default.

4. Gradient Form:
  -- A standard FMX form filled with a gradient color by default.

5. Image Form:
  -- An FMX form based on an image (form has the same shape as the image).

6. Background image scrolling Form:
  -- An FMX form that has a scrolling image background according to mouse movements.


Quote:

* Scaling:

1. Note that there's no guarantee for any custom scaling value for correct scaling (see first screenshot).
2. Make sure to use only the values supported by your display (see second screenshot).



.

Fak Eid 15-03-2024 00:32

Help with Animation of FCustomPage
 
1 Attachment(s)
Can someone help me in animating this section down on the click of 'i' (info button) ? Check the gif:
Page[1]: FCustomPage;
PageContent[1]: FRectangle;

Code:

  Page[1].FCreate(ShadowImg.Handle);
  Page[1].Visible(False);

  PageContent[1].FCreate(Page[1].Handle);
  PageContent[1].FillColor(HTMLColorStrToFMXColor('#1f2227'));
  PageContent[1].SetBounds(20, 70, 780, 150);
  PageContent[1].Opacity(0.85);
  PageContent[1].CornerStyle(2, 2, [tcTopLeft, tcTopRight, tcBottomLeft, tcBottomRight], ctRound);


Fak Eid 15-03-2024 12:39

Issue resurfaced with FCreateBlankForm
 
2 Attachment(s)
Hi @Blackfire

The earlier issue with FCreateBlankForm, where it loads with a blank image before load, has resurfaced. When running for the first time it is for more time, it subsequently gets faster (depending upon SSD/HDD, I suppose). Can you please look into it?

I'm not sure if there is already a fix for it, as I lost track of some recent changes in FMXInno. If there is a fix, let me know.

Image and gif added for review.

hitman797 15-03-2024 14:18

Quote:

Originally Posted by Fak Eid (Post 503880)
Hi @Blackfire

The earlier issue with FCreateBlankForm, where it loads with a blank image before load, has resurfaced. When running for the first time it is for more time, it subsequently gets faster (depending upon SSD/HDD, I suppose). Can you please look into it?

I'm not sure if there is already a fix for it, as I lost track of some recent changes in FMXInno. If there is a fix, let me know.

Image and gif added for review.

add this to the code.
Code:

procedure InitializeWizard();
begin
  FMXForm.Show;
end;


BLACKFIRE69 15-03-2024 22:45

FMXInno - Cumulative Update
 
FMXInno: Cumulative Update - [2024-Mar-15]


What's New:

Code:

* Merged FMXInno Dev into this.
* Updated ISArcEx to the latest version.
* Made some improvements and bug fixes.
* This update addresses most of the previous issues.
* Added Radiant Shapes.
* Introduced new properties to classes.
* WinTitleBar will now display the application icon by default.
* Not compressed by default.
  - No Exe compressor or file reduction tricks were used.
* Implemented new functions.

Quote:

- function MbOrTbEx(Float: Extended; Decimal: Integer; sMb, sGb, sTb: WideString): WideString;
- function MHzOrGHzEx(Float: Extended; Decimal: Integer; sMz, sGz, sTz: WideString): WideString;

etc.


.

BLACKFIRE69 19-03-2024 20:48

FMXInno - Final Release
 
10 Attachment(s)
Quote:

Originally Posted by BLACKFIRE69 (Post 503884)
FMXInno: Cumulative Update - [2024-Mar-15]


What's New:

Code:

* Merged FMXInno Dev into this.
* Updated ISArcEx to the latest version.
* Made some improvements and bug fixes.
* This update addresses most of the previous issues.
* Added Radiant Shapes.
* Introduced new properties to classes.
* WinTitleBar will now display the application icon by default.
* Not compressed by default.
  - No Exe compressor or file reduction tricks were used.
* Implemented new functions.




FMXInno - Final Release [2024-Mar-20]


What's new:

Quote:

* This update will extend from FMXInno Dev [2023-Mar-15].

- Make sure to refer to the last previous changelog to check out the new changes.

* Added a new Fluent Form (FluentBlendedColor).

- This is also a standard Fluent Form, but this new form will blend with the Windows colors (Accent or Desktop Image) along with standard Fluent colors.
- The reason for this new form is for Fluent forms to have a more realistic and modern look.
- Supports both Dark/Light modes and custom color mode.
- Also supports some possible customizations.
- Check out the screenshots to see the differences between standard Fluent forms at standard opacity level (Opacity = 0.56).

* Added built-in SVG image support.

- Rendering engine: Image32

* Windows title bar is now more customizable.

- Custom Application Icon instead of the default one.
- Titlebar Color.
- Button Colors.
- Titlebar Background Effects, and so on.

* SKIA and Blend2D are now optional.

- SKIA and Blend2D are optional from now on because they require external dependencies (sk4d.dll, blend2d_win32.dll).
- You can still have them, but you have to download them manually.

* Added Image32 - 2D Graphic Library.

- Image32 will take the place of SKIA and Blend2d from now on, especially because it does not require external dependencies and has average performance compared to SKIA and Direct2D.
- Image32 is not enabled by default for public use; for now, it's for my personal use only (because i'm pretty sure no one will use it directly in their projects. ;))
- More info about Image32: Image32 is a 2D graphics library

* Added new properties for classes.

* More bug fixes and improvements.

* Plugin folder has been cleaned up.

- Removed unwanted plugins from the directory.
- Re-compiled all the plugins to make sure everything is up to date.

* All the examples have been revised.

- Now the default compression will be 'lzma2/ultra64'.

* Also, added new examples.

* Extended support for Windows 11 24H2.

Code:

function FCreateFluentBlendedColor(WParent: HWND; DarkTheme, NoBorder: Boolean;
  Opacity: Single; BrightnessPct: Byte; BlendColorMode: TBlendColorMode): HWND;

function FCreateFluentBlendedColorEx(WParent: HWND; DarkTheme, NoBorder: Boolean;
  Opacity: Single; BrightnessPct: Byte; BlendColorMode: TBlendColorMode;
  BlendColorLvl: Integer): HWND;

function FCreateFluentBlendedColorEx2(WParent: HWND; VCLColor: TColor;
  DarkTheme, NoBorder: Boolean; Opacity: Single; BrightnessPct: Byte;
  BlendColorLvl: Integer): HWND;


Note: The first post has been updated; check it out.



.

BLACKFIRE69 20-03-2024 08:43

FMXInno: Minor Update
 
2 Attachment(s)
FMXInno: Minor Update for [Mar-20]


Quote:

* Added two methods to the UWP class that select a specific UWP tile.

* Now supports FluentBlendedColor option in other forms as well (CustomForm, Dir/Start Form).

* Added missing method 'SetApplicationIconFromFXStream' to the 'FWinTitleBar' class.

UWP Tile Selection:
Code:

procedure TileSelect(ATile: LongInt);
procedure TileSelectEx(ATile: LongInt; MouseOverColor: TAlphaColor);

Example:

UWPTiles.TileSelect(Tile[5]);
UWPTiles.TileSelectEx(Tile[5], ALRed);


How to update:
Code:

1. Download the latest update from the first post.
2. Replace the 'FMXInno.dll' and 'FMXInnoHandle.iss' with the provided ones.



.

BLACKFIRE69 27-03-2024 06:48

FMXInno: Minor Update
 
1 Attachment(s)
FMXInno: Minor Update - [2024-Mar-27]


Code:

* Added the FColorComboBox class.
* Prevented forms from being resized.
* Added the following new functions:

function IsValidVCLColor(const AColor: TColor): Boolean;
function IsValidFMXColor(const AColor: TAlphaColor): Boolean;

function IsLightFMXColor(const AColor: TAlphaColor): Boolean;
function IsLightVCLColor(const AColor: TColor): Boolean;


IsLightFMXColor:
Quote:

> in some cases, 'IsLightFMXColor' is useful for determining the font colors based on the background color or background image color. here's how it can be used:
Code:

procedure ClrBxOnChange(Sender: TObject);
var
  CtrlClr: TAlphaColor;
begin
  CtrlClr := AClrBx.GetColor;

  if IsLightFMXColor(CtrlClr) then
    AText.Color(ALBlack)
  else
    AText.Color(ALWhite);

  ARect.FillColor(CtrlClr);
end;

Code:

Extra:

function DesktopImgExist: Boolean;

function GetDesktopImgColorFMX: TAlphaColor;
function GetDesktopSolidColorFMX: TAlphaColor;

function GetImgColorFMX(const Image: UnicodeString): TAlphaColor;
function GetImgPartColorFMX(const Image: UnicodeString;
  const PixelX, PixelY, PixelW, PixelH: Single): TAlphaColor;


How to update:
Code:

1. Download the latest update from the first post.
2. Replace the 'FMXInno.dll' and 'FMXInnoHandle.iss' with the provided ones.



.

BLACKFIRE69 28-03-2024 11:40

FMXInno - Windows 8
 
1 Attachment(s)
FMXInno - Windows 8


Quote:

even though i'm not a fan of Windows 8 like many others, i do like the background color transition during its installation. what are your thoughts?




.

Jahan1373 28-04-2024 01:12

Link dwnlad
 
Quote:

Originally Posted by Fak Eid (Post 501521)
Hi audiofeel,

Well, please refer the files. To reproduce the issue:
1. The required files in the Output are obviously missing. So, start the installer normally and navigate to Installation tab. It will show you some error like: Required Files Missing.

2. Try to close it and quit the installer. It doesn't happen. Hard close using Task Manager.

3. Now, open the installer again and try to quit at any point of time. It doesn't close.

Let me know if you're able to refer this link:
https://www.mediafire.com/file/ohrzl...dated.zip/file

I know there can be some issue with my code. But, if you can help me, I'll learn from you

Link dwnlad

BLACKFIRE69 29-04-2024 07:02

FMXInno - Update
 
9 Attachment(s)
FMXInno - Final Release [2024-Apr-29]


* What's New:

Quote:

* This update focuses on quality improvements, stability enhancements, and minimizing memory leaks.

-- Features like FMXInno Copilot, Widgets, and certain modern features have been postponed to avoid adding bloatware to FMXInno.
-- However, you can test them out on FMXInno-Dev, and I'll provide updates on their availability in the future.

* Introduced a new Error Handling Mechanism.

-- Previous versions of FMXInno lacked proper error handling because I prioritized adding new features and improvements over it.
-- With this update, I've enhanced the stability of FMXInno,
-- Ensuring that the new error handling significantly benefits you by preventing installer crashes and access violation errors.

* Compiled with the latest version of RadStudio (RadStudio Athens 12.1 - 04/Apr/2024).

-- This ensures that everything is up-to-date.
-- Providing high-quality performance and rendering.
-- High-DPI support.
-- Complete compatibility with Windows 11.
-- Increased Windows API availability.
-- And improved coding efficiency.

* Fixed HTMLText and added support for opacity.

-- Previously, HTMLText had issues with opacity, which have now been resolved.

* Fixed WebView2 to ensure proper setup closure.

-- Updated WebView2 to the latest version and made necessary improvements.
Code:

Example:

procedure DeinitializeSetup();
begin
  AWebView.Stop;
  AWebView.Shutdown;
  FMXInnoShutDown;
end;

Quote:

* Improved SKIA for high performance.

-- SKIA relies on the GPU and minimally affects the CPU, making it suitable for use in your installer.

* Although SKIA and Blend2D are kept separate from the standard FMXInno for now, both versions are provided in the attachment.

-- In the future, they will need to be downloaded separately.

* The Image32 Engine remains unavailable for public use.

-- As many FMXInno users may not be familiar with it.

* Various improvements and bug fixes.

-- No software is without issues, so we continue to address them with each update.

* Updated the '_InstallerGenerator' app.

-- Now includes a built-in Inno Script Editor + Compiler.

* Ready to use with the upcoming InnoSetup v6.3.0.

* Added a new example for setup language selection.


Note: The first post has been updated; check it out.



.

Tihiy_Don 29-04-2024 10:29

Good afternoon! Some users, on any systems, have a problem when the installer process hangs in the processes and the form does not open. It occurs extremely rarely, in about 5-10 percent of users. I hope this issue has been fixed in this version. I tried to change different types of forms, the result is the same.

BLACKFIRE69 30-04-2024 11:15

1 Attachment(s)
Quote:

Originally Posted by Tihiy_Don (Post 504355)
Good afternoon! Some users, on any systems, have a problem when the installer process hangs in the processes and the form does not open. It occurs extremely rarely, in about 5-10 percent of users. I hope this issue has been fixed in this version. I tried to change different types of forms, the result is the same.



users sometimes report this issue, but until now, i couldn't come up with a better solution.

let's dive a little deeper into this. in FMXInno, all the forms (FluentForm, BlankForm, ImageForm, etc.) are based on a single form called 'TFMXFluentF', which is a modified Firemonkey TForm specifically used for FMXInno. i think this could be the main reason for all of this. So, that's how i came up with this new idea.

i've introduced a new form called 'ClassicForm' into FMXInno. so, what is the 'ClassicForm'? Is it another blank form or something else? actually not, it's an original Firemonkey TForm which is exactly the same as the one Mr. Jiva Newstone used in 'ISFMXFW'.

First of all, let's check out the key differences between FMXInno's TFMXFluentF and ISFMXFW's TForm:

Code:

- FMXInno's TFMXFluentF:
  1. This replaces the WizardForm when creating.
  2. It has more control over this.
  3. It can have Fluent effects on this.

- ISFMXFW's TForm:
  1. This is parented to the WizardForm, nothing is replaced.
  2. It has limited controls.
  3. Fluent effects cannot be used on this.


so, how is the 'Classic' form gonna fix this issue? my idea is to have two modes for the same installer as a backup using 'Classic' forms. to do so, we can use command-line parameters in case the setup is unable to run with the 'TFMXFluentF'. we can easily do that using a batch file, and the following simple example will show you how to do that.


Code:

var
  IsClassicMode: Boolean;

function InitializeSetup(): Boolean;
begin
  IsClassicMode := CmdLineParamExist('/Classic');

  FMXInnoInit;
  Result := True;
end;

procedure InitializeWizard();
begin
  EmptyWizardForm(True, 640, 480);

  // Music ...

  FMXDesigning;
  FMXForm.Show;

  if IsClassicMode then
    pTaskbarPreview(True) // or pTaskbarPreviewEx(WizardForm.Handle, True);
  else
    pTaskbarPreviewEx(FMXForm.HandleHWND, True);
end;

procedure FMXDesigning;
begin
  { FMX Form }
  if IsClassicMode then
    FMXForm.FCreateClassicForm(WizardForm.Handle, ALMoneyGreen, '')
  else
    FMXForm.FCreateFluent(WizardForm.Handle, False, False, 0.56, 0);

  FMXForm.SetCursor(ExtractAndLoad('Dark.cur'));
  ...
end;

Code:

Bat File:

@echo off
cd /d "%~dp0"

start "" "_Setup1.exe" /Classic


in this way, you can try the classic mode if the installer is unable to run with modern forms. (because of the classic form, FMXInno may support old OS like Windows 7. i'm not sure because i don't have any virtual machine or bare metal right now to test it out.)

there're some facts you should notice when using the classic forms:

Code:

1. EmptyWizardForm - the 'Buttons' parameter should always be 'True'.
  eg: EmptyWizardForm(True, 640, 480);

2. pTaskbarPreviewEx - the 'hwnd' parameter should always be 'WizardForm.Handle'.
  eg: pTaskbarPreviewEx(WizardForm.Handle, True);


in the attachment, i've included two examples: a simple example and the Modern FitGirl Installer example with both Normal and Classic modes. run the batch files to see the differences. the following screenshot will show you the Modern FitGirl installer in both normal and classic mode. (remember, classic forms are always borderless rectangle forms, and we cannot control the border style.)

also, the first post has been updated with the new update.


.

Tihiy_Don 01-05-2024 08:11

Thank you - this is exactly what I need, I will try to implement the installer on it and test it on users. Unfortunately, I also could not identify any consistency with this problem, it sometimes occurs on windows 11, 10 and 7. Someone solved this problem by rebooting the operating system, but others did not. I also sent you a message on krinkels related to unpacking the archives, please read it as you have free time.

Fak Eid 10-05-2024 09:28

3 Attachment(s)
Hi @Blackfire69,

Can you please help me with following additions/workaround to FMX Libraries as I require them on a Project I'm working in:

1. Can we fetch the drive's name (Picture 1)?

2. Functionality to have sharp corners on FCustomFluentWindow?
Edit: Audiofeel helped with this. Thank you
Code:

InstallPage.FCreateBlankForm(FMXForm.HandleHWND, HTMLColorStrToFMXColor('#25282f'), '');

InstallPage.Show;
SetWin11FormCorners(InstallPage.ParentHandleHWND, ctw11Sharp);

3. Functionality to have FImgSlideShow or FFormImgSlide inside FRectangle (not HWND)

4. A variable on ProgressCallback to fetch the total disk size extracted in case of multiple disks. I tried doing (Installation % * Size) div 100 but it is just workaround. (Picture 2 & 3 for reference)

5. In some cases, the CpuUsage.Name gives value seperated by Tabs. Any way to remove that? Like:
Processor: { Tab Space } AMD Ryzen 9

6. How to right align a FLabel/FText? It is not working or an example please.
Edit: Audiofeel helped with this. Thank you
Code:

ALabel.FCreate(PageContent[3].Handle, '57.2 GB');
ALabel.SetBounds(500, 165, 70, 20);
ALabel.FontSetting('{#FontName}', 11, {#SelectedFontColor});
ALabel.FontStyle([fsBold]);
ALabel.TextSetting(False, txTrailing, txCenter);

7. FCombineText: if have 0 Tab space must get the width of Text 1 and Text 2 should start after some space

With the new FMXInno, so many error messages keep popping up. Can you please have a toggle to turn them off or bypass?

BLACKFIRE69 11-05-2024 09:01

FMXInno - Updates
 
7 Attachment(s)
FMXInno Cumulative Update - [2024 May 11]

Code:

* Improvements in the code.
* Cleaned up the code a bit and removed duplications.
* More stable.

* This build could be more efficient than the previous one.
  - Ensured compatibility with Windows 11 24H2.

* Added a new class to deal with INI files.
  - Now you can handle even complex INI files more easily.
  - Check the example in the attachment.

* Added a new class for All-in-One array.
  - Now you can have multiple data types in one array.
  - Supports 11+ data types by default.
  - More data types will be added upon request.
  - Easy to manipulate.
  - Check the example in the attachment.

* Updated FLogicalDrives class.
  - Added a new property called 'Disk Name'.
  - Check out the 'Example_LogicalDrives.iss'.

* Updated FXStream.
  - FXPckr can hold InnoSetup's encrypted password.
  - Updated encryption.
  - Fixed minor bugs related to FCreateFXStream.
  - This version doesn't support previous versions.

* Updated FCheckboxTree class.
  - Now, the OnChange events of checkboxes are handled automatically by the FMXInno internally.
  - To override it and have manual OnChange events, you have to call 'OverrideDefaultOnChangeEvent'.
    eg: Pg4ChkbxTree.OverrideDefaultOnChangeEvent;

* Updated WebView2 class.

* Updated license agreement.



================================================== =================

>> FMXInno hangs on Taskbar <<

Now we've evidence that the main cause of this issue is the custom font. Generally, I use the following three functions to install custom fonts into the installer:

Code:

1. InstallFMXFont
2. DeleteFMXFont
3. InvalidateFMXFont

Instead of using these three functions, try the following functions for custom fonts for now:

Code:

1. AddFontResource2
2. RemoveFontResource2

I've updated the examples, so you can check them out to see how to use these functions.

Thanks to @Tihiy_Don for conducting some tests on this.



The first post has been updated.



.

ScOOt3r 12-05-2024 12:30

Thanks @Blackfire69 this fixes my issue of the same thing to.. works Great!

ScOOt3r

BLACKFIRE69 13-05-2024 00:36

Quote:

Originally Posted by Fak Eid (Post 504421)
With the new FMXInno, so many error messages keep popping up. Can you please have a toggle to turn them off or bypass?

Quote:

Originally Posted by audiofeel (Post 504453)
I think it's better for us to catch errors than for users not to ?


  • The new error handler is a little bit tougher because effective error management is key to reducing runtime errors, especially. This approach forces you to explicitly handle errors and null values, making your code clearer and safer.

  • The new error handler provides more informative error messages tailored to specific situations, making it very convenient to deal with.

  • Why didn't previous versions display these error messages? Because they lacked an error handler altogether, thus allowing any errors to go unnoticed and potentially causing issues.


The error handler will remain active; I won't permit bypassing it. ;)



.

Fak Eid 13-05-2024 07:52

Quote:

Originally Posted by BLACKFIRE69 (Post 504454)
The error handler will remain active; I won't permit bypassing it. ;)
.

No issues. Completely understandable. I'll just rewrite my code again. Can you please implement 4, 5 and 7 (optional, if possible).

BLACKFIRE69 14-05-2024 03:50

Quote:

Originally Posted by Fak Eid (Post 504459)
No issues. Completely understandable. I'll just rewrite my code again. Can you please implement 4, 5 and 7 (optional, if possible).



Quote:

Originally Posted by Fak Eid (Post 504421)
Hi @Blackfire69,

3. Functionality to have FImgSlideShow or FFormImgSlide inside FRectangle (not HWND)

1. 'FImgSlideshow' requires its parent as 'HWND' because it's originally based on a VCL component.
2. You can create a 'FFormImgSlide' on an 'FRectangle' because its parent's type requires 'TFMXObject'.



Quote:

Originally Posted by Fak Eid (Post 504421)

4. A variable on ProgressCallback to fetch the total disk size extracted in case of multiple disks. I tried doing (Installation % * Size) div 100 but it is just workaround. (Picture 2 & 3 for reference)

the callback function already has too many parameters, so i'll add two new functions instead.

Code:

function ISArcExGetTotalSizeMBOfAllDisks: Integer;
  --> Uncompressed (Original) size of all the disks (in MB).

function ISArcExGetExtractedSizeMBOfAllDisks: Integer;
  --> Currently extracted size of all the disks (in MB).

Code:

Example:

function ProgressCallback(...): longword;
var
  S: WideString;
begin
  ...

  // Extra: Titlebar Caption
  S := 'Total Extraction:  ' + IntToStr(ISArcExGetExtractedSizeMBOfAllDisks) +
      '  MB  /  ' + IntToStr(ISArcExGetTotalSizeMBOfAllDisks) + '  MB';

  WizardForm.Caption := S;

  Result := ISArcExCancel;
end;

Code:

Stats:

data1.bf  ==  914 MB
data2.bf  ==  764 MB
data3.bf  ==  613 MB

Total == 2,291 MB



Quote:

Originally Posted by Fak Eid (Post 504421)

5. In some cases, the CpuUsage.Name gives value seperated by Tabs. Any way to remove that? Like:
Processor: { Tab Space } AMD Ryzen 9

Code:

  Something := Trim(CpuUsage.Name);


Quote:

Originally Posted by Fak Eid (Post 504421)

7. FCombineText: if have 0 Tab space must get the width of Text 1 and Text 2 should start after some space

To use spaces instead of tab spaces, use a 'Negative' value for 'Tabs'.
  • Positive values for Tabs:
    • 1 = One Tab
    • 2 = Two Tabs
    • 3 = Three Tabs
    • etc.

  • Negative values for Tabs:
    • -1 = One Space
    • -2 = Two Spaces
    • -3 = Three Spaces
    • etc.


Code:

{ ACombineText }
ACombineText.FCreate(FMXForm.Handle, 50, 80, 'The Module Name:', 'FMXInno.dll', -3, False);

ACombineText.Text1Setting('Segoe UI SemiBold', 16, ALBlack, False);
ACombineText.Text2Setting('Segoe UI', 16, ALRed, False);
ACombineText.Text1ShadowSetting(ALBlack, 0.2, 0.2);
ACombineText.Text2ShadowSetting(ALRed, 0.1, 0.6);



.

Fak Eid 16-05-2024 08:29

1 Attachment(s)
Thank you for the enhancements. But there seems to be a bug.
When trying to open this FCustomFluentWindow for the first time, I'm able to see a header on top of it which goes away after dragging.

It is only happening for the first time and for this FCustomFluentWindow. For other it is working as expected. Can you let me know what could be the issue here?

BLACKFIRE69 16-05-2024 09:00

Quote:

Originally Posted by Fak Eid (Post 504501)
Thank you for the enhancements. But there seems to be a bug.
When trying to open this FCustomFluentWindow for the first time, I'm able to see a header on top of it which goes away after dragging.

It is only happening for the first time and for this FCustomFluentWindow. For other it is working as expected. Can you let me know what could be the issue here?



Code:

SetWin11FormCorners(CusForm.ParentHandleHWND, ctw11Sharp);
this could be the cause of that.

R6S 17-05-2024 01:21

Quote:

Originally Posted by xNoah (Post 495481)
Hello upon testing this, it doesn't seem to work. I am still have the same issue.

link can downloud the best existing compression tool that works with WPI_CorePack

Fak Eid 17-05-2024 01:24

1 Attachment(s)
Quote:

Originally Posted by BLACKFIRE69 (Post 504502)
Code:

SetWin11FormCorners(CusForm.ParentHandleHWND, ctw11Sharp);
this could be the cause of that.

Commented that line of code. Now the form comes in round corners, but it is still happening. Any other fix?

Fak Eid 17-05-2024 02:16

Quote:

Originally Posted by audiofeel (Post 504516)
is the newest version of the dll from May 11th in use? and do you use a style file in your work? if so, then give it up and try again.

I use the 14th May version from the link Blackfire shared above, with my enhancements. Yes, I do use a style file for FMemo, FEdit, FCheckbox and in future for FSwitch. I tested without style.bin file but still the issue persists.

The fact that it is only happening for InstallPage: FCustomFluentWindow only for the first time and not again, and not happening for ExitPage and SettingsPage confuses me.

BLACKFIRE69 17-05-2024 04:14

Quote:

Originally Posted by Fak Eid (Post 504518)
I use the 14th May version from the link Blackfire shared above, with my enhancements. Yes, I do use a style file for FMemo, FEdit, FCheckbox and in future for FSwitch. I tested without style.bin file but still the issue persists.

The fact that it is only happening for InstallPage: FCustomFluentWindow only for the first time and not again, and not happening for ExitPage and SettingsPage confuses me.


i can't easily explain why this is happening, and i can't recreate the situation to test it. but anyway,

FMXInno - [2024-May-17].rar

Fak Eid 18-05-2024 03:00

2 Attachment(s)
Quote:

Originally Posted by BLACKFIRE69 (Post 504525)
i can't easily explain why this is happening, and i can't recreate the situation to test it. but anyway,

17th May version has some more issues.
But I figured, in 14th May version. This anomaly is only happening in InstallPage @1080p 125% resolution only which is FCustomFluentWindow with both FCreateBlankForm only(not any other FCreate functions).

For the rest other resolutions, it is working fine. Sharing you files to look and please let me know if I'm doing something wrong as well. I'll try correcting it from next time as well. [This is just dummy code set]

Required Files in 'Game' folder.
FMX files in Files/Modules
Section to review: Search by keyword 'InstallPage'

PS: Please also add GetSelectedDiskName (to get the name of the selected drive) on FDiskList.

Gummy Bear 18-05-2024 07:20

Quote:

Originally Posted by BLACKFIRE69 (Post 503474)
Modern FitGirl Installer for Windows 11+













.

Looks very cool, is there a script with working functionality?

ScOOt3r 18-05-2024 08:12

@GummyBear yes there is a script that works just fine, its on the first page, it has several installers in it so choose the one you like. if you still want the fitgirl installer then look for the fitgirl script. this is currently my favourite script.

ScOOt3r

Gummy Bear 19-05-2024 00:35

Quote:

Originally Posted by ScOOt3r (Post 504544)
@GummyBear yes there is a script that works just fine, its on the first page, it has several installers in it so choose the one you like. if you still want the fitgirl installer then look for the fitgirl script. this is currently my favourite script.

ScOOt3r

Thank you, is there a translation into Russian?

BLACKFIRE69 19-05-2024 05:10

FMXInno
 
guys, if you recall, in a previous build of FMXInno, even though 'SetActiveThemeModeAwareness' is enabled, if the installer is minimized, i ignore the installer’s color mode change. this means that for 'SetActiveThemeModeAwareness' to take effect, the installer shouldn't be minimized.

someone asked me if this is an issue with FMXInno. No, FMXInno is just fine, but there's an issue that comes from Windows itself. i'm not a Windows developer, so i can't fix it. therefore, FMXInno ignores 'SetActiveThemeModeAwareness' if the installer is minimized.

check the screenshot below:



.

BLACKFIRE69 19-05-2024 10:24

Quote:

Originally Posted by Fak Eid (Post 504540)
17th May version has some more issues.
But I figured, in 14th May version. This anomaly is only happening in InstallPage @1080p 125% resolution only which is FCustomFluentWindow with both FCreateBlankForm only(not any other FCreate functions).

For the rest other resolutions, it is working fine. Sharing you files to look and please let me know if I'm doing something wrong as well. I'll try correcting it from next time as well. [This is just dummy code set]

Required Files in 'Game' folder.
FMX files in Files/Modules
Section to review: Search by keyword 'InstallPage'

PS: Please also add GetSelectedDiskName (to get the name of the selected drive) on FDiskList.


  • adding compatibility for higher DPI is a headache, but anyway, we've to deal with it.
  • this update will fix the issue that shows the titlebar at higher DPI settings (>= 125%).
  • feel free to report back if there are other issues.

(Tested at 125% scale)


All times are GMT -7. The time now is 02:05.

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