Skip to main content

Solution-Runner

Solution-Runner is an open source project that allows running projects as Visual Studio "solutions" (.sln and .vcxproj formats) on Linux, via cross-compilation.

It has been tested with basic Win32 projects, the SDL-enabled Kevgine version (using its unchanged Win32 backend), and console projects.

Source code.

Dependencies:

For Arch Linux, you can use this command to get the necessary packages:

sudo pacman -S python clang wine mingw-w64-crt mingw-w64-binutils mingw-w64-gcc mingw-w64-headers mingw-w64-winpthreads

Compile and run:

  1. Clone the Solution-Runner project to your computer.
  2. Navigate to your solution directory, and run the run.py script. It will parse the Visual Studio (.sln and .vcxproj) project and attempt to compile it.
  3. If it succeeds, it will proceed to run the .exe file via WINE.

NOTE: you can ignore the usual WINE output, as well as these lines:

Warning: corrupt .drectve at end of def file

You may set up a shell alias like runsln that points to the absolute path of the script, as a hackish way to "install" it globally. This way, you can call it from anywhere.

Usage with IDEs

This is not a replacement for a proper CMake project with Linux support! However, you can get a functional IDE experience if using clangd as a language server. Solution-Runner will generate a compile-flags.txt file, which clangd should pick up. This file allows it to provide errors and diagnostics as if you were on Windows. Magic!