Skip to content

How to compile from source

Marcos Orallo edited this page Jul 14, 2021 · 6 revisions
  1. Download Visual Studio 2019 (previous versions may work too, but these instructions will focus on that version)
  2. Install Visual Studio 2019 with the following components:
    • Visual C++ for Windows applications
    • Visual C++ for Game development
    • MSVC Runtime v141 (it will not be the default because it's not the latest)
  3. Clone the xwa_ddraw_d3d11 project from Github
  4. Download the dependencies:
  5. Open DirectXTK project (Desktop_2019) with VS2019 and build the DirectXTK_Desktop_2019 project (right click, Build), in Release configuration, x86. If you try to build the whole solution, it may fail.
  6. Modify the ddraw project properties (remember, for both configurations Debug and Release). To avoid conflicts with the upstream project definition files, you should use Property Sheets. To edit them, you need to display the Property Manager window in VS (View->Other Windows->Property Manager). Then doubleclick the PropertySheetDebug and PropertySheetRelease files in the corresponding folders of the ddraw project and perform the following modifications:
    • VC++ Directories/Include Directories: point to your DirectXTK\Inc and openvr folders
    • C/C++/Code Generation/Runtime Library: (this must match the properties of the DirectXTK project or it will fail linking).
      • Release: Multi-Threaded DLL (/MD)
      • Debug: Multi-Threaded Debug DLL (/MDd)
    • Linker/General/Additional Library Directories: modify the path to point to your own directories.
      • Release configuration: <base_path>\DirectXTK\Bin\Desktop_2019_Win10\Win32\Release; <base_path>\openvr\lib\win32
      • Debug configuration: <base_path>\DirectXTK\Bin\Desktop_2019_Win10\Win32\Debug; <base_path>\openvr\lib\win32
    • Build Events/Post-build events/Command Line: modify to point to your XWA folder.

Clone this wiki locally