12. Command Line Applications
• Extended Support for:
• VTerm Colors
• Command Line Parsing
• Headless mode
• VM Without dependencies on the Graphic
UI
12
pharo-contributions/clap-st
Loaded in Pharo
13. 13
We have our application developed…
We are done… let’s go party
14. We have our application developed…
We are done… let’s go party
14
Not So Fast…
We need to make it available
to the users
15. Once the Application is developed…
• We Need to think on:
• Making a Release Version
• Branding
• Veri
fi
cation
• Distribution
• Deployment
• Errors Handling
15
16. Once the Application is developed…
• We Need to think on:
• Making a Release Version
• Branding
• Veri
fi
cation
• Distribution
• Deployment
• Errors Handling
16
We will not see these…
17. Once the Application is developed…
• We Need to think on:
• Making a Release Version
• Branding
• Veri
fi
cation
• Distribution
• Deployment
• Errors Handling
17
We will see these
18. Making a Release Version
Let’s create an image
18
My
AppCode
Pharo
Image
19. Making a Release Version
Let’s create an image
19
My
AppCode
Do we want to
distribute the whole
Pharo Image?
Pharo
Image
20. Making a Release Version
Let’s create an image
20
My
AppCode
Do we want to
distribute the whole
Pharo Image?
Pharo
Image
Tools?…
UI?…
Debugger?
21. Making a Release Version
Let’s create an image
21
My
AppCode
We can use the
minimal Image and
load what we need
Minimal
Image
22. Making a Release Version
Let’s create an image
22
My
AppCode
We can use the
minimal Image and
load what we need
Minimal
Image
The minimal Image is
generated during the
bootstrap
23. Making a Release Version
Let’s create an image
23
My
AppCode
We can use the
minimal Image and
load what we need
Minimal
Image
The minimal Image is
generated during the
bootstrap
Ask If you are
interested…
24. Branding
Make your App look like it is your App
• Icons
• Resources (App Metadata)
• My App Executable
• The remaining stu
ff
:
• Main window open or not,
• application title,
• additional windows,
• about dialog,
• etc…
24
25. My APP as a Thin Layer
• My Own Icons
• My Own information
• Built using Pharo VM as a library
25
30. How to Implement it…
• A Simple CMake Script and some simple
fi
les
30
31. My Thin App
60 lines of code with comments
• Just a Main Function
31
32. Some Resources
• In Windows:
• A Resource
fi
le with icon information &
Metadata of the application (Developer,
version, etc)
• In OSX:
• A PList with information about the icons,
fi
le
associations and metadata of the
application.
32
35. Verification
• Applications should be signed
• Signing should be done by the developer
• All executing code should be signed
35
We have to assure
that our applications
is not tainted
36. Verification
• Applications should be signed
• Signing should be done by the developer
• All executing code should be signed
36
What we do with the
image?
The image is
executable code…
We have to assure
that our applications
is not tainted
37. Alternative 1: Embedding as a Resource
• If the image not change we can embed it as a
resource.
My Main Pharo VM
Dynamic
Image
My Executable
37
38. Alternative 1: Embedding as a Resource
My Main Pharo VM
Dynamic
Image
It can be signed and
validated as any other
Executable in the OS
• If the image not change we can embed it as a
resource.
My Executable
38
39. My Main Pharo VM
Dynamic
Image
Updating the image requires
to update the executables
Alternative 1: Embedding as a Resource
• If the image not change we can embed it as a
resource.
39
My Executable
40. My Main Pharo VM
Dynamic
Image
We need to change the
reading of the image to read
from the embedded resource
Alternative 1: Embedding as a Resource
• If the image not change we can embed it as a
resource.
40
My Executable
41. Proposed Architecture
Alternative 2: We sign it outside the executable
We can update the Image
downloading a new one
MyApp
Executable
Pharo VM
Dynamic
Lib
Image
41
42. We need to update the read
to check the image
signature…
Alternative 2: We sign it outside the executable
42
Proposed Architecture
MyApp
Executable
Pharo VM
Dynamic
Lib
Image
43. It is not validated by the
OS… we need to validate it
on loading
Alternative 2: We sign it outside the executable
43
Proposed Architecture
MyApp
Executable
Pharo VM
Dynamic
Lib
Image
50. Open Build Service
https://openbuildservice.org/
• Attack Distributions Di
ff
erences
• Build for many architectures at the same time.
50
Our Package: devel:languages:pharo:latest/pharo9
We are using… great for
creating packages
51. Open Build Service
https://openbuildservice.org/
• Attack Distributions Di
ff
erences
• Build for many architectures at the same time.
51
Our Package: devel:languages:pharo:latest/pharo9
Ideal for Open source
Packages… you can use
OpenSuse Infra
For Non-OpenSource easy to
run in-house
The packages can be
integrated in default
repositories
It provides a native repository
supporting updates
53. FFI: Opening the game to external libraries
Let’s not reinvent the wheel
53
54. FFI: Opening the game to external libraries
Let’s not reinvent the wheel
54
Reusing Libraries
Interacting with
the OS
55. FFI: Opening the game to external libraries
Let’s not reinvent the wheel
55
Integrated in
Pharo https://books.pharo.org/booklet-u
ffi
/
56. 56
Application Development
with Pharo
Pablo Tesone - Guille Polito
pablo.tesone@inria.fr
@tesonep
Making a Release Version Branding
Veri
fi
cation Distribution
Deployment Errors Handling