Hi all,
in VO we could do something like
DEFINE MAINVERSION := "4"
DEFINE SUBVERSION := "0"
DEFINE MAINBUILD := "21"
DEFINE SUBBUILD := "12"
RESOURCE VS_VERSION_INFO VERSIONINFO
FILEVERSION MAINVERSION,SUBVERSION,MAINBUILD,SUBBUILD
......
The transporter replaces the defines in the resource with their actual values.
Is it still possible to use defines in resources or does anybody know a trick how to achieve this ?
TIA
Karl
Resource Compiler
Resource Compiler
Hello Karl,
While Chris/Robert could no doubt explain why the Transporter replace values, we have a Defines.vh included in an X# program containing code like this:
#define CLM_RESOURCES 11326
So I'd say it is still possible like in VO (with a # before the define apparently).
Dick
While Chris/Robert could no doubt explain why the Transporter replace values, we have a Defines.vh included in an X# program containing code like this:
#define CLM_RESOURCES 11326
So I'd say it is still possible like in VO (with a # before the define apparently).
Dick
Resource Compiler
Hello Dick,
I always get
Fehler RC2104 undefined keyword or key name: MAINVERSION 12-proMOTM D:ProjekteproMO12-proMOTM___Version___.VS_VERSION_INFO.rc 2
no matter how I define MAINVERSION.
#define inside the rc-file seems to work, but I can't refer to defines elsewhere in the application...
Maybe the only solution for this will be include-files so that all rc-files in a solution can use the same defines..
I always get
Fehler RC2104 undefined keyword or key name: MAINVERSION 12-proMOTM D:ProjekteproMO12-proMOTM___Version___.VS_VERSION_INFO.rc 2
no matter how I define MAINVERSION.
#define inside the rc-file seems to work, but I can't refer to defines elsewhere in the application...
Maybe the only solution for this will be include-files so that all rc-files in a solution can use the same defines..
Resource Compiler
Karl,
It is better that you do not add a version info resource to your DLL/EXE at all and use these defines in Assembly attributes. The compiler will then automatically generate the version resource for you.
Robert
It is better that you do not add a version info resource to your DLL/EXE at all and use these defines in Assembly attributes. The compiler will then automatically generate the version resource for you.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Resource Compiler
Hi Karl,
As Robert said, in .Net it is better to use version Assembly attributes for that. But if you insist to use a native resource, then the defines must be entered in the way the resource compiler (rc.exe) expects them:
#define MAINVERSION 4
#define SUBVERSION 0
#define MAINBUILD 21
#define SUBBUILD 12
Also you must not include the word RESOURCE in the .rc file, this is not recognised by the resource compiler, it is only used in VO to define the resource "entity"
.
As Robert said, in .Net it is better to use version Assembly attributes for that. But if you insist to use a native resource, then the defines must be entered in the way the resource compiler (rc.exe) expects them:
#define MAINVERSION 4
#define SUBVERSION 0
#define MAINBUILD 21
#define SUBBUILD 12
Also you must not include the word RESOURCE in the .rc file, this is not recognised by the resource compiler, it is only used in VO to define the resource "entity"
.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Resource Compiler
Thanks for the hint, I think I can see what you mean in the ReportPro-source. I'll change my source accordingly
Karl
Karl