From d2c6289fcefb3b9ce7066e3ffc755fa5ca6e3b82 Mon Sep 17 00:00:00 2001 From: Peter Eszlari Date: Sun, 6 Dec 2020 15:13:20 +0100 Subject: [PATCH] Linux: rename metadata according to spec https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s02.html#desktop-file-id --- AppImage-package/bundle.sh | 7 ++----- CMakeLists.txt | 19 +++--------------- doc/de/old/install3.html | 2 +- doc/en/install2.html | 2 +- doc/en/qsg.html | 2 +- doc/fr/install3.html | 2 +- doc/it/install2.html | 2 +- doc/it/qsg.html | 2 +- doc/ru/qsg.html | 2 +- ....desktop.in => net.scribus.Scribus.desktop | 12 +++++------ ...xml.in => net.scribus.Scribus.metainfo.xml | 20 +++++++++---------- scribus.xml => net.scribus.Scribus.xml | 1 + resources/iconsets/artwork/CMakeLists.txt | 2 +- 13 files changed, 30 insertions(+), 45 deletions(-) rename scribus.desktop.in => net.scribus.Scribus.desktop (95%) rename scribus.appdata.xml.in => net.scribus.Scribus.metainfo.xml (70%) rename scribus.xml => net.scribus.Scribus.xml (96%) diff --git a/AppImage-package/bundle.sh b/AppImage-package/bundle.sh index a59a7a9ec7..94992da26d 100644 --- a/AppImage-package/bundle.sh +++ b/AppImage-package/bundle.sh @@ -46,10 +46,7 @@ make DESTDIR=appdir -j$(nproc) install cp AppImage-package/AppRun appdir/ chmod +x appdir/AppRun -cp ./appdir/usr/share/icons/hicolor/256x256/apps/scribus.png ./appdir/ - -# TODO: is this needed? -sed -i -e 's|^Icon=.*|Icon=scribus|g' ./appdir/usr/share/applications/scribus.desktop +cp ./appdir/usr/share/icons/hicolor/256x256/apps/net.scribus.Scribus.png ./appdir/ ######################################################################## # Bundle everyhting @@ -121,7 +118,7 @@ EOF # Finalize AppDir but do not turn into AppImage just yet wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" chmod a+x linuxdeployqt-continuous-x86_64.AppImage -ARCH=x86_64 VERSION=$SCRIBUS_VERSION ./linuxdeployqt-continuous-x86_64.AppImage --appimage-extract-and-run appdir/usr/share/applications/scribus.desktop \ +ARCH=x86_64 VERSION=$SCRIBUS_VERSION ./linuxdeployqt-continuous-x86_64.AppImage --appimage-extract-and-run appdir/usr/share/applications/net.scribus.Scribus.desktop \ -appimage -unsupported-bundle-everything \ -executable=appdir/usr/bin/python3.6 \ -executable=appdir/usr/lib/python3.6/lib-dynload/_tkinter.cpython-36m-x86_64-linux-gnu.so \ diff --git a/CMakeLists.txt b/CMakeLists.txt index dce257e810..cb535e14e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -514,36 +514,23 @@ if (APPLE) endif() #Install the .desktop file -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/scribus.desktop.in - ${CMAKE_CURRENT_SOURCE_DIR}/scribus.desktop -) install(FILES - scribus.desktop - RENAME scribus${TAG_VERSION}.desktop + net.scribus.Scribus.desktop DESTINATION ${DESKTOPDIR} ) #Install our MIME data install(FILES - scribus.xml - RENAME scribus${TAG_VERSION}.xml + net.scribus.Scribus.xml DESTINATION ${MIMEDIR} ) - #Install the appdata file -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/scribus.appdata.xml.in - ${CMAKE_CURRENT_SOURCE_DIR}/scribus.appdata.xml -) install(FILES - scribus.appdata.xml - RENAME scribus${TAG_VERSION}.appdata.xml + net.scribus.Scribus.metainfo.xml DESTINATION ${APPDATADIR} ) - #If building an Apple bundle, install these specific files if(APPLEBUNDLE) install(FILES diff --git a/doc/de/old/install3.html b/doc/de/old/install3.html index 2d19cd2c4f..d3eac18cc6 100644 --- a/doc/de/old/install3.html +++ b/doc/de/old/install3.html @@ -59,7 +59,7 @@

Kompilieren und Installieren

Standardmäßig befindet sich die ausführbare Scribus-Datei in /usr/local/bin. Die Dokumentation befindet sich in /usr/local/lib/scribus/doc.

-

Außerdem gibt es noch eine desktop.config-Datei namens scribus.desktop, die als Menükürzel oder als Schnellstarter auf dem Desktop dienen kann. Kopieren Sie die Datei einfach aus dem Installationverzeichnis auf Ihren KDE-Desktop, dort können Sie dann Scribus starten. Wenn Sie die Datei auf den Desktop gezogen haben, müssen Sie noch dafür sorgen, daß sie "ausführbar" ist. Mit einem Rechtsklick können Sie prüfen, ob das entsprechende Kontrollkästchen aktiviert ist. Diese Datei entspricht den jüngsten Spezifikationen von www.freedesktop.org.

+

Außerdem gibt es noch eine desktop.config-Datei namens net.scribus.Scribus.desktop, die als Menükürzel oder als Schnellstarter auf dem Desktop dienen kann. Kopieren Sie die Datei einfach aus dem Installationverzeichnis auf Ihren KDE-Desktop, dort können Sie dann Scribus starten. Wenn Sie die Datei auf den Desktop gezogen haben, müssen Sie noch dafür sorgen, daß sie "ausführbar" ist. Mit einem Rechtsklick können Sie prüfen, ob das entsprechende Kontrollkästchen aktiviert ist. Diese Datei entspricht den jüngsten Spezifikationen von www.freedesktop.org.

Da Scribus autoconf verwendet, sollten Sie - sofern Sie die korrekten Versionen der Entwickler-Bibliotheken besitzen - kaum Probleme beim Kompilieren haben. Falls es dennoch zu Schwierigkeiten kommt, wenden Sie sich bitte an die Scribus-Mailingliste oder unseren IRC-Channel. Beachten Sie hierzu das Kapitel Community Resources in diesem Handbuch.

Zuguterletzt:

diff --git a/doc/en/install2.html b/doc/en/install2.html index dddb7d3a34..19568387aa 100644 --- a/doc/en/install2.html +++ b/doc/en/install2.html @@ -47,6 +47,6 @@

Optionally:

Using CMake

In 1.3.3.6+, we added support for CMake as an alternative to the traditional autotools. Since 1.3.5 it is mandatory, and autotools are no longer supported. Currently, building on Linux, UNIX and Mac OS X is working reliably. Please see the CMake instructions for more details.

The default location for the Scribus executable is located in /usr/local/bin. Documentation is located in /usr/local/lib/scribus/doc

-

In addition for Linux/UNIX desktops, there is a desktop.config file named scribus.desktop which can be used for a menu shortcut or desktop shortcut. Simply copy this from the base directory of the installation source directory to your KDE desktop and this will launch Scribus. After dragging the file to the desktop, right click and make sure the “execute” check box is checked. This file conforms to the latest www.freedesktop.org specifications.

+

In addition for Linux/UNIX desktops, there is a desktop.config file named net.scribus.Scribus.desktop which can be used for a menu shortcut or desktop shortcut. Simply copy this from the base directory of the installation source directory to your KDE desktop and this will launch Scribus. After dragging the file to the desktop, right click and make sure the “execute” check box is checked. This file conforms to the latest www.freedesktop.org specifications.

diff --git a/doc/en/qsg.html b/doc/en/qsg.html index 2d56fc0b19..65fcf052b5 100755 --- a/doc/en/qsg.html +++ b/doc/en/qsg.html @@ -132,7 +132,7 @@

Step Three: Adding Text

Step Four: Adding the Publishing “Company”

-

The final steps include adding an imaginary publishing company and its logo. We'll decide in modesty to call the company “Scribus Publishing”. That way, we need not rack our brains about a logo, but can simply use the Scribus logo. You'll find it in the folder ~/share/scribus/icons, where ~ is your Scribus installation directory. The filename is scribus.png.

+

The final steps include adding an imaginary publishing company and its logo. We'll decide in modesty to call the company “Scribus Publishing”. That way, we need not rack our brains about a logo, but can simply use the Scribus logo. You'll find it in the folder ~/share/scribus/icons, where ~ is your Scribus installation directory. The filename is net.scribus.Scribus.png.

Now create a small Image Frame at the bottom the page, between the page border and the cover image(s). Make sure the fill color of the image frame is set to “None”, because we are going to import an image with a transparent background. Then, as with our first image, we import the icon via right-click > Get Image. To prevent the icon's colors from interfering with the colors chosen for our layout, open the Image Effects dialog as explained in Step Two. Setting the image to “Greyscale” and raising the contrast makes sure the logo won't “disappear”, and at the same time it won't clash with the rest of our colors.

diff --git a/doc/fr/install3.html b/doc/fr/install3.html index 250ca41d06..3bf68823d9 100644 --- a/doc/fr/install3.html +++ b/doc/fr/install3.html @@ -59,7 +59,7 @@

Compilation et installation

L'exécutable de Scribus est situé par défaut dans/usr/local/bin. La documentation se trouve dans/usr/local/lib/scribus/doc

-

De plus, il y a un fichier desktop.config nommé scribus.desktop qui peut être utilisé comme raccourci menu ou raccourci bureau. Copiez-le simplement du répertoire de base de Scribus dans votre bureau KDE et il démarrera Scribus. Après avoir mis ce fichier sur le bureau, cliquez dessus avec le bouton droit et assurez-vous que la case exécuter est cochée. Ce fichier se conforme aux plus récentes spécifications www.freedesktop.org.

+

De plus, il y a un fichier desktop.config nommé net.scribus.Scribus.desktop qui peut être utilisé comme raccourci menu ou raccourci bureau. Copiez-le simplement du répertoire de base de Scribus dans votre bureau KDE et il démarrera Scribus. Après avoir mis ce fichier sur le bureau, cliquez dessus avec le bouton droit et assurez-vous que la case exécuter est cochée. Ce fichier se conforme aux plus récentes spécifications www.freedesktop.org.

Vu que Scribus utilise autoconf, aussi longtemps que vous avez les bonnes versions des librairies de développement, vous ne deriez pas avoir beaucoup de difficultés lors de la compilation. Si vous avez quand même des problèmes, veuillez les signaler dans la liste de diffusion Scribus ou sur le canal IRC. Voir la section Ressources de la communauté de ce manuel.

Finalement :

diff --git a/doc/it/install2.html b/doc/it/install2.html index 39173b39ce..58889fe4a7 100644 --- a/doc/it/install2.html +++ b/doc/it/install2.html @@ -47,6 +47,6 @@

Optionally:

Using CMake

In 1.3.3.6+, we added support for CMake as an alternative to the traditional autotools. Since 1.3.5 it is mandatory, and autotools are no longer supported. Currently, building on Linux, UNIX and Mac OS X is working reliably. Please see the CMake instructions for more details.

The default location for the Scribus executable is located in /usr/local/bin. Documentation is located in /usr/local/lib/scribus/doc

-

In addition for Linux/UNIX desktops, there is a desktop.config file named scribus.desktop which can be used for a menu shortcut or desktop shortcut. Simply copy this from the base directory of the installation source directory to your KDE desktop and this will launch Scribus. After dragging the file to the desktop, right click and make sure the “execute” check box is checked. This file conforms to the latest www.freedesktop.org specifications.

+

In addition for Linux/UNIX desktops, there is a desktop.config file named net.scribus.Scribus.desktop which can be used for a menu shortcut or desktop shortcut. Simply copy this from the base directory of the installation source directory to your KDE desktop and this will launch Scribus. After dragging the file to the desktop, right click and make sure the “execute” check box is checked. This file conforms to the latest www.freedesktop.org specifications.

diff --git a/doc/it/qsg.html b/doc/it/qsg.html index b28aea1ff0..c0c9f7c535 100644 --- a/doc/it/qsg.html +++ b/doc/it/qsg.html @@ -124,7 +124,7 @@

Passo tre: aggiungere il testo

Passo quattro: aggiungere l’“Editore”

-

Le operazioni conclusive consistono nell’aggiungere un editore immaginario e il suo logo. Con uno sfoggio di modestia, chiameremo il nostro editore “Scribus Publishing”. Così non dovremo scervellarci per inventare un logo, ma potremo usare quello di Scribus. Potete trovarlo nella cartella ~/share/scribus/icons, dove ~ è la directory in cui Scribus è installato sul vostro computer. Il file si chiama scribus.png.

+

Le operazioni conclusive consistono nell’aggiungere un editore immaginario e il suo logo. Con uno sfoggio di modestia, chiameremo il nostro editore “Scribus Publishing”. Così non dovremo scervellarci per inventare un logo, ma potremo usare quello di Scribus. Potete trovarlo nella cartella ~/share/scribus/icons, dove ~ è la directory in cui Scribus è installato sul vostro computer. Il file si chiama net.scribus.Scribus.png.

Ora create una piccola cornice immagine in fondo alla pagina, tra il bordo e le immagini di copertina. Assicuratevi che il colore di riempimento di questa cornice sia impostato a “Nessuno”, Perché vi importeremo un’immagine con sfondo trasparente. Poi, come abbiamo fatto con la prima immagine, importiamo l’icona con clic sul tasto destro > Carica immagine. Per evitare che i colori dell’icona interferiscano con i colori che abbiamo scelto per la pagina, aprite la finestra di dialogo Effetti Immagine come spiegato al passo 2. Trasformate l’immagine in “Scala di grigi” e aumentate il contrasto: in questo modo il logo resterà ben visibile, e allo stesso tempo non contrasterà con i colori scelti prima.

diff --git a/doc/ru/qsg.html b/doc/ru/qsg.html index 09996ce0f5..a9e94f24f2 100644 --- a/doc/ru/qsg.html +++ b/doc/ru/qsg.html @@ -93,7 +93,7 @@

Шаг третий: добавление текста

Шаг четвёртый: добавление издательской «фирмы»

-

Заключительные шаги включают добавление воображаемой издательской фирмы и её логотипа. Из соображений скромности назовём фирму «Издательство Scribus». Благодаря этому нам не нужно ломать голову над логотипом — можно просто использовать логотип Scribus. Его можно найти в папке ~/share/scribus/icons, где «~» — каталог установки Scribus. Файл называется scribus.png.

+

Заключительные шаги включают добавление воображаемой издательской фирмы и её логотипа. Из соображений скромности назовём фирму «Издательство Scribus». Благодаря этому нам не нужно ломать голову над логотипом — можно просто использовать логотип Scribus. Его можно найти в папке ~/share/scribus/icons, где «~» — каталог установки Scribus. Файл называется net.scribus.Scribus.png.

Теперь создайте небольшой блок изображения в нижней части страницы, где-то между её краем и изображением обложки. Убедитесь, что цвет заливки блока изображения установлен в «Нет», потому что мы будем вставлять изображение с прозрачным фоном. После этого, как и в случае с нашим первым изображением, импортируем значок, щёлкнув правой кнопкой мыши и выбрав в контекстном меню пункт Содержимое > Вставить изображение. Чтобы цвета значка не мешали цветам, использующимся в макете, откройте диалоговое окно эффектов изображения, как описано во втором шаге. Выбор для изображения «Градаций серого» и повышение контрастности гарантирует, что логотип не «исчезнет», и в то же время не будет конфликтовать с остальными нашими цветами.

diff --git a/scribus.desktop.in b/net.scribus.Scribus.desktop similarity index 95% rename from scribus.desktop.in rename to net.scribus.Scribus.desktop index 649c9389d2..9fbcecebfa 100644 --- a/scribus.desktop.in +++ b/net.scribus.Scribus.desktop @@ -93,16 +93,16 @@ GenericName[xh]=Upapasho lwe Desktop GenericName[zh_CN]=桌面出版 GenericName[zh_TW]=桌面出版 GenericName[zu]=Ukushicilelwa kwe-Desktop -TryExec=scribus@TAG_VERSION@ -Exec=scribus@TAG_VERSION@ %f -Icon=scribus@TAG_VERSION@ +TryExec=scribus +Exec=scribus %f +Icon=net.scribus.Scribus Terminal=false MimeType=application/vnd.scribus; Categories=Qt;Graphics;Publishing; -StartupWMClass=scribus@TAG_VERSION@ -DocPath=scribus@TAG_VERSION@ +StartupWMClass=scribus +DocPath=scribus StartupNotify=false -X-AppInstall-Package=scribus@TAG_VERSION@ +X-AppInstall-Package=scribus X-AppInstall-Section=main X-KDE-SubstituteUID=false X-KDE-Username= diff --git a/scribus.appdata.xml.in b/net.scribus.Scribus.metainfo.xml similarity index 70% rename from scribus.appdata.xml.in rename to net.scribus.Scribus.metainfo.xml index c97eb38531..4f0e2e1b9e 100644 --- a/scribus.appdata.xml.in +++ b/net.scribus.Scribus.metainfo.xml @@ -1,22 +1,22 @@ - scribus@TAG_VERSION@.desktop +net.scribus.Scribus CC0-1.0 Scribus GPL-2.0+ Open Source Page Layout and Desktop Publishing (DTP) - http://www.scribus.net/ + https://www.scribus.net

Scribus is a open source page layout program which -produces commercial grade output in PDF and Postscript, primarily, -though not exclusively, for Linux.

+ produces commercial grade output in PDF and Postscript, primarily, + though not exclusively, for Linux.

-While the goals of the program are ease of use and simple -easy-to-understand tools, Scribus support for professional -publishing features, such as CMYK and spot colors, easy PDF creation, -Encapsulated Postscript import and export and creation of color -separations.

+ While the goals of the program are ease of use and simple + easy-to-understand tools, Scribus support for professional + publishing features, such as CMYK and spot colors, easy PDF creation, + Encapsulated Postscript import and export and creation of color + separations.

@@ -37,6 +37,6 @@ separations.

- +
diff --git a/scribus.xml b/net.scribus.Scribus.xml similarity index 96% rename from scribus.xml rename to net.scribus.Scribus.xml index ab6a288359..db9eb43cc2 100644 --- a/scribus.xml +++ b/net.scribus.Scribus.xml @@ -27,5 +27,6 @@ + diff --git a/resources/iconsets/artwork/CMakeLists.txt b/resources/iconsets/artwork/CMakeLists.txt index 43dca4a33a..135ff26ce1 100644 --- a/resources/iconsets/artwork/CMakeLists.txt +++ b/resources/iconsets/artwork/CMakeLists.txt @@ -11,7 +11,7 @@ if(NOT WIN32 AND NOT APPLE) FOREACH(res 16x16 32x32 128x128 256x256 512x512 1024x1024) INSTALL(FILES icon_${res}.png - RENAME scribus${TAG_VERSION}.png + RENAME net.scribus.Scribus.png DESTINATION ${SYSICONDIR}/${res}/apps/ ) ENDFOREACH(res)