id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 8,[patch] Enhanced build script,Abscissa,somebody,I've created a new buildscript for DDMD that should automate most of steps in building ddmd making it much easier for new people to get started. I'd like to submit it for inclusion. What this does (in order):\r\n\r\n- Optionally (via command-line arg) downloads dmd.2.039.zip (or any other version) from digitamars.com if it isn't already in the main ddmd directory (requires wget to be installed. If it isn't_ the user can just download the file to dmd's main directory manually).\r\n\r\n- Extracts the dmd zip.\r\n\r\n- Applies the necessary patches/modifications to build dmd.lib_ then builds it and copies it to the main ddmd directory.\r\n\r\n- Copies necessary library files and config file (and makes a minor adjustment to the config file) so that ddmd will be able to compile and link out-of-the-box without having to manually point it to the phobos/druntime source/libs.\r\n\r\n- Compiles the debug and/or release versions of ddmd.\r\n\r\nUpon subsequent runs_ it will remember it did all of the setup and will just simply recompile ddmd (unless you give it the --setup arg). Help screen is shown with "build --help" (win) or "./build.sh --help" (lin)_ which is reproduced here (for the windows version):\r\n\r\n{{{\r\nThis script will compile DDMD\r\n\r\nTo run this script_ you must download a copy of dmd.2.039.zip to this\r\ndirectory. It can be obtained from:\r\n http://ftp.digitalmars.com/dmd.2.039.zip\r\nOr just use --download if you have wget installed.\r\n\r\nNote that this script must be run from the main DDMD directory.\r\n\r\nAlso_ make sure you have GNU patch installed and current versions\r\nof DMC and DMD (D2) on the PATH.\r\n\r\nUsage:\r\n build.bat [options...]\r\n \r\n --help_-h_-H_-? Display this help message\r\n --debug_-d Only build debug version\r\n --release_-r Only build release version\r\n --ver={ver} Base DDMD off specific DMD version (default: 2.039)\r\n --setup Re-run initial setup\r\n --download If running initial setup and the dmd zip doesn't exist_\r\n use wget to download it\r\n --dmbase={path} Path to directory containing 'dm' for building dmd.lib\r\n (Optional if --setup is used_ otherwise ignored)\r\n}}}\r\n\r\nThis does introduce a reliance on RDMD_ but that shouldn't be a problem since building DDMD requires DMD anyway (which includes RDMD). No other requirements are introduced.\r\n\r\nThis does assume that the appropriate DMC and DMD compilers and the DM library tool are on the PATH.\r\n\r\nIt works on Windows. It "mostly" works on Linux_ but since I haven't been able to compile DDMD manually on Linux yet ( http://www.dsource.org/forums/viewtopic.php?p=25643#25643 ) I haven't been able to get this 100% on Linux yet either.\r\n\r\nExample session_ starting in a directory with nothing more than the files attached to this ticket and a hello world_ and with GNU patch_ HG_ DMD 2.048+ and DMC on the PATH:\r\n\r\n{{{\r\nC:\\test> dir /b\r\nbuild.bat\r\nbuild.sh\r\nbuildHelper.d\r\nhello.d\r\n\r\nC:\\test> type hello.d\r\nimport std.stdio;\r\nvoid main()\r\n{\r\n writeln("Hello");\r\n}\r\n\r\nC:\\test> hg clone http://hg.dsource.org/projects/ddmd/ \r\n[downloads ddmd]\r\n\r\nC:\\test> copy *.* ddmd\r\n["yes" to all]\r\n\r\nC:\\test> cd ddmd\r\n\r\nC:\\test\\ddmd> rem Either download dmd.2.039.zip here manually and\r\nrun "build --debug"_ or do the following if you have wget:\r\n\r\nC:\\test\\ddmd> build --debug --download\r\n[builds ddmd]\r\n\r\nC:\\test\\ddmd> bin\\ddmd hello.d\r\n[compiles hello]\r\n\r\nC:\\test\\ddmd> hello\r\nHello\r\n}}},enhancement,closed,major,,component1,,fixed,,