DPROJ settings for Custom Styles

Just spent the last 3-4 hours trying to figure out why FB8 would not compile my project with the custom style CyanDusk.vsf as defined in the DPROJ file.  (the project would build, but would produce a runtime error that the style was not found - it had not been included in the .RES file, and therefore not linked to the project executable)

Turns out that the project file defined the style like this: (note the version - this was an XE7 project - so we can see this was an upgrade project, because we are building it with X10)
        <custom_styles>“Cyan Dusk|VCLSTYLE|$(PUBLIC)\Documents\Embarcadero\Studio\15.0\Styles\CyanDusk.vsf”</custom_styles>

I upgraded the project to X10 Seattle and was attempting to use FB to build it - in this case, it would NOT build the project and include the style, no matter what I specified in the custom VCL styles field on the Resource Compiler tab.

So, I looked at a project that did work, and noticed that they were previously specified with the following (I tweeked this version to match the one above + changed he folder for X10)

        <vcl_custom_styles>“Cyan Dusk|VCLSTYLE|$(PUBLIC)\Documents\Embarcadero\Studio\17.0\Styles\CyanDusk.vsf”</vcl_custom_styles>

Looking at the .rc file that is generated, this is the line that was not included unless the VCL_CUSTOM_STYLES node was present in the DPROJ file.
CyanDusk VCLSTYLE "C:\Users\Public\Documents\Embarcadero\Studio\17.0\Styles\CyanDusk.vsf"

Creating a brand new X10 project, this is what is actually used to specify the style file (so it matches what XE7 used) - perhaps that was the version where it change - who knows.
        <custom_styles>&quot;Cyan Dusk|VCLSTYLE|$(PUBLIC)\Documents\Embarcadero\Studio\17.0\Styles\CyanDusk.vsf&quot;</custom_styles>

At any rate, If you want Final Builder to include your project specified custom style, you must define the style with the VCL_Custom_Styles node.
Also note that if you update your project via X10 IDE - it will only update the Custom_Styles - you will have to go back and manually edit the VCL_Custom_Styles to include any necessary changes.

FB Version: 8.0.0.1351

p.s. It appears that XE4 used the VCL_Custom_Styles - maybe Final Builder just needs a little update to look at the “new” configuration node. (I don’t have XE5 or XE6, so can’t tell when the change happened - though XE7+ appears to use Custom_Styles)

Hi Kent

Thanks for the heads up. From my testing it appears the change was only made in D10 Seattle. Older versions use VCL_Custom_Styles. I tested by creating new projects in XE7/8/D10 and adding styles and looking at the dproj. I also tested upgrading an XE7 project to D10, and it leaves the VCL_Custom_Styles element there and adds Custom_Styles, however the IDE does not show the original styles as selected and when compiling in the IDE it does not include them in the exe. So D10 is quite broken in this regard.

I have updated our code to look for VCL_Custom_Styles and Custom_Styles and combine then That should deal with new D10 projects and ones that were upgraded.

On second thoughts, I will change it to use Custom_Styles if there, otherwise VCL_Custom_Styles. Combining the two could cause duplicate resource errors if people re-add styles that are missing after upgrading.