Skip to content

Commit ec1b98b

Browse files
committed
Build GTK 4 binaries
Currently the GTK4 binaries are not build as part of the build, this has several drawbacks: 1) If anything is adjusted for GTK4 part it might break without notice 2) We have no GTK4 binaries by default This enables *compilation* of the gtk4 parts to see at laest everything can be compiled.
1 parent 9248e1e commit ec1b98b

File tree

6 files changed

+21
-17
lines changed

6 files changed

+21
-17
lines changed

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Install Linux requirements
4444
run: |
4545
sudo apt-get update -qq
46-
sudo apt-get install -qq -y libgtk-3-dev freeglut3-dev webkit2gtk-driver
46+
sudo apt-get install -qq -y libgtk-3-dev libgtk-4-dev freeglut3-dev webkit2gtk-driver
4747
if: ${{ matrix.config.native == 'gtk.linux.x86_64'}}
4848
- name: Pull large static Windows binaries
4949
run: |

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ kind: Pod
2424
spec:
2525
containers:
2626
- name: "swtbuild"
27-
image: "eclipse/platformreleng-centos-swt-build:8"
27+
image: "eclipse/platformreleng-centos-swt-build:9"
2828
imagePullPolicy: "Always"
2929
resources:
3030
limits:

binaries/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,10 @@
135135
</exec>
136136
</then>
137137
<else>
138-
<property name="gtk_version" value="3.0" />
139138
<exec dir="${build_dir}" executable="sh" failonerror="true">
140139
<arg line="build.sh"/>
141140
<env key="SWT_JAVA_HOME" value="${SWT_JAVA_HOME}"/>
142141
<env key="OUTPUT_DIR" value="${project.basedir}"/>
143-
<env key="GTK_VERSION" value="${gtk_version}"/>
144142
<env key="MODEL" value="${arch}"/>
145143
<arg line="install clean"/>
146144
</exec>

bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ func_echo_plus "Building SWT/GTK+ for Architectures: $SWT_OS $SWT_ARCH"
247247

248248
func_build_gtk4 () {
249249
export GTK_VERSION=4.0
250-
251250
func_echo_plus "Building GTK4 bindings:"
251+
pkg-config --libs gtk+4.0
252252
${MAKE_TYPE} -f $MAKEFILE all $MAKE_CAIRO $MAKE_AWT "${@}"
253253
RETURN_VALUE=$? #make can return 1 or 2 if it fails. Thus need to cache it in case it's used programmatically somewhere.
254254
if [ "$RETURN_VALUE" -eq 0 ]; then
@@ -261,8 +261,8 @@ func_build_gtk4 () {
261261

262262
func_build_gtk3 () {
263263
export GTK_VERSION=3.0
264-
265264
func_echo_plus "Building GTK3 bindings:"
265+
pkg-config --libs gtk+3.0
266266
${MAKE_TYPE} -f $MAKEFILE all $MAKE_CAIRO $MAKE_AWT "${@}"
267267
RETURN_VALUE=$? #make can return 1 or 2 if it fails. Thus need to cache it in case it's used programmatically somewhere.
268268
if [ "$RETURN_VALUE" -eq 0 ]; then
@@ -273,22 +273,27 @@ func_build_gtk3 () {
273273
fi
274274
}
275275

276-
if [ "$1" = "-gtk-all" ]; then
277-
shift
278-
func_echo_plus "Note: When building multiple GTK versions, a cleanup is required (and automatically performed) between them."
279-
func_clean_up
280-
func_build_gtk4 "$@"
281-
func_clean_up
282-
func_build_gtk3 "$@"
283-
elif [ "$1" = "-gtk4" ]; then
276+
if [ "$1" = "-gtk4" ]; then
284277
shift
285278
func_build_gtk4 "$@"
286279
elif [ "$1" = "-gtk3" ]; then
287280
shift
288281
func_build_gtk3 "$@"
289282
elif [ "${GTK_VERSION}" = "4.0" ]; then
290283
func_build_gtk4 "$@"
291-
elif [ "${GTK_VERSION}" = "3.0" -o "${GTK_VERSION}" = "" ]; then
292-
export GTK_VERSION="3.0"
284+
elif [ "${GTK_VERSION}" = "3.0" ]; then
285+
func_build_gtk3 "$@"
286+
else
287+
func_echo_plus "==== Building GTK3 + GTK 4 ===="
288+
func_echo_plus "See below for installed GTK versions:"
289+
dpkg --get-selections | grep libgtk
290+
apt list --installed libgtk*
291+
rpm -qa|grep gtk
292+
func_build_gtk3 "$@"
293+
shift
294+
func_echo_plus "Note: When building multiple GTK versions, a cleanup is required (and automatically performed) between them."
295+
func_clean_up
296+
func_build_gtk4 "$@"
297+
func_clean_up
293298
func_build_gtk3 "$@"
294299
fi

bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*
1111
* Contributors:
1212
* Syntevo - initial API and implementation
13+
* DUMMY CHANGE
1314
*******************************************************************************/
1415

1516
#ifndef INC_gtk3_H

container/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN chmod 555 /usr/local/bin/jenkins-slave && \
2121
ENTRYPOINT [ "uid_entrypoint", "jenkins-slave" ]
2222

2323
RUN dnf -y update && dnf -y install \
24-
java-openjdk maven webkit2gtk3-devel \
24+
java-openjdk maven webkit2gtk3-devel libgtk-4-dev \
2525
make gcc mesa-libGLU-devel mesa-libGL-devel \
2626
libXt-devel procps-ng \
2727
&& dnf clean all

0 commit comments

Comments
 (0)