Build your application from the Pharo-minimal image.

Create a deployable image just loading the application on the minimal image and disabling the command line handlers.

Tools necessaries for this approach

MyApplicationEntryPoint class>>#initialize
    SessionManager default
            register: (ClassSessionHandler forClassNamed: 
         self name)
            inCategory: SessionManager default 

StartUp and ShutDown

MyApplicationEntryPoint class>>startUp: arg1
    MyApplicationManager instance startAlgorithm

MyApplicationEntryPoint class>>shutDown: arg1
    MyApplicationManager instance stopAlgorithm

If We get the minimal image and use the VM that we was used to development process wont work


./pharo Pharo-minimal.image
This interpreter (vers. 68021) cannot read image file (vers. 6521).
Press CR to quit...

### Get the minimal image and use the 32 bits VM

 curl | bash
curl | bash
./pharo Pharo-minimal.image eval “2+2”

### Order your ideas # Your aplication environment

Load your application in the minimal image

The next script doesn’t work with GitHub and Filetree repositories. With SmalltalkHub works.

./pharo Pharo-minimal.image config \ repositoryOfMyApplication\ BaselineOfMyApplication\ --install=baseline

If you try do the same thing with PharoConsole in Windows but doesn’t work.

For Windows you can load your application using Smalltalks's scripts
 PharoConsole.exe Pharo-minimal.image

Script Example

Metacello new
baseline: 'MyApplication';
SmalltalkImage current   saveImageInFileNamed:'myApp.image'.
SmalltalkImage current snapshot: true andQuit: true
Metacello new
repository: 'github://despotadesdibujau/seaside-todo-application:master';
SmalltalkImage current   saveImageInFileNamed:'myApp.image'.
SmalltalkImage current snapshot: true andQuit: true

This should work but some dependencies of filetree aren’t loaded in the minimal image, so you need load these dependencies. When you was loaded these dependencies execute Smalltalk recompile and save the image. Rename the image and try to load your application.

Dependencies of filetree in order of dependency (from botton to top)

With this script you can prepare the minimal image to load your application from github and filetree (proven) ### Example for Windows

 PharoConsole.exe Pharo-minimal.image
PharoConsole.exe minimal-ready.image
PharoConsole.exe myApplication.image

So far My idea was to prepare a minimal image with every tool for load code:Monticello,Metacello suporting all types of repositories (filetree,github,gitbucket, gitlab,…etc),…etc.

But luckily Pavel Krivanek said

“In Pharo 7 most of them are already part of the the minimal (Metacello) image.”

### Disable the reads to sources and changes Wiht this script you can disable the calls to changes and sources

Full example (proven in Ubuntu 14.04)

Firts of all:

### Next and last step: