Changeset 66

Show
Ignore:
Timestamp:
12/15/04 05:28:24 (4 years ago)
Author:
aldacron
Message:

[DerelictSDL]
* moved image.d and mixer.d into their own separate projects (DerelictSDLImage and DerelictSDLMixer respectively).
* Updated the README with Linux instructions
* removed the *dist folders and all of the files in them
[DerelictSDLImage && DerelictSDLMixer]
* initial checkin

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/DerelictSDL/Makefile

    r45 r66  
    5656    $(SDL.OBJ.DIR)\timer.obj \ 
    5757    $(SDL.OBJ.DIR)\types.obj \ 
    58     $(SDL.OBJ.DIR)\video.obj  
    59      
    60 SDLIMG.SRC.DIR = $(SDL.SRC.DIR) 
    61 SDLIMG.SRC = \ 
    62     $(SDLIMG.SRC.DIR)\image.d 
    63      
    64 SDLIMG.OBJ.DIR = $(SDL.OBJ.DIR) 
    65 SDLIMG.OBJ = \ 
    66     $(SDLIMG.OBJ.DIR)\image.obj 
    67      
    68 SDLMIX.SRC.DIR = $(SDL.SRC.DIR) 
    69 SDLMIX.SRC = \ 
    70     $(SDLMIX.SRC.DIR)\mixer.d 
    71      
    72 SDLMIX.OBJ.DIR = $(SDL.OBJ.DIR) 
    73 SDLMIX.OBJ = \ 
    74     $(SDLMIX.OBJ.DIR)\mixer.obj 
    75      
    76 SDL.OBJ.ALL = \ 
    77     $(SDL.OBJ) \ 
    78     $(SDLIMG.OBJ) \ 
    79     $(SDLMIX.OBJ) 
     58    $(SDL.OBJ.DIR)\video.obj 
    8059     
    8160SDL.LIB = $(LIB.DIR)\derelictSDL.lib 
     
    9372cleanall: clean clean_lib 
    9473 
    95 sdlonly
     74all
    9675    @md $(SDL.OBJ.DIR) 
    9776    @dmd $(SDL.SRC) -c $(DFLAGS) $(DINC) -od$(SDL.OBJ.DIR) 
    9877    @lib $(LIBFLAGS) $(SDL.LIB) $(SDL.OBJ) 
    99      
    100 sdl: 
    101     @md $(SDL.OBJ.DIR) 
    102     @dmd $(SDL.SRC) -c $(DFLAGS) $(DINC) -od$(SDL.OBJ.DIR) 
    103      
    104 sdlimg: 
    105     @md $(SDLIMG.OBJ.DIR) 
    106     @dmd $(SDLIMG.SRC) -c $(DFLAGS) $(DINC) -od$(SDLIMG.OBJ.DIR) 
    107      
    108 sdlmix: 
    109     @md $(SDLMIX.OBJ.DIR) 
    110     @dmd $(SDLMIX.SRC) -c $(DFLAGS) $(DINC) -od$(SDLMIX.OBJ.DIR) 
    111      
    112 libsdlimg: 
    113     @lib $(LIBFLAGS) $(SDL.LIB) $(SDL.OBJ) $(SDLIMG.OBJ) 
    114      
    115 libsdlmix: 
    116     @lib $(LIBFLAGS) $(SDL.LIB) $(SDL.OBJ) $(SDLMIX.OBJ) 
    117      
    118 liball: 
    119     @lib $(LIBFLAGS) $(SDL.LIB) $(SDL.OBJ.ALL)   
    120      
    121 sdl_sdlimg: sdl sdlimg libsdlimg 
    122  
    123 sdl_sdlmix: sdl sdlmix libsdlmix 
    124      
    125 all: sdl sdlimg sdlmix liball 
    126      
  • trunk/DerelictSDL/Makefile.linux

    r55 r66  
    5959    $(OBJ.DIR)/loader.o 
    6060  
    61 SDLIMG.SRC.DIR = $(SDL.SRC.DIR) 
    62 SDLIMG.SRC = \ 
    63     $(SDLIMG.SRC.DIR)/image.d 
    64   
    65 SDLIMG.OBJ.DIR = $(SDL.OBJ.DIR) 
    66 SDLIMG.o = \ 
    67     $(SDLIMG.OBJ.DIR)/image.o 
    68   
    69 SDLMIX.SRC.DIR = $(SDL.SRC.DIR) 
    70 SDLMIX.SRC = \ 
    71     $(SDLMIX.SRC.DIR)/mixer.d 
    72   
    73 SDLMIX.OBJ.DIR = $(SDL.OBJ.DIR) 
    74 SDLMIX.o = \ 
    75     $(SDLMIX.OBJ.DIR)/mixer.o 
    76   
    77 SDL.OBJ.ALL = \ 
    78     $(SDL.o) \ 
    79     $(SDLIMG.o) \ 
    80     $(SDLMIX.o) 
    81   
    8261SDL.LIB = $(LIB.DIR)/libderelictSDL.a 
    8362 
    84 .PHONY: clean_obj clean_lib clean cleanall objdir sdlonly sdl sdlimg sdlmix libsdlimg libsdlmix liball sdl_sdlimg sdl_sdlmix all 
     63.PHONY: clean_obj clean_lib clean cleanall all 
    8564 
    8665DEFAULT: all 
     
    9574 
    9675cleanall: clean clean_lib 
    97  
    98 objdir
     76     
     77all
    9978    @mkdir -p $(SDL.OBJ.DIR)  
    100      
    101 sdl: 
    10279    @dmd $(SDL.SRC) -c $(DFLAGS) $(DINC) -od$(SDL.OBJ.DIR) 
    103      
    104 sdlimg: 
    105     @dmd $(SDLIMG.SRC) -c $(DFLAGS) $(DINC) -od$(SDLIMG.OBJ.DIR) 
    106   
    107 sdlmix: 
    108     @dmd $(SDLMIX.SRC) -c $(DFLAGS) $(DINC) -od$(SDLMIX.OBJ.DIR) 
    109  
    110 libsdl: 
    11180    @ar $(LIBFLAGS) $(SDL.LIB) $(SDL.o) 
    11281  
    113 libsdlimg: 
    114     @ar $(LIBFLAGS) $(SDL.LIB) $(SDL.o) $(SDLIMG.o) 
    115   
    116 libsdlmix: 
    117     @ar $(LIBFLAGS) $(SDL.LIB) $(SDL.o) $(SDLMIX.o) 
    118   
    119 liball: 
    120     @ar $(LIBFLAGS) $(SDL.LIB) $(SDL.OBJ.ALL) 
    121  
    122 sdlonly: objdir sdl libsdl 
    123   
    124 sdl_sdlimg: objdir sdl sdlimg libsdlimg 
    125  
    126 sdl_sdlmix: objdir sdl sdlmix libsdlmix 
    127   
    128 all: objdir sdl sdlimg sdlmix liball 
    129   
  • trunk/DerelictSDL/README

    r45 r66  
    77user's machine.  
    88 
    9 Please note that the Linux version is not yet implemented. Anyone who would like 
    10 to do so please let me know in the forum! 
    11  
    12 Additionally, when distributing applications built with DerelictSDL on Windows, 
    13 it is a good idea to use the DLL in the DerelictSDL\sdl_dist directory. If you 
    14 absolutely must distribute a different version of the DLL, please ensure that 
    15 it is compiled with a compiler that does not mangle the exported DLL funtion 
    16 symbol names (such as Microsoft Visual C++), or that aliases are used in the 
    17 DLL's .def file to get around the mangling. Some compilers (such as MingW) will 
    18 mangle the names in such a way that DerelictSDL cannot load them (at this time). 
     9This version of DerelictSDL expects requires SDL 1.2.7 or later. 
    1910 
    2011------------------------------------------------------------------------------- 
     
    5243++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
    5344 
    54 From that point you can call SDL functions as normal. Don't forget to make sure 
    55 that SDL.dll is on the path. 
     45From that point you can call SDL functions as normal. 
    5646 
    57 -------------------------------------------------------------------------------- 
    58 USING SDL_image 
    59 --------------------------------------------------------------------------------  
    60 SDL_image is now incorporated into DerelictSDL. Because SDL_image has a dependency 
    61 upon SDL, it cannot be used in isolation. To use SDL_image with your SDL application, 
    62 you first must import the derelict.sdl.image module. 
    63  
    64 ++++++++++++++++++++++++++   CODE  +++++++++++++++++++++++++++++++++++++++++++++ 
    65  
    66 import derelict.sdl.image;       
    67  
    68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
    69  
    70 Before calling any SDL_image functions, you need to make a call to  
    71 DerelictSDLImage_Load. This will load the shared library. 
    72  
    73 ++++++++++++++++++++++++++   CODE  +++++++++++++++++++++++++++++++++++++++++++++ 
    74  
    75 // load the shared library - the try...catch block is optional of course 
    76 try 
    77 
    78    DerelictSDLImage_Load(); 
    79 
    80 catch(Exception e) 
    81 
    82    ... 
    83 
    84  
    85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
    86  
    87 From that point you can call SDL_image functions as normal. Don't forget to make 
    88 sure that SDL_image.dll is on the path. 
    89  
    90 -------------------------------------------------------------------------------- 
    91 USING SDL_mixer 
    92 --------------------------------------------------------------------------------  
    93 SDL_mixer is now incorporated into DerelictSDL. Because SDL_mixer has a dependency 
    94 upon SDL, it cannot be used in isolation. To use SDL_mixer with your SDL application, 
    95 you first must import the derelict.sdl.mixer module. 
    96  
    97 ++++++++++++++++++++++++++   CODE  +++++++++++++++++++++++++++++++++++++++++++++ 
    98  
    99 import derelict.sdl.mixer;       
    100  
    101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
    102  
    103 Before calling any SDL_mixer functions, you need to make a call to  
    104 DerelictSDLImage_Load. This will load the shared library. 
    105  
    106 ++++++++++++++++++++++++++   CODE  +++++++++++++++++++++++++++++++++++++++++++++ 
    107  
    108 // load the shared library - the try...catch block is optional of course 
    109 try 
    110 
    111    DerelictSDLMixer_Load(); 
    112 
    113 catch(Exception e) 
    114 
    115    ... 
    116 
    117  
    118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
    119  
    120 From that point you can call SDL_mixer functions as normal. Don't forget to make 
    121 sure that SDL_mixer.dll is on the path. 
    122  
    123 NOTE: to play .ogg files with SDL_mixer you will need the libvorbis DLL from 
    124         http://www.vorbis.com/ 
    125  
    126 NOTE: to play .mp3 files with SDL_mixer you will need the SMPEG DLL from 
    127         http://icculus.org/smpeg/ 
    128          
    129 SPECIAL THANKS: to Jaymz031602 for putting the SDL_mixer binding together 
     47******************************************************************************** 
     48IMPORTANT  
     49******************************************************************************** 
     50DerelictSDL_Load attempts to load the SDL shared library using a filename appropriate 
     51for the Operating System. On Windows, this is SDL.dll, and on Linux, libSDL.so. 
     52The appropriate shared library (or symlink on Linux) must be on the path for it  
     53to be loaded successfully. 
    13054 
    13155-------------------------------------------------------------------------------- 
     
    13458 
    13559-------------------------------------------------------------------------------- 
    136 To build DerelictSDL with SDL_image and SDL_mixer on Windows: 
     60To build DerelictSDL on Windows: 
    13761 
    138621) ensure that both dmd\bin and dm\bin are on your path 
    139632) from a command prompt, cd to <derelict_dir>\DerelictSDL 
    140 3) type 'make' or 'make all' to build derelictSDL.lib with SDL_image and SDL_mixer   
     643) type 'make' or 'make all' to build derelictSDL.lib 
    141654) optionally type 'make clean' to delete all object files OR 
    14266   optionally type 'make cleanall' to delete all object and lib files 
     67    
     68   -------------------------------------------------------------------------------- 
     69To build DerelictSDL on Linux: 
    14370 
    144 -------------------------------------------------------------------------------- 
    145 To build DerelictSDL with SDL_image on Windows: 
    146  
    147 1) ensure that both dmd\bin and dm\bin are on your path 
    148 2) from a command prompt, cd to <derelict_dir>\DerelictSDL 
    149 3) type 'make sdl_sdlimg' to build derelictSDL.lib with SDL_image    
    150 4) optionally type 'make clean' to delete all object files OR 
    151    optionally type 'make cleanall' to delete all object and lib files 
    152  
    153 --------------------------------------------------------------------------------   
    154 To build DerelictSDL with SDL_mixer on Windows: 
    155  
    156 1) ensure that both dmd\bin and dm\bin are on your path 
    157 2) from a command prompt, cd to <derelict_dir>\DerelictSDL 
    158 3) type 'make sdl_sdlmix' to build derelictSDL.lib with SDL_mixer   
    159 4) optionally type 'make clean' to delete all object files OR 
    160    optionally type 'make cleanall' to delete all object and lib files 
    161  
    162 -------------------------------------------------------------------------------- 
    163 To build DerelictSDL without SDL_image or SDL_mixer on Windows: 
    164  
    165 1) ensure that both dmd\bin and dm\bin are on your path 
    166 2) from a command prompt, cd to <derelict_dir>\DerelictSDL 
    167 3) type 'make sdlonly' to build derelictSDL.lib without SDL_image or SDL_mixer   
    168 4) optionally type 'make clean' to delete all object files OR 
    169    optionally type 'make cleanall' to delete all object and lib files 
     711) ensure that both dmd and gcc are on your path 
     722) from a command prompt, cd to <derelict_dir>/DerelictSDL 
     733) type 'make -fMakefule.linux' or 'make -fMakefule.linux all' to build libderelictSDL.a 
     744) optionally type 'make -fMakefule.linux clean' to delete all object files OR 
     75   optionally type 'make -fMakefule.linux cleanall' to delete all object and lib files