Hello,
I am a long time user of TMS VCL UI Pack. I currently use C++Builder 10.4 and my application is Win32. I have just purchased and upgrade to C++ Builder 12.2 and upgraded to the most recent version of the TMS VCL UI Pack.
As I start using the new compiler and VCL Pack I am seeing that TShader is no longer an available component. My application has 910 locations that uses this component as a base and thousands of components placed on top.
It appears I need to replace TShader with TAdvPanel. But this is a massive undertaking as I would have to start with a blank TAdvPanel and copy and paste one component at time to migrate. I cannot find a way to do a multi select of all the components on a TShader.
Does anyone have any advice on how to approach this task?
Thank you,
Chad
The source code of TShader is still included.
So, easiest solution is to create a new package, add shader.pas & shader.dcr to this new package and compile & install this package in the IDE and you can continue to use TShader.
Hello Bruno,
Can you give me a tutorial on how to do this?
In C++ Builder I select File->New->Package. Then I right click on the Contains items and browse and select the Shader.pas.
I cannot figure out how add the shader.dcr file. When I try to add it to the Contains area I get an error. If I try a build I get an error saying [Pascal Error] Shader.pas(27,48): F2613 Unit 'Graphics' not found.
Here is what I see. What am I doing wrong?

- Add the .DCR File to Your Package:
- Open your package in Delphi (a
.dpk
file).
- In the Project Manager, right-click on the package's name and select "Add...".
- Navigate to and select the
.dcr
file you prepared earlier, then click "Open".
- Ensure the .DCR File is Properly Referenced:
- After adding the
.dcr
file, it should appear in your project manager under the 'contains' section of the package.
- If you are manually handling the package source file (
.dpk
), you might need to ensure the .dcr
file is listed in the package source. You can reference it like so:
{$R 'YourComponentResource.dcr'}
This directive can be added either in the .dpk
file directly beneath where your components are registered or within the unit that registers the component.
For the issue with "Graphics not found" , make sure to add the dependency to vcl.dcp in the requires list.
Hello Bruno,
Thank you for the instructions. I am stuck on step 1. I do not own a license to Delphi. I only have C++ Builder. So when you say "Open your package in Delphi" I cannot do this.
Thank you,
Chad
I believe you should also be able to open such package from C++ only
Hello Bruno,
I made some progress on this but I am still stuck. Can you use your delphi to create the package and provide it to me?
I was able to add the .dcr to the package I created in C++ Builder. When I try to add the .pas file I get an error. If I compile the package and then install it in a blank project there are no components in it.
Thank you,
Chad
Hello Bruno,
Thank you. I thought I was going to be able to install the package you provided or at least open it in C++ Builder but I guess it is not cross compatible?
Any way can you use C++ Builder to create a shader .bpl for me?
Thank you,
Chad
Hello Bruno,
I have spent quite a bit of time on this. MSBuild does not have an option to compile a Delphi project info a C++ .bpl package. All I could get it to do is create .dcu files.
So I am still stuck. All I want is the C++ .bpl file for the Shader component so I can install it in C++Builder 12 and use it in my application.
Any other ideas? Or is this no longer possible?
Chad
C++Builder is able to compile via MSBUILD Delphi created .DPROJ files. This is the way the TMS VCL UI Pack and any other TMS product is built.
Did you follow steps at:
Building a Project Using an MSBuild Command - RAD Studio ?
?
Hello Bruno,
I read through the topic and did the following. But I end up with a .bpl without the shader component. Why?
- Using C++ Builder 12 I created and new package and named it ShaderPkg.cbproj.
- I placed this .cbproj file in a folder with all the other files you gave me. (shader.dcr, shader.pas, shaderpkg.dpk)
- Using MSBUILD I used the command "msbuild ShaderPkg.cbproj /t:build"
- After adding some missing files due to failed compiles to my folder it was successful and it did create a ShaderPkg.bpl file.
- I created a new C++ Builder VCL application and from the Project menu I selected Options. I selected Packages and added the new Package.
- When click to see the components of the package it is blank...
Try with this updated shader.pas file
shader.zip (3.3 KB)
Hello Bruno,
I used the new shader.pas file you provided and I get the same result... I have attached the .bpl if it is helpful.
shaderpkg.zip (9.2 KB)
Chad
Alternative approach proposal: with the updated shader.pas in the TMS VCL UI Pack source folder, rebuild TMSVCLUIPackPkgDXE15.dproj
Bruno,
Okay... What are my steps?
I go and create a blank .cproj file named TMSVCLUIPackPkgDXE.cbproj. Then run "msbuild TMSVCLUIPackPkgDXE.cbproj /t:build" in the "C:\Users\myusername\AppData\Local\tmssoftware\registered\TMS VCL UI Pack" folder?
I am worried that if I do this and it fails I have overwritten the .bpl file and the rest of my application will break.
Chad
No use the MSBUILD tool to build this package (see earlier references to this)
Hello Bruno,
You have me really confused. How would you write the MSBuild line to create the .bpl file?
Chad