Skip to content

Commit

Permalink
freedesktop update
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Dec 7, 2023
1 parent bbb7609 commit 57209ca
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/app/app.desktop.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Name=@FRICTION_DISPLAY_NAME@
Exec=@FRICTION_NAME@ %f
Icon=@PROJECT_FREEDESKTOP@
Comment=@PROJECT_DESCRIPTION@
GenericName=@PROJECT_DESCRIPTION@
GenericName=@FRICTION_NAME_GENERIC@
StartupNotify=true
Terminal=false
Type=Application
Expand Down
16 changes: 8 additions & 8 deletions src/app/appdata.xml.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright Friction contributors -->
<!-- Copyright @PROJECT_COPYRIGHT@ -->
<component type="desktop">
<id>@PROJECT_FREEDESKTOP@</id>
<launchable type="desktop-id">@[email protected]</launchable>
<name>Friction</name>
<developer_name>Friction</developer_name>
<summary>Motion graphics software</summary>
<name>@FRICTION_DISPLAY_NAME@</name>
<developer_name>@FRICTION_DISPLAY_NAME@</developer_name>
<summary>@PROJECT_DESCRIPTION@</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<description>
Expand All @@ -24,10 +24,10 @@
<caption>Friction user interface</caption>
</screenshot>
</screenshots>
<url type="homepage">https://friction.graphics</url>
<url type="bugtracker">https://github.com/friction2d/friction/issues</url>
<url type="help">https://friction.graphics/documentation/</url>
<update_contact>[email protected]</update_contact>
<url type="homepage">@PROJECT_HOMEPAGE_URL@</url>
<url type="bugtracker">@PROJECT_BUGTRACKER_URL@</url>
<url type="help">@PROJECT_HELP_URL@</url>
<update_contact>@PROJECT_CONTACT@</update_contact>
<content_rating type="oars-1.1"/>
<keywords>
<keyword>2d</keyword>
Expand Down
6 changes: 5 additions & 1 deletion src/cmake/friction-meta.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@
#

set(FRICTION_NAME "friction")
set(FRICTION_NAME_GENERIC "Motion Graphics")
set(FRICTION_DISPLAY_NAME "Friction")
set(PROJECT_COPYRIGHT "Friction contributors")
set(PROJECT_IDENTIFIER "graphics.friction")
set(PROJECT_DESCRIPTION "Motion Graphics")
set(PROJECT_DESCRIPTION "Motion graphics software")
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_CONTACT "[email protected]")
27 changes: 16 additions & 11 deletions src/scripts/build_vfxplatform_package_tar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ SDK=${SDK:-"/opt/friction"}
DISTFILES=${DISTFILES:-"/mnt"}
BUILD=${BUILD:-"${HOME}"}
VERSION=${VERSION:-""}
APPID="graphics.friction.Friction"
FRICTION_PKG=friction-${VERSION}

if [ "${VERSION}" = "" ]; then
Expand Down Expand Up @@ -105,11 +106,12 @@ scalable

mkdir -p ${BUILD}/${FRICTION_PKG}/usr/bin
mkdir -p ${BUILD}/${FRICTION_PKG}/usr/share/mime/packages
mkdir -p ${BUILD}/${FRICTION_PKG}/usr/share/applications
mkdir -p ${BUILD}/${FRICTION_PKG}/usr/share/{applications,metainfo}

(cd ${BUILD}/${FRICTION_PKG}/usr/bin; ln -sf ../../opt/friction/bin/friction .)
(cd ${BUILD}/${FRICTION_PKG}/usr/share/mime/packages ; ln -sf ../../../../opt/friction/share/mime/packages/friction.xml .)
(cd ${BUILD}/${FRICTION_PKG}/usr/share/applications; ln -sf ../../../opt/friction/share/applications/friction.desktop .)
(cd ${BUILD}/${FRICTION_PKG}/usr/share/mime/packages ; ln -sf ../../../../opt/friction/share/mime/packages/${APPID}.xml .)
(cd ${BUILD}/${FRICTION_PKG}/usr/share/applications; ln -sf ../../../opt/friction/share/applications/${APPID}.desktop .)
(cd ${BUILD}/${FRICTION_PKG}/usr/share/metainfo; ln -sf ../../../opt/friction/share/metainfo/${APPID}.appdata.xml .)

for icon in ${HICOLOR}; do
ICON_SUFFIX=png
Expand All @@ -119,8 +121,8 @@ for icon in ${HICOLOR}; do
mkdir -p ${BUILD}/${FRICTION_PKG}/usr/share/icons/hicolor/${icon}/{apps,mimetypes}
ICON_APP_DIR=${BUILD}/${FRICTION_PKG}/usr/share/icons/hicolor/${icon}/apps
ICON_MIME_DIR=${BUILD}/${FRICTION_PKG}/usr/share/icons/hicolor/${icon}/mimetypes
(cd ${ICON_APP_DIR} ; ln -sf ../../../../../../opt/friction/share/icons/hicolor/${icon}/apps/friction.${ICON_SUFFIX} .)
(cd ${ICON_MIME_DIR} ; ln -sf ../../../../../../opt/friction/share/icons/hicolor/${icon}/mimetypes/application-x-friction.${ICON_SUFFIX} .)
(cd ${ICON_APP_DIR} ; ln -sf ../../../../../../opt/friction/share/icons/hicolor/${icon}/apps/${APPID}.${ICON_SUFFIX} .)
(cd ${ICON_MIME_DIR} ; ln -sf ../../../../../../opt/friction/share/icons/hicolor/${icon}/mimetypes/application-x-${APPID}.${ICON_SUFFIX} .)
done

strip -s ${BUILD}/${FRICTION_PKG}/opt/friction/bin/friction
Expand All @@ -135,13 +137,13 @@ if [ ! -d "${HOME}/rpmbuild/SOURCES" ]; then
fi

mv ${FRICTION_PKG}.tar ${HOME}/rpmbuild/SOURCES/
cat ${BUILD}/friction/src/scripts/vfxplatform.spec | sed 's/__FRICTION_PKG_VERSION__/'${PKG_VERSION}'/g;s/__FRICTION_VERSION__/'${VERSION}'/g' > rpm.spec
cat ${BUILD}/friction/src/scripts/vfxplatform.spec | sed 's/__FRICTION_PKG_VERSION__/'${PKG_VERSION}'/g;s/__FRICTION_VERSION__/'${VERSION}'/g;s/__APPID__/'${APPID}'/g' > rpm.spec

# RPM
rpmbuild -bb rpm.spec

# Portable
FRICTION_PORTABLE=${FRICTION_PKG}-portable-x86_64
FRICTION_PORTABLE=${FRICTION_PKG}-linux-X11-x86_64
FRICTION_PORTABLE_DIR=${BUILD}/${FRICTION_PORTABLE}
cd ${BUILD}
rm -f ${FRICTION_PORTABLE_DIR} || true
Expand Down Expand Up @@ -181,10 +183,13 @@ xz -9 ${FRICTION_PORTABLE}.tar

# AppImage
(cd ${FRICTION_PORTABLE_DIR} ;
ln -sf bin/friction AppRun
ln -sf share/applications/friction.desktop .
ln -sf share/icons/hicolor/256x256/apps/friction.png .
ln -sf share/icons/hicolor/256x256/apps/friction.png .DirIcon
rm -f friction
mkdir usr
mv lib bin plugins share usr/
ln -sf usr/bin/friction AppRun
ln -sf usr/share/applications/${APPID}.desktop .
ln -sf usr/share/icons/hicolor/256x256/apps/${APPID}.png .
ln -sf usr/share/icons/hicolor/256x256/apps/${APPID}.png .DirIcon
)
tar xf ${DISTFILES}/appimagetool.tar.xz
ARCH=x86_64 ./appimagetool/AppRun ${FRICTION_PORTABLE}
Expand Down

0 comments on commit 57209ca

Please sign in to comment.