Adding metainfo files + changing cpy in AppMenuBar + fixing flatpak bug.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Adsooi 2021-08-02 19:17:45 +02:00
parent 0dfc0aa2b6
commit 49ea64c5e4
No known key found for this signature in database
GPG key ID: 9C87C7D3A69E6BBE
5 changed files with 134 additions and 13 deletions

View file

@ -74,7 +74,7 @@ MenuBar {
} }
MenuSeparator { } MenuSeparator { }
Action { Action {
text: qsTr("&Copy diagram") text: qsTr("&Copy plot")
shortcut: StandardKey.Copy shortcut: StandardKey.Copy
onTriggered: root.copyDiagramToClipboard() onTriggered: root.copyDiagramToClipboard()
icon.name: 'edit-copy' icon.name: 'edit-copy'

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2021 Ad5001 -->
<application>
<id>eu.ad5001.LogarithmPlotter</id>
<id type="desktop">eu.ad5001.LogarithmPlotter.desktop</id>
<launchable type="desktop-id">eu.ad5001.LogarithmPlotter.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0+</project_license>
<name>LogarithmPlotter</name>
<name xml:lang="fr">LogarithmPlotter</name>
<icon type="remote">http://apps.ad5001.eu/icons/apps/logarithmplotter.svg</icon>
<summary>2D plotter software to make BODE plots, sequences and repartition functions</summary>
<summary xml:lang="fr">Logiciel de traçage 2D pour les diagrammes de BODE, les suites et les fonctions de répartition</summary>
<description>
<p>
LogarithmPlotter is, as it's name suggests, a plotter made with logarithm scales in mind. With an object system similar to <a href="https://geogebra.org">Geogebra</a>'s, it allows dynamic creation of plots with very few limitations.
</p>
<p>
It's primary use is to quickly create [asymptotic Bode Diagrams/plots](https://en.wikipedia.org/wiki/Bode_plot), but it's extensible nature and ability to switch to non-logarithmic scales allow it to create other things with it, like sequences or statistical repartition functions.
</p>
</description>
<description xml:lang="fr">
<p>
LogarithmPlotter est, comme son nom l'indique, un créateur de graphes et diagrammes 2D réalisé avec l'échelle logarithmique en tête. Avec un système d'objets similaire à <a href="https://geogebra.org">Geogebra</a>, ce qui lui permet de créer des graphes avec peu de limitations.
</p>
<p>
Son intérêt principal est de permettre de créer des [diagrammes asymptotiques de Bode](https://fr.wikipedia.org/wiki/Diagramme_de_Bode), mais sa nature extensible et sa capacité à passer à une échelle non-logarithmique lui permet de créer d'autres choses.
</p>
</description>
<categories>
<category>Network</category>
<category>Feed</category>
</categories>
<url type="homepage">https://apps.ad5001.eu/logarithmplotter/</url>
<url type="bugtracker">https://git.ad5001.eu/Ad5001/LogarithmPlotter/issues/</url>
<url type="help">https://git.ad5001.eu/Ad5001/LogarithmPlotter/wiki/</url>
<screenshots>
<screenshot type="default">http://apps.ad5001.eu/img/full/logarithmplotter.png</screenshot>
</screenshots>
<releases>
<release version="0.0.1" date="2021-07-15"/>
</releases>
<content_rating type="oars-1.0">
</content_rating>
<update_contact>mail@ad5001.eu</update_contact>
</application>

View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2021 Ad5001 -->
<application>
<id>eu.ad5001.LogarithmPlotter</id>
<id type="desktop">logarithmplotter.desktop</id>
<launchable type="desktop-id">logarithmplotter.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0+</project_license>
<name>LogarithmPlotter</name>
<name xml:lang="fr">LogarithmPlotter</name>
<icon type="remote">http://apps.ad5001.eu/icons/apps/logarithmplotter.svg</icon>
<summary>2D plotter software to make BODE plots, sequences and repartition functions</summary>
<summary xml:lang="fr">Logiciel de traçage 2D pour les diagrammes de BODE, les suites et les fonctions de répartition</summary>
<description>
<p>
LogarithmPlotter is, as it's name suggests, a plotter made with logarithm scales in mind. With an object system similar to <a href="https://geogebra.org">Geogebra</a>'s, it allows dynamic creation of plots with very few limitations.
</p>
<p>
It's primary use is to quickly create [asymptotic Bode Diagrams/plots](https://en.wikipedia.org/wiki/Bode_plot), but it's extensible nature and ability to switch to non-logarithmic scales allow it to create other things with it, like sequences or statistical repartition functions.
</p>
</description>
<description xml:lang="fr">
<p>
LogarithmPlotter est, comme son nom l'indique, un créateur de graphes et diagrammes 2D réalisé avec l'échelle logarithmique en tête. Avec un système d'objets similaire à <a href="https://geogebra.org">Geogebra</a>, ce qui lui permet de créer des graphes avec peu de limitations.
</p>
<p>
Son intérêt principal est de permettre de créer des [diagrammes asymptotiques de Bode](https://fr.wikipedia.org/wiki/Diagramme_de_Bode), mais sa nature extensible et sa capacité à passer à une échelle non-logarithmique lui permet de créer d'autres choses.
</p>
</description>
<categories>
<category>Network</category>
<category>Feed</category>
</categories>
<url type="homepage">https://apps.ad5001.eu/logarithmplotter/</url>
<url type="bugtracker">https://git.ad5001.eu/Ad5001/LogarithmPlotter/issues/</url>
<url type="help">https://git.ad5001.eu/Ad5001/LogarithmPlotter/wiki/</url>
<screenshots>
<screenshot type="default">http://apps.ad5001.eu/img/full/logarithmplotter.png</screenshot>
</screenshots>
<releases>
<release version="0.0.1" date="2021-07-15"/>
</releases>
<content_rating type="oars-1.0">
</content_rating>
<update_contact>mail@ad5001.eu</update_contact>
</application>

View file

@ -74,7 +74,8 @@ if sys.platform == 'linux':
data_files.append((os.environ["PREFIX"] + '/mime/packages/', ['linux/x-logarithm-plot.xml'])) data_files.append((os.environ["PREFIX"] + '/mime/packages/', ['linux/x-logarithm-plot.xml']))
data_files.append((os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/', ['linux/application-x-logarithm-plot.svg'])) data_files.append((os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/', ['linux/application-x-logarithm-plot.svg']))
data_files.append((os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/', ['logplotter.svg'])) data_files.append((os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/', ['logplotter.svg']))
if len(sys.argv) > 1 and sys.argv[1] == "install": if len(sys.argv) > 1:
if sys.argv[1] == "install":
from shutil import copyfile from shutil import copyfile
os.makedirs(os.environ["PREFIX"] + '/applications/', exist_ok=True) os.makedirs(os.environ["PREFIX"] + '/applications/', exist_ok=True)
os.makedirs(os.environ["PREFIX"] + '/mime/packages/', exist_ok=True) os.makedirs(os.environ["PREFIX"] + '/mime/packages/', exist_ok=True)
@ -82,11 +83,24 @@ if sys.platform == 'linux':
os.makedirs(os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/', exist_ok=True) os.makedirs(os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/', exist_ok=True)
copyfile(current_dir + '/linux/logarithmplotter.desktop', os.environ["PREFIX"] + '/applications/logarithmplotter.desktop') copyfile(current_dir + '/linux/logarithmplotter.desktop', os.environ["PREFIX"] + '/applications/logarithmplotter.desktop')
copyfile(current_dir + '/linux/x-logarithm-plot.xml', os.environ["PREFIX"] + '/mime/packages/x-logarithm-plot.xml') copyfile(current_dir + '/linux/x-logarithm-plot.xml', os.environ["PREFIX"] + '/mime/packages/x-logarithm-plot.xml')
copyfile(current_dir + '/linux/application-x-logarithm-plot.svg', os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/application-x-logarithm-plot.svg') copyfile(current_dir + '/linux/application-x-logarithm-plot.svg',
os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/application-x-logarithm-plot.svg')
copyfile(current_dir + '/logplotter.svg', os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/logplotter.svg') copyfile(current_dir + '/logplotter.svg', os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/logplotter.svg')
if "FLATPAK_INSTALL" in os.environ:
os.makedirs(os.environ["PREFIX"] + '/metainfo/', exist_ok=True)
copyfile(current_dir + '/linux/eu.ad5001.LogarithmPlotter.metainfo.flatpak.xml',
os.environ["PREFIX"] + '/metainfo/eu.ad5001.LogarithmPlotter.metainfo.xml')
elif sys.argv[1] == "uninstall":
os.remove(os.environ["PREFIX"] + '/applications/logarithmplotter.desktop')
os.remove(os.environ["PREFIX"] + '/mime/packages/x-logarithm-plot.xml')
os.remove(os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/application-x-logarithm-plot.svg')
os.remove(os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/logplotter.svg')
print("FLATPAK_INSTALL=", "FLATPAK_INSTALL" in os.environ)
print("Dependencies:", [] if "FLATPAK_INSTALL" in os.environ else ["PySide2"])
setuptools.setup( setuptools.setup(
install_requires=["PySide2"], install_requires=([] if "FLATPAK_INSTALL" in os.environ else ["PySide2"]),
python_requires='>=3.8', python_requires='>=3.8',
name='logarithmplotter', name='logarithmplotter',

View file

@ -1,4 +1,5 @@
name: logarithmplotter name: logarithmplotter
title: LogarithmPlotter
version: '0.0.1' version: '0.0.1'
summary: 2D plotter software to make BODE plots, sequences and repartition functions. summary: 2D plotter software to make BODE plots, sequences and repartition functions.
description: | description: |
@ -8,6 +9,12 @@ confinement: strict
base: core20 base: core20
grade: devel grade: devel
icon: LogarithmPlotter/logarithmplotter.svg icon: LogarithmPlotter/logarithmplotter.svg
adopt-info: linuxfiles
license: GPL-3.0+
architectures:
- build-on: amd64
run-on: amd64
plugs: plugs:
#gnome-3-38-2004: #gnome-3-38-2004:
@ -19,7 +26,7 @@ plugs:
interface: content interface: content
target: $SNAP/data-dir/themes target: $SNAP/data-dir/themes
sound-themes: sound-themes:
default-provider: gtk-common-themes:sound-themes defauwebsitelt-provider: gtk-common-themes:sound-themes
interface: content interface: content
target: $SNAP/data-dir/sounds target: $SNAP/data-dir/sounds
icon-themes: icon-themes:
@ -65,6 +72,7 @@ parts:
linuxfiles: linuxfiles:
source: linux/ source: linux/
plugin: dump plugin: dump
parse-info: [eu.ad5001.LogarithmPlotter.metainfo.xml]
organize: organize:
logarithmplotter.desktop: usr/share/applications/logarithmplotter.desktop logarithmplotter.desktop: usr/share/applications/logarithmplotter.desktop
x-logarithm-plot.xml: usr/share/mime/packages/x-logarithm-plot.xml x-logarithm-plot.xml: usr/share/mime/packages/x-logarithm-plot.xml