SCons tools
This page contains some scons tools i contributed to the SCons project on the context of CLAM. They are hosted here waiting until they go to the official SCons release.
About SCons
SCons is a python based replacement for the make utility. The main purpose is to orchestrate the different commands needed to build an application from the sources.
SCons can be extended by adding tools. Each tool gives SCons the ability to perform new kinds of build steps (builders). To add them to your SCons environment just add this line:
env.Tool('toolname', toolpath=['path/to/the/tool'])
Qt4 tool (qt4)
This tool provides builders and fills the environment to build a Qt 4.x.x application. It is based on the existing qt tool which addressed qt3 (by Karol Pietrzak). As the build process on qt4 and qt3 is different, a new tool is needed.
This tool provides the following builders:
- Qrc: Compiles resources (.qrc) into a cxx file by using rcc. (Files referenced by the qrc file are implicitly added as dependencies)
- Uic4: Compiles interfaces (.ui) files the qt4 way
- Moc4: Extracts meta object implementations from sources containing the Q_OBJECT macro (those sources are implicitly scanned, no need to call this builder explicitly)
- Ts: Merges the translatable strings into a .ts file by using lupdate. (Still not working well: scons -c will delete your translations!!!)
- Qm: Compiles .ts translation files into a binary .qm file using lrelease
The tool also adds an environment method (EnableQt4Modules) to choose the qt modules you need to use and whether you want to use debug or release versions of the libraries. You should use it like this:
env.EnableQt4Modules( ['QtCore', 'QtGui', QtOpenGL'], debug=True)
Files:
- The 'qt4' tool (taken from CLAM subversion)
- An example SConstruct that builds the Qt4 examples
Limitations and TO-DO's
- Ts builders makes scons -c remove the user edited translations on .ts files!!
- OSX compatibility
- Implement the debug mode in Windows
- Make the SConstruct for the Qt4 examples work on Windows
- Fix a moc scanner bug that prevents some Qt4 examples to compile
- Add designer related libraries (mostly QtUiTools and the designer interfaces)
- Consider adding some macros defined by qmake (QT_GUI_LIB, QT_XML_LIB...)
Null Soft Installer System tool (nsis)
The Null Soft Installer System (NSIS) is a framework to develop installers for the Windows platform.
This tool is still under development but feel free to try it. For this tool I just packaged into a tool the previous work by Xavier Rubio for CLAM.
Files:
- The 'nsis' tool (from clam subversion)
Limitations and TO-DO's
- Too adhoc for the CLAM project, it needs some generalization
OSX Disk Image tool (dmg)
Files:
- The 'dmg' tool (from clam subversion)
Limitations and TO-DO's
- Too adhoc for the CLAM project, it needs some generalization