@@ -16,6 +16,56 @@ use it. However, since this chapter is written for Pharo 4, if you notice
16
16
differences between the appearance or behaviour of your system and what is
17
17
described here, do not be surprised.
18
18
19
+ !!Pharo components
20
+
21
+ Like many Smalltalk-derived systems, Pharo consists of four main component files.
22
+ Although you do not need to deal with them directly for the purposes
23
+ of this book, it is useful to understand the roles they play.
24
+
25
+ ""1."" The ""virtual machine"" (VM) is the only component that is
26
+ different for each operating system. The VM executable is named:
27
+ - ==Pharo.exe== for Windows;
28
+ - ==pharo== for Linux ; and
29
+ - ==Pharo== for OSX (inside a package also named ==Pharo==).
30
+
31
+ The other components below are portable across operating systems,
32
+ and can be copied and run on any appropriate virtual machine.
33
+
34
+ ""2."" The ""sources"" file contains source code for parts of
35
+ Pharo that don't change frequently. Typically a new ""sources""
36
+ file is generated once per major release of Pharo.
37
+ For Pharo 4.0, this file is named ==PharoV40.sources==.
38
+
39
+
40
+ ""3."" The ""changes"" file logs of all source code
41
+ modifications since the ==.sources== file was generated.
42
+ This facilitates a per method history for diffs or reverting.
43
+ Each release provides a near empty file named for the release,
44
+ for example ==Pharo4.0.changes==.
45
+
46
+ ""4."" The ""image"" file provides a frozen in time snapshot
47
+ of a running Pharo system. This is the heart of Pharo,
48
+ containing the live state of all objects in the system
49
+ (including classes and methods, since they are objects too).
50
+ The file is named for the release like ==Pharo4.0.image==.
51
+
52
+ The ==.image== and ==.changes== files provided by a Pharo release
53
+ are the starting point for a live environment that you adapt to your needs.
54
+ As you work in Pharo, these files are modified,
55
+ so you need to make sure that they are writable.
56
+ The ==.image== and ==.changes== files are intimately linked
57
+ and should always be kept together, with matching base filenames.
58
+ Never edit them directly with a text editor, as ==.images== holds your
59
+ live object runtime memory,which indexes into the ==.changes== files
60
+ for the source.
61
+ It is a good idea to keep a backup copy of the downloaded ==.image== and ==.changes==
62
+ files so you can always start from a fresh image and reload your code.
63
+
64
+ The four main component files above can be placed in the same directory,
65
+ but its also possible to put the Virtual Machine and sources file in separate
66
+ directory where everyone has read-only access to them.
67
+ Do whatever works best for your style of working and your operating system.
68
+
19
69
!!Getting started
20
70
21
71
Pharo is available as a free download from
@@ -35,42 +85,6 @@ appropriate zip file, uncompress it in a directory of your choice and now you
35
85
are ready to launch Pharo. In case of Ubuntu Linux, there is also the extra
36
86
option of installing Pharo via the Pharo PPA.
37
87
38
- !!Pharo components
39
-
40
- Like many Smalltalk-derived systems, Pharo currently consists of three main
41
- components. Although you do not need to deal with them directly for the purposes
42
- of this book, it is important to understand the roles that they play.
43
-
44
- ""1."" The ""image"" is a current snapshot of a running Pharo system, frozen in
45
- time. It consists of two files: an ==.image== file, which contains the state of
46
- all of the objects in the system (including classes and methods, since they are
47
- objects too), and a ==.changes== file, which contains the log of all of the
48
- changes to the source code of the system. For Pharo 4.0, these files are named
49
- ==Pharo4.0.image== and ==Pharo4.0.changes==. These files are portable across
50
- operating systems, and can be copied and run on any appropriate virtual machine.
51
-
52
- ""2."" The ""virtual machine"" (VM) is the only part of the system that is
53
- different for each operating system. Pre-compiled virtual machines are available
54
- for all major computing environments. (For example, on Windows, the VM file is
55
- named ==Pharo.exe==).
56
-
57
- ""3."" The ""sources"" file contains the source code for all of the parts of
58
- Pharo that don't change very frequently. For Pharo 4.0, this file is named
59
- ==PharoV40.sources==.
60
-
61
- As you work in Pharo, the ==.image== and ==.changes== files are modified (so you
62
- need to make sure that they are writable). Always keep these two files together.
63
- Never edit them directly with a text editor, as Pharo uses them to store the
64
- objects you work with and to log the changes you make to the source code. It is
65
- a good idea to keep a backup copy of the downloaded ==.image== and ==.changes==
66
- files so you can always start from a fresh image and reload your code.
67
-
68
- The ==.sources== file and the VM can be read-only, and can be shared between
69
- different users. All of these files can be placed in the same directory, but it
70
- is also possible to put the Virtual Machine and sources file in separate
71
- directory where everyone has access to them. Do whatever works best for your
72
- style of working and your operating system.
73
-
74
88
!!Launching Pharo
75
89
76
90
To start Pharo, double click on the Pharo executable (or, for more advanced
0 commit comments