Skip to content

Commit c984d14

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 ca1bb19 commit c984d14

File tree

3 files changed

+23
-14
lines changed

3 files changed

+23
-14
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: 'ubuntu-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/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: 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)