Create a deployable image just loading the application on the minimal image and disabling the command line handlers.
MyApplicationEntryPoint class>>#initialize
SessionManager default
register: (ClassSessionHandler forClassNamed:
self name)
inCategory: SessionManager default
userCategory
MyApplicationEntryPoint class>>startUp: arg1
MyApplicationManager instance startAlgorithm
MyApplicationEntryPoint class>>shutDown: arg1
MyApplicationManager instance stopAlgorithm
(linux)
curl get.pharo.org/61-minimal
./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 get.pharo.org/vm61 | bash
curl get.pharo.org/61-minimal | bash
./pharo Pharo-minimal.image eval “2+2”
4
### Order your ideas # Your aplication environment
Proof that all works .
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 loadMyApplication.st
Metacello new
baseline: 'MyApplication';
filetreeDirectory:'pathToMyApplication';
load.
SmalltalkImage current saveImageInFileNamed:'myApp.image'.
SmalltalkImage current snapshot: true andQuit: true
Metacello new
baseline:'ToDoApplication';
repository: 'github://despotadesdibujau/seaside-todo-application:master';
load.
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.
With this script you can prepare the minimal image to load your application from github and filetree (proven) ### Example for Windows script-to-prepare-minimal-image.st
PharoConsole.exe Pharo-minimal.image script-to-prepare-minimal-image.st
PharoConsole.exe minimal-ready.image loadMyApplication.st
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
Firts of all:
2+2
curl get.pharo.org/vm61 | bash \
&& curl get.pharo.org/61-minimal | bash \
&& ./pharo Pharo.image loadMetacello.st \
&& ./pharo minimal-ready.image loadApplication.st \
&& ./pharo todoApplication.image disableChangesAndSources.st \
&& rm *.changes \
&& rm pharo-vm/lib/pharo/5.0-201707201942/PharoV60.sources \
&& ./pharo todoApplication.image welcome.st
In the browser go to http://localhost:8080/examples/todo If everithing is ok you should to see a todoApplication of Seaside’s examples, if not send me an email despotadesdibujau@gmail.com
### Next and last step: