ecal icon indicating copy to clipboard operation
ecal copied to clipboard

Mon CLI: Implemented TUI Version of eCAL Mon

Open FlorianReimold opened this issue 2 years ago • 5 comments

FlorianReimold avatar Jul 29 '22 09:07 FlorianReimold

This failed to compile on Windows, as FTXUI apparently cannot be compile with Visual Studio 2015 (v140). When upgrading the project to Visual Studio 2019 (v142) everything works perfectly.

I am converting this PR to a draft, until we have decided on a strategy how to solve that. The options I see are:

  • entirely ditching v140 compatibility
  • compiling ecal_core with v140 and the apps with a different (newer) toolset

image

FlorianReimold avatar Aug 05 '22 15:08 FlorianReimold

Looks like we really need Visual Studio 2019 Toolset (v142) on Windows 😣

With v141 Visual Studio reports an "internal error" in a file d:\a01\_work\2\s\src\vctools\compiler\cxxfe\sl\p1\c\funcs.c. This file does not exist on my machine, I think this really is something Visual Studio internal.

2>------ Build started: Project: mon (app\mon\mon), Configuration: Debug x64 ------
2>Building Custom Rule D:/Projects/ecal/ecal-githubcom/app/mon/mon_cli/CMakeLists.txt
2>main.cpp
2>d:\projects\ecal\ecal-githubcom\app\mon\mon_cli\src\model/log.hpp(106): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
2>d:\projects\ecal\ecal-githubcom\app\mon\mon_cli\src\tui/view/component/data_table.hpp(129): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
2>d:\projects\ecal\ecal-githubcom\app\mon\mon_cli\src\tui/view/component/focus_manager.hpp(57): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
2>d:\projects\ecal\ecal-githubcom\app\mon\mon_cli\src\tui/view/component/focus_manager.hpp(85): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
2>d:\projects\ecal\ecal-githubcom\app\mon\mon_cli\src\tui/view/message_visualization/raw.hpp(32): fatal error C1001: An internal error has occurred in the compiler.
2>(compiler file 'd:\a01\_work\2\s\src\vctools\compiler\cxxfe\sl\p1\c\funcs.c', line 2780)
2> To work around this problem, try simplifying or changing the program near the locations listed above.
2>Please choose the Technical Support command on the Visual C++
2> Help menu, or open the Technical Support help file for more information
2>Done building project "mon.vcxproj" -- FAILED.

FlorianReimold avatar Sep 28 '22 08:09 FlorianReimold

Well I guess this would somehow be expected since v140 does not fully support C++17, but ftxui requires it. Maybe this helps us in treating eCAL sdk = v140 and apps builds = v142 differently.

KerstinKeller avatar Sep 28 '22 08:09 KerstinKeller

Well I guess this would somehow be expected since v140 does not fully support C++17

That's why I switched to v141 (Visual Studio 2017). This should in theory support C++17, but it seems like there are some internal bugs that prevent FTXUI from compiling

If you have any suggestion how to split SDK and apps and compile them with different toolsets I am more than happy to hear those.

FlorianReimold avatar Sep 28 '22 08:09 FlorianReimold

Looking good so far with the latest commit! What I did, is:

  • Use v140 for GH Action builds
  • FTXUI and mon_cli targets upgrade themself to hardcoded v142, if the CMAKE_VS_PLATFORM_TOOLSET is older than that

This solution works like a charm and lets us continue publishing v140 compatible binaries and still use v142 for that one application.

What is left to do is to also install the MSVC runtime dlls. Currently it does work on a freshly installed Win10, but it picks the dlls from inconsistent locations. Here is a screenshot from dependency walker:

image

I think it's funny that it doesn't seem to load the v142 dlls at all (those would be xxx140_2.dll). So the Visual Studio 2017 dlls are enough, even though we need to compile with Visual Studio 2019.

FlorianReimold avatar Sep 29 '22 06:09 FlorianReimold