Changeset 254
- Timestamp:
- 04/14/07 22:40:20 (1 year ago)
- Files:
-
- trunk/buildme.d (modified) (9 diffs)
- trunk/docs/build.html (modified) (7 diffs)
- trunk/docs/styles.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/buildme.d
r253 r254 161 161 void cleanLib() 162 162 { 163 printf(" Deleting all %s files from the lib subdirectory...\n", toCString(libExt));163 printf("[BuildMe] Deleting all %s files from the lib subdirectory...\n", toCString(libExt)); 164 164 execute(delCmd ~ "lib" ~ pathSep ~ "*" ~ libExt); 165 printf(" Finished!\n\n");165 printf("[BuildMe] Finished!\n\n"); 166 166 } 167 167 … … 193 193 void scanForPackages() 194 194 { 195 printf("\n Scanning for buildable packages...\n\n");195 printf("\n[BuildMe] Scanning for buildable packages...\n\n"); 196 196 197 197 // cycle through every Derelict directory to find buildable packages … … 210 210 } 211 211 212 printf(" Finished!\n\n");212 printf("[BuildMe] Finished!\n\n"); 213 213 } 214 214 … … 218 218 if(findStr(packageName, "Derelict") != 0) 219 219 { 220 printf(" Nothing to do for directory \'%s\'\n", toCString(packageName));220 printf("[BuildMe] Nothing to do for directory \'%s\'\n", toCString(packageName)); 221 221 } 222 222 else … … 246 246 247 247 // create the temporary brf 248 printf(" Preparing to build package %s in %s mode...\n", toCString(packageName), toCString(modeToString()));248 printf("[BuildMe] Preparing to build package %s in %s mode...\n", toCString(packageName), toCString(modeToString())); 249 249 if(!createBRF(packageName, path)) 250 250 return false; 251 251 252 252 // call out to build with the name of the temp brf as an arg 253 printf(" Building %s...\n", toCString(packageName));253 printf("[BuildMe] Building %s...\n", toCString(packageName)); 254 254 if(execute(_name ~ " @" ~ _tempBRFName) != 0) 255 255 { … … 260 260 { 261 261 // delete the temporary brf 262 printf(" Deleting temporary Build Response File...\n\n");262 printf("[BuildMe] Deleting temporary Build Response File...\n\n"); 263 263 execute(delCmd ~ _tempBRFName); 264 264 } … … 279 279 bool createBRF(char[] packageName, char[] path) 280 280 { 281 printf(" Reading build tool arguments...\n");281 printf("[BuildMe] Reading build tool arguments...\n"); 282 282 283 283 char[] txt; // holds the contents of the forbud file … … 289 289 if(txt is null) 290 290 { 291 printf(" Could not find %s\n", toCString(path));291 printf("[BuildMe] Could not find %s\n", toCString(path)); 292 292 return false; 293 293 } … … 313 313 314 314 // write the temporary brf to disk 315 printf(" Creating temporary Build Response File...\n");315 printf("[BuildMe] Creating temporary Build Response File...\n"); 316 316 317 317 writeFile(_tempBRFName, brf); trunk/docs/build.html
r251 r254 1 1 <html lang="en"> 2 2 <head> 3 <title>Building Derelict</title>4 <link rel="stylesheet" type="text/css" href="styles.css">3 <title>Building Derelict</title> 4 <link rel="stylesheet" type="text/css" href="styles.css"> 5 5 </head> 6 6 <body> … … 28 28 </p> 29 29 30 <div class="important">Derelict has built-in support for 31 <a href="http://www.dsource.org/projects/tango">Tango</a>. but currently the 32 build script cannot be executed in a Tango-enabled environment. If you need to 33 use Derelict with Tango, you must do so using the method recommended above (with 34 Bud or Rebuild).</div> 35 36 <h3>Requirements</h3> 37 Currently, the build script requires that <a href="http://www.dsource.org/projects/build"> 38 Bud</a> be on your PATH. If it is not, the script will fail. 39 40 <h3>Execution</h3> 41 To execute the build script, cd to $DERELICT_HOME and use one of the following 42 command lines: 30 <h3>Setting Up An Import Directory</h3> 31 Whether you run the build script or not, when you compile applications using 32 Derelict you need to let the compiler know where it can find the Derelict source 33 modules. The directory tree of the Derelict distribution is designed to for ease 34 of maintenance. Each package is clearly segregated into its own directory. Because 35 of this structure, when compiling a Derelict application you have to pass the path 36 to each package you use to the compiler. For example, if building an app using 37 DerelictSDL and DerelictGL, you need to do something like this: 43 38 44 39 <pre> 45 dmd -run buildme.d 46 gdmd -run buildme.d 40 bud myapp.d -IDerelictDir/DerelictGL -IDerelictDir/DerelictSDL -IDerelictDir/DerelictUtil 41 </pre> 42 43 When using response files, this is a non-issue. However, many people prefer to 44 have all of their D modules in a single import tree. For a long time, Derelict 45 users who wanted such a setup had to copy the Derelict modules to their import 46 tree manually, or use a custom script. As a result, Derelict now includes a very 47 basic install script written in D. Given a root directory, this script will 48 create a subdirectory 'derelict' and copy all derelict modules into that tree. Then 49 you can add all of the to the import path with a single command line switch, 50 '-IRootDir'. 51 52 The following command line will execute the install script (if you are using 53 GDC, replace 'dmd' with 'gdmd': 54 55 <pre> 56 dmd -run install.d RootDir 57 </pre> 58 59 'RootDir' is a required argument and should be the complete path to the directory 60 in which you want to install the Derelict modules. Note that this does not copy 61 any Derelict libraries (remember, you do not need to build the Derelict libraries 62 if you use a build tool like Bud or Rebuild to compile your D apps). 63 64 This simple script is provided as a convenience. While I will certainly respond 65 to bug reports, I make no promises about enhancing its functionality. 66 67 <div class="important">Derelict has built-in support for 68 <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> 74 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 78 <pre> 79 dmd -run buildme.d 80 gdmd -run buildme.d 47 81 </pre> 48 82 49 83 The first is the command line to use with DMD. The second is for GDC. In the rest 50 of this document, 'dmd' will be used for example command lines. Anytime you see51 'dmd', you can replace it with 'gdmd' to use the same command line with GDC.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. 52 86 53 <h 3>Options</h3>87 <h4>Options</h4> 54 88 Before executing the build script, you need to decide which libraries you want 55 89 to build and how you want to build them. There are a few command line options … … 57 91 may be passed in any order. 58 92 59 <h4>Debug or Release?</h4>60 93 By default, each package will be built in Release mode. You can specify debug 61 94 mode by passing 'debug' on the command line: 62 95 63 96 <pre> 64 dmd -run buildme.d debug97 dmd -run buildme.d debug 65 98 </pre> 66 99 67 100 The script also accepts 'release' as a command line argument. 68 69 <h4>Options for Bud</h4>70 101 71 102 The build script generates a temporary Bud Response File that is deleted at the … … 75 106 76 107 <pre> 77 dmd -run buildme.d nodelbrf108 dmd -run buildme.d nodelbrf 78 109 </pre> 79 110 … … 108 139 109 140 <pre> 110 cd $DERELICT_HOME111 dmd -run buildme.d DerelictAL DerelictUtil141 cd $DERELICT_HOME 142 dmd -run buildme.d DerelictAL DerelictUtil 112 143 </pre> 113 144 … … 119 150 120 151 <pre> 121 cd $DERELICT_HOME122 dmd -run buildme.d cleanlib152 cd $DERELICT_HOME 153 dmd -run buildme.d cleanlib 123 154 </pre> 124 155 … … 127 158 be ignored. If it is not first, it will be ignored. 128 159 129 <h 3>Troubleshooting</h3>160 <h4>Troubleshooting</h4> 130 161 If you have any problems building Derelict with Bud, you may direct them to the 131 162 <a href="http://www.dsource.org/forums/viewforum.php?f=19&sid=d6f86cfb804d7c8727af1f58cd327d2c">Derelict Forums</a> trunk/docs/styles.css
r252 r254 27 27 pre { 28 28 color : #000080; 29 background-color: # BBB;29 background-color: #E6EAEC; 30 30 font-weight : bold; 31 31 }
