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

Fix Windows builds #23

Merged
merged 4 commits into from
Dec 7, 2023
Merged

Conversation

madmiraal
Copy link
Contributor

Fixes multiple issues with Windows builds:

Fixes godotengine/godot#58595: (Older?) MinGW compilers may not define ENABLE_VIRTUAL_TERMINAL_PROCESSING; so the build fails.

Reverses godotengine/godot#55967 that introduced ENABLE_VIRTUAL_TERMINAL_PROCESSING to workaround godotengine/godot#54076 and caused godotengine/godot#58595. I cannot reproduce godotengine/godot#54076; so it may have been fixed by Microsoft, and we should be able to safely revert godotengine/godot#55967 to fix godotengine/godot#58595.

Fixes the Windows build scripts:

  • Removes the dot from s suffix added to sanitizer builds.
  • Adds mingw or msvc suffix to builds to indicate compiler mode.
  • Adds MSVC LLVM (Clang) compiler build option.
  • Refactors the MinGW configuration and setup.

Note: The MSVC LLVM (Clang) build is currently failing (see also godotengine/godot#43354) when trying to build the third-party library libwebp:

error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'ExtractAlpha_SSE41' that is compiled without support for 'ssse3'

SSSE3 is part of micro-architecture level x86-64-v2. Clang (GCC and MinGW) require specifying the microarchitecture level. Microsoft Visual C compiler, supports x86-64-v2 by default. Microsoft Visual C compiler and Clang in MSVC mode define _MSC_VER. libweb enables SSE2 and SSE4.1 when _MSC_VER is defined, because it assumes x86-64-v2 is supported. Therefore, this issue is a combination of Clang requiring x86-64-v2 to be specified, Microsoft supporting x86-64-v2 by default and libwebp assuming that if _MSC_VER is specified that SSE2 and SSE41 commands can be used.

To maximise Rebel Engine support, Rebel Engine is currently built without support for x86-64-v2. As explained by Red Hat's decision to support x86-64-v2, it is probably now safe to build Rebel Engine with x86-64-v2 support, but I'll leave that for a separate PR.

Reverts godotengine/godot#26674 that caused godotengine/godot#54684. Note: godotengine/godot#26674 was incorrectly implemented. godotengine/godot#54591 corrected the implementation. However, godotengine/godot#54591 was never applied, therefore, the issue with godotengine/godot#26674, which was raised before it was merged (godotengine/godot#26674 (comment)) didn't affect Rebel Engine.

Fixes the Windows executable's property details to ensure all values are displayed as expected:

  • Displays the Product version, which was blank despite being defined.
  • Correctly displays the Copyright in a standard format.

Includes the addition of a vertical scrollbar to the automated patch application prompt when running the pre-commit style check hooks.

- Places all Windows resource file values on one line.
- Removes leading empty strings from VERSION defines.
- Reverts the workaround for a problem with Windows 11 Terminal closing
  Rebel Editor when Project Manager closed.
- Reverts the incomplete change for disabling execute opening a console.
- Removes the dot from suffix added to sanitizer builds.
- Adds mingw or msvc suffix to builds to indicate compiler mode.
- Adds MSVC LLVM (Clang) compiler build option.
- Refactors the MinGW configuration and setup.
Copy link
Contributor

@DanielaOrtner DanielaOrtner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What a huge step forward towards supporting our Windows community!

@DanielaOrtner DanielaOrtner merged commit 8c08ca3 into RebelToolbox:main Dec 7, 2023
13 checks passed
@madmiraal madmiraal deleted the fix-windows-builds branch December 7, 2023 11:52
@madmiraal madmiraal added PR Type: Bug Fix Your current game should now work as expected. PR Type: Enhancement Your current game will work better. and removed bug labels May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR Type: Bug Fix Your current game should now work as expected. PR Type: Enhancement Your current game will work better.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows MINGW Build enable_virtual_terminal_processing not found
2 participants