Daniel
Posts: 8271
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Deploy your own application custom font before setup UI initializes

Hi,

Hereby I expose the configuration of a setup package that will use same custom font (for setup dialogs) as the one used by your application.

Often, applications make use of a custom font. To do so the custom font have to be deployed using your setup package. This is fairly easy to configure, have a look "How do I register a Font?" article.

Now to have a consistent user experience you may want to use the same application custom font for the UI dialogs of your setup package. To do so you should make sure the font is deployed before the setup UI initializes. For instance you can create a separate setup package that will simply deploy the application font and make sure this package is installed using a custom action just before the UI dialogs of the main setup package are displayed.

Attached you can find a sample implementing this configuration.
sample.zip
(625.32 KiB) Downloaded 3425 times

Here are the detailed configuration steps you can go with:

1. create a setup package that will simply deploy your application custom font; just follow the steps exposed in "How do I register a Font?" article.

2. open your main setup project and go to "Files and Folders" page; add the above fontSetup package as a temporary file
screen1.jpg
screen1.jpg (90.7 KiB) Viewed 352103 times

3. go to "Custom Actions" page and add a new "Run PowerShell Inline Script" custom action without sequence that will simply launch and silently install the fontSetup package; you can use a PowerShell code like this:

Code: Select all

$arguments = "/i `"" + $env:TEMP + "\fontSetup.msi`" /qn"
Start-Process -FilePath msiexec.exe -ArgumentList $arguments -Wait
screen2.jpg
screen2.jpg (185.96 KiB) Viewed 352103 times

4. go to "Dialogs" page and select "PreparePrereqDlg" dialog; add a trigger for the above configured "InstallFont" custom action on "Init Event" tab - let's assume your main setup project also includes pre-install prerequisites; otherwise you can trigger this action from "PrepareDlg" dialog
screen3.jpg
screen3.jpg (149.35 KiB) Viewed 352103 times

5. go to "Install Parameters" page and make sure you check "Run as administrator" option

6. go to "Themes" page -> Text Styles" tab and set for the default text style your custom font (the custom font must be already installed on current build machine in order to be able to select it in "Text Styles" tab)
screen4.jpg
screen4.jpg (137.11 KiB) Viewed 352103 times

7. finally go to "Table Editor" view. In "Property" table you should simply add a new property row like this:

Property: AI_FIRSTTEMPFILES
Value: 1

TableEditor_screen.jpg
TableEditor_screen.jpg (164.01 KiB) Viewed 4716 times

8. save and rebuild your main setup project

That was all!

All the best,
Daniel
TableEditor_screen.jpg
TableEditor_screen.jpg (164.01 KiB) Viewed 4716 times
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Hishiro
Posts: 11
Joined: Fri Jul 07, 2023 4:47 pm

Re: Deploy your own application custom font before setup UI initializes

Hi guy.
I try your tutorital but my font not installer. I try installer on windows 7 but not work.
If I run fontSetup.msi before running the installation, the program displays correctly.
But if I follow your instructions it doesn't work.
1.png
1.png (16.78 KiB) Viewed 17510 times
2.png
2.png (57.12 KiB) Viewed 17510 times
3.png
3.png (14.66 KiB) Viewed 17510 times
my font setup : https://drive.google.com/file/d/1YbMukv ... sp=sharing
Font rar : https://drive.google.com/drive/folders/ ... sp=sharing
name font : UTM Avo

Pls help me.
Daniel
Posts: 8271
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Deploy your own application custom font before setup UI initializes

Hi,

The fontSetup.msi file seems to be configured fine.

Can you please send me the .AIP (setup project) file of your main setup by email at support at advancedinstaller dot com? The one that installs the "fontSetup.msi" file using a custom action as exposed in steps 2 to 7.

I need to double check the settings configured into your main setup project too.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Hishiro
Posts: 11
Joined: Fri Jul 07, 2023 4:47 pm

Re: Deploy your own application custom font before setup UI initializes

I send mail to support mail. Pls check it
Tks
Daniel
Posts: 8271
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Deploy your own application custom font before setup UI initializes

Hi,

Thank you for your patience on this!

I have tested your setup project and replicated the issue. It seems the behavior is caused by the fact I forgot to document one last step you need to configure. I apologize for this.

The last step you need to configure is in "Table Editor" view. In "Property" table you should simply add a new property row like this:

Property: AI_FIRSTTEMPFILES
Value: 1
TableEditor_screen.jpg
TableEditor_screen.jpg (164.01 KiB) Viewed 4716 times
Can you please configure the above step too and let me know how this works now?

I have also updated this info on our web forum thread. Thank you for helping me to correct my post.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Hishiro
Posts: 11
Joined: Fri Jul 07, 2023 4:47 pm

Re: Deploy your own application custom font before setup UI initializes

I created a new project and added properties. It works perfectly. Thank you for creating such a great guide.

Thanks for sharing!
Daniel
Posts: 8271
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Deploy your own application custom font before setup UI initializes

Thank you too for your feedback on this!

Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Sample Projects”