Creating Python GUI Applications using XULRunner

Packaging and deployment

Packaging is often the most oft overlooked parts when developing a GUI application, and as such it's often overlay complicated to get right. This is not the case for XUL applications, as everything you need is already right in your application structure. No need to futz around with additional libraries or perform complicated dependency lookups.

Windows

Using Inno Setup, a setup program is created for the installation on Windows. This involves packaging up all the files under your application directory. Here are the simple steps:

  • Download and install inno setup
  • Open up the installer/Windows/pyxpcom_gui_app.iss file inside of the Inno Setup application
  • Use the "Build->Compile" menu to package the application
  • The setup file is created at build/pyxpcom_gui_app-win32.exe
And your done! The final setup program for the Windows example weighs in at roughly 10MB in size.

Linux

The easiest of them all:

$ tar -cvf pyxpcom_gui_app.tar pyxpcom_gui_app
$ gzip pyxpcom_gui_app.tar
                
And your done! Ship it already... The archive for this example comes to 16MB in size, or 15MB if using bzip2.

Mac OS X

You should have an application package layout like the one shown in this Mac OS X packaging guide. Now to create the installer (in dmg format):

  • hdiutil create -srcfolder pyxpcom_gui_app.app pyxpcom_gui_app.dmg
  • And your done!
The final weigh in for the Mac OS X (universal binary) dmg file is a whopping 50MB... whose your daddy, eh?