From e588c3f0558fec847c7f88b91c0d5e02b65964eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Tue, 27 Aug 2024 10:51:43 +0200 Subject: [PATCH] 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. --- .github/workflows/maven.yml | 2 +- Jenkinsfile | 2 +- binaries/pom.xml | 2 -- .../Eclipse SWT PI/gtk/library/build.sh | 23 +++++++++++-------- .../Eclipse SWT PI/gtk/library/gtk3.h | 1 + container/Dockerfile | 2 +- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 5bdf36909b3..f2f1912bf0a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -43,7 +43,7 @@ jobs: - name: Install Linux requirements run: | sudo apt-get update -qq - sudo apt-get install -qq -y libgtk-3-dev freeglut3-dev webkit2gtk-driver + sudo apt-get install -qq -y libgtk-3-dev libgtk-4-dev freeglut3-dev webkit2gtk-driver if: ${{ matrix.config.native == 'gtk.linux.x86_64'}} - name: Pull large static Windows binaries run: | diff --git a/Jenkinsfile b/Jenkinsfile index 6d60c8cda10..6b2e8404e98 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,7 +24,7 @@ kind: Pod spec: containers: - name: "swtbuild" - image: "eclipse/platformreleng-centos-swt-build:8" + image: "eclipse/platformreleng-centos-swt-build:9" imagePullPolicy: "Always" resources: limits: diff --git a/binaries/pom.xml b/binaries/pom.xml index ea59779ad29..0bd747cb498 100644 --- a/binaries/pom.xml +++ b/binaries/pom.xml @@ -135,12 +135,10 @@ - - diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh index 1b8398b28c9..fdab8cea36a 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh @@ -273,14 +273,7 @@ func_build_gtk3 () { fi } -if [ "$1" = "-gtk-all" ]; then - shift - func_echo_plus "Note: When building multiple GTK versions, a cleanup is required (and automatically performed) between them." - func_clean_up - func_build_gtk4 "$@" - func_clean_up - func_build_gtk3 "$@" -elif [ "$1" = "-gtk4" ]; then +if [ "$1" = "-gtk4" ]; then shift func_build_gtk4 "$@" elif [ "$1" = "-gtk3" ]; then @@ -288,7 +281,17 @@ elif [ "$1" = "-gtk3" ]; then func_build_gtk3 "$@" elif [ "${GTK_VERSION}" = "4.0" ]; then func_build_gtk4 "$@" -elif [ "${GTK_VERSION}" = "3.0" -o "${GTK_VERSION}" = "" ]; then - export GTK_VERSION="3.0" +elif [ "${GTK_VERSION}" = "3.0" ]; then + func_build_gtk3 "$@" +else + func_echo_plus "==== Building GTK3 + GTK 4 ====" + func_echo_plus "See below for installed GTK versions:" + dpkg --get-selections | grep libgtk + func_build_gtk3 "$@" + shift + func_echo_plus "Note: When building multiple GTK versions, a cleanup is required (and automatically performed) between them." + func_clean_up + func_build_gtk4 "$@" + func_clean_up func_build_gtk3 "$@" fi diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h index ed6b65e62ba..ecd2334427d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h @@ -10,6 +10,7 @@ * * Contributors: * Syntevo - initial API and implementation + * DUMMY CHANGE *******************************************************************************/ #ifndef INC_gtk3_H diff --git a/container/Dockerfile b/container/Dockerfile index a78844841c1..2a4ea240e5c 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -21,7 +21,7 @@ RUN chmod 555 /usr/local/bin/jenkins-slave && \ ENTRYPOINT [ "uid_entrypoint", "jenkins-slave" ] RUN dnf -y update && dnf -y install \ - java-openjdk maven webkit2gtk3-devel \ + java-openjdk maven webkit2gtk3-devel libgtk-4-dev \ make gcc mesa-libGLU-devel mesa-libGL-devel \ libXt-devel procps-ng \ && dnf clean all