Building the XULRunner SDK
Part of the XULRunner planning is not only to release builds of the XULRunner runtime platform, but also to produce and release a set of developer tools, which for lack of a better name I have been calling the XULRunner SDK, or XDK for short.
Several characteristics distinguish the XULRunner SDK from the currently released Mozilla SDK packages:
- In addition to headers and import libraries for the frozen APIs exposed by the Mozilla platform, the XDK will contain headers for non-frozen interfaces. These headers will be segregated in a way that makes it clear to developers that they are using nonfrozen APIs.
- The XDK will provide tools to aid in the development, debugging, testing, and deployment of applications that use the Mozilla platform. This includes extensions and XULRunner applications, as well as embedding applications. The goal is to make use of existing projects and tools as much as possible. Potential tools that may be included include:
- A build system which can be used to package extensions and XULrunner-based applications from sources
- Deployment tools which can be used to create installers for XULRunner-based applications.
- Debugging tools such as DOM Inspector, a JavaScript debugger, and leak-detection tools.
- Localization tools
I am now in the process of implementing the build system which will be used to produce the XDK. My basic strategy is to package the XDK by tarring up the dist/ directory from a XULRunner build, just as the XULRunner runtime itself is packaged from the dist/bin directory. In order for this strategy to be reasonable, several things need to happen:
- The dist/lib directory structure needs to be cleaned out. That directory should only contain static libs and import libs that will be used by embedders. All of the shared libraries that are currently installed to dist/lib as well as dist/bin will only be installed to dist/bin. All the intermediate static libraries that are currently installed to dist/lib will not be installed and will instead be referenced from their in-tree location.
- The dist/include directory structure needs to be cleaned out. Headers which are only meant for internal use will be removed from the EXPORTS section of makefiles and will either be referenced from their in-tree locations or will be installed to module-specific locations (think /layout/include).
- The dist/bin directory needs to be cleaned out. Currently tests and other files are installed to dist/bin. These tests and other files will be installed to other locations as appropriate.
I would like some feedback on this proposal, especially as it affects RPM packages and Linux distributions. My current idea for RPM structures would look like this:
- XULRunner-1.9 RPM
ships the contents of dist/bin to /usr/lib/xulrunner-1.9 - XULRunner-dev-1.9 RPM
depends on XULRunner-1.9
ships the contents of dist to /usr/lib/xulrunner-1.9-dev
/usr/lib/xulrunner-1.9-dev/bin is a symlink to /usr/lib/xulrunner-1.9 (to avoid having to ship two copies of the XULRunner runtime)
Yes, I know that this structure is a bit nonstandand and it would be slightly more unix-like to ship the headers to /usr/include/xulrunner-1.9. But I think it’s important to keep the structure, so that the mozilla build system can be used –with-libxul-sdk=/usr/lib/xulrunner-1.9-dev and have everything “just work”.
March 27th, 2006 at 5:29 pm
> –with-libxul-sdk=/usr/lib/xulrunner-1.9-dev and have everything “just workâ€.
the include directory in /usr/lib/xulrunner-1.9-dev could be a symlink to /usr/include/xulrunner-1.9
March 27th, 2006 at 7:55 pm
This sounds like a great plan to me. What can I do to help?
March 28th, 2006 at 12:07 am
Would this work with pkgconfig (xulrunner.pc, or xulruner-1.9.pc)? If so, xulrunner.pc could specify locations for headers, libs, etc. and everything would still “just work”.
March 30th, 2006 at 8:43 pm
You may want to come up with a name other than “XDK” — that’s the name of the XBox Developer’s Kit. The chance of confusion seems low, but… I don’t have any good names to suggest, though. (XULKit?)
May 19th, 2006 at 6:23 pm
Can you make sure to include the DOM Inspector and Venkman in the SDK?
I’m really looking forward to seeing this, because building mozilla on my box takes a long time.
July 11th, 2006 at 3:01 am
[…] The naming change and some other changes within the package were made to make it possible to have different versions of XULRunner installed on one system. As you can see there is still only one version allowed from a major Gecko release. So the next packages which will appear on FACTORY are mozilla-xulrunner181 etc. and some time in the future (if versioning scheme doesn’t change) mozilla-xulrunner190. There are also changes to adopt the structure and naming scheme according to Ben’s (XULRunner project lead) proposal which is primarily meant for version 1.9 and I don’t want to change the filesystem locations for the 1.8.0.x versions to keep it as compatible as possible with our released package. The upcoming 1.8.1.x package will most probably still follow the same directory structure. (Please note that I still have to figure out some details to make minor version upgrades possible without breaking applications embedding libgtkembedmoz.so using rpath or environment tricks.) […]