Case Status Kiln
Log In


Pharo»How to deploy an application?
  • RSS Feed

Last modified on 9/24/2013 12:19 AM by User.


How to deploy an application?


As always that depends on kind of application and the target system you want to deploy to. Typically you distribute an image including the running/prepared application together with the VM for the target platform:

First the VM

Some scenarios:

  • If you have written a seaside web application you can deploy the image/VM on your own root server or on a seaside hosting platform (like the free There is a good description in the seaside book (1).
Thats an easy deployment since you just have to tell your customer a URL where the app runs.
  • If you want to deploy to iPhone just ask John McIntosh how he packaged the app (iphone vm + image) for the Apple Store Since the memory is limited you may have to reduce the image size (unload packages, ...) with an own custom shrinking script
  • If you want to deploy a desktop like app/or web app to multiple platforms use the one click distribution since there are already VM's for Linux, Win, Mac. Just exchange the image with your own one. Have a look at the application or the seaside image. They use this kind of deployment with a ZIP.
  • If you deploy to windows (Win32 only) you may want to be closer to Windows app rules - so you may want to build a custom Win VM executable (xxx.exe) with your own icons and a platform specific installer copying the image and VM.
See (2) how to do that. The Pharo Win32 Installer is built this way. If you think VM building is rocket science you can also exchange the icons using reshacker (3) in a standard Pharo windows VM.

And the image

Anything other depends on how you prepare the image. Typically you may want to
  • Reduce the image size by throwing out anything that is not required by your app and which is useless for your customer (unit tests, dev tools).
This process is called "shrinking" an image. Take care since it is often usefull to keep dev tools inside since you can easily debug a failure situation at your customers place later. At least you typically may want to disable developer facilities, implement a different walkback window so the customer gets a notification instead of a "debug it" button and so on, ...
To reduce the size of the image I would also clear Monticello caches, throw out unused Form instances, ... There are many tricks here - depends on how far you want to go. A common way is to evaluate "ScriptLoader? new cleanUpForProduction".
If size doesnt matter just use the image as it is or use a pharo-dev image for development and a pharo-core image for deployment.
  • However - typically you just want to deploy the VM only together with the image, no changes and source file necessary for your customer. Therefore you may want to disable the two preferences "warnIfNoSourcesFile" and "warnIfNoChangesFile" (see (2)) before saving the image. So you dont have to redistribute the changes and source files
  • Open your application, either manually or by a custom launcher (since there is no main() in Smalltalk) and the startup list (see (2))
  • Save your image in this predefined "ready" state so when the customer starts the image with the VM he can instantly use your app.
So "deployment" in Smalltalk is different and a little bit more complicated since you have many options.

No comments