Skip to content

Commit

Permalink
Update Linux SDK
Browse files Browse the repository at this point in the history
* Disable CI (enable after merge and docker update)
* Support Wayland
* Support Portal
* Qt 5.15.16+kde
* GLX => EGL
  • Loading branch information
rodlie committed Dec 29, 2024
1 parent f5941b0 commit 9d77ca0
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Linux

on: [push, pull_request]
on: workflow_dispatch

jobs:
release:
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/Dockerfile.vfxplatform
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo

RUN yum -y group install "Development Tools"
RUN yum -y install pulseaudio-libs-devel wget rpmdevtools git yasm python3 fontconfig-devel zlib-devel autoconf automake xz devtoolset-7 llvm-toolset-7.0 tree curl libICE-devel libSM-devel libX11-devel libXau-devel libXdamage-devel libXext-devel libXfixes-devel libXi-devel libXxf86vm-devel libdrm-devel libxcb-devel mesa-libGL-devel xorg-x11-proto-devel xcb-proto libxcb-devel xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel xorg-x11-util-macros
RUN yum -y install pulseaudio-libs-devel wget rpmdevtools git yasm python3 fontconfig-devel zlib-devel autoconf automake xz devtoolset-7 llvm-toolset-7.0 tree curl libICE-devel libSM-devel libX11-devel libXau-devel libXdamage-devel libXext-devel libXfixes-devel libXi-devel libXxf86vm-devel libdrm-devel libxcb-devel mesa-libGL-devel xorg-x11-proto-devel xcb-proto libxcb-devel xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel xorg-x11-util-macros mesa-libEGL-devel mesa-libGLES-devel wayland-devel
RUN ln -sf /usr/bin/python3 /usr/bin/python
RUN rm -f /usr/lib64/pkgconfig/libpng.pc
RUN rm -f /usr/lib64/pkgconfig/libpng15.pc
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ APPIMG=20240401
SDK=1.0.0
URL=https://github.com/friction2d/friction-sdk/releases/download/v${SDK}
APPIMAGE_TAR=friction-appimage-tools-${APPIMG}.tar.xz
SDK_TAR=friction-sdk-${SDK}-linux-x86_64.tar.xz
SKIA_TAR=skia-friction-09e64895-linux-x86_64.tar.xz
SDK_TAR=friction-sdk-${SDK}r5-linux-x86_64.tar.xz
SKIA_TAR=skia-friction-f5941b02-linux-x86_64.tar.xz

mkdir -p distfiles/sdk || true

Expand Down
2 changes: 1 addition & 1 deletion src/scripts/build_vfxplatform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CUSTOM=${CUSTOM:-""}
MKJOBS=${MKJOBS:-32}
SDK_VERSION=${SDK_VERSION:-""}
ONLY_SDK=${ONLY_SDK:-0}
SDK_TAR="${DISTFILES}/sdk/friction-sdk-${SDK_VERSION}-linux-x86_64.tar"
SDK_TAR="${DISTFILES}/sdk/friction-sdk-${SDK_VERSION}r5-linux-x86_64.tar"
TAR_VERSION=${TAR_VERSION:-""}

# Build SDK
Expand Down
6 changes: 3 additions & 3 deletions src/scripts/build_vfxplatform_friction.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@ CMAKE_EXTRA=""
GIT_COMMIT=`git rev-parse --short=8 HEAD`
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`

cmake -GNinja \
cmake -G Ninja \
-DCMAKE_INSTALL_PREFIX=${SDK} \
-DCMAKE_PREFIX_PATH=${SDK} \
-DCMAKE_BUILD_TYPE=Release \
-DLINUX_DEPLOY=ON \
-DUSE_SKIA_SYSTEM_LIBS=OFF \
-DUSE_EGL=ON \
-DFRICTION_OFFICIAL_RELEASE=${REL_STATUS} \
-DQSCINTILLA_INCLUDE_DIRS=${SDK}/include \
-DQSCINTILLA_LIBRARIES_DIRS=${SDK}/lib \
Expand All @@ -111,13 +112,12 @@ cmake --build .

if [ "${BUILD_ENGINE}" = "ON" ]; then
(cd src/engine ;
tar cf skia-friction-${VERSION}-linux-x86_64.tar skia
tar cf skia-friction-${VERSION}-linux-x86_64.tar skia/libskia.friction.so
mkdir -p /mnt/builds/${VERSION} || true
mv skia-friction-${VERSION}-linux-x86_64.tar /mnt/builds/${VERSION}/
)
fi

FRICTION_INSTALL_DIR=friction-${VERSION}
mkdir -p ${BUILD}/${FRICTION_INSTALL_DIR}/opt/friction/{bin,lib,share} || true
mkdir -p ${BUILD}/${FRICTION_INSTALL_DIR}/opt/friction/plugins/{audio,generic,platforminputcontexts,platforms,xcbglintegrations} || true
DESTDIR=${BUILD}/${FRICTION_INSTALL_DIR} cmake --build . --target install
43 changes: 30 additions & 13 deletions src/scripts/build_vfxplatform_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ FRICTION_PKG=friction-${VERSION}

APPIMAGETOOL=bfe6e0c
APPIMAGERUNTIME=1bb1157
SKIA_LIB=${DISTFILES}/skia/libskia.friction.so

if [ "${VERSION}" = "" ]; then
echo "Missing version"
Expand Down Expand Up @@ -69,12 +68,16 @@ for so in ${LIB_DIR}/*.so*; do
done
done

cp ${SDK}/plugins/audio/libqtmedia_pulse.so ${PLUG_DIR}/audio/
cp ${SDK}/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so ${PLUG_DIR}/platforminputcontexts/
cp ${SDK}/plugins/platforms/libqminimal.so ${PLUG_DIR}/platforms/
cp ${SDK}/plugins/platforms/libqoffscreen.so ${PLUG_DIR}/platforms/
cp ${SDK}/plugins/platforms/libqxcb.so ${PLUG_DIR}/platforms/
cp ${SDK}/plugins/xcbglintegrations/libqxcb-glx-integration.so ${PLUG_DIR}/xcbglintegrations/
mkdir -p ${PLUG_DIR}/platforms
cp -a ${SDK}/plugins/platforms/libqxcb.so ${PLUG_DIR}/platforms/
cp -a ${SDK}/plugins/platforms/libqwayland-generic.so ${PLUG_DIR}/platforms/
cp -a ${SDK}/plugins/platforms/libqwayland-egl.so ${PLUG_DIR}/platforms/

cp -a ${SDK}/plugins/audio ${PLUG_DIR}/
cp -a ${SDK}/plugins/xcbglintegrations ${PLUG_DIR}/
cp -a ${SDK}/plugins/wayland-graphics-integration-client ${PLUG_DIR}/
cp -a ${SDK}/plugins/wayland-shell-integration ${PLUG_DIR}/
cp -a ${SDK}/plugins/wayland-decoration-client ${PLUG_DIR}/

for so in ${PLUG_DIR}/*/*.so; do
DEPENDS=`ldd ${so} | awk '{print $3}'`
Expand Down Expand Up @@ -136,25 +139,39 @@ echo "[Paths]" > ${BUILD}/${FRICTION_PKG}/opt/friction/bin/qt.conf
echo "Prefix = .." >> ${BUILD}/${FRICTION_PKG}/opt/friction/bin/qt.conf
echo "Plugins = plugins" >> ${BUILD}/${FRICTION_PKG}/opt/friction/bin/qt.conf

#(cd ${BUILD}/${FRICTION_PKG}/opt/friction/bin ; patchelf --set-rpath '$ORIGIN/../lib' friction)

(cd ${BUILD}/${FRICTION_PKG}/opt/friction/lib ;
for so in *.so*; do
patchelf --set-rpath '$ORIGIN' ${so}
done
)

SKIA_DIST_LIB=${DISTFILES}/skia/libskia.friction.so
PKG_SKIA_LIB64=${BUILD}/${FRICTION_PKG}/opt/friction/lib64/libskia.friction.so
PKG_SKIA_LIB=${BUILD}/${FRICTION_PKG}/opt/friction/lib/libskia.friction.so
if [ -f "${SKIA_LIB}" ] && [ ! -f "${PKG_SKIA_LIB}" ]; then
cp -a ${SKIA_LIB} ${BUILD}/${FRICTION_PKG}/opt/friction/lib/

if [ -f "${PKG_SKIA_LIB64}" ]; then
mv ${PKG_SKIA_LIB64} ${PKG_SKIA_LIB}
strip -s ${PKG_SKIA_LIB}
rm -rf ${BUILD}/${FRICTION_PKG}/opt/friction/lib64
else
if [ -f "${SKIA_DIST_LIB}" ] && [ ! -f "${PKG_SKIA_LIB}" ]; then
cp -a ${SKIA_DIST_LIB} ${PKG_SKIA_LIB}
strip -s ${PKG_SKIA_LIB}
fi
fi

if [ ! -f "${PKG_SKIA_LIB}" ]; then
echo "Missing libskia.friction.so"
exit 1
fi

PLUGS="
audio
platforminputcontexts
platforms
audio
xcbglintegrations
wayland-graphics-integration-client
wayland-shell-integration
wayland-decoration-client
"
for pdir in ${PLUGS}; do
for so in ${BUILD}/${FRICTION_PKG}/opt/friction/plugins/${pdir}/*.so; do
Expand Down
11 changes: 5 additions & 6 deletions src/scripts/build_vfxplatform_sdk02.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ DIST=${DIST:-"/mnt"}
MKJOBS=${MKJOBS:-32}
SRC_SUFFIX=tar.xz

QT_V=5.15.16
QT_V=5.15.16_20241121_32be1543
QSCINTILLA_V=2.14.1

PELF_V=0.17.0
CMAKE_V=3.26.3

Expand Down Expand Up @@ -229,10 +230,10 @@ fi # cmake
if [ ! -f "${QMAKE_BIN}" ]; then
cd ${SRC}
QT_SRC="qt-everywhere-src-${QT_V}"
QT_TAR_SRC="qt-everywhere-opensource-src-${QT_V}"
rm -rf ${QT_SRC} || true
tar xf ${DIST}/qt/${QT_TAR_SRC}.${SRC_SUFFIX}
tar xf ${DIST}/qt/${QT_SRC}.${SRC_SUFFIX}
cd ${QT_SRC}
(cd qtbase ; xzcat ${DIST}/qt/qtbase-use-wayland-on-gnome.patch.xz | patch -p1)
./configure \
-prefix ${SDK} \
-c++std c++14 \
Expand All @@ -259,7 +260,7 @@ if [ ! -f "${QMAKE_BIN}" ]; then
-no-syslog \
-no-pch \
-no-glib \
-no-dbus \
-dbus \
-no-avx2 \
-no-avx512 \
-no-gif \
Expand All @@ -283,8 +284,6 @@ if [ ! -f "${QMAKE_BIN}" ]; then
-no-sql-sqlite \
-no-sql-tds \
-no-gtk \
-no-eglfs \
-no-kms \
-no-linuxfb \
-nomake examples \
-nomake tests \
Expand Down

0 comments on commit 9d77ca0

Please sign in to comment.