Factor Language Blog

Generating stand-alone Mac OS X applications from Factor

Thursday, July 19, 2007

This is all subject to change, but right now, the following works:

USE: tools.deploy
USE: tools.deploy.app
"Tetris.app" "tetris" H{ { deploy-compiled? t } { deploy-ui? t } } deploy.app

After a rather slow bootstrap and deploy process, you’re left with Tetris.app, 2.2 Mb in size. Of this, 1.3 Mb is the FreeType font rendering library; soon, Factor will use native font rendering on Mac OS X, thus we won’t have to ship FreeType anymore.

A lot remains to be done: we need a graphical way to configure the deployment tool (there are a lot of switches which can be toggled in the hashtable passed to deploy.app), and there needs to be an automated way of packaging required resources and native libraries with the app. And of course, deployment of native Linux and Windows binaries is a whole other kettle of fish. But over time, all of this will be implemented.