Changeset 265
- Timestamp:
- 07/06/07 12:23:53 (1 year ago)
- Files:
-
- trunk/DerelictGL/derelict/opengl/extension/arb/multitexture.d (modified) (1 diff)
- trunk/DerelictILUT/derelict/devil/ilutfuncs.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/collision.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/collision_space.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/collision_trimesh.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/common.d (modified) (2 diffs)
- trunk/DerelictODE/derelict/ode/compatibility.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/contact.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/error.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/export_dif.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/mass.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/matrix.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/misc.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/objects.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/odemath.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/rotation.d (modified) (1 diff)
- trunk/DerelictODE/derelict/ode/timer.d (modified) (1 diff)
- trunk/buildme.d (modified) (9 diffs)
- trunk/docs/build.html (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/DerelictGL/derelict/opengl/extension/arb/multitexture.d
r264 r265 197 197 typedef void function(GLenum, GLshort) pfglMultiTexCoord1sARB; 198 198 typedef void function(GLenum, GLshort*) pfglMultiTexCoord1svARB; 199 typedef void function(GLenum, GLdouble ) pfglMultiTexCoord2dARB;199 typedef void function(GLenum, GLdouble, GLdouble) pfglMultiTexCoord2dARB; 200 200 typedef void function(GLenum, GLdouble*) pfglMultiTexCoord2dvARB; 201 typedef void function(GLenum, GLfloat ) pfglMultiTexCoord2fARB;201 typedef void function(GLenum, GLfloat, GLfloat) pfglMultiTexCoord2fARB; 202 202 typedef void function(GLenum, GLfloat*) pfglMultiTexCoord2fvARB; 203 typedef void function(GLenum, GLint ) pfglMultiTexCoord2iARB;203 typedef void function(GLenum, GLint, GLint) pfglMultiTexCoord2iARB; 204 204 typedef void function(GLenum, GLint*) pfglMultiTexCoord2ivARB; 205 typedef void function(GLenum, GLshort ) pfglMultiTexCoord2sARB;205 typedef void function(GLenum, GLshort, GLshort) pfglMultiTexCoord2sARB; 206 206 typedef void function(GLenum, GLshort*) pfglMultiTexCoord2svARB; 207 typedef void function(GLenum, GLdouble ) pfglMultiTexCoord3dARB;207 typedef void function(GLenum, GLdouble, GLdouble, GLdouble) pfglMultiTexCoord3dARB; 208 208 typedef void function(GLenum, GLdouble*) pfglMultiTexCoord3dvARB; 209 typedef void function(GLenum, GLfloat ) pfglMultiTexCoord3fARB;209 typedef void function(GLenum, GLfloat, GLfloat, GLfloat) pfglMultiTexCoord3fARB; 210 210 typedef void function(GLenum, GLfloat*) pfglMultiTexCoord3fvARB; 211 typedef void function(GLenum, GLint ) pfglMultiTexCoord3iARB;211 typedef void function(GLenum, GLint, GLint, GLint) pfglMultiTexCoord3iARB; 212 212 typedef void function(GLenum, GLint*) pfglMultiTexCoord3ivARB; 213 typedef void function(GLenum, GLshort ) pfglMultiTexCoord3sARB;213 typedef void function(GLenum, GLshort, GLshort, GLshort) pfglMultiTexCoord3sARB; 214 214 typedef void function(GLenum, GLshort*) pfglMultiTexCoord3svARB; 215 typedef void function(GLenum, GLdouble ) pfglMultiTexCoord4dARB;215 typedef void function(GLenum, GLdouble, GLdouble, GLdouble, GLdouble) pfglMultiTexCoord4dARB; 216 216 typedef void function(GLenum, GLdouble*) pfglMultiTexCoord4dvARB; 217 typedef void function(GLenum, GLfloat ) pfglMultiTexCoord4fARB;217 typedef void function(GLenum, GLfloat, GLfloat, GLfloat, GLfloat) pfglMultiTexCoord4fARB; 218 218 typedef void function(GLenum, GLfloat*) pfglMultiTexCoord4fvARB; 219 typedef void function(GLenum, GLint ) pfglMultiTexCoord4iARB;219 typedef void function(GLenum, GLint, GLint, GLint, GLint) pfglMultiTexCoord4iARB; 220 220 typedef void function(GLenum, GLint*) pfglMultiTexCoord4ivARB; 221 typedef void function(GLenum, GLshort ) pfglMultiTexCoord4sARB;221 typedef void function(GLenum, GLshort, GLshort, GLshort, GLshort) pfglMultiTexCoord4sARB; 222 222 typedef void function(GLenum, GLshort*) pfglMultiTexCoord4svARB; 223 223 pfglActiveTextureARB glActiveTextureARB; trunk/DerelictILUT/derelict/devil/ilutfuncs.d
r264 r265 177 177 version(Windows) 178 178 { 179 private import std.c.windows.windows; 179 version(Tango) 180 { 181 private import tango.sys.Common; 182 } 183 else 184 { 185 private import std.c.windows.windows; 186 } 187 180 188 181 189 typedef HBITMAP function(HDC hDC) pfilutConvertToHBitmap; trunk/DerelictODE/derelict/ode/collision.d
r259 r265 32 32 module derelict.ode.collision; 33 33 34 import derelict.ode.common; 35 import derelict.ode.collision_space; 36 import derelict.ode.contact; 34 private 35 { 36 import derelict.ode.common; 37 import derelict.ode.collision_space; 38 import derelict.ode.contact; 39 } 37 40 38 41 /* trunk/DerelictODE/derelict/ode/collision_space.d
r259 r265 32 32 module derelict.ode.collision_space; 33 33 34 import derelict.ode.common;34 private import derelict.ode.common; 35 35 36 36 /* trunk/DerelictODE/derelict/ode/collision_trimesh.d
r259 r265 32 32 module derelict.ode.collision_trimesh; 33 33 34 import derelict.ode.common;34 private import derelict.ode.common; 35 35 36 36 /* trunk/DerelictODE/derelict/ode/common.d
r259 r265 32 32 module derelict.ode.common; 33 33 34 import std.math; 34 private 35 { 36 version(Tango) 37 { 38 import tango.stdc.math; 39 } 40 else 41 { 42 import std.math; 43 } 44 } 35 45 36 46 /* … … 87 97 dReal dFMod(dReal a, dReal b) 88 98 { 89 real c = b; 90 return modf(a,c); /* modulo */ 99 version(Tango) 100 { 101 return modf(a,&b); 102 } 103 else 104 { 105 real c; 106 return modf(a,c); 107 } 108 91 109 } 92 110 trunk/DerelictODE/derelict/ode/compatibility.d
r259 r265 32 32 module derelict.ode.compatibility; 33 33 34 import derelict.ode.common; 35 import derelict.ode.rotation; 34 private 35 { 36 import derelict.ode.common; 37 import derelict.ode.rotation; 38 } 36 39 37 40 /* trunk/DerelictODE/derelict/ode/contact.d
r259 r265 32 32 module derelict.ode.contact; 33 33 34 import derelict.ode.common;34 private import derelict.ode.common; 35 35 36 36 /* trunk/DerelictODE/derelict/ode/error.d
r259 r265 32 32 module derelict.ode.error; 33 33 34 import std.stdarg; 34 private 35 { 36 version(Tango) 37 { 38 import tango.stdc.stdarg; 39 } 40 else 41 { 42 import std.stdarg; 43 } 44 } 35 45 36 46 /* trunk/DerelictODE/derelict/ode/export_dif.d
r259 r265 32 32 module derelict.ode.export_dif; 33 33 34 import std.c.stdio; 35 import derelict.ode.common; 34 private 35 { 36 import derelict.ode.common; 37 38 version(Tango) 39 { 40 import tango.stdc.stdio; 41 } 42 else 43 { 44 import std.c.stdio; 45 } 46 } 36 47 37 48 /* trunk/DerelictODE/derelict/ode/mass.d
r259 r265 32 32 module derelict.ode.mass; 33 33 34 import derelict.ode.common; 35 import std.stdio; 34 private 35 { 36 import derelict.ode.common; 37 38 version(Tango) 39 { 40 import tango.stdc.stdio; 41 } 42 else 43 { 44 import std.c.stdio; 45 } 46 } 36 47 /* 37 48 * ODE contribution by William DeVore, 2007 trunk/DerelictODE/derelict/ode/matrix.d
r259 r265 32 32 module derelict.ode.matrix; 33 33 34 import derelict.ode.common;34 private import derelict.ode.common; 35 35 36 36 /* trunk/DerelictODE/derelict/ode/misc.d
r259 r265 32 32 module derelict.ode.misc; 33 33 34 import std.c.stdio; 35 import derelict.ode.common; 34 private 35 { 36 import derelict.ode.common; 37 38 version(Tango) 39 { 40 import tango.stdc.stdio; 41 } 42 else 43 { 44 import std.c.stdio; 45 } 46 } 36 47 37 48 /* trunk/DerelictODE/derelict/ode/objects.d
r259 r265 32 32 module derelict.ode.objects; 33 33 34 import derelict.ode.common; 35 import derelict.ode.mass; 36 import derelict.ode.contact; 34 private 35 { 36 import derelict.ode.common; 37 import derelict.ode.mass; 38 import derelict.ode.contact; 39 } 37 40 38 41 /* trunk/DerelictODE/derelict/ode/odemath.d
r259 r265 32 32 module derelict.ode.odemath; 33 33 34 import derelict.ode.common;34 private import derelict.ode.common; 35 35 36 36 /* trunk/DerelictODE/derelict/ode/rotation.d
r259 r265 32 32 module derelict.ode.rotation; 33 33 34 import derelict.ode.common;34 private import derelict.ode.common; 35 35 36 36 /* trunk/DerelictODE/derelict/ode/timer.d
r259 r265 32 32 module derelict.ode.timer; 33 33 34 import std.c.stdio; 34 private 35 { 36 version(Tango) 37 { 38 import tango.stdc.stdio; 39 } 40 else 41 { 42 import std.c.stdio; 43 } 44 } 35 45 36 46 /* trunk/buildme.d
r261 r265 33 33 // Imports 34 34 //============================================================================== 35 module buildme; 36 35 37 version(Tango) 36 38 { 37 static assert(0, "Tango support for the build script is currently incomplete.");39 // static assert(0, "Tango support for the build script is currently incomplete."); 38 40 private 39 41 { … … 46 48 import tango.stdc.stringz; 47 49 import tango.stdc.stdio; 50 import tango.io.FilePath; 51 import tango.io.Stdout; 52 import tango.sys.Environment; 48 53 } 49 54 } … … 64 69 version(Windows) 65 70 { 66 private static const char[] delCmd = "@del ";71 private static const char[] delCmd = "cmd /c del "; 67 72 private static const char[] pathSep = "\\"; 68 73 private static const char[] libPre = ""; … … 198 203 version(Tango) 199 204 { 205 scope dir = new FilePath("."); 206 foreach(c; dir.toList) 207 { 208 scope path = new FilePath(c); 209 if(path.isFolder && c[0] != '.') 210 processPackage(c); 211 } 200 212 } 201 213 else … … 370 382 version(Tango) 371 383 { 372 return toLower(str );384 return toLower(str.dup); 373 385 } 374 386 else … … 382 394 version(Tango) 383 395 { 384 autos = new String!(char)(a);396 scope s = new String!(char)(a); 385 397 return s.compare(b); 386 398 } … … 425 437 version(Tango) 426 438 { 427 auto p = new Process(cmd, null);439 auto p = new Process(cmd, Environment.get); 428 440 p.execute(); 441 // Stdout.stream.copy(p.stdout); 429 442 auto r = p.wait(); 430 443 return r.status; … … 440 453 version(Tango) 441 454 { 442 autof = new File(name);455 scope f = new File(name); 443 456 return cast(char[])f.read(); 444 457 } … … 456 469 version(Tango) 457 470 { 458 autof = new File(name);471 scope f = new File(name); 459 472 f.write(cast(void[])contents); 460 473 } trunk/docs/build.html
r254 r265 11 11 <hr> 12 12 <h3>Introduction</h3> 13 While it is possible to compile any or all of the Derelict packages into static 14 libraries, it is not recommended that you do so. The provided build script exists 15 solely as a convenience for those who absolutely need it. The recommended way of 16 using Derelict in your applications is to make use of a build tool, such as 17 <a href="http://www.dsource.org/projects/build">Bud</a> or 13 There are some wonderful build tools created by D users, such as 14 <a href="http://www.dsource.org/projects/build">Bud</a> and 18 15 <a href="http://www.dsource.org/projects/dsss/wiki/Rebuild">Rebuild</a>. Given 19 a single D source module, these tools can automatically compile and link all 20 imported modules to create an executable. So unless you absolutely must use the 21 static libraries, please consider using the recommended approach instead. 16 a single source module, these tools are able to parse all of the modules imported 17 by your application and cause them to be compiled and linked into the final 18 executable. This is the recommended way to use Derelict. Unfortunately, it is not 19 always possible. 22 20 <p> 23 For those who do need the libraries, in the top-level Derelict directory 24 ($DERELICT_HOME) you will find a D module named <tt>buildme.d</tt>. It can be, 25 and is intended to be, run as a script. Executing this file will create one or 26 more libraries from the Derelict packages. At the end of execution, all of the 27 libraries that were created will be found in the $DERELICT_HOME/lib directory. 28 </p> 21 There are times when you may need to compile the Derelict packages into static 22 libraries. An example is when using an IDE that has a two-step compile and link 23 process. In such cases, D support is usually an extension and the IDE is not 24 aware of tools like Bud and Rebuild. One such IDE is 25 <a href="http://www.codeblocks.org/">Code::Blocks</a>. If you find yourself 26 needing to use Derelict in library form, a build script is included in the 27 top-level Derelict directory ($DERELICT_HOME). <tt>buildme.d</tt> can be used 28 to compile all of the Derelict packages or only those you specify. How to do 29 so is detailed below. 30 </p><p> 29 31 30 32 <h3>Setting Up An Import Directory</h3> … … 65 67 to bug reports, I make no promises about enhancing its functionality. 66 68 67 <div class="important">Derelict hasbuilt-in support for69 <div class="important">Derelict packages have built-in support for 68 70 <a href="http://www.dsource.org/projects/tango">Tango</a>. However, currently the 69 neither the install script nor the build script (described below) can be executed 70 in a Tango-enabled environment. If you need to use Derelict with Tango, you must 71 do so using the method recommended above (with Bud or Rebuild).</div> 72 73 <h3>TheBuild Script</h3> 71 the install script is not configured for Tango and will not execute in a Tango 72 environment. When you execute the script, make sure you do so in a Phobos environment.</div> 73 74 <h3>The Build Script</h3> 75 74 76 Currently, the build script requires that <a href="http://www.dsource.org/projects/build"> 75 Bud</a> be on your PATH. If it is not, the script will fail. To execute the 76 build script, cd to $DERELICT_HOME and use one of the following command lines: 77 Bud</a> be on your PATH. If it is not, the script will fail execution. In the future, support 78 for Rebuild will be added. How you execute the build script depends upon the environment 79 you have configured (Phobos or Tango) and which tools you decide to use. Following are 80 descriptions for different ways to use the build script, two of which require 81 compilation and only one of which will currently work in a Tango environment. 82 83 <h4>Execution as a Script</h4> 84 85 In a Phobos environment you can execute <tt>buildme.d</tt> as a script, without 86 compiling it first, using one of the following command lines: 77 87 78 88 <pre> … … 82 92 83 93 The first is the command line to use with DMD. The second is for GDC. In the rest 84 of this document, 'dmd' will be used for all example command lines. Anytime you 85 see 'dmd', you can replace it with 'gdmd' to use the same command line with GDC. 94 of this document, anytime you see 'dmd' in a command line, you can replace it with 95 'gdmd' to use the same command line with GDC. You can also compile the script with 96 DMD or GDC, but then you'll need to clean up the output files. 97 98 <h4>Compiling with Bud</h4> 99 100 The build script uses Bud to compile Derelict packages into static libraries. You can 101 also use Bud to compile the build script into an executable. This is not really 102 necessary, nor is it really recommended. But, the option exists as long as you are 103 in a Phobos environment. For some reason, Bud can compile the Derelict packages 104 just fine in a Tango environment, but fails to compile <tt>buildme.d</tt>. The 105 following is the recommended command line: 106 107 <pre> 108 bud -clean buildme.d 109 </pre> 110 111 Passing the <tt>-clean</tt> option to Bud will cause all temporary output files to be 112 deleted once the process completes. You can then execute <tt>buildme</tt> like any other 113 executable. 114 115 <h4>Compiling with Rebuild</h4> 116 117 This option is the only one of the three listed here that works in a Tango environment, 118 but it also works in a Phobos environment. The command line is very similar to that 119 for Bud above: 120 121 <pre> 122 rebuild -clean buildme.d 123 </pre> 124 125 The <tt>-clean</tt> option will cause most of the temporary output files to be deleted. 126 But Rebuild currently does not delete MAP files generated by DMD on Windows, so you will 127 have a buildme.map lying around in the directory after execution. 86 128 87 129 <h4>Options</h4> 88 Before executing the build script, you need to decide which libraries you want 89 to build and how you want to build them. There are a few command line options 90 you can pass along. With the exception of the 'cleanlib' option, all options 91 may be passed in any order.92 130 Whether you run <tt>buildme.d</tt> as a script or compile it into an executable, 131 you first need to decide which libraries you want to build and how you want to build them. 132 There are a few command line options you can pass along. With the exception of the 133 'cleanlib' option, all options may be passed in any order. 134 <p> 93 135 By default, each package will be built in Release mode. You can specify debug 94 136 mode by passing 'debug' on the command line: … … 98 140 </pre> 99 141 142 Or, for the compiled form: 143 144 <pre> 145 buildme debug 146 </pre> 147 100 148 The script also accepts 'release' as a command line argument. 101 102 The build script generates a temporary Bud Response File that is deleted at the149 </p><p> 150 The build script generates a temporary build response file that is deleted at the 103 151 end of execution. Sometimes, when debugging problems with the build script, it 104 152 is necessary to see the contents of this file. You can prevent the script from … … 109 157 </pre> 110 158 159 Or for the compiled form: 160 161 <pre> 162 buildme nodelbrf 163 </pre> 164 111 165 You can also pass options to both Bud and the compiler, though not via the command 112 166 line. This is done through the following three options files: … … 120 174 Options in <tt>bud_common.txt</tt> are used in both Debug and Release builds. The other 121 175 two are self-explanatory. 122 < p>176 </p><p> 123 177 The rules for editing these files are the same as those for editing 124 178 <a href="http://build.dsource.org/response_file.html">Bud Response Files</a>, … … 143 197 </pre> 144 198 199 Or for the compiled form: 200 201 <pre> 202 cd $DERELICT_HOME 203 buildme DerelictAL DerelictUtil 204 </pre> 205 145 206 The above will build only the DerelictAL and DerelictUtil libraries. 146 207 … … 154 215 </pre> 155 216 217 Or for the compiled form: 218 219 <pre> 220 cd $DERELICT_HOME 221 buildme cleanlib 222 </pre> 223 156 224 This will delete the libraries in $(DERELICT_HOME/lib). Unlike the other command 157 line options, this option must be specified first. Any options following it will158 be ignored. If it is not first,it will be ignored.225 line options, this option is exclusive to other options. If any options precede it, 226 it will be ignored. Likewise, any options following it will be ignored. 159 227 160 228 <h4>Troubleshooting</h4>
