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

Windows GUI: Upgrade to C++Builder 12 Community Edition #918

Merged
merged 7 commits into from
Oct 7, 2024

Conversation

cjee21
Copy link
Collaborator

@cjee21 cjee21 commented Jul 30, 2024

  • Save project file with C++Builder 12
    • Clean-up and save project file using C++Builder 12
  • Enable Win64x target platform
  • Various fixes and improvements
    • To make it compile and run successfully on the new C++Builder and Win64x target.

Note:
Looks like it is still not possible to enable CFG and CET even though the new bcc64x toolchain is based on LLVM/Clang 15.0.

@cjee21 cjee21 marked this pull request as draft August 5, 2024 09:39
@cjee21 cjee21 marked this pull request as ready for review August 5, 2024 11:49
@cjee21 cjee21 force-pushed the bcb-athens branch 2 times, most recently from 857c73d to 6851655 Compare September 16, 2024 12:23
cjee21 added 4 commits October 1, 2024 20:01
Use TWebBrowser instead of TCppWebBrowser for all HTML views for compatibility with bcc64x compiler.
More simple and do not need to delay load user32 anymore.
@JeromeMartinez JeromeMartinez merged commit 9d99599 into MediaArea:master Oct 7, 2024
3 checks passed
@JeromeMartinez
Copy link
Member

We upgraded to BCB12 without the PRs, then used the PR with the legacy compiler, so merged. We'll test the Win64x build soon.

@cjee21 cjee21 deleted the bcb-athens branch October 7, 2024 16:57
@JeromeMartinez
Copy link
Member

We reverted the BCB12 upgrade and switched back to BCB11 because BCB12 compiled binary requires Windows 10 Universal C Runtime (CRT) on Win7 and it is that on a bare metal Win7:
unnamed

We keep the related PRs because it does not hurt to have them.

@cjee21
Copy link
Collaborator Author

cjee21 commented Oct 8, 2024

Now I see that the 64-bit versions have dependency on UCRT.

It ran when I tested with a clean install Windows 7 VM that day. Maybe somehow my Windows 7 ISO has UCRT built-in? Or it got installed by MSVC runtime?

@JeromeMartinez
Copy link
Member

Maybe somehow my Windows 7 ISO has UCRT built-in? Or it got installed by MSVC runtime?

I can not say about that, I can only see that with a 10 year old VM with Win7 SP1 installed 10 years ago, the behavior is different between BCB11 and BCB12 compilation (only that was changed), and I am afraid that there are still installs with a such configuration, without knowing how many people would be impacted.
As it currently doesn't bother me to stay with BCB11, I think I'll stay with that for the moment, and BCB12 + Win64x will be activated when we drop Win7 support for a big reason. Currently I still have 5% of my users with Win7 to Win8.
In the meantime our master branch has the code for it so you don't have to maintain a specific branch, and we'll accept patches (please do! If it is something you like to do) focused on BCB12 + BCC64X if they don't break BCB11 compilation.

Detection of the lack of UCRT and download+install of it could be an alternative, but some additional work (also managing cases without internet connexion on the target machine with a hint for downloading the missing stuff on another machine) and I don't see as needed until we have a good reason to use an up to date LLVM/Clang instead of a 8+ year old one enough for us for the moment, especially with BCC32X still using the old one.

Long story short, for the moment I prefer to stay as it is now (patches in source code for BCB12 compatibility but still released with BCB11).

@cjee21
Copy link
Collaborator Author

cjee21 commented Oct 10, 2024

Putting this here for future reference.

No longer reproducible after PR944:

Known issue with BCC64X in version 12.1 Patch 1:
When switching to dark mode then back using options menu, the app crashes with a sound but no pop-up after appearing to successfully switch back to light. Starting the app in dark then switching to light via menu crashes too. Interestingly, switching from light to dark and back then repeating many times by switching Windows' settings while the app is running does not trigger a crash. This should be tested on newer versions in the future before migrating to BCC64X.

Appears to be caused by doing Clean and Build in the same MSBuild command which works with Visual Studio projects:

Known issue with version 12.1 Patch 1:
When building Win32, Win64 and Win64x versions one after another using MSBuild in the same batch file, the following issues may occur (seems to randomly happen, other times no issues):

  • Win64 version may have non-working dark mode
  • Win64x version may fail to link with
    ld.lld: error: could not open '.\Win64x\Release\MediaInfo_GUI.res': no such file or directory

Expected updates to BCC64X in version 12.2 (no community edition available yet):
Parallel compilation support to speed up compilation of multiple source files using multiple CPU cores.
Parallel compilation is already supported by the other two compilers but is not currently enabled in the project file.

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

Successfully merging this pull request may close these issues.

2 participants