Skip to content

Commit 0be5151

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 least everything can be compiled.
1 parent d9d9bf0 commit 0be5151

File tree

7 files changed

+29
-13
lines changed

7 files changed

+29
-13
lines changed

Jenkinsfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def runOnNativeBuildAgent(String platform, Closure body) {
1919
def final nativeBuildStageName = 'Build SWT-native binaries'
2020
if (platform == 'gtk.linux.x86_64') {
2121
podTemplate(inheritFrom: 'centos-latest' /* inhert general configuration */, containers: [
22-
containerTemplate(name: 'swtbuild', image: 'eclipse/platformreleng-centos-swt-build:8',
22+
containerTemplate(name: 'swtbuild', image: 'eclipse/platformreleng-debian-swtnativebuild:12',
2323
resourceRequestCpu:'1000m', resourceRequestMemory:'512Mi',
2424
resourceLimitCpu:'2000m', resourceLimitMemory:'4096Mi',
2525
alwaysPullImage: true, command: 'cat', ttyEnabled: true)
@@ -228,7 +228,15 @@ pipeline {
228228
if (isUnix()){
229229
sh '''
230230
mkdir libs
231-
sh build.sh install
231+
if [[ ${PLATFORM} == gtk.linux.aarch64 ]]; then
232+
sh build.sh -gtk3 install
233+
elif [[ ${PLATFORM} == gtk.linux.ppc64le ]]; then
234+
sh build.sh -gtk3 install
235+
elif [[ ${PLATFORM} == gtk.linux.riscv64 ]]; then
236+
sh build.sh -gtk3 install
237+
else
238+
sh build.sh install
239+
fi
232240
ls -1R libs
233241
'''
234242
} else {

binaries/org.eclipse.swt.gtk.linux.aarch64/build.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ output.. = bin/
4545
pom.model.property.os=linux
4646
pom.model.property.ws=gtk
4747
pom.model.property.arch=aarch64
48+
pom.model.property.gtkVersion=3.0

binaries/org.eclipse.swt.gtk.linux.loongarch64/build.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ output.. = bin/
4545
pom.model.property.os=linux
4646
pom.model.property.ws=gtk
4747
pom.model.property.arch=loongarch64
48+
pom.model.property.gtkVersion=3.0

binaries/org.eclipse.swt.gtk.linux.ppc64le/build.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ output.. = bin/
4545
pom.model.property.os=linux
4646
pom.model.property.ws=gtk
4747
pom.model.property.arch=ppc64le
48+
pom.model.property.gtkVersion=3.0

binaries/org.eclipse.swt.gtk.linux.riscv64/build.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ output.. = bin/
4444
pom.model.property.os=linux
4545
pom.model.property.ws=gtk
4646
pom.model.property.arch=riscv64
47+
pom.model.property.gtkVersion=3.0

binaries/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<buildid>${buildId}</buildid>
3131
<maven.compiler.release>17</maven.compiler.release>
3232
<swtMainProject>${project.basedir}/../../bundles/org.eclipse.swt</swtMainProject>
33+
<gtkVersion>all</gtkVersion>
3334
</properties>
3435

3536
<modules>
@@ -136,7 +137,7 @@
136137
</exec>
137138
</then>
138139
<else>
139-
<property name="gtk_version" value="3.0" />
140+
<property name="gtk_version" value="${gtkVersion}" />
140141
<exec dir="${build_dir}" executable="sh" failonerror="true">
141142
<arg line="build.sh"/>
142143
<env key="SWT_JAVA_HOME" value="${SWT_JAVA_HOME}"/>

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

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -280,22 +280,25 @@ func_build_gtk3 () {
280280
fi
281281
}
282282

283-
if [ "$1" = "-gtk-all" ]; then
284-
shift
285-
func_echo_plus "Note: When building multiple GTK versions, a cleanup is required (and automatically performed) between them."
286-
func_clean_up
287-
func_build_gtk4 "$@"
288-
func_clean_up
289-
func_build_gtk3 "$@"
290-
elif [ "$1" = "-gtk4" ]; then
283+
if [ "$1" = "-gtk4" ]; then
291284
shift
292285
func_build_gtk4 "$@"
293286
elif [ "$1" = "-gtk3" ]; then
294287
shift
295288
func_build_gtk3 "$@"
296289
elif [ "${GTK_VERSION}" = "4.0" ]; then
297290
func_build_gtk4 "$@"
298-
elif [ "${GTK_VERSION}" = "3.0" -o "${GTK_VERSION}" = "" ]; then
299-
export GTK_VERSION="3.0"
291+
elif [ "${GTK_VERSION}" = "3.0" ]; then
292+
func_build_gtk3 "$@"
293+
else
294+
if [ "$1" = "-gtk-all" ]; then
295+
shift
296+
fi
297+
func_echo_plus "==== Building GTK3 + GTK 4 ===="
298+
func_echo_plus "Note: When building multiple GTK versions, a cleanup is required (and automatically performed) between them."
299+
func_clean_up
300+
func_build_gtk4 "$@"
301+
func_echo_plus "Note: When building multiple GTK versions, a cleanup is required (and automatically performed) between them."
302+
func_clean_up
300303
func_build_gtk3 "$@"
301304
fi

0 commit comments

Comments
 (0)