From 9d77ca0996355851c1b2d38a3cb7922130cc0c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Sun, 29 Dec 2024 16:54:00 +0100 Subject: [PATCH 01/11] Update Linux SDK * Disable CI (enable after merge and docker update) * Support Wayland * Support Portal * Qt 5.15.16+kde * GLX => EGL --- .github/workflows/linux.yml | 2 +- src/scripts/Dockerfile.vfxplatform | 2 +- src/scripts/build.sh | 4 +-- src/scripts/build_vfxplatform.sh | 2 +- src/scripts/build_vfxplatform_friction.sh | 6 ++-- src/scripts/build_vfxplatform_package.sh | 43 ++++++++++++++++------- src/scripts/build_vfxplatform_sdk02.sh | 11 +++--- 7 files changed, 43 insertions(+), 27 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2c479232a..26ce8e382 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,6 +1,6 @@ name: Linux -on: [push, pull_request] +on: workflow_dispatch jobs: release: diff --git a/src/scripts/Dockerfile.vfxplatform b/src/scripts/Dockerfile.vfxplatform index 036407f48..116844673 100644 --- a/src/scripts/Dockerfile.vfxplatform +++ b/src/scripts/Dockerfile.vfxplatform @@ -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 diff --git a/src/scripts/build.sh b/src/scripts/build.sh index 275c3d39b..92816c75e 100755 --- a/src/scripts/build.sh +++ b/src/scripts/build.sh @@ -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 diff --git a/src/scripts/build_vfxplatform.sh b/src/scripts/build_vfxplatform.sh index 1a8f340aa..15bba7084 100755 --- a/src/scripts/build_vfxplatform.sh +++ b/src/scripts/build_vfxplatform.sh @@ -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 diff --git a/src/scripts/build_vfxplatform_friction.sh b/src/scripts/build_vfxplatform_friction.sh index a18e97293..907e26051 100755 --- a/src/scripts/build_vfxplatform_friction.sh +++ b/src/scripts/build_vfxplatform_friction.sh @@ -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 \ @@ -111,7 +112,7 @@ 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}/ ) @@ -119,5 +120,4 @@ 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 diff --git a/src/scripts/build_vfxplatform_package.sh b/src/scripts/build_vfxplatform_package.sh index 96df3192b..946edd486 100755 --- a/src/scripts/build_vfxplatform_package.sh +++ b/src/scripts/build_vfxplatform_package.sh @@ -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" @@ -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}'` @@ -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 diff --git a/src/scripts/build_vfxplatform_sdk02.sh b/src/scripts/build_vfxplatform_sdk02.sh index 1f834eb28..62bfa49b5 100755 --- a/src/scripts/build_vfxplatform_sdk02.sh +++ b/src/scripts/build_vfxplatform_sdk02.sh @@ -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 @@ -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 \ @@ -259,7 +260,7 @@ if [ ! -f "${QMAKE_BIN}" ]; then -no-syslog \ -no-pch \ -no-glib \ - -no-dbus \ + -dbus \ -no-avx2 \ -no-avx512 \ -no-gif \ @@ -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 \ From 3cef2cbcb71b151bc545064bdff3ca730617cd89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Tue, 31 Dec 2024 05:54:10 +0100 Subject: [PATCH 02/11] Add flatpak scripts --- src/scripts/flatpak/build.sh | 4 ++ src/scripts/flatpak/flathub.json | 3 ++ .../flatpak/graphics.friction.Friction.json | 40 +++++++++++++++++++ src/scripts/flatpak/package.sh | 6 +++ src/scripts/flatpak/run.sh | 3 ++ 5 files changed, 56 insertions(+) create mode 100755 src/scripts/flatpak/build.sh create mode 100644 src/scripts/flatpak/flathub.json create mode 100644 src/scripts/flatpak/graphics.friction.Friction.json create mode 100755 src/scripts/flatpak/package.sh create mode 100755 src/scripts/flatpak/run.sh diff --git a/src/scripts/flatpak/build.sh b/src/scripts/flatpak/build.sh new file mode 100755 index 000000000..0f6cd5cd0 --- /dev/null +++ b/src/scripts/flatpak/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +flatpak-builder --user --install builddir --install-deps-from=flathub graphics.friction.Friction.json --force-clean + diff --git a/src/scripts/flatpak/flathub.json b/src/scripts/flatpak/flathub.json new file mode 100644 index 000000000..637604e82 --- /dev/null +++ b/src/scripts/flatpak/flathub.json @@ -0,0 +1,3 @@ +{ + "only-arches": ["x86_64"] +} diff --git a/src/scripts/flatpak/graphics.friction.Friction.json b/src/scripts/flatpak/graphics.friction.Friction.json new file mode 100644 index 000000000..8a9971413 --- /dev/null +++ b/src/scripts/flatpak/graphics.friction.Friction.json @@ -0,0 +1,40 @@ +{ + "app-id": "graphics.friction.Friction", + "runtime": "org.freedesktop.Platform", + "runtime-version": "23.08", + "sdk": "org.freedesktop.Sdk", + "command": "friction", + "finish-args": [ + "--share=ipc", + "--socket=fallback-x11", + "--socket=wayland", + "--socket=pulseaudio", + "--device=dri", + "--filesystem=xdg-documents", + "--filesystem=xdg-pictures", + "--filesystem=xdg-videos", + "--filesystem=xdg-music", + "--filesystem=xdg-desktop" + ], + "modules": [ + { + "name": "friction", + "buildsystem": "simple", + "build-commands": [ + "mv Friction/* /app/", + "rm -f /app/friction", + "rm -f /app/bin/portable.txt", + "rm -f /app/share/icons/hicolor/*/mimetypes/application-x-graphics.friction.Friction.png", + "rm -f /app/share/icons/hicolor/scalable/mimetypes/application-x-graphics.friction.Friction.svg" + ], + "sources": [ + { + "type": "archive", + "url": "https://sourceforge.net/projects/friction/files/snapshots/1.0.0-9d77ca09/friction-1.0.0-9d77ca09-linux-x86_64.tar.xz", + "sha256": "20f6788bd407029355cfcab99b3f48cef6556333eca7e06047cf93498c323ad4", + "dest": "./Friction" + } + ] + } + ] +} diff --git a/src/scripts/flatpak/package.sh b/src/scripts/flatpak/package.sh new file mode 100755 index 000000000..833b5a8b0 --- /dev/null +++ b/src/scripts/flatpak/package.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +rm -f Friction.flatpak || true +flatpak-builder builddir graphics.friction.Friction.json --force-clean +flatpak build-export export builddir +flatpak build-bundle export Friction.flatpak graphics.friction.Friction diff --git a/src/scripts/flatpak/run.sh b/src/scripts/flatpak/run.sh new file mode 100755 index 000000000..f1ab4522f --- /dev/null +++ b/src/scripts/flatpak/run.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +flatpak run -v graphics.friction.Friction From ea7fc674c4fea40f3f9509771e5ff095bf4ac3c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Tue, 31 Dec 2024 07:07:20 +0100 Subject: [PATCH 03/11] flatpak stuff --- src/app/appdata.xml.in | 4 ++-- src/core/appsupport.cpp | 23 +++++++++++++++++++ src/core/appsupport.h | 2 ++ .../flatpak/graphics.friction.Friction.json | 1 + src/ui/dialogs/exportsvgdialog.cpp | 2 +- 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/app/appdata.xml.in b/src/app/appdata.xml.in index 30e4902c8..07930609f 100644 --- a/src/app/appdata.xml.in +++ b/src/app/appdata.xml.in @@ -7,7 +7,7 @@ @FRICTION_DISPLAY_NAME@ @PROJECT_SUMMARY@ CC0-1.0 - GPL-3.0-or-later + GPL-3.0-only

@PROJECT_DESCRIPTION@

@@ -69,7 +69,7 @@ - https://friction.graphics/assets/screenshots/096/friction-096-screenshot.jpg + https://friction.graphics/assets/screenshots/100/friction-100b2-screenshot.png Friction user interface diff --git a/src/core/appsupport.cpp b/src/core/appsupport.cpp index 417a08603..546aab212 100644 --- a/src/core/appsupport.cpp +++ b/src/core/appsupport.cpp @@ -255,6 +255,24 @@ const QString AppSupport::getAppPath() return QApplication::applicationDirPath(); } +const QString AppSupport::getAppTempPath() +{ +#ifdef Q_OS_LINUX + if (isFlatpak()) { + QString path = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); + if (!path.isEmpty()) { + path.append("/friction-temp"); + if (!QFile::exists(path)) { + QDir dir(path); + dir.mkpath(path); + } + if (QFile::exists(path)) { return path; } + } + } +#endif + return QDir::tempPath(); +} + const QString AppSupport::getAppOutputProfilesPath() { QString path = QString::fromUtf8("%1/OutputProfiles").arg(getAppConfigPath()); @@ -696,6 +714,11 @@ bool AppSupport::isWayland() return QGuiApplication::platformName().startsWith("wayland"); } +bool AppSupport::isFlatpak() +{ + return !QString(qgetenv("container")).isEmpty(); +} + const QString AppSupport::getAppImagePath() { return QString(qgetenv("APPIMAGE")); diff --git a/src/core/appsupport.h b/src/core/appsupport.h index 51a63c164..ccc4968a9 100644 --- a/src/core/appsupport.h +++ b/src/core/appsupport.h @@ -79,6 +79,7 @@ class CORE_EXPORT AppSupport : public QObject static const QString getAppBranchUrl(); static const QString getAppConfigPath(); static const QString getAppPath(); + static const QString getAppTempPath(); static const QString getAppOutputProfilesPath(); static const QString getAppPathEffectsPath(); static const QString getAppRasterEffectsPath(); @@ -120,6 +121,7 @@ class CORE_EXPORT AppSupport : public QObject static bool isAppPortable(); static bool isAppImage(); static bool isWayland(); + static bool isFlatpak(); static const QString getAppImagePath(); static bool hasXDGDesktopIntegration(); static bool setupXDGDesktopIntegration(); diff --git a/src/scripts/flatpak/graphics.friction.Friction.json b/src/scripts/flatpak/graphics.friction.Friction.json index 8a9971413..4ba104da3 100644 --- a/src/scripts/flatpak/graphics.friction.Friction.json +++ b/src/scripts/flatpak/graphics.friction.Friction.json @@ -22,6 +22,7 @@ "buildsystem": "simple", "build-commands": [ "mv Friction/* /app/", + "rm -rf Friction", "rm -f /app/friction", "rm -f /app/bin/portable.txt", "rm -f /app/share/icons/hicolor/*/mimetypes/application-x-graphics.friction.Friction.png", diff --git a/src/ui/dialogs/exportsvgdialog.cpp b/src/ui/dialogs/exportsvgdialog.cpp index 56cf02be4..58ed606a2 100644 --- a/src/ui/dialogs/exportsvgdialog.cpp +++ b/src/ui/dialogs/exportsvgdialog.cpp @@ -297,7 +297,7 @@ ExportSvgDialog::ExportSvgDialog(QWidget* const parent, void ExportSvgDialog::showPreview(const bool &closeWhenDone) { if (!mPreviewFile) { - const QString templ = QString::fromUtf8("%1/%2_svg_preview_XXXXXX.html").arg(QDir::tempPath(), + const QString templ = QString::fromUtf8("%1/%2_svg_preview_XXXXXX.html").arg(AppSupport::getAppTempPath(), AppSupport::getAppName()); mPreviewFile = qsptr::create(templ); mPreviewFile->setAutoRemove(false); From 85d124715b4e585845c25ac3831b9e071ecac622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Tue, 31 Dec 2024 07:25:10 +0100 Subject: [PATCH 04/11] Update graphics.friction.Friction.json --- src/scripts/flatpak/graphics.friction.Friction.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/flatpak/graphics.friction.Friction.json b/src/scripts/flatpak/graphics.friction.Friction.json index 4ba104da3..433fcb256 100644 --- a/src/scripts/flatpak/graphics.friction.Friction.json +++ b/src/scripts/flatpak/graphics.friction.Friction.json @@ -31,8 +31,8 @@ "sources": [ { "type": "archive", - "url": "https://sourceforge.net/projects/friction/files/snapshots/1.0.0-9d77ca09/friction-1.0.0-9d77ca09-linux-x86_64.tar.xz", - "sha256": "20f6788bd407029355cfcab99b3f48cef6556333eca7e06047cf93498c323ad4", + "url": "https://sourceforge.net/projects/friction/files/snapshots/1.0.0-ea7fc674/friction-1.0.0-ea7fc674-linux-x86_64.tar.xz", + "sha256": "003964418ba46bda3fab76f7bc8e5d266aa8d9181d7f5eb1721ae32ea99a7dc8", "dest": "./Friction" } ] From c8a951580837310a7a8d7017e5ef3a3c84de4283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Tue, 31 Dec 2024 10:04:12 +0100 Subject: [PATCH 05/11] Update meta data (for flatpak) --- .gitignore | 3 +++ src/app/appdata.xml.in | 40 +++++++++++++++++++++++++---------- src/cmake/friction-meta.cmake | 8 +++++-- 3 files changed, 38 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 8ce46e957..68a8661c0 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,7 @@ skia-build qt-* sdk build-release +src/scripts/flatpak/.flatpak-builder +src/scripts/flatpak/builddir +src/scripts/flatpak/export diff --git a/src/app/appdata.xml.in b/src/app/appdata.xml.in index 07930609f..97277fe02 100644 --- a/src/app/appdata.xml.in +++ b/src/app/appdata.xml.in @@ -4,7 +4,9 @@ @PROJECT_FREEDESKTOP@ @PROJECT_FREEDESKTOP@.desktop @FRICTION_DISPLAY_NAME@ - @FRICTION_DISPLAY_NAME@ + + @FRICTION_DISPLAY_NAME@ + @PROJECT_SUMMARY@ CC0-1.0 GPL-3.0-only @@ -16,43 +18,43 @@

This release includes several fixes, some new features and several UI/UX changes.

- https://friction.graphics/releases/friction-100-beta2.html + https://friction.graphics/releases/friction-100-beta2.html

This release includes several new features and many UI/UX improvements.

- https://friction.graphics/releases/friction-100-beta1.html + https://friction.graphics/releases/friction-100-beta1.html

The first maintenance release for Friction 0.9.6 is now available.

- https://friction.graphics/releases/friction-0961.html + https://friction.graphics/releases/friction-0961.html

This release includes new features, critical fixes and generic UI/UX improvements.

- https://friction.graphics/releases/friction-096.html + https://friction.graphics/releases/friction-096.html

This release includes new features, fixes and generic improvements.

- https://friction.graphics/releases/friction-095.html + https://friction.graphics/releases/friction-095.html

This release includes several fixes and improvements to the user experience.

- https://friction.graphics/releases/friction-094.html + https://friction.graphics/releases/friction-094.html

This release includes several fixes and improvements to the user experience.

- https://friction.graphics/releases/friction-093.html + https://friction.graphics/releases/friction-093.html
@@ -64,28 +66,44 @@

First public release.

- https://friction.graphics/releases/friction-091.html + https://friction.graphics/releases/friction-091.html
https://friction.graphics/assets/screenshots/100/friction-100b2-screenshot.png - Friction user interface + Default user interface @PROJECT_HOMEPAGE_URL@ @PROJECT_BUGTRACKER_URL@ @PROJECT_HELP_URL@ + @PROJECT_FAQ_URL@ + @PROJECT_DONATE_URL@ + @PROJECT_CONTRIBUTE_URL@ + @PROJECT_REPO_URL@ @PROJECT_CONTACT@ + + keyboard + pointing + + + AudioVideo + Graphics + 2d graphics - motiongraphics + motion graphics + mograph animation + web animation video svg vector raster + vfx + editing diff --git a/src/cmake/friction-meta.cmake b/src/cmake/friction-meta.cmake index ef8401a05..d779a695a 100644 --- a/src/cmake/friction-meta.cmake +++ b/src/cmake/friction-meta.cmake @@ -25,10 +25,14 @@ set(FRICTION_DISPLAY_NAME "Friction") set(PROJECT_COPYRIGHT "Friction contributors") set(PROJECT_IDENTIFIER "graphics.friction") set(PROJECT_SUMMARY "Motion graphics and animation") -set(PROJECT_DESCRIPTION "Powerful and versatile motion graphics and animation application that allows you to create vector and raster animations for web and video platforms with ease") -set(PROJECT_LICENSE "GPLv3+") +set(PROJECT_DESCRIPTION "Powerful and versatile motion graphics and animation application that allows you to create vector and raster animations for web and video.") +set(PROJECT_LICENSE "GPLv3") set(PROJECT_HOMEPAGE_URL "https://friction.graphics") set(PROJECT_FREEDESKTOP "${PROJECT_IDENTIFIER}.${FRICTION_DISPLAY_NAME}") set(PROJECT_BUGTRACKER_URL "https://github.com/friction2d/friction/issues") set(PROJECT_HELP_URL "https://friction.graphics/documentation/") +set(PROJECT_FAQ_URL "https://friction.graphics/documentation/faq.html") +set(PROJECT_DONATE_URL "https://friction.graphics/donate.html") +set(PROJECT_CONTRIBUTE_URL "https://github.com/friction2d/friction/discussions") +set(PROJECT_REPO_URL "https://github.com/friction2d/friction") set(PROJECT_CONTACT "support@friction.graphics") From 3bc2c83bc812382f58ef165b6bf42624c4f3f838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Wed, 1 Jan 2025 18:55:13 +0100 Subject: [PATCH 06/11] Update build_vfxplatform_package.sh Add missing portal :smile: --- src/scripts/build_vfxplatform_package.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scripts/build_vfxplatform_package.sh b/src/scripts/build_vfxplatform_package.sh index 946edd486..004b61d1d 100755 --- a/src/scripts/build_vfxplatform_package.sh +++ b/src/scripts/build_vfxplatform_package.sh @@ -73,6 +73,9 @@ 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/ +mkdir -p ${PLUG_DIR}/platformthemes +cp -a ${SDK}/plugins/platformthemes/libqxdgdesktopportal.so ${PLUG_DIR}/platformthemes/ + cp -a ${SDK}/plugins/audio ${PLUG_DIR}/ cp -a ${SDK}/plugins/xcbglintegrations ${PLUG_DIR}/ cp -a ${SDK}/plugins/wayland-graphics-integration-client ${PLUG_DIR}/ From 754755c433fbb8e1b18d9d0b553d5aa7de1fe51a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Wed, 1 Jan 2025 19:20:45 +0100 Subject: [PATCH 07/11] Update graphics.friction.Friction.json --- src/scripts/flatpak/graphics.friction.Friction.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/scripts/flatpak/graphics.friction.Friction.json b/src/scripts/flatpak/graphics.friction.Friction.json index 433fcb256..bfbefa670 100644 --- a/src/scripts/flatpak/graphics.friction.Friction.json +++ b/src/scripts/flatpak/graphics.friction.Friction.json @@ -22,7 +22,6 @@ "buildsystem": "simple", "build-commands": [ "mv Friction/* /app/", - "rm -rf Friction", "rm -f /app/friction", "rm -f /app/bin/portable.txt", "rm -f /app/share/icons/hicolor/*/mimetypes/application-x-graphics.friction.Friction.png", @@ -31,8 +30,8 @@ "sources": [ { "type": "archive", - "url": "https://sourceforge.net/projects/friction/files/snapshots/1.0.0-ea7fc674/friction-1.0.0-ea7fc674-linux-x86_64.tar.xz", - "sha256": "003964418ba46bda3fab76f7bc8e5d266aa8d9181d7f5eb1721ae32ea99a7dc8", + "url": "https://sourceforge.net/projects/friction/files/snapshots/1.0.0-3bc2c83b/friction-1.0.0-3bc2c83b-linux-x86_64.tar.xz", + "sha256": "09377fe840902048228df9f40acd2e9839ca9bb6a5084d32bb80175805aab545", "dest": "./Friction" } ] From f7da1aedff53905debb5ac0d79522e61ddd3a833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Wed, 1 Jan 2025 21:12:33 +0100 Subject: [PATCH 08/11] flatpak: workaround limited portal support If running as flatpak limit save image sequence to XDG Pictures/Documents. There are probably other places where this also should be checked for, can we import sequences? There is no way for us to support 'org.freedesktop.portal.FileChooser::SaveFiles' as-is. - We allow 'xdg-documents' for SVG preview, plugins and image sequences - We allow 'xdg-pictures' for image sequences The rest of Friction can use portal to load and save to any directory. --- .../RenderWidgets/renderinstancewidget.cpp | 22 +++++++++++++++++++ .../flatpak/graphics.friction.Friction.json | 5 +---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/app/GUI/RenderWidgets/renderinstancewidget.cpp b/src/app/GUI/RenderWidgets/renderinstancewidget.cpp index 8745b420a..9f44cc15b 100644 --- a/src/app/GUI/RenderWidgets/renderinstancewidget.cpp +++ b/src/app/GUI/RenderWidgets/renderinstancewidget.cpp @@ -37,6 +37,7 @@ #include "appsupport.h" #include +#include RenderInstanceWidget::RenderInstanceWidget( Canvas *canvas, QWidget *parent) : @@ -401,6 +402,27 @@ void RenderInstanceWidget::openOutputDestinationDialog() { QString saveAs = eDialogs::saveFile("Output Destination", iniText, supportedExts); if(saveAs.isEmpty()) return; + +#ifdef Q_OS_LINUX + if (AppSupport::isFlatpak()) { + const bool isImgSeq = (format) ? !std::strcmp(format->name, "image2") : false; + if (isImgSeq) { + const QString pixPath = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation); + const QString docPath = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); + if (!saveAs.startsWith(pixPath) && + !saveAs.startsWith(docPath)) { + QMessageBox box(this); + box.setWindowTitle(tr("Permission issue")); + box.setText(tr("Due to limitations in Flatpak " + "you can only save image sequences to %1 or %2.").arg(pixPath, + docPath)); + box.exec(); + return; + } + } + } +#endif + mSettings.setOutputDestination(saveAs); mOutputDestinationLineEdit->setText(saveAs); updateOutputDestinationFromCurrentFormat(); diff --git a/src/scripts/flatpak/graphics.friction.Friction.json b/src/scripts/flatpak/graphics.friction.Friction.json index bfbefa670..71447c163 100644 --- a/src/scripts/flatpak/graphics.friction.Friction.json +++ b/src/scripts/flatpak/graphics.friction.Friction.json @@ -11,10 +11,7 @@ "--socket=pulseaudio", "--device=dri", "--filesystem=xdg-documents", - "--filesystem=xdg-pictures", - "--filesystem=xdg-videos", - "--filesystem=xdg-music", - "--filesystem=xdg-desktop" + "--filesystem=xdg-pictures" ], "modules": [ { From b26757a4c682948fa3edc83b191ee61452a50696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Wed, 1 Jan 2025 21:33:33 +0100 Subject: [PATCH 09/11] Update graphics.friction.Friction.json --- src/scripts/flatpak/graphics.friction.Friction.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/flatpak/graphics.friction.Friction.json b/src/scripts/flatpak/graphics.friction.Friction.json index 71447c163..7c9da190b 100644 --- a/src/scripts/flatpak/graphics.friction.Friction.json +++ b/src/scripts/flatpak/graphics.friction.Friction.json @@ -27,8 +27,8 @@ "sources": [ { "type": "archive", - "url": "https://sourceforge.net/projects/friction/files/snapshots/1.0.0-3bc2c83b/friction-1.0.0-3bc2c83b-linux-x86_64.tar.xz", - "sha256": "09377fe840902048228df9f40acd2e9839ca9bb6a5084d32bb80175805aab545", + "url": "https://sourceforge.net/projects/friction/files/snapshots/1.0.0-f7da1aed/friction-1.0.0-f7da1aed-linux-x86_64.tar.xz", + "sha256": "d6485bca3a28f2df587b93d34a632341df18adcf5d77b360724cb68702e7188f", "dest": "./Friction" } ] From fdc04f679abae7748122682fd2673495c681d1df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Fri, 3 Jan 2025 21:32:13 +0100 Subject: [PATCH 10/11] Update .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 68a8661c0..e00256feb 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,6 @@ build-release src/scripts/flatpak/.flatpak-builder src/scripts/flatpak/builddir src/scripts/flatpak/export +src/scripts/flatpak/builder +src/scripts/flatpak/repo-main From 68703654164ff124fa8e848a84db19f6c275c79b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Sat, 4 Jan 2025 00:32:43 +0100 Subject: [PATCH 11/11] Update flatpak --- src/scripts/flatpak/README.md | 7 +++++++ src/scripts/flatpak/graphics.friction.Friction.json | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 src/scripts/flatpak/README.md diff --git a/src/scripts/flatpak/README.md b/src/scripts/flatpak/README.md new file mode 100644 index 000000000..4ca6afce7 --- /dev/null +++ b/src/scripts/flatpak/README.md @@ -0,0 +1,7 @@ +# Friction Early Access Flatpak + +[![Friction Early Access Flatpak](https://img.shields.io/badge/Flatpak-4A90D9?logo=flatpak&logoColor=fff&style=for-the-badge)](https://friction.graphics/repo/friction-main.flatpakref) + +``` +flatpak install https://friction.graphics/repo/friction-main.flatpakref +``` diff --git a/src/scripts/flatpak/graphics.friction.Friction.json b/src/scripts/flatpak/graphics.friction.Friction.json index 7c9da190b..90bb169d0 100644 --- a/src/scripts/flatpak/graphics.friction.Friction.json +++ b/src/scripts/flatpak/graphics.friction.Friction.json @@ -27,8 +27,8 @@ "sources": [ { "type": "archive", - "url": "https://sourceforge.net/projects/friction/files/snapshots/1.0.0-f7da1aed/friction-1.0.0-f7da1aed-linux-x86_64.tar.xz", - "sha256": "d6485bca3a28f2df587b93d34a632341df18adcf5d77b360724cb68702e7188f", + "url": "https://sourceforge.net/projects/friction/files/snapshots/1.0.0-8299d776/friction-1.0.0-8299d776-linux-x86_64.tar.xz", + "sha256": "71c8fbd92d45ad3e3ddf1ad4f82b382d000c9581568cf1931046e67804bd39e3", "dest": "./Friction" } ]