Tuesday, October 2, 2012

D Programming: OpenGL 3.x+ (for Windon't 7) Part 2

To start we need to... start.

You will need to download the D installer, the Mono IDE, the MonoD extension, Derelict3, and some things required to get SDL2 to work.

I will be hosting everything on a single page so you don't have to crawl around for it. These downloads will become outdated but should (for the foreseeable future) work together just fine.

So if you want the latest/greatest make sure you DON'T use my downloads and actually go get copies of these things yourself.

Download everything from me.

  1. https://code.google.com/p/brollace-blog-filehost/source/browse/d_pack.zip
  2. On the right of the page is the link "view raw file".
  3. Right click the link and "save as" to download the zip.
Setup a storage directory
  1. Go to your "Documents" and create a folder called "DontMove".
  2. In this folder create a folder called "D".
  3. Unpack the contents of "d_pack.zip" to "DontMove\D" so that, for instance, you can observe the following path: "DontMove\D\4.png", and NOT "DontMove\D\d_pack\4.png".
Install D Programming Language:

Uses the d_pack files:
  • dinstaller.exe
  1. Run the "dinstaller.exe".
  2. I put my installation on "C:\D\<my stuff installed here yo>"
Setup Derelict3 for OpenGL 3.X+

Now this part was painful so please do allow me to share the fruits of my labor with you to end the chain of suffering.

Uses the d_pack files:
  • aldacron-Derelict3-b4f810c.zip
  1. Unzip the aldracon package.
  2. Go to "import" so you see a folder containing "derelict".
  3. Copy the folder "derelict" with all the stuff in it and paste it into (for example on my machine) "C:\D\dmd2\src".
  4. The folder should look something like "derelict, dmd, druntime, phobos".
  5. Go to "aldracon/lib" and copy everything to (for example on my machine) "C:\D\dmd2\windows\lib".
  6. You should have just copied a bunch of .libs into a folder of other .libs.
  7. Open up "C:\D\dmd2\windows\bin\sc.ini" in some editor like Notepad++ or Scite or ConTEXT.
  8. Change the line: [1] to look something like [2]...
[1] DFLAGS="-I%@P%\..\..\src\phobos" "-I%@P%\..\..\src\druntime\import"
[2]DFLAGS="-I%@P%\..\..\src\phobos" "-I%@P%\..\..\src" "-I%@P%\..\..\src\druntime\import"

Install MonoD

Uses the d_pack files:
  • MonoDevelop-3.0.4.7.msi
  • MonoDevelop.D_0.4.1.4_MD3.0.4.7.mpack
  • ResourceCompiler.zip
.
.
.
.

You should now be able to create D programs in MonoDevelop using MonoD.

Next I will go over how to write your first D OpenGL3.X+ app using SDL2.

No comments:

Post a Comment