From Worms Knowledge Base
This page describes how to set up a working development environment with D and Armageddon Engine on Windows, and build the sample ae demos.
There are two versions of the language: D 1 and 2. D2 is the current version, thus commonly referred to as just "D".
- Proceed to the D download page, and download the current "dmd D 2.0 compiler 1-click install for Windows".
- On the component selection screen, uncheck "D 1".
Download and install the Windows version of git.
- At Adjusting your PATH environment, select one of the first two options.
- At Choosing the SSH executable, select Use OpenSSH.
- At Configuring the line ending conventions, select Checkout as-is, commit as-is.
ae and requisites
- Create a work directory which will contain all the source code.
- Right-click on the newly-created work directory, and select Git Bash.
- At the prompt, type (without the $ signs):
$ git clone https://github.com/CyberShadow/ae $ git clone https://github.com/CS-svnmirror/dsource-bindings-win32 win32 $ git clone https://bitbucket.org/cybershadow/derelict.git
- Go back to the work directory, and copy the path to it from the address bar.
- Navigate to
C:\D\dmd2\windows\bin, and open
- Find the line starting with
- At the end of the line, type a space, then
"-I, then paste the path copied above, then type
"to close the quotes.
- Save and close the file.
- You will also need to download the SDL2 DLL (you'll need the Runtime binary for 32-bit Windows). Place the DLL in the folder you created.
You should now be able to compile and run the PewPew demo by running the following command from the work directory:
$ rdmd ae/demo/pewpew/pewpew
For improved performance, you can create and run a release build with the command:
$ rdmd -O -inline -release ae/demo/pewpew/pewpew
Below are instructions for setting up an editor or IDE, for more comfortable development.
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,
- From the Build menu, select Set build commands
- In the edit box near the Build button (in the Command column), replace the command with:
rdmd --build-only -w -g -of.\ "%f"
- You should now be able to compile the current file with F8, build the currently-opened D program with F9, and run it with F5.
- To create optimized builds (which catch less programming errors and are unsuitable for debugging, but run faster), use this Build command line:
rdmd --build-only -w -O -inline -release -of.\ "%f"
- Warnings about missing rpcns4.lib, mpr.lib, version.lib
- These warnings can be safely ignored.
- Derelict SharedLibLoadException
- The program could not find the SDL DLL. Copy SDL2.dll in the program's folder, or to any folder in the system PATH (e.g.