-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add PDCurses to Windows #74057
Add PDCurses to Windows #74057
Conversation
Looks like this PR would fix #73011 which would be a huge weight off my shoulders when changes to ImTui (TUI version of ImGui) need to be made |
Regarding UCRT64 prints extra characters in some places I am now trying using Edit: it doesn't work because PDCurses uses 64-bit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto-requesting reviews from non-collaborators: @Qrox
I get these statis assertion failures when building on Windows using VS2022 Community Edition:
|
Is this ready or waiting on akrieger or something else? |
I made the non-curses build work but I don't have time to validate the curses build still works given the changes I had to make that I called out. |
This caused crashes in Windows debug mode because the debug RTL injects own things and |
Includes BSD changes from CleverRaven#73561
PDC_RGB causes swapping blue and red.
Copied from ncurses_def.cpp
Macro `USE_PDCURSES` defined when found.
Centralizing the configuration in Cataclysm-common required splitting pch handling into a separate property sheet. The flatbuffers project was compiling with a pch with different flags, so it was never trying to include SDL headers like the pch normally does. Moving the defines to the common property sheet exposed this, so the pch configs got split out separately, and manually reincluded where needed.
Summary
Build "Add PDCurses to Windows"
Purpose of change
Allow to build
TILES=0
for Windows with PDCurses from VCPKG.Describe the solution
defined(_WIN32)
fromdefined(TILES)
by using a new#define TUI
wincurse.cpp
USE_PDCURSES
to CMake buildsMore details in the commits comments
Describe alternatives you've considered
None
Testing
Built with:
windows-x64-msvc
windows-tiles-sounds-x64-msvc
windows-x64
windows-tiles-sounds-x64
linux-x64
linux-tiles-sounds-x64
CCACHE=1 RELEASE=1 MSYS=1 DYNAMIC_LINKING=1 SDL=0 TILES=0 SOUND=0 LOCALIZE=0 LINTJSON=0 ASTYLE=0 TESTS=0 cataclysm.exe
Run inside Windows Terminal 1.19, open the main menu, load a debug game, open the overmap, quit:
MSVC has red and blue colors swapped. Can not be fixed with PDCurses'-DPDC_RGB
.imgui.cpp:9123
"Need a positive DeltaTime!"Run SDL native or under WSLg.
Additional context
This PR in draft to check the CI build and the linters.
Related PR/issues:
This is the MSYS UCRT64 MINGW NCURSES build running in cmd.exe 80x25:
This is the MSVC PDCurses build running in cmd.exe 80x25: