Highlighted

PluginVersion compilation error

Community Beginner ,
Nov 12, 2020

Copy link to clipboard

Copied

Hi,

I have the following PluginVersion in my plugin .fr file

// Plugin version definition.
resource PluginVersion (kSDKDefPluginVersionResourceID)
{
kTargetVersion,
kMyPluginID,
kSDKDefPlugInMajorVersionNumber, kSDKDefPlugInMinorVersionNumber,
kSDKDefHostMajorVersionNumber, kSDKDefHostMinorVersionNumber,
kMyCurrentMajorFormatNumber, kMyCurrentMinorFormatNumber,
{ kInDesignProduct, kInCopyProduct },
{ kWildFS },
#if CSVER >= 55
kUIPlugIn,
#endif
kMyVersion
};

 

I tried building this with kMyVersion as 0.pre-release.0

This gave me an error like so by odfrc: R6: # Error: looked like a number but it wasnt

 

I suspect this is due to some grammar that this field must support, but I can't locate it. Any help is appreicated where I can understand more about the error thrown by odfrc

 

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

I used the string literally in the fr file in one of my plugins, and it worked. Try the following and check

resource PluginVersion (kSDKDefPluginVersionResourceID)
{
kTargetVersion,
kMyPluginID,
kSDKDefPlugInMajorVersionNumber, kSDKDefPlugInMinorVersionNumber,
kSDKDefHostMajorVersionNumber, kSDKDefHostMinorVersionNumber,
kMyCurrentMajorFormatNumber, kMyCurrentMinorFormatNumber,
{ kInDesignProduct, kInCopyProduct },
{ kWildFS },
#if CSVER >= 55
kUIPlugIn,
#endif
"0.pre-release.0"
};

I suspect your issue is somewhere in the expansion of the macros if the above works

-Manan

TOPICS
How to, SDK

Views

42

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

PluginVersion compilation error

Community Beginner ,
Nov 12, 2020

Copy link to clipboard

Copied

Hi,

I have the following PluginVersion in my plugin .fr file

// Plugin version definition.
resource PluginVersion (kSDKDefPluginVersionResourceID)
{
kTargetVersion,
kMyPluginID,
kSDKDefPlugInMajorVersionNumber, kSDKDefPlugInMinorVersionNumber,
kSDKDefHostMajorVersionNumber, kSDKDefHostMinorVersionNumber,
kMyCurrentMajorFormatNumber, kMyCurrentMinorFormatNumber,
{ kInDesignProduct, kInCopyProduct },
{ kWildFS },
#if CSVER >= 55
kUIPlugIn,
#endif
kMyVersion
};

 

I tried building this with kMyVersion as 0.pre-release.0

This gave me an error like so by odfrc: R6: # Error: looked like a number but it wasnt

 

I suspect this is due to some grammar that this field must support, but I can't locate it. Any help is appreicated where I can understand more about the error thrown by odfrc

 

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

I used the string literally in the fr file in one of my plugins, and it worked. Try the following and check

resource PluginVersion (kSDKDefPluginVersionResourceID)
{
kTargetVersion,
kMyPluginID,
kSDKDefPlugInMajorVersionNumber, kSDKDefPlugInMinorVersionNumber,
kSDKDefHostMajorVersionNumber, kSDKDefHostMinorVersionNumber,
kMyCurrentMajorFormatNumber, kMyCurrentMinorFormatNumber,
{ kInDesignProduct, kInCopyProduct },
{ kWildFS },
#if CSVER >= 55
kUIPlugIn,
#endif
"0.pre-release.0"
};

I suspect your issue is somewhere in the expansion of the macros if the above works

-Manan

TOPICS
How to, SDK

Views

43

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 12, 2020 0
Adobe Community Professional ,
Nov 12, 2020

Copy link to clipboard

Copied

Hi,

 

I found this in the sample but it doesn't appear to say what you have is invalid.

 

/*
// Version Number String macro:
// Used to create a string for the PluginVersion resource.
// This is provideded only as a convenience. The PluginVersion field after the FeatureSet array
// can contain any string, but has a default, SDK samples will contain a string
// made up of the major.minor.step.build  numbers. e.g. "3.0.0.385"
*/
#define SDK_DEF_MAKE_VERSIONSTRING(ver_maj, ver_min, ver_step, ver_build) SDK_DEF_STRINGIZE(ver_maj)"." SDK_DEF_STRINGIZE(ver_min)"." SDK_DEF_STRINGIZE(ver_step)"." SDK_DEF_STRINGIZE(ver_build)

/*
// Plug-in version string used in About box. In the debug build, we append 'D' at the end of the version string.
*/
#ifdef DEBUG
#define kSDKDefPluginVersionString SDK_DEF_MAKE_VERSIONSTRING(kSDKDefPlugInMajorVersionNumberForResource, kSDKDefPlugInMinorVersionNumberForResource, kSDKDefPlugInStepVersionNumberForResource, kBuildNumber)"D"
#else
#define kSDKDefPluginVersionString SDK_DEF_MAKE_VERSIONSTRING(kSDKDefPlugInMajorVersionNumberForResource, kSDKDefPlugInMinorVersionNumberForResource, kSDKDefPlugInStepVersionNumberForResource, kBuildNumber) 
#endif

 

Probably not much help, will continue to investigate, are you able to change a the value and have it compile?

 

Regards

 

Malcolm

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 12, 2020 0
Adobe Community Professional ,
Nov 13, 2020

Copy link to clipboard

Copied

I used the string literally in the fr file in one of my plugins, and it worked. Try the following and check

resource PluginVersion (kSDKDefPluginVersionResourceID)
{
kTargetVersion,
kMyPluginID,
kSDKDefPlugInMajorVersionNumber, kSDKDefPlugInMinorVersionNumber,
kSDKDefHostMajorVersionNumber, kSDKDefHostMinorVersionNumber,
kMyCurrentMajorFormatNumber, kMyCurrentMinorFormatNumber,
{ kInDesignProduct, kInCopyProduct },
{ kWildFS },
#if CSVER >= 55
kUIPlugIn,
#endif
"0.pre-release.0"
};

I suspect your issue is somewhere in the expansion of the macros if the above works

-Manan

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 13, 2020 1
asaxena LATEST
Community Beginner ,
Nov 24, 2020

Copy link to clipboard

Copied

I agree. In my .fr file I have a .h include that has some of the #defines which seemed to be the problem. Anyways, we changed our versioning criteria, so this no longer bothers me now.

Thanks for help

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 24, 2020 0