Skip to content

Add windows compatibility - #5

Open
Tardigrade42 wants to merge 24 commits into
nekonaute:mainfrom
Tardigrade42:add-windows-compatibility
Open

Add windows compatibility#5
Tardigrade42 wants to merge 24 commits into
nekonaute:mainfrom
Tardigrade42:add-windows-compatibility

Conversation

@Tardigrade42

Copy link
Copy Markdown

This change makes the project compatible to run natively on Windows as well. In addition to a general instruction on how to compile this program on Windows devices, this change needed to update the code to be completely Windows compatible. The main changes were:

  • Enforce strict C++ syntax (replacing logical and with && since it is not available on Windows)
  • Use Windows alternative of library sys/time.h on Windows and add missing function gettimeofday for Windows
  • Enable cmath constants (like M_PI) on Windows
  • Disable Windows override of max-function
  • Replace unsupported inheritance of std::unary_function<_Result, _Arg>
  • Update legacy code in CMakeLists.txt and add certain Windows-only settings
  • Update setup.py and fix No module named Sphinx.setup_command #4
  • Replace shuffle syntax which is not available on Windows
  • Add toml file for clearer Python dependency resolution
  • Replace getopt library with custom code, since the library does not exists on Windows
  • Replace POSIX code, since it is not available on Windows

In addition there are many warnings during the build, which might be fixed in the future. To see the initial errors during Windows compilation clearer, I suppressed these warnings. I left the code that way and added a TODO comment there.

Personal Note

I checked the current setup on two different Windows 11 devices and it worked on both. So I am pretty confident, that the setup is correct. However I only have WSL at hand and no Linux or Mac. @nekonaute please confirm, that these changes do not effect your device, but I do not see any reason why the code should not run on MacOS or Linux.

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.

No module named Sphinx.setup_command

1 participant