Parsing System (v0.7)
Goldie Home (v0.7) -> Developers -> Scripts for Developers

Scripts for Developers

There are a few scripts included to aid in Goldie's development. All of these are available in both Unix shell script and Windows batch file. All of these should be run from the main Goldie directory.

makeBuiltinStaticLangs

Goldie comes with two static-style languages already generated and built-in: calc and grm. Run this script to automatically regenerate them if you've modified their grammars, StaticLang, or relevant portions of GoldieLib.

Note that this script does not automatically compile the .grm grammar definitions into CGT files. So if you modify their .grm definitions, you'll have to recompile their CGT files yourself via either GRMC: Grammar Compiler or GOLD Parser Builder before running this script.

makeDocs

This is explained on the GenDocs page.

makePackage

Exports the latest Goldie and SemiTwistDTools trunks fresh out of version control, builds them, and generates ready-to-distribute .7z packages, just like the ones on the Goldie downloads page. The Unix shell script version also generates a source-only package.

All work is done in ./release/. If that directory already exists, it will be completely erased first. If it does not exist, it will be created.

runTests

Exports the latest Goldie and SemiTwistDTools trunks fresh out of version control and into ./test-cache/. Then with each supported D compiler, attempts to build everything and run all unittests.

This tool requires that you have DVM (D Version Manager) installed, and that you have used DVM to install all versions of DMD supported by Goldie (You can check inside the runTests script to see which versions these are).

It's highly recommended to log the output of runTests, because it's unlikely to all fit on one command line screen, even with scrolling. If you're not sure how to do this, see the article 'tee' Time Logging.

updateServerDocs

Goldie's documentation is laid out like this:

http://www.semitwist.com/goldie/* <-- Most recent version http://www.semitwist.com/goldie/v{version}/* <-- Specific version archives

If you're maintaining a copy of Goldie's documentation, you can use this tool to automatically merge in a new version. It's split into two components:

  1. The core implementation written in D: ./bin/goldie-updateServerDocs
  2. An optional user-specific shell script frontend (examples are in ./updateServerDocs-example and ./updateServerDocs-example.bat).

Run either one with no arguments to see usage information.

To use this, make sure the documentation you want to merge in is at ./release/PublicDocs/docs (it will already be put there by makePackage). Then, run the updateServerDocs tool and give it the version number you're merging in. Examples:

$./updateServerDocs-example 0.6 $goldie-updateServerDocs 0.6 /mnt/my-server-via-sshfs/www/goldie >updateServerDocs-example 0.6 >goldie-updateServerDocs 0.6 C:\Inetpub\wwwroot\goldie

If you want to merge in more than one version, make sure you merge them in order from oldest to newest. Otherwise, the automatic creation of "this page no longer exists" pages will get messed up.

To compile the D-based portion of updateServerDocs, you'll need at least DMD 2.054. If you have that, then compile with:

>semitwist-stbuild updateServerDocs