Skip to content

Setting Up Your Environment

Colden Cullen edited this page Nov 6, 2020 · 6 revisions

Prerequisites

Setting up the Environment

  1. Clone this repository.
  2. From inside the Dash folder, run dub add-local . "~master" from cmd.
  3. Clone the Sample Game.
  4. Open your command prompt to the Sample-Dash-Game folder.
  5. To run the game, from the command prompt, run dub.
  6. To run the game through an IDE, either open the dub.json file with Mono-D, or use dub generate to make a project file.

Linux Users

  • Manually install the X11 binding with dub fetch x11. X11 bindings are mandatory but can't be enabled by default for now due to dub-related issues.
  • Using your distro's package manager, install libfreeimage-dev and libjpeg62-dev.

Setting up the Environment (in the RIT IGM labs)

  1. Clone this repository. Cloning with command line? Run git submodule update --init after cloning.
  2. From inside the Dash folder, run dub add-local . "~master" from cmd.
  3. Clone the Sample Game.
  4. If on Windows, run the following commands:
dub fetch --local derelict-util --version=1.0.0
dub fetch --local derelict-gl3 --version="~master"
dub fetch --local derelict-fi --version="~master"
dub fetch --local derelict-assimp3 --version="~master"
dub fetch --local dyaml --version="~master"
dub fetch --local gl3n-shared --version="~master"
dub fetch --local dlogg --version=1.3.0
  1. From the command prompt window you will be using, run /path/to/D/dmd2vars.bat.
  2. Open your command prompt to the Sample-Dash-Game folder.
  3. To run the game, from the command prompt, run dub.
  4. To debug the game or engine, see the article on debugging.

Setting up Environment Variables

In order to run dub and dmd, you need certain environment variables set. To use various IDEs, such as Xamarin/MonoD, you'll need these variables set on a global scale. If you are on a computer that doesn't reset overnight, you can make sure these variables are permanently set. Steps:

  • Go to System (Control Panel, or Windows+Break)
  • Advanced system settings
  • Environment Variables
  • Under "System Variables" scroll down and find one called Path (may be in all caps)
  • Select Path and then click Edit
  • In the Variable value box, add (do not delete existing values) C:\D\dmd2\windows\bin;C:\Program Files (x86)\dub; to the end.
  • Note: The paths to add may change depending on where you install dmd and dub. Please note that the paths you are adding are to the folders where dmd.exe and dub.exe are located. They should not include the exe's