.Vfr and .vfr


Konstantin Aladyshev
 

Hello!

I've noticed that edk2 uses two different styles for naming Visual
Forms Representation files: "*.vfr" and "*.Vfr".
Is there any logic why some files have "*.Vfr" and some have "*.vfr" extension?
If there is no distinction, maybe it is better to use one style?

$ find ./ -name "*.vfr"
./EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefHii.vfr
./EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformHii.vfr
./MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.vfr
./MdeModulePkg/Library/FileExplorerLib/FileExplorerVfr.vfr
./MdeModulePkg/Library/PlatformVarCleanupLib/PlatVarCleanup.vfr
./MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskHii.vfr
./MdeModulePkg/Universal/DriverSampleDxe/Inventory.vfr
./MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
./MdeModulePkg/Universal/HiiResourcesSampleDxe/Sample.vfr
./MdeModulePkg/Universal/PlatformDriOverrideDxe/Vfr.vfr
./NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr
./NetworkPkg/Ip4Dxe/Ip4Config2.vfr
./NetworkPkg/Ip6Dxe/Ip6Config.vfr
./NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr
./NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigVfr.vfr
./NetworkPkg/VlanConfigDxe/VlanConfig.vfr
./NetworkPkg/WifiConnectionManagerDxe/WifiConnectionManagerDxe.vfr
./OvmfPkg/PlatformDxe/PlatformForms.vfr
./SecurityPkg/HddPassword/HddPassword.vfr
./SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordForm.vfr
./SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
./SecurityPkg/Tcg/TcgConfigDxe/TcgConfig.vfr
./SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfig.vfr
./UefiLessonsPkg/HIIForm/Form.vfr
./UefiLessonsPkg/HiiMenu/bak.vfr
./UefiLessonsPkg/HiiMenu/HiiForm1Vfr.vfr

$ find ./ -name "*.Vfr"
./MdeModulePkg/Application/UiApp/FrontPageVfr.Vfr
./MdeModulePkg/Library/BootManagerUiLib/BootManagerVfr.Vfr
./MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerVfr.Vfr
./MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthConfigureVfr.Vfr
./MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerVfr.Vfr
./OvmfPkg/Csm/LegacyBootMaintUiLib/LegacyBootMaintUiVfr.Vfr

Best regards,
Konstantin Aladyshev


Bob Feng
 

Both .vfr and .Vfr are supported by edk2 build tool. You can find the build rule in the edk2\BaseTools\Conf\build_rule.template.
Vfr, vfr, and VFR are all valid file ext and they apply the same build rule.

[Visual-Form-Representation-File]
<InputFile>
?.vfr
?.Vfr
?.VFR

<ExtraDependency>
$(MAKE_FILE)

<OutputFile>
$(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c

<Command>
"$(VFRPP)" $(DEPS_FLAGS) $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_base}.i
"$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i



Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of Konstantin Aladyshev
Sent: Monday, November 1, 2021 2:28 AM
To: discuss <discuss@edk2.groups.io>
Subject: [edk2-discuss] .Vfr and .vfr

Hello!

I've noticed that edk2 uses two different styles for naming Visual Forms Representation files: "*.vfr" and "*.Vfr".
Is there any logic why some files have "*.Vfr" and some have "*.vfr" extension?
If there is no distinction, maybe it is better to use one style?

$ find ./ -name "*.vfr"
./EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefHii.vfr
./EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformHii.vfr
./MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.vfr
./MdeModulePkg/Library/FileExplorerLib/FileExplorerVfr.vfr
./MdeModulePkg/Library/PlatformVarCleanupLib/PlatVarCleanup.vfr
./MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskHii.vfr
./MdeModulePkg/Universal/DriverSampleDxe/Inventory.vfr
./MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
./MdeModulePkg/Universal/HiiResourcesSampleDxe/Sample.vfr
./MdeModulePkg/Universal/PlatformDriOverrideDxe/Vfr.vfr
./NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr
./NetworkPkg/Ip4Dxe/Ip4Config2.vfr
./NetworkPkg/Ip6Dxe/Ip6Config.vfr
./NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr
./NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigVfr.vfr
./NetworkPkg/VlanConfigDxe/VlanConfig.vfr
./NetworkPkg/WifiConnectionManagerDxe/WifiConnectionManagerDxe.vfr
./OvmfPkg/PlatformDxe/PlatformForms.vfr
./SecurityPkg/HddPassword/HddPassword.vfr
./SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordForm.vfr
./SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
./SecurityPkg/Tcg/TcgConfigDxe/TcgConfig.vfr
./SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfig.vfr
./UefiLessonsPkg/HIIForm/Form.vfr
./UefiLessonsPkg/HiiMenu/bak.vfr
./UefiLessonsPkg/HiiMenu/HiiForm1Vfr.vfr

$ find ./ -name "*.Vfr"
./MdeModulePkg/Application/UiApp/FrontPageVfr.Vfr
./MdeModulePkg/Library/BootManagerUiLib/BootManagerVfr.Vfr
./MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerVfr.Vfr
./MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthConfigureVfr.Vfr
./MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerVfr.Vfr
./OvmfPkg/Csm/LegacyBootMaintUiLib/LegacyBootMaintUiVfr.Vfr

Best regards,
Konstantin Aladyshev


Konstantin Aladyshev
 

Thanks for the answer.

I understand that it is possible, but is it good style?
I don't suggest dropping ".VFR" and ".Vfr" files parsing, but maybe
all the EDKII form files should be renamed to one style ''.vfr" for
consistency?
Honestly I've always used 'find ./ -name "*.vfr" ' to grep for form
files with no idea that they can be named differently. I wasn't even
thinking about the fact that they can be named ".Vfr" or ".VFR". Of
course I'm not a EDKII pro and I am investigating EDKII by myself, but
it is just a thing to think about.
Also for example it is also possible for the string files to have
different extensions: "UNI", "Uni" and "uni". But the EDKII codebase
has only "uni" files in itself. Which I think is a good consistency.
And I simply suggest doing the same with form files.

Best regards,
Konstantin Aladyshev

On Mon, Nov 1, 2021 at 4:10 AM Feng, Bob C <bob.c.feng@intel.com> wrote:

Both .vfr and .Vfr are supported by edk2 build tool. You can find the build rule in the edk2\BaseTools\Conf\build_rule.template.
Vfr, vfr, and VFR are all valid file ext and they apply the same build rule.

[Visual-Form-Representation-File]
<InputFile>
?.vfr
?.Vfr
?.VFR

<ExtraDependency>
$(MAKE_FILE)

<OutputFile>
$(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c

<Command>
"$(VFRPP)" $(DEPS_FLAGS) $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_base}.i
"$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i



Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of Konstantin Aladyshev
Sent: Monday, November 1, 2021 2:28 AM
To: discuss <discuss@edk2.groups.io>
Subject: [edk2-discuss] .Vfr and .vfr

Hello!

I've noticed that edk2 uses two different styles for naming Visual Forms Representation files: "*.vfr" and "*.Vfr".
Is there any logic why some files have "*.Vfr" and some have "*.vfr" extension?
If there is no distinction, maybe it is better to use one style?

$ find ./ -name "*.vfr"
./EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefHii.vfr
./EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformHii.vfr
./MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.vfr
./MdeModulePkg/Library/FileExplorerLib/FileExplorerVfr.vfr
./MdeModulePkg/Library/PlatformVarCleanupLib/PlatVarCleanup.vfr
./MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskHii.vfr
./MdeModulePkg/Universal/DriverSampleDxe/Inventory.vfr
./MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
./MdeModulePkg/Universal/HiiResourcesSampleDxe/Sample.vfr
./MdeModulePkg/Universal/PlatformDriOverrideDxe/Vfr.vfr
./NetworkPkg/HttpBootDxe/HttpBootConfigVfr.vfr
./NetworkPkg/Ip4Dxe/Ip4Config2.vfr
./NetworkPkg/Ip6Dxe/Ip6Config.vfr
./NetworkPkg/IScsiDxe/IScsiConfigVfr.vfr
./NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigVfr.vfr
./NetworkPkg/VlanConfigDxe/VlanConfig.vfr
./NetworkPkg/WifiConnectionManagerDxe/WifiConnectionManagerDxe.vfr
./OvmfPkg/PlatformDxe/PlatformForms.vfr
./SecurityPkg/HddPassword/HddPassword.vfr
./SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordForm.vfr
./SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr
./SecurityPkg/Tcg/TcgConfigDxe/TcgConfig.vfr
./SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfig.vfr
./UefiLessonsPkg/HIIForm/Form.vfr
./UefiLessonsPkg/HiiMenu/bak.vfr
./UefiLessonsPkg/HiiMenu/HiiForm1Vfr.vfr

$ find ./ -name "*.Vfr"
./MdeModulePkg/Application/UiApp/FrontPageVfr.Vfr
./MdeModulePkg/Library/BootManagerUiLib/BootManagerVfr.Vfr
./MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerVfr.Vfr
./MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthConfigureVfr.Vfr
./MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerVfr.Vfr
./OvmfPkg/Csm/LegacyBootMaintUiLib/LegacyBootMaintUiVfr.Vfr

Best regards,
Konstantin Aladyshev