Derelict+Tango
Jacob Carlborg
doob at me.com
Sun Sep 6 13:24:14 PDT 2009
On 9/6/09 21:05, Moritz Warning wrote:
> On Sun, 06 Sep 2009 18:54:06 +0000, Moritz Warning wrote:
> [..]
>>
>> No rebuild rebuild required for this step.
>
> On a second look,
> I see that buildme.d uses bud (some older build tool for D).
>
> I can tell you how I install derelict "by hand":
>
> - download the trunk (zip archive is at http://www.dsource.org/projects/
> derelict/browser/trunk)
>
> - create an derelict directory
>
> - move the contents from all trunk/Derelict*/derelict/*
> directories into the new derelict directory we created before
>
> - put the derelict directory next to your main.d
>
> - add the code at the end of this post into your main.d
>
> - rebuild main.d or xfbuild main.d
>
>
>
> import derelict.sdl.sdl;
> import derelict.sdl.image;
> import derelict.opengl.gl;
> import derelict.opengl.glu;
>
>
> static this()
> {
> DerelictGL.load();
> DerelictGLU.load();
> DerelictSDL.load();
> DerelictSDLImage.load();
>
> if (SDL_Init(SDL_INIT_EVERYTHING)< 0)
> {
> throw new Exception("Failed to initialize SDL: " ~
> fromStringz(SDL_GetError()));
> }
>
> // Enable key repeat so the player can keep a key down for moving
> if (SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY,
> SDL_DEFAULT_REPEAT_INTERVAL))
> {
> throw new Exception("Failed to set key repeat: " ~
> fromStringz(SDL_GetError()));
> }
> }
>
> static ~this()
> {
> SDL_Quit();
> // release GL, GLU and SDL's shared libs
> DerelictGLU.unload();
> DerelictGL.unload();
> DerelictSDL.unload();
> }
Or just using dsss: in the derelict directory run "dsss build && dsss
install"
/Jacob Carlborg
More information about the Digitalmars-d
mailing list