Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Building DSFML from SVN in Eclipse?  (Read 6776 times)

0 Members and 1 Guest are viewing this topic.

bridell

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • http://www.bridell.com
Building DSFML from SVN in Eclipse?
« on: October 20, 2009, 09:22:56 am »
Hey.

I'm a D noob (but very enthusiastic), wondering how to get a grip of DFSML...

I've set up DMD + DSSS + the Descent plugin for Eclipse so I can make a DSSS build from within Eclipse, which seems really neat. Is anybody else doing this? Or are you using some other IDE or just a text editor + dsss? I haven't tried building DSFML yet but I'm about to.

I'm guessing the SVN version is what I want to play with, but should I go for the one in the trunk or in the sfml2 branch? Or are they in sync?

/ bridell

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Building DSFML from SVN in Eclipse?
« Reply #1 on: October 20, 2009, 09:56:50 am »
Unfortunately, DSFML has not been maintained since SFML 1.4. So both the trunk and the sfml2 branch will probably not compile.
Laurent Gomila - SFML developer

bridell

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • http://www.bridell.com
How to build DSFML from the SVN
« Reply #2 on: October 20, 2009, 01:37:23 pm »
Cheer up. Things still work!

I just grabbed the entire SFML from the SVN and managed to build DSFML.
Here's how I did it, I think. I'm currently on Windows XP.

-----------------------------------------------------------------------------

1. Get the SFML distro from SVN

With a command-line svn you type
svn co https://sfml.svn.sourceforge.net/svnroot/sfml sfml

Using TortoiseSVN [http://tortoisesvn.net/downloads] you just create a folder,
right-click and select "SVN checkout" and enter
https://sfml.svn.sourceforge.net/svnroot/sfml, get the HEAD branch.

You probably shoud avoid doing any of this stuff in folders with spaces
anywhere in the path. So don't go playing around in "My Documents".

Below, "trunk" refers to the folder "trunk" that
you get from the SVN. (Yes, I know you can select what to get...)
-----------------------------------------------------------------------------

2. Install Code::Blocks
Get version with with MinGW [http://www.codeblocks.org/]

Some people have had problems with code::blocks not setting up the
compiler properly, here's a fix:

Run Code::Blocks, go into Settings > Compiler and Debugger
> Toolchain Executables and click "auto-detect"

-----------------------------------------------------------------------------

3. Build SFML. (This step may not be necessary?)

Make sure codeblocks is on your path

CD to the trunk\build\codeblocks\batch-build and run build.bat

this builds a bunch of .a and .dll files to trunk\lib\mingw
-----------------------------------------------------------------------------

4. Build CFSML

open the codeblocks workspace trunk\CSFML\codeblocks\CFSML.workspace

In Build > Select target, select "Release WIN32_DLL"

Do Build > build workspace

this builds a bunch of .dll files into \trunk\CSFML\lib\mingw

copy all the .dll files to trunk\DSFML\samples\dsfml\bin

-----------------------------------------------------------------------------

5. Build DSFML

make sure dsss and dmd are on your path

cd to trunk\DSFML\samples\dsfml and run "dsss build"

trunk\DSFML\samples\dsfml\bin

-----------------------------------------------------------------------------

That's it! (I think - as I said I'm a total D noob)

To make your own DSFML app, just make a new folder in "samples", add it
to the dsss.conf (you'll see how the others look) and do "dsss build" again.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Building DSFML from SVN in Eclipse?
« Reply #3 on: October 20, 2009, 01:45:06 pm »
It works, but only because SFML 1.5+ is more or less compatible with version 1.4. But the D API is not maintained anymore, which means that you may not get the new functions (those in SFML > 1.4), or even get crashes.

And of course, DSFML won't compile with the sfml2 branch ;)
Laurent Gomila - SFML developer