Including a file behaves differently with RC.EXE or BRCC32.EXE to create * .rc files

I want to use a period (.) As a resource record in RC files for my Delphi project. However, Delphi BRCC32.exe does not resolve the period (.) In resource names. Starting with Delphi 2010, we can specify "Resource Compiler to use" in

Project | Option | Resource Compiler 

to switch to RC.exe (Resource Compiler SDK for Windows), which support the dot in the names.

Using RC.exe as a resource compiler to determine the point names I want. However, I ran into the problem of using #include in the rc file.

I have an app.db.excludes.rc file:

#include "../../../../core/resource/db/excludes/system.db.excludes.rc"

HR_BRANCH_DSC     8000  "HR.BRANCH.DSC.xml"
HR_CALENDAR_DSC   8000  "HR.CALENDAR.DSC.xml"
HR_CATEGORY_DSC   8000  "HR.CATEGORY.DSC.xml"

And the system.db.excludes.rc file:

#include "../../system.h"

SYSTEM_GROUPS_DSC   8000  "SYSTEM.GROUPS.DSC.xml"
SYSTEM_SCRIPT_DSC   8000  "SYSTEM.SCRIPT.DSC.xml"
SYSTEM_USER_DSC     8000  "SYSTEM.USER.DSC.xml"

Compile the Delphi project:

[BRCC32 Error] payroll.db.excludes.rc(3): file not found: SYSTEM.GROUPS.DSC.xml
[BRCC32 Error] payroll.db.excludes.rc(4): file not found: SYSTEM.SCRIPT.DSC.xml
[BRCC32 Error] payroll.db.excludes.rc(5): file not found: SYSTEM.USER.DSC.xml

The above problem occurs when using RC.exe. It works without problems if I use BRCC32.exe.

app.db.excludes.rc, system.db.excludes.rc .

system.db.excludes.rc

#include "../../system.h"

SYSTEM_GROUPS_DSC   8000  "../../../../core/resource/db/excludes/SYSTEM.GROUPS.DSC.xml"
SYSTEM_SCRIPT_DSC   8000  "../../../../core/resource/db/excludes/SYSTEM.SCRIPT.DSC.xml"
SYSTEM_USER_DSC     8000  "../../../../core/resource/db/excludes/SYSTEM.USER.DSC.xml"

RC.exe .

- , RC.exe BRCC32.EXE , ?

+3
2

#include rc:

#include "../../../../core/resource/db/excludes/system.db.excludes.rc"

#include "system.db.excludes.rc" Delphi (.dproj).

"app.db.excludes.rc":

HR_BRANCH_DSC     8000  "HR.BRANCH.DSC.xml"
HR_CALENDAR_DSC   8000  "HR.CALENDAR.DSC.xml"
HR_CATEGORY_DSC   8000  "HR.CATEGORY.DSC.xml"

Delphi (.dpk) :

package resource.db;

{$R *.res}
{$R 'payroll.db.excludes.res'}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO ON}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
....

​​ .dpk :

{$R 'payroll.db.excludes.res'}

BRCC32.exe, CGRC.exe/RC.exe.

0

/I RC, , XML . RC , .

+3

Source: https://habr.com/ru/post/1782264/


All Articles