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
For instructions on building the native binaries of SWT see the section [Building native binaries](bundles/org.eclipse.swt/Readme.md#building-native-binaries).
For Linux, to build only the GTK3 binaries, set the environment variable `GTK_VERSION` to value `3.0`,
85
+
to build only GTK4 binaries, set `GTK_VERSION` to `4.0`.
63
86
64
-
* If necessary, install the **M2E - Maven integration for Eclipse** (see [m2e](https://eclipse.dev/m2e/))
87
+
The Maven build will perform a `clean` and then calls [`build-native-libraries`](https://github.com/eclipse-platform/eclipse.platform.swt/blob/a589ee9fedcfdab60f90902da87f5058faf94be9/binaries/pom.xml#L133-L173),
88
+
which sets the required environment variables and runs the appropriated build script for the current platform (`build.sh`/`build.bat`).
89
+
The script is located in the source folder `Eclipse SWT PI\<current-ws>\library` of the corresponding SWT native fragment.
90
+
91
+
To build the native binaries as part of a complete build of all SWT artifacts, run:
92
+
```bash
93
+
mvn clean verify -Dnative=<ws>.<os>.<arch>
94
+
```
95
+
using the placeholder from above.
96
+
97
+
#### Building native binaries from within the Eclipse IDE
98
+
99
+
* Ensure the **M2E - Maven integration for Eclipse** is installed (see [m2e](https://eclipse.dev/m2e/))
65
100
* Open the **Launch Configurations** dialog.
66
101
* Run the **Maven** configuration called: `Build-SWT-native-binaries-for-running-platform`.
102
+
* This will build the native binaries for the current target platform.
67
103
* If compile fails, inspect build log for warnings, they can point out issues in your configuration.
68
104
69
-
The Maven configuration will perform a `clean` and then call [`build-native-libraries`](https://github.com/eclipse-platform/eclipse.platform.swt/blob/979d3f1580b4786aee1efe046da8a6f836300804/binaries/pom.xml#L92-L134),
70
-
which sets the required environment variables and then runs the appropriate
71
-
build script for the current platform (`build.sh`/`build.bat`). The script is located in the
72
-
source folder `Eclipse SWT PI\<current-ws>\library` in the appropriate fragment.
105
+
Testing the nativebinaries
106
+
----------------------------
107
+
108
+
Import and build the SWT project `bundles/org.eclipse.swt` and `binaries/org.eclipse.swt.<ws>.<os>.<arch>` in Eclipse.
73
109
74
110
To test if you binaries actually get used, you could try to revert back to some older version and
75
111
run a snippet, you should get the 'missing natives' error. Then if you build the natives
0 commit comments