changeblog/1768049814

Building and Running Purgatorio on Windows 11

Sat, 10 Jan 26 13:56:54 CET

I wanted to try building purgatorio (inferno) on a Windows system, and with some effort I got it compile using Visual Studio. Even more than that, I was able to set up Visual Studio in a way that I can use IntelliSense and the debugger.

Here are a few notes:

Setting up Visual Studio

Store these files in the root folder of the project:

launch.vs.json: Needed for launching. Pick emu in the selection.
{
  "version": "0.2.1",
  "configurations": [
    {
      "name": "emu",
      "project": "emu\\Nt\\iemu.exe",
      "args": [ "-r", "${workspaceRoot}", "/dis/wm/wm.dis" ]
    }
  ]
}
CppProperties.json: Needed for IntelliSense.
{
  "configurations": [
    {
      "inheritEnvironments": [
        "msvc_x86"
      ],
      "name": "x86-Debug",
      "includePath": [
        "${env.INCLUDE}",
        "${workspaceRoot}\\**"
      ],
      "defines": [
        "WIN32",
        "_DEBUG",
        "UNICODE",
        "_UNICODE"
      ],
      "intelliSenseMode": "windows-msvc-x86"
    }
  ]
}
tasks.vs.json: If you want right-click → build for mkfiles.
{
  "version": "0.2.1",
  "tasks": [
    {
      "taskLabel": "runmk",
      "appliesTo": "mkfile",
      "contextType": "build",
      "type": "launch",
      "command": "mk",
      "args": [ "install" ],
      "envVars": {
        "PATH": "${workspaceRoot}\\Nt\\386\\bin;${env.PATH}"
      }
    }
  ]
}