FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Building Derelict2

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
Daevius



Joined: 06 Sep 2010
Posts: 3

PostPosted: Mon Sep 06, 2010 2:35 am    Post subject: Building Derelict2 Reply with quote

The sticky says the following: "This works just as it does in Derelict 1, ...". Well, it sure does not work like Derelict 1:

Where do I get the Derelict 2 sources? I can _only_ download Derelict 1 sources from the dsource page. Also, someone removed branches from the trunk, so when downloading the latest version, you _don't_ get Derelict 2 as well, neither do I see an option to download the branch (without going through immense efforts to get some SVN app running and what not).

Building should be no problem, I just run DSSS over it. But just acquiring the sources is already an investigation a la Sherlock Holmes.

Thank you in advance.
Back to top
View user's profile Send private message
michaelp



Joined: 27 Jul 2008
Posts: 114

PostPosted: Mon Sep 06, 2010 2:05 pm    Post subject: Reply with quote

To get the SVN source:
Code:
svn co http://svn.dsource.org/projects/derelict

In the branches folder, you can find Derelict2.
Also, the DSSS configuration files may no longer work in D2, as aldracon has worked on a Makefile build system DSSS is outdated and no longer being worked on.

To build Derelict2 with Makefiles:
Code:
make -f platform.mak DC=compiler

Where platform is linux, win32, or mac, and compiler is dmd, ldc, or gdmd.
Then add the import folder to your import path and the lib folder to your library path.

An example of compiling a D program using Derelict2:
Code:
module test;
import derelict.sdl.sdl;
import std.stdio;

void main()
{
    try
    {
        DerelictSDL.load();
        writefln("Successfully loaded the SDL shared library.");
    }
    catch (Exception e)
    {
        writefln("Could not load the SDL shared library.");
    }
}


And build it with:

Code:
dmd test.d -L-ldl -L-lDerelictSDL -L-lDerelictUtil


Hope this helps.
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Tue Sep 07, 2010 8:10 am    Post subject: Re: Building Derelict2 Reply with quote

Daevius wrote:
Also, someone removed branches from the trunk, so when downloading the latest version, you _don't_ get Derelict 2 as well, neither do I see an option to download the branch (without going through immense efforts to get some SVN app running and what not).


The Derelict 2 branch is not and never was part of the trunk. The branches directory is a sibling of the trunk. The svn command given by michaelp shows how to check out everything in svn, including /trunk, /branches, /tags and /downloads. To specifically checkout only the Derelict 2 branch, you can use this command:

Code:

svn co http://svn.dsource.org/projects/derelict/branches/Derelict2


And if you don't want to use svn, from the Derelict project page you can click 'Browse Source' at the top and navigate to the Derelict 2 branch (or just click directly to http://www.dsource.org/projects/derelict/browser/branches/Derelict2). At the bottom of the page, click on the 'zip archive' link. You'll get a zip file containing the Derelict 2 branch and nothing else.

Quote:

(without going through immense efforts to get some SVN app running and what not)


Getting svn up and running is nothing special. And it's something that, by now, should be in every developer's toolbox. If you haven't installed it yet, I highly recommend you do. Having Mercury and Git is a big win as well.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group