Skip to content

Commit 688ebe1

Browse files
committed
Update AGENTS.md: Add GTK version specific build instructions
1 parent f402032 commit 688ebe1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

AGENTS.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ mvn clean verify -DskipTests
4848
```bash
4949
cd bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library
5050
./build.sh -gtk-all install # Build both GTK3 and GTK4
51+
52+
# Build only GTK3
53+
export GTK_VERSION=3.0
54+
./build.sh install
55+
56+
# Build only GTK4
57+
export GTK_VERSION=4.0
58+
./build.sh install
5159
```
5260

5361
**CRITICAL**: Files like `os.c`, `os_stats.c`, `os_stats.h` are **auto-generated**. Never edit them directly!
@@ -184,7 +192,7 @@ display.asyncExec(() -> button.setText("Updated"));
184192
### Adding GTK Functions
185193
1. Add native method declaration to `OS.java` with JavaDoc annotations (`@param cast=`, `@method flags=dynamic`)
186194
2. Clean and rebuild `org.eclipse.swt` project (regenerates `os.c`)
187-
3. Rebuild natives: `cd bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library && ./build.sh -gtk3 install`
195+
3. Rebuild natives: `cd bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library && export GTK_VERSION=3.0 && ./build.sh install`
188196

189197
## Tips for AI Tools
190198

0 commit comments

Comments
 (0)