From 95b0015f3635da93ec655dd49f476590cffe1d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Fri, 19 Jan 2024 20:02:47 +0100 Subject: [PATCH] Update vfxplatform build --- src/scripts/README.md | 24 +++++------------------ src/scripts/build_vfxplatform.sh | 3 +++ src/scripts/build_vfxplatform_friction.sh | 5 +++++ src/scripts/build_vfxplatform_package.sh | 6 ++++++ src/scripts/run_vfxplatform.sh | 2 ++ 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/scripts/README.md b/src/scripts/README.md index f060267b3..be8dbb586 100644 --- a/src/scripts/README.md +++ b/src/scripts/README.md @@ -2,38 +2,24 @@ Various scripts and files used to build and maintain Friction. -## easing - -Various JS easing scripts. Used in the expression editor in Friction. +**NOTE: Several scripts assume that the host OS is Ubuntu 22.04.** ## build_ci.sh -Our main CI build script. This script build and package Friction on Ubuntu 22.04. +Our main CI script. This script build and package Friction on Ubuntu 22.04. Can also be used to easily build and package Friction on other Ubuntu systems. -## run_docker.sh / build_docker.sh +## run_docker.sh Scripts used to build and package Friction for each supported Ubuntu release using docker. -## build_macos.sh - -Old macOS build script. Currently not supported. +## run_vfxplatform.sh -## run_vfxplatform.sh / build_vfxplatform*.sh - -Scripts used to build the universal Linux binaries. Using CentOS7 running through docker. +Script used to build the universal Linux binaries using docker. ## make_hicolor.sh Script used to update the Friction icon theme. Must be run after new icons are added. **NOTE: `inkscape` must be in `PATH`** - -## make_ico.sh - -Generates a win32 application icon for Friction. - -## mkicns.sh - -Generates a macOS application icon for Friction. diff --git a/src/scripts/build_vfxplatform.sh b/src/scripts/build_vfxplatform.sh index 2928e89bd..93b5e9b0f 100755 --- a/src/scripts/build_vfxplatform.sh +++ b/src/scripts/build_vfxplatform.sh @@ -34,6 +34,9 @@ ONLY_SDK=${ONLY_SDK:-0} SDK_TAR="${DISTFILES}/friction-vfxplatform-sdk-${SDK_VERSION}.tar" # Build SDK +if [ ! -d "${SDK}" ]; then + mkdir -p ${SDK} +fi if [ -f "${SDK_TAR}.xz" ]; then (cd ${SDK}/.. ; tar xf ${SDK_TAR}.xz ) else diff --git a/src/scripts/build_vfxplatform_friction.sh b/src/scripts/build_vfxplatform_friction.sh index 017741407..98c962458 100755 --- a/src/scripts/build_vfxplatform_friction.sh +++ b/src/scripts/build_vfxplatform_friction.sh @@ -72,11 +72,16 @@ if [ "${REL}" != 1 ]; then REL_STATUS="OFF" fi +# workaround for gperftools (until I fix it) +cp -a ${SDK}/include/libunw* /usr/include/ +cp -a ${SDK}/lib/libunw* /usr/lib64/ + cmake -GNinja \ -DCMAKE_INSTALL_PREFIX=${SDK} \ -DCMAKE_PREFIX_PATH=${SDK} \ -DCMAKE_BUILD_TYPE=Release \ -DLINUX_DEPLOY=ON \ +-DUSE_SKIA_SYSTEM_LIBS=OFF \ -DFRICTION_OFFICIAL_RELEASE=${REL_STATUS} \ -DQSCINTILLA_INCLUDE_DIRS=${SDK}/include \ -DQSCINTILLA_LIBRARIES_DIRS=${SDK}/lib \ diff --git a/src/scripts/build_vfxplatform_package.sh b/src/scripts/build_vfxplatform_package.sh index 11f619bc7..6dd132e63 100755 --- a/src/scripts/build_vfxplatform_package.sh +++ b/src/scripts/build_vfxplatform_package.sh @@ -38,6 +38,10 @@ if [ ! -d "${BUILD}/${FRICTION_PKG}" ]; then exit 1 fi +if [ ! -d "${DISTFILES}/builds" ]; then + mkdir -p ${DISTFILES}/builds +fi + export PATH="${SDK}/bin:${PATH}" export PKG_CONFIG_PATH="${SDK}/lib/pkgconfig" export LD_LIBRARY_PATH="${SDK}/lib:${LD_LIBRARY_PATH}" @@ -179,6 +183,7 @@ done cd ${BUILD} tar cvf ${FRICTION_PORTABLE}.tar ${FRICTION_PORTABLE} xz -9 ${FRICTION_PORTABLE}.tar +cp -a ${FRICTION_PORTABLE}.tar.xz ${DISTFILES}/builds/ # AppImage (cd ${FRICTION_PORTABLE_DIR} ; @@ -192,5 +197,6 @@ ln -sf usr/share/icons/hicolor/256x256/apps/${APPID}.png .DirIcon ) tar xf ${DISTFILES}/appimagetool.tar.xz ARCH=x86_64 ./appimagetool/AppRun ${FRICTION_PORTABLE} +cp -a *.AppImage ${DISTFILES}/builds/ echo "PKG DONE" diff --git a/src/scripts/run_vfxplatform.sh b/src/scripts/run_vfxplatform.sh index eea46f9bd..6099ba092 100755 --- a/src/scripts/run_vfxplatform.sh +++ b/src/scripts/run_vfxplatform.sh @@ -14,4 +14,6 @@ DOCKER="docker run" DOCKER="${DOCKER} -e REL=${REL} -e MKJOBS=${JOBS} -e SDK_VERSION=${SDK_VERSION} -e ONLY_SDK=${ONLY_SDK} -e BRANCH=${BRANCH} -e COMMIT=${COMMIT} -e TAG=${TAG}" DOCKER="${DOCKER} -t --mount type=bind,source=${CWD}/distfiles,target=/mnt" +(cd src/scripts; docker build -t friction-vfxplatform -f Dockerfile.vfxplatform .) + ${DOCKER} friction-vfxplatform