4/Development setup

From Worms Knowledge Base

Revision as of 08:44, 30 September 2011 by CyberShadow (Talk | contribs) (D: best to not install D1 due to PATH conflicts and confusion)

Jump to: navigation, search
(Up to 4)

This page describes how to set up a working development environment with D and Armageddon Engine on Windows, and build the sample ae demos.

D

There are two versions of the language: D 1 and 2. D2 is the current version, thus commonly referred to as just "D".

Warning: The D installer is known to truncate the system PATH environment variable over a certain limit. (If you don't know what this means, it most likely doesn't apply to you.)

ae and requisites

There are two ways to set up development libraries: the proper way (using source control), and the easy way (zip snapshots). The proper way allows to easily update and contribute back to the libraries, but requires a lot more work when setting up from scratch. This page covers the easy way.

 

Folder structure
  • Unpack all ZIP files.
  • Create a new folder, and place the unpacked folders in the new folder as shown in the picture to the right. You will need to:
    • rename the root folder from the last zip file from CyberShadow-ae-something to simply ae.
    • merge the derelict directories from the derelict zip files.
  • Copy the path to the new folder from the address bar.

 

  • Navigate to C:\D\dmd2\windows\bin, and open sc.ini in Notepad.
  • Find the line starting with DFLAGS=
  • At the end of the line, type a space, then "-I, then paste the path copied above, then type " to close the quotes.
  • Example correct sc.ini
  • Save and close the file.

SDL runtime

You'll need the SDL 1.2 runtime to run the SDL demos.

  • Download the Win32 runtime library for the SDL 1.2 download page.
  • Place SDL.dll in your project's directory, or somewhere on the system path (e.g. C:\Windows)

Geany

There are many editors and IDEs supporting D. This page describes setting up Geany, but there are many others available. If you're feeling adventurous, you can try experimenting with some of the editors and IDEs on this page.

  • Download and run the Windows Geany installer (with GTK) from the Geany download page.
  • Start Geany, and open a D file (for example, ae/demo/pewpew/pewpew.d).
  • From the Build menu, select Set build commands
  • Click the Build button below D source file Commands, and change the text to Build and run in the pop-up box
  • In the edit box near the button (in the Command column), type: rdmd -w -g "%f"
  • Screenshot
  • You should now be able to build & run the currently-opened D program by pressing F9 or by clicking the Build icon (Ae-geany-build.png) in the toolbar.


Personal tools