Compile Qooxdoo for eyeOS (I)
juliol 6th, 2011Sometimes an eyeOS developer may need to use a Qooxdoo contrib, or to update Qooxdoo, or to fix anything. For instance, contribs extend the library and let the hacker have more backend features, widgets, themes, etc. There is a manual that helps Qooxdoo applications developers, but in eyeOS things might turn a bit tricky.
The first part of this article explains the standard method. The second part, the patches that sometimes are required.
To include a contrib, you have to ‘compile’ Qooxdoo. That is, Qooxdoo needs to resolve dependencies and to be compressed.
Requirements
- Qooxdoo SDK (same version eyeOS uses)
- Python
When is this article useful?
- Contribs — you want to use a Qooxdoo contrib
- Core modifications — If you modified qx.* or aristo.Aristo or a dependency declared in the config file.
- Debugging — If your face turned green fixing a bug.
- Deployment — generate files to deploy eyeOS.
Getting the big picture
Edit eyeOS config file. This file differs a bit from Qooxdoo’s in order to include the Aristo theme and to adapt paths to libraries. Run the generate.py script.
generate.py build
Where ‘build’ is a job defined in config.json. In eyeOS you can use ‘debug’ as well, but it won”t work most times.
config.json
This file defines what to include, what to exclude, where to find the libraries… In eyeOS two jobs are declared: ‘build’ and ‘debug’. In the ‘build’ job you’ll find a line to declare your libraries. If you need to use a contrib, add it there.
"include": ["qx.*", "aristo.Aristo", "svg.*"]
Right beneath this line you’ll have to tell Qooxdoo where to find the code you’re including:
{
"manifest" : "/home/edu/svg/Manifest.json"
}
All contribs contain a Manifest.json. Just extract all the files of the contrib anywhere (e.g /home/edu/mycontrib). They’ll be copied and compressed to the source/ folder of your Qooxdoo application.
Adapt all other paths. You may need to download the Aristo theme and edit the path in this file so the “compiler” finds it, like you did for the contrib and the “manifest” field 30 seconds before.
Troubleshooting
If you’re using a Qooxdoo version older than 1.4.1 and GNU/Linux, you might see ‘global name ‘WindowsError’ is not defined’. There’s a very quick fix available explained in bug 5273.
