merlon icon indicating copy to clipboard operation
merlon copied to clipboard

Support Windows natively

Open bates64 opened this issue 2 years ago • 0 comments

I don't have Windows, so I'd greatly appreciate help with this! Message me on Discord for more info (nanalan#0771).

Merlon currently supports Windows via WSL 2 and the Linux build. However, there shouldn't be anything stopping us from executing shell commands inside WSL but from a native Windows executable.

Specifically:

  1. All of the calls to Command::new within the package (package.rs, init.rs, tests/dependencies.rs) need to be calls to wsl followed by the rest of the args. It would be good to create a method on Package like pub fn run_command(args: &[str]) -> Result<String> that constructs a Command with the given args, runs it with the current directory being the package directory, and returns stdout/stderr. On Windows (#[cfg(target_os = "win32")]) we can prepend wsl to args.
  2. emulator::run_rom needs to use a Windows version of the ROM path (i.e. $wsl:// or whatever it is). wslpath2 might be useful here!
  3. Print a warning if a Package is created with a non-WSL path on Windows arguing that compiling in the Windows filesystem is a source of performance issues.

bates64 avatar May 09 '23 15:05 bates64