Skip to content

Commit 9374b38

Browse files
committed
update instructions
1 parent 4286d51 commit 9374b38

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

README.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Spec Gtk bindings for Pharo
44
# How to install
55

66
### On Windows
7-
You need Gtk3!
7+
You need Gtk4!
88
And you need to put it at the same place of the `Pharo.exe` executable.
99
To simplify the process we created a VM bundled with all the DLL and resources needed to execute GTK+3
1010

@@ -14,27 +14,34 @@ NOTE: If you are running under cygwin subsystem, remember to `chmod +x *`. Libra
1414

1515
### On macOS:
1616

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)
1818
```
19-
brew install gtk+3
19+
brew install gtk+4
2020
```
2121

2222
### 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+
```
2532

2633
## Installing in your image
2734

28-
1) Download a Pharo 11.0 image:
35+
1) Download a Pharo 12.0 image:
2936

3037
```
31-
curl get.pharo.org/110 | bash
38+
curl get.pharo.org/120 | bash
3239
```
3340

3441
2) Open your image using `./pharo-ui Pharo.image` and evaluate:
3542
```Smalltalk
3643
Metacello new
37-
repository: 'github://pharo-spec/Spec-Gtk';
44+
repository: 'github://pharo-spec/Spec-Gtk:gtk4';
3845
baseline: 'SpecGtk';
3946
onConflict: [ :e | e useIncoming ];
4047
onUpgrade: [ :e | e useIncoming ];
@@ -43,7 +50,9 @@ curl get.pharo.org/110 | bash
4350
```
4451
After the execution, save the image, and quit.
4552

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.
4756

4857
## A first example
4958

@@ -52,10 +61,10 @@ The following code should open a small UI:
5261
```Smalltalk
5362
SpLabelPresenter new
5463
application: (SpApplication new useBackend: #Gtk);
55-
label: 'Hello, Gtk3';
64+
label: 'Hello, Gtk4';
5665
open.
5766
```
5867

5968
## Current status
6069

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

Comments
 (0)