Skip to content

Commit

Permalink
Build GTK 4 binaries
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
laeubi committed Aug 27, 2024
1 parent 32b31fb commit e447b1c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ kind: Pod
spec:
containers:
- name: "swtbuild"
image: "eclipse/platformreleng-centos-swt-build:8"
image: "eclipse/platformreleng-centos-gtk4-mutter:9"
imagePullPolicy: "Always"
resources:
limits:
Expand Down
2 changes: 0 additions & 2 deletions binaries/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,10 @@
</exec>
</then>
<else>
<property name="gtk_version" value="3.0" />
<exec dir="${build_dir}" executable="sh" failonerror="true">
<arg line="build.sh"/>
<env key="SWT_JAVA_HOME" value="${SWT_JAVA_HOME}"/>
<env key="OUTPUT_DIR" value="${project.basedir}"/>
<env key="GTK_VERSION" value="${gtk_version}"/>
<env key="MODEL" value="${arch}"/>
<arg line="install clean"/>
</exec>
Expand Down
20 changes: 10 additions & 10 deletions bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -273,22 +273,22 @@ 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
shift
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_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
1 change: 1 addition & 0 deletions bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
* Contributors:
* Syntevo - initial API and implementation
* DUMMY CHANGE
*******************************************************************************/

#ifndef INC_gtk3_H
Expand Down
2 changes: 1 addition & 1 deletion container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e447b1c

Please sign in to comment.