-*- markdown -*-
Orchid is a build tool for [Vala](vala-project.org). Actually, it's a task library for the most amazing build tool on the world: Rake.
It is fairly simple to use (assuming you have Ruby and Rake installed):
First, you need to install the Gem.
sudo gem install orchid
Then, create a new directory where your project will live, create a beautiful Rakefile and fill it with stuff like this:
require 'rubygems' require 'orchid' Orchid::App.new("app") do |app, compiler| app.src = "./src" app.build = "./build" end
That's it. Now you can run rake build:[your_project_name_here] or rake build:all. The install: tasks aren't yet finished… so don't run those. :)
Orchid makes a distinction between two types of dependencies: packages and dependencies. The idea is that packages are system-installed libraries (a.k.a. the blend of .vapi and .so), and dependencies are projects that work together, i.e. a library that is part of a project is used by the Application that is primary to the project.
Consider this Rakefile:
require 'rubygems' require 'orchid' Orchid::Library("ProjectLibrary").new Orchid::App("ProjectApplication").new do |app, compiler| app.packages = "gtk+-2.0 >= 2.16", "gee-2.0" app.dependencies << "ProjectLibrary" end
This makes ProjectApplication dependant on ProjectLibrary. Also, as you can see versioned packages are also supported. Just add a “=> MAJOR.MINOR” to the package string and you're all set to go. No version information means use any version.
Orchid distinguishes two types of targets: *debug*, and *release*. You can assign these to any task. For example: rake build:app[debug] will build the “app” project for debugging. *debug* is also the default, so you would only have to use *release* when ready to build it system wide.
Another thing that one might need to know is that whenever *debug*, Orchid automagically defines a “DEBUG” symbol and turns on the debug valac switch.
Orchid always defines a “ORCHID” symbol.
The Common Project Layout
Projects, by default, are layed out like so:
/ - Project | - INFO # project info files such as README, LICENSE... | - Rakefile | - Orchid::Project | - src | - ProjectSources.vala | - res | - SomeImage.img | - SomeUI.ui | - Orchid::Project | - src | - AnotherSourceFile.vala | - res | - AVeryImportantTextFile.txt | - build | - Orchid::Project | - out.bin | - out.vapi # if it's a library... | - SomeImage.img | - SomeUI.ui | - Orchid::Project | - anotherout.bin | - AVeryImportantTextFile.txt [*]: Note that Orchid::Project denotes every subclass of that semi-abstract class.
This layout can be easily changed by modifying the properties of the Project (the first block argument, app).
Orchid is licensed under the MIT License. Orchid uses pkg-config.rb as part of it's distribution as to remove dependencies on the ruby-gnome2 bindings. The pkg-config.rb file is licensed under the [GNU Lesser General Public License version 2.1](www.gnu.org/licenses/lgpl-2.1.html), as is the whole [Ruby-GNOME2 Project](ruby-gnome2.sourceforge.jp/). The MIT License is compatible with the GNU LGPL v. 2.1 License.
Address the LICENSE file included in this distribution for more information.