delphidelphi-xe4

What Is a .vrc file, how is is generated and can you remove it using the IDE?


I am trying to install a commercial component called JamShellBrowser but it will not install.

I have contacted the developer, but meanwhile I'd like to know:

  1. What is a vrc file?
  2. How is it produced?
  3. Can it be controlled or modified with the Delphi XE4 IDE?

I checked the IDE's help but I could not find anything about vrc files and I searched for Delphi vrc and did not find anything that would help me.

The error message is:

Checking project dependencies...

Compiling JamShellDelphiXE4.dproj (Release, Win32)

brcc32 command line for "JamShellDelphiXE4.vrc"

c:\program files (x86)\embarcadero\rad studio\11.0\bin\cgrc.exe -c65001 JamShellDelphiXE4.vrc -foJamShellDelphiXE4.res

[BRCC32 Error] JamShellDelphiXE4.vrc(2): file not found: JamShellDelphiXE2_Icon.ico

Failed

Elapsed time: 00:00:00.1

I searched the components folders for an ico file, but there is none... thus the message, but even if I remove the line MAINICON ICON "JamShellDelphiXE2_Icon.ico" from the vrc file or even delete the vrc file it is automatically generated when I try to install.

I moved from Delphi 2010 to XE4 a few months ago and noticed the apparently new vrc file but I do not know what it is or how to handle these files.


Solution

  • I believe this is a built in IDE behaviour of Delphi XE4 and XE5, possibly caused by an upgrade bug. Generation of VRC files is something that you can not disable except by removing the tags in the dproj file that cause it to be generated.

    If there was a way to fix it or remove it, it might involve comparing your dproj file with another dproj file and looking for something that was appropriate only to a .dpr+.dproj Project that somehow got into your .dpk+.dproj project, like <Icon_MainIcon>.

    It appears to be an intermediate file that is auto-generated when a .dpr+.dproj project has some version information which must be written out of the .dproj file, and into a temporary location and then compiled and linked into your application as a version info resource. However, I have also seen it get generated for a .dpk+.dproj project, and this mystifies me as well.

    It also seems to contain a resource for your default application icon and version information, and packages do not normally have a versioninfo or application icon resource.

    What I find to be possibly a BUG is that there is no UI in the Delphi IDE to let you set the Application Icon of a Package. Yet, I sometimes get a .VRC and an .ICO file. But I am not aware of a fix, other than to report the issue to Embarcadero Quality Central.

    With a .dproj project, a .VRC intermediate file makes at least some sense. I see the following content: Version Info, Application Icon, and VCL Styles (ie AquaLightSlate.vsf) resource linkage.