Improved package targets in cdc, added a zip package target,

updated the Getting Started tutorial with a link to D:YAML at
GitHub.
This commit is contained in:
Ferdinand Majerech 2011-08-16 18:35:27 +02:00
parent 283c42bf8f
commit 8e2572245f
6 changed files with 23 additions and 12 deletions

20
cdc.d
View file

@ -183,7 +183,7 @@ void main(string[] args)
void build_tar_gz()
{
if(system("tar cf dyaml.tar * && gzip -9v dyaml.tar ") != 0)
if(system("git archive HEAD | gzip -9v > dyaml.tar.gz") != 0)
{
writeln("Error creating a tar.gz package.");
}
@ -191,12 +191,20 @@ void main(string[] args)
void build_tar_xz()
{
if(system("tar cf dyaml.tar * && xz -9ev dyaml.tar ") != 0)
if(system("git archive HEAD | xz -9ev > dyaml.tar.xz ") != 0)
{
writeln("Error creating a tar.xz package.");
}
}
void build_zip()
{
if(system("git archive -odyaml.zip -9 HEAD") != 0)
{
writeln("Error creating a zip package");
}
}
void build(string[] targets ...)
{
foreach(target; targets)
@ -209,6 +217,7 @@ void main(string[] args)
case "unittest": build_unittest(); break;
case "tar.gz": build_tar_gz(); break;
case "tar.xz": build_tar_xz(); break;
case "zip": build_zip(); break;
case "all": build("debug", "release", "unittest"); break;
default:
writeln("unknown build target: ", target);
@ -244,10 +253,9 @@ void help()
" Optimizations, inlining enabled.\n"
" Target binary name: 'pong-release'\n"
" all All of the above.\n"
" tar.gz Unix/Linux only: Create a tar.gz package\n"
" (this just archives the directory at the moment)\n"
" tar.xz Unix/Linux only: Create a tar.xz package\n"
" (this just archives the directory at the moment)\n"
" tar.gz Needs git, gzip: Create a tar.gz package.\n"
" tar.xz Needs git, xz: Create a tar.xz package.\n"
" zip Needs zip: Create a zip package.\n"
"\n"
"Available options:\n"
" -h --help Show this help information.\n"

Binary file not shown.

View file

@ -35,8 +35,9 @@ Download the version of DMD for your operating system and install it.
Download and compile D:YAML
^^^^^^^^^^^^^^^^^^^^^^^^^^^
The newest version of D:YAML can be found `here <TODO>`_. Download a source
archive, extract it, and move to the extracted directory.
The newest version of D:YAML can be found
`here <https://github.com/Kiith-Sa/D-YAML>`_. Download a source archive, extract
it, and move to the extracted directory.
D:YAML uses a modified version of the `CDC <http://dsource.org/projects/cdc/>`_
script for compilation. To compile D:YAML, you first need to build CDC.

View file

@ -71,8 +71,9 @@ however, at the moment they are not as up to date as DMD.</p>
</div>
<div class="section" id="download-and-compile-d-yaml">
<h3>Download and compile D:YAML<a class="headerlink" href="#download-and-compile-d-yaml" title="Permalink to this headline"></a></h3>
<p>The newest version of D:YAML can be found <a class="reference external" href="TODO">here</a>. Download a source
archive, extract it, and move to the extracted directory.</p>
<p>The newest version of D:YAML can be found
<a class="reference external" href="https://github.com/Kiith-Sa/D-YAML">here</a>. Download a source archive, extract
it, and move to the extracted directory.</p>
<p>D:YAML uses a modified version of the <a class="reference external" href="http://dsource.org/projects/cdc/">CDC</a>
script for compilation. To compile D:YAML, you first need to build CDC.
Do this by typing the following command into the console:</p>

View file

@ -35,8 +35,9 @@ Download the version of DMD for your operating system and install it.
Download and compile D:YAML
^^^^^^^^^^^^^^^^^^^^^^^^^^^
The newest version of D:YAML can be found `here <TODO>`_. Download a source
archive, extract it, and move to the extracted directory.
The newest version of D:YAML can be found
`here <https://github.com/Kiith-Sa/D-YAML>`_. Download a source archive, extract
it, and move to the extracted directory.
D:YAML uses a modified version of the `CDC <http://dsource.org/projects/cdc/>`_
script for compilation. To compile D:YAML, you first need to build CDC.