Difference between revisions of "4/Development setup"

From Worms Knowledge Base

Jump to: navigation, search
(Troubleshooting)
(Updates)
Line 17: Line 17:
 
** [http://www.dsource.org/projects/derelict/changeset/head/branches/Derelict2/DerelictUtil/derelict?old_path=%2F&format=zip Derelict2 Util]
 
** [http://www.dsource.org/projects/derelict/changeset/head/branches/Derelict2/DerelictUtil/derelict?old_path=%2F&format=zip Derelict2 Util]
 
** [http://www.dsource.org/projects/derelict/changeset/head/branches/Derelict2/DerelictSDL/derelict?old_path=%2F&format=zip Derelict2 SDL]
 
** [http://www.dsource.org/projects/derelict/changeset/head/branches/Derelict2/DerelictSDL/derelict?old_path=%2F&format=zip Derelict2 SDL]
 +
** [http://www.dsource.org/projects/derelict/changeset/head/branches/Derelict2/DerelictGL/derelict?old_path=%2F&format=zip Derelict2 OpenGL]
 
** [https://github.com/CyberShadow/ae/zipball/master Armageddon Engine]
 
** [https://github.com/CyberShadow/ae/zipball/master Armageddon Engine]
 
{{gap}}
 
{{gap}}
Line 29: Line 30:
 
* Find the line starting with <code>DFLAGS=</code>
 
* Find the line starting with <code>DFLAGS=</code>
 
* At the end of the line, type a space, then <code>"-I</code>, then paste the path copied above, then type <code>"</code> to close the quotes.
 
* At the end of the line, type a space, then <code>"-I</code>, then paste the path copied above, then type <code>"</code> to close the quotes.
* [[File:ae-setup-dmd-scini.png|thumb|600px|none|Example correct sc.ini]]
+
: [[File:ae-setup-dmd-scini.png|thumb|600px|none|Example correct sc.ini]]
 
* Save and close the file.
 
* Save and close the file.
 
<!--
 
<!--
Line 49: Line 50:
 
** (example image goes here)
 
** (example image goes here)
 
* Click OK.
 
* Click OK.
 +
-->
 +
<!--
 +
>>>>>>>>>>>>>> Mono-D has the same issues as Visual-D <<<<<<<<<<<<<<<
 +
 +
== Mono-D ==
 +
Mono-D is a plugin adding D support for MonoDevelop.
 +
 +
* Download and install [http://monodevelop.com/ MonoDevelop] and its dependencies.
 +
* Follow the [http://mono-d.sourceforge.net/?page_id=9 Mono-D installation instructions].
 +
* Follow the [http://mono-d.sourceforge.net/?page_id=11 "Getting Started" guide], too.
 +
  * On the 4th step, also add the path to your d-stuff folder.
 +
* ???
 +
* Profit!
 
-->
 
-->
 
== SDL runtime ==
 
== SDL runtime ==
Line 63: Line 77:
 
* From the '''Build''' menu, select '''Set build commands'''
 
* From the '''Build''' menu, select '''Set build commands'''
 
* In the edit box near the '''Build''' button (in the '''Command''' column), replace the command with: <code>rdmd --build-only -w -g -of.\ "%f"</code>
 
* In the edit box near the '''Build''' button (in the '''Command''' column), replace the command with: <code>rdmd --build-only -w -g -of.\ "%f"</code>
* [[File:ae-setup-geany-buildtools.png|thumb|400px|none|Screenshot]]
+
** You may need to add a <code>-d</code> switch to the above line currently to suppress typedef deprecation errors. This issue is expected to be temporary.
 +
: [[File:ae-setup-geany-buildtools.png|thumb|400px|none|Screenshot]]
 
* 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'''.
 
* 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'''.
 
<!--
 
<!--

Revision as of 20:47, 6 January 2012

(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 from 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
  • In the edit box near the Build button (in the Command column), replace the command with: rdmd --build-only -w -g -of.\ "%f"
    • You may need to add a -d switch to the above line currently to suppress typedef deprecation errors. This issue is expected to be temporary.
Screenshot
  • 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.

Troubleshooting

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 SDL.dll in the program's folder, or to any folder in the system PATH.
Personal tools