compiler.nvim icon indicating copy to clipboard operation
compiler.nvim copied to clipboard

Add Windows support

Open Gaweringo opened this issue 1 year ago • 2 comments

This PR would make all commands which use rm -f and mkdir -p windows compatible by adding the get_commands() function to utils which swaps the unix commands with the cmd commands erase /s /q and mkdir. The way to ignore errors is also different and is changed from || true to > nul 2> nul & cd. for cmd. Ignoring errors is also needed for mkdir in cmd, since there is no -p equivalent.

I could not test the asm changes fully yet, since it uses linux/unix syscalls from what I understand. Building and linking works, but the "Run program" does not succeed and exits with a large negative exit code.

Languages which had changes:

  • asm
  • c
  • cpp
  • cs
  • dart
  • go
  • java
  • kotlin
  • python
  • rust
  • swift
  • fortran

Bau which had changes:

  • cmake
  • meson

From my testing, everything should still work on Linux with these changes.

Let me know if I need to change something, or if this PR might go in the wrong direction / uses an undesired approach.

Gaweringo avatar Sep 23 '24 23:09 Gaweringo