Files
Don Cross 523b91fde2 Fixed JavaScript unit tests for Windows.
I noticed on a freshly-cloned Astronomy Engine on Windows,
I started getting JavaScript test failures. The problem was the
script generate/test.js had an inconsistent way of reading text
from files and splitting it into lines. Some of the tests
did not account for \r\n line endings in Windows text files.

So I created a unified approach: a new function ReadLines
that works correctly for Linux and Windows, regardless
of the variant line endings.

This may not work on Mac OS, but I don't have an easy
way of testing that myself. But at least now I can fix
issues like that in one place.
2021-11-24 08:30:54 -05:00
..
2021-11-12 19:44:56 -05:00
2019-04-23 17:44:56 -04:00
2019-04-08 22:25:38 -04:00

Source Generator

This directory contains code and data for generating the various language implementations of Astronomy Engine.

It is only needed by contributors who want to make enhancements or fix bugs. People who just want to use the astronomy calculator for a given programming langauge can safely ignore this directory and use the source code that has already been generated for that language.


Linux

Tool setup

The following tools are required for developers:

  • gcc
  • Node.js
  • npm

Optional documentation generation

The following steps are optional, if you want to generate documentation.

Install these packages:

  • jsdoc2md
  • doxygen
  • xsltproc
  • graphviz

In the directory generate, create a file generate_c_docs; it doesn't matter what it contains. This enables creating documentation for the C code.

Change into the directory hydrogen and execute: npm init.

Build process

Once you have all the tools installed and configured, you are ready to proceed.

Change into the generate directory (this directory) and run the bash script ./run to rebuild all code, generate all documentation, and run all the unit tests.


Windows

Tool setup

The following tools are required for developers:

  • Microsoft Visual Studio (2015 or later Community Edition is freely available and works fine).
  • Node.js
  • npm

Optional documentation generation

The following steps are optional, if you want to generate documentation.

Install these packages:

In the directory generate, create a file generate_c_docs; it doesn't matter what it contains. This enables creating documentation for the C code.

Change into the directory hydrogen and execute: npm init.

Build process

Once you have all the tools installed and configured, you are ready to proceed.

Change into the generate directory (this directory) and run the batch file run.bat to rebuild all code, generate all documentation, and run all the unit tests.


Mac

I could use some help getting this to work on the Mac. If you are looking for an open source project to help with, and you have a Mac, here is your chance! Creating issues is welcome. Creating pull requests is even more welcome! This should be similar to the Linux steps, but may require some tweaks.