Skip to content

Latest commit

 

History

History
90 lines (71 loc) · 3.36 KB

compiling.md

File metadata and controls

90 lines (71 loc) · 3.36 KB

Setup for Windows

Install rust via https://www.rustup.rs/ using the default settings. If you already have rustup, ensure it is setup with the msvc toolchain. Install Build Tools for Visual Studio 2017

Install ninja, cmake, python 3 and blender. The recommended way to do this is to install chocolatey then run:

  • choco install ninja
  • choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
  • choco install python
  • choco install blender

Make sure to add blender to your PATH environment variable. The path to blender will be somewhere like C:\Program Files\Blender Foundation\Blender 2.83.

Setup for Ubuntu

Install rust via https://www.rustup.rs/ (Use the default settings)

sudo apt-get install build-essential libssl-dev libusb-1.0-0-dev pkg-config cmake libvulkan-dev vulkan-utils libudev-dev blender

Currently the blender provided by ubuntu is too old. Instead you must manually download the latest blender for linux: https://www.blender.org/download/ Then you need to add the path containing the blender executable to your PATH environment variable. Maybe the CI script will help illustrate the simplest possible commands to do this:

wget https://ftp.nluug.nl/pub/graphics/blender/release/Blender2.83/blender-2.83.0-linux64.tar.xz
But you will probably want to set it up better for your own usage.

Need to also install one of the following packages depending on your graphics card:

  • Intel: sudo apt-get install mesa-vulkan-drivers
  • Nvidia: No extra drivers required
  • AMD: TODO

If it fails to launch, you may need to enable DRI3, Create a file /etc/X11/xorg.conf.d/20-intel.conf containing:

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "DRI" "3"
EndSection

Setup for Arch

sudo pacman -Syu rustup gcc make python libusb cmake vulkan-icd-loader blender

Need to also install one of the following packages depending on your graphics card:

  • Intel: vulkan-intel
  • Nvidia: No extra drivers required
  • AMD: vulkan-radeon

Compile and run the game

  1. In the assets_raw/models directory run: python export_all_assets.py
  2. In the canon_collision directory run: cargo run --release

Compile and run the Controller Mapper

In the map_controllers directory run: cargo run --release

Setup CLI

To build the CLI tool run cargo build in the cc_cli directory, the resulting binary is stored at target/debug/cc_cli. Copy cc_cli to somewhere in your PATH.