Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the C++ packages to match the Delphi ones #153

Closed
pyscripter opened this issue Feb 4, 2022 · 16 comments
Closed

Update the C++ packages to match the Delphi ones #153

pyscripter opened this issue Feb 4, 2022 · 16 comments

Comments

@pyscripter
Copy link
Contributor

With the move to DirectWrite units have added/removed. The C++ packages need to be updated.

@dm-e
Copy link
Contributor

dm-e commented Feb 21, 2022

I updated the package for the C++Builder. The components can be installed with it, but unfortunately they cannot be used. When trying to compile a new VCL application with a SynEditor, there are about 80 errors of the following kind:

[bcc32c Error] SynDWrite.hpp(55): unknown type name '_di_IDWriteFontCollection'

If you still want the updated package, I'm happy to push it.

I can also provide an update of the package for C++Builder Tokyo. It compiles but I didn't try to install it to avoid polluting my system

An attempt to make the package for C++Builder Sydney failed completely. It didn't even compile.

For an older version of the components, I created a C++Builder-only counterpart. I will post an announcement here.

@pyscripter
Copy link
Contributor Author

This interface comes from Winapi.D2D1. If you look at this file at the top in includes:

(*$DEFINE WINAPI_D2D1_HPP_DEFINES_INTERFACE*)
(*$DEFINE WINAPI_D2D1_USE_ENUMERATIONS*)
(*$DEFINE WINAPI_D2D1_ENUM_WITH_FLAG_OPERATORS_AS_INTEGER*)
(*$HPPEMIT NOUSINGNAMESPACE *)
(*$HPPEMIT '#include <d2d1.h>' *)
(*$HPPEMIT '#include <dwrite.h>' *)

So you need to link these include files. In theory whatever compiles in Delphi should be usable in C++ Builder maybe with a bit of tweaking and HPPEMMIT directives.

@dm-e
Copy link
Contributor

dm-e commented Feb 22, 2022

The reason for the error was in the redeclaration of some interfaces in SynDWrite.pas. I have declared them as EXTERNALSYM now. I installed the components again and could run the example application. The Delphi code can now be correctly debugged even in C++Builder.

If you get me the right to access the repository I will push the modified SynDWrite.pas and the files for the Alexandria package.

@pyscripter
Copy link
Contributor Author

pyscripter commented Feb 22, 2022

Great!!!

You don't need access to the repo. The standard way of contributing is:

  • Fork
  • Do the changes in your fork
  • Submit a Pull Request.

Looking forward to your PR...

And by the way could you help resolve the remaining C++ issues? Or does your work resolve them as well?

@dm-e
Copy link
Contributor

dm-e commented Feb 22, 2022

If I did everything correctly, you should now see a pull request.

I don't know if other C++Builder-related problems have been solved, but they've certainly been reduced. When I get a chance I'll try to get the package for Sydney as well.

@pyscripter
Copy link
Contributor Author

I saw your PR and was about to merge but you closed it! Are you about to submit a new one?

@pyscripter
Copy link
Contributor Author

Regarding the open issues this is what I was referring to.

@dm-e
Copy link
Contributor

dm-e commented Feb 22, 2022

I now have a meeting, I will try again a few hours later

@dm-e
Copy link
Contributor

dm-e commented Feb 22, 2022

sorry, I never did this before. I now created a new pull request On the bottom of the page there are two buttons: one to close with comment and a comment button. I don't see any other reasonable possibility to procced.

@dm-e
Copy link
Contributor

dm-e commented Feb 22, 2022

I pressed the comment button now

@pyscripter
Copy link
Contributor Author

Your PR was now merged.

@dm-e
Copy link
Contributor

dm-e commented Feb 22, 2022

great!

@pyscripter
Copy link
Contributor Author

If you could now look at the other open C++ issues it would be faboulous.

@dm-e
Copy link
Contributor

dm-e commented Feb 23, 2022

All C++Builder issues affect version 10.4. Sydney. I tried to build the package with the modified SynDWrite.pas but in vain. I didn't even manage to create a new empty package.

The reason is that the versions of the C++Builder that follow 10.2 Tokyo are very bad. In these versions, the conversion from the classic C++compiler to the clang compiler takes place.
A lot of things don't work here anymore. The compiler is extremely slow, declarations are not found and resources are constantly exhausted when debugging. It's scandalous that Embarcadero is taking money for these compilers from his subscribers. Only C++Builder 11.0 Alexandria works halfway again. I'm still using C++Builder 10.2 Tokyo.
Sorry, I dont want to waste more time with C++Builder 10.4.

@pyscripter
Copy link
Contributor Author

Thanks for looking into this. No problem. Can I assume that Synedit works well Delphi Alexandria and the issues raised are resolved at least with that version?

@dm-e
Copy link
Contributor

dm-e commented Feb 23, 2022

As far as I understand the issues, they will be solved with C++Builder Alexandria. I can't estimate whether other problems will then remain, e.g. with TwineCompile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants