You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ The Spec Gtk bindings for Pharo
4
4
# How to install
5
5
6
6
### On Windows
7
-
You need Gtk3!
7
+
You need Gtk4!
8
8
And you need to put it at the same place of the `Pharo.exe` executable.
9
9
To simplify the process we created a VM bundled with all the DLL and resources needed to execute GTK+3
10
10
@@ -14,27 +14,34 @@ NOTE: If you are running under cygwin subsystem, remember to `chmod +x *`. Libra
14
14
15
15
### On macOS:
16
16
17
-
You need Gtk3 (installed by brew because paths are fixed for now)
17
+
You need Gtk4 (installed by brew because paths are fixed for now)
18
18
```
19
-
brew install gtk+3
19
+
brew install gtk+4
20
20
```
21
21
22
22
### On Linux
23
-
You need to have Gtk3 installed (this should be already the case).
24
-
23
+
You need to have Gtk4 installed (this should be already the case).
24
+
You can verify with this command:
25
+
```
26
+
apt list --installed | grep gtk4
27
+
```
28
+
or
29
+
```
30
+
dnf list --installed | grep gtk4
31
+
```
25
32
26
33
## Installing in your image
27
34
28
-
1) Download a Pharo 11.0 image:
35
+
1) Download a Pharo 12.0 image:
29
36
30
37
```
31
-
curl get.pharo.org/110 | bash
38
+
curl get.pharo.org/120 | bash
32
39
```
33
40
34
41
2) Open your image using `./pharo-ui Pharo.image` and evaluate:
35
42
```Smalltalk
36
43
Metacello new
37
-
repository: 'github://pharo-spec/Spec-Gtk';
44
+
repository: 'github://pharo-spec/Spec-Gtk:gtk4';
38
45
baseline: 'SpecGtk';
39
46
onConflict: [ :e | e useIncoming ];
40
47
onUpgrade: [ :e | e useIncoming ];
@@ -43,7 +50,9 @@ curl get.pharo.org/110 | bash
43
50
```
44
51
After the execution, save the image, and quit.
45
52
46
-
In macOS, if you open the image using `./pharo-ui Pharo.image`, the image should give the feeling of being significantly slower. This is because the Gtk event loop is running. You can verify this by opening the process browser: you should see a line begining with `(70) GtkRunLoop`.
53
+
Running GTK now requires the Pharo VM to be run in worker mode: `./pharo --worker Pharo.image`.
54
+
55
+
In macOS, running the World in Morphic is not yet possible since the SDL loop will execute in the worker and assume Cocoa is in the same thread. It cannot work since Cocoa must run in the main thread.
47
56
48
57
## A first example
49
58
@@ -52,10 +61,10 @@ The following code should open a small UI:
52
61
```Smalltalk
53
62
SpLabelPresenter new
54
63
application: (SpApplication new useBackend: #Gtk);
55
-
label: 'Hello, Gtk3';
64
+
label: 'Hello, Gtk4';
56
65
open.
57
66
```
58
67
59
68
## Current status
60
69
61
-
Currently, only the low-level infrastructure is supported. Tools building based on solely Spec2/Gtk are under way. Be patient.
70
+
Currently, only the low-level infrastructure is supported. Tools building based on solely Spec2/Gtk are under way. Be patient.
0 commit comments