- Install the dependencies for your platform.
- Fork the project here.
- Learn how to contribute.
- Build CompilerKit.
- Read Documentation.
- Find something to work on:
- Check the issue tracker Comment on the issue to get dibs.
- Check the coordination document
- Add your improvements to a branch named for the issue.
- Send in a pull request.
- Profit!
Topic branches isolate chunks of work so that it's easier for others to merge in.
- Create a new branch:
git checkout -b issueXYZ - Hack away, making commits along the way.
- Push your issue branch to github:
git push origin issueXYZ - Switch to that branch in github, and send in a pull request for feedback.
Sometimes, it's necessary to switch between branches. Your work will always be saved.
- To switch back to master:
git checkout master - To see the branches:
git branch
I will not merge code into my master branch until it has passing test cases in the test suite. If the changes include documentation, then ensure the documentation looks as expected. If the changes include code, ensure it works.
- Ensure the project builds successfully.
- Ensure the demo works.
- Write test cases for your code.
- Add test cases to the test suite.
- Ensure the project builds successfully.
- Ensure the test suite passes.
You will need to download and install everything manually. Therefore, verify everything is working first before building CompilerKit.
- Visual Studio 2010 or MinGW
- Git (version control).
- CMake.
- Doxygen.
- GLib and GObject. Extract to
C:\glib. AddC:\glib\binto the system PATH.
Open Git Bash to the CompilerKit folder. Type in the first line. Did you see the rest? You should.
pkg-config --list-all
gio-2.0 GIO - glib I/O library
gmodule-2.0 GModule - Dynamic module loader for GLib
glib-2.0 GLib - C Utility Library
gmodule-no-export-2.0 GModule - Dynamic module loader for GLib
gthread-2.0 GThread - Thread support for GLib
gobject-2.0 GObject - GLib Type, Object, Parameter and Signal Library
Did you see command not found after typing these into Git Bash? You should not.
doxygencmake
In the terminal, paste this in for your distribution:
sudo yum install git cmake doxygen glib-devel pkgconfig
sudo apt-get install git cmake doxygen libglib2.0-dev pkg-config
If you do not already have it, install:
In the terminal, paste this in:
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
Once installed, paste this into the Terminal:
brew install git cmake doxygen glib pkg-config
CompilerKit builds with CMake.
The first time you build, do this:
mkdir build && cd build
cmake ..
cmake --build .
For subsequent builds, in the build folder, just run cmake --build .
After building CompilerKit, look inside the docs/html folder.
Also, read up on GLib and GObject.
GLib is a C utility library similar to the Standard Template Library in C++. It provides data structures as well as GObject.
To use it, read these first:
Let's compare with some examples.
GObject Java/C#
(prefix everything with COMPILERKIT) package CompilerKit;
COMPILERKIT_IS_ALTERNATION(obj) (obj instanceof Alternation)
COMPILERKIT_ALTERNATION (obj) (Alternation) obj
COMPILERKIT_TYPE_ALTERNATION Alternation.class
G_OBJECT_TYPE (obj) obj.getClass()
GObject may seem intimidating. Learn how it works, and realize that OOP languages provide a lot of shortcuts that C exposes to the programmer.
To use GObject, read these first:
Run ./generate.sh, and follow the instructions.