Updating mimetype name to x-logarithm-plot, using xdg commandline utilities when installing on linux.
This commit is contained in:
parent
1e73465f08
commit
ee15835dbb
7 changed files with 32 additions and 26 deletions
|
@ -19,12 +19,11 @@
|
||||||
|
|
||||||
APPROOT="$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
APPROOT="$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
echo "Adding desktop file..."
|
echo "Adding desktop file..."
|
||||||
mkdir -p ~/.local/share/applications
|
xdg-desktop-menu install "$APPROOT/linux/logarithmplotter.desktop"
|
||||||
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/logarithmplotter.desktop" > ~/.local/share/applications/logarithmplotter.desktop
|
|
||||||
echo "Installing mime-type..."
|
echo "Installing mime-type..."
|
||||||
mkdir -p ~/.local/share/applications
|
xdg-mime install "$APPROOT/linux/x-logarithm-plot.xml"
|
||||||
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/x-logarithm-plotter-old.xml" > ~/.local/share/mime/packages/x-logarithm-plotter.xml
|
echo "Installing icons..."
|
||||||
mkdir -p ~/.local/share/icons/hicolor/scalable/mimetypes
|
xdg-icon-resource install --context mimetypes --novendor "$APPROOT/logplotterfile.svg" "application-x-logarithm-plot"
|
||||||
cp "$APPROOT/logplotterfile.svg" ~/.local/share/icons/hicolor/scalable/mimetypes/application-x-logarithm-plotter.svg
|
xdg-icon-resource install --context apps --novendor "$APPROOT/logplotter.svg" "logarithmplotter"
|
||||||
update-mime-database ~/.local/share/mime/
|
update-mime-database ~/.local/share/mime/
|
||||||
update-icon-caches ~/.local/share/icons/hicolor
|
update-icon-caches ~/.local/share/icons/hicolor
|
||||||
|
|
|
@ -19,12 +19,12 @@
|
||||||
|
|
||||||
APPROOT="$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
APPROOT="$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
echo "Adding desktop file..."
|
echo "Adding desktop file..."
|
||||||
mkdir -p ~/.local/share/applications
|
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/logplotter.desktop" > "$APPROOT/linux/logarithmplotter-local.desktop"
|
||||||
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/logplotter.desktop" > ~/.local/share/applications/logarithmplotter.desktop
|
xdg-desktop-menu install "$APPROOT/linux/logarithmplotter-local.desktop"
|
||||||
echo "Installing mime-type..."
|
echo "Installing mime-type..."
|
||||||
mkdir -p ~/.local/share/applications
|
xdg-mime install "$APPROOT/linux/x-logarithm-plot.xml"
|
||||||
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/x-logarithm-plotter.xml" > ~/.local/share/mime/packages/x-logarithm-plotter.xml
|
echo "Installing icons..."
|
||||||
mkdir -p ~/.local/share/icons/hicolor/scalable/mimetypes
|
xdg-icon-resource install --context mimetypes --novendor "$APPROOT/logplotterfile.svg" "application-x-logarithm-plot"
|
||||||
cp "$APPROOT/logplotterfile.svg" ~/.local/share/icons/hicolor/scalable/mimetypes/application-x-logarithm-plotter.svg
|
xdg-icon-resource install --context apps --novendor "$APPROOT/logplotter.svg" "logarithmplotter"
|
||||||
update-mime-database ~/.local/share/mime/
|
update-mime-database ~/.local/share/mime/
|
||||||
update-icon-caches ~/.local/share/icons/hicolor
|
update-icon-caches ~/.local/share/icons/hicolor
|
||||||
|
|
|
@ -2,10 +2,15 @@
|
||||||
Version=1.0
|
Version=1.0
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=LogarithmPlotter
|
Name=LogarithmPlotter
|
||||||
Comment=Plotter to make BODE diagrams, sequences and repartition functions.
|
GenericName=2D plotter software
|
||||||
Exec=/usr/bin/logarithmplotter %F
|
GenericName[fr]=Logiciel de traçage 2D
|
||||||
Icon=logplotter
|
Comment=Create BODE diagrams, sequences and repartition functions.
|
||||||
MimeType=application/x-logarithm-plotter;
|
Comment[fr]=Créer des diagrammes de BODE, des suites et des fonctions de répartition.
|
||||||
|
|
||||||
|
TryExec=logarithmplotter
|
||||||
|
Exec=logarithmplotter %f
|
||||||
|
Icon=logarithmplotter
|
||||||
|
MimeType=application/x-logarithm-plot;
|
||||||
Terminal=false
|
Terminal=false
|
||||||
StartupNotify=false
|
StartupNotify=false
|
||||||
Categories=Math
|
Categories=Math
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
Version=1.0
|
Version=1.0
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=LogarithmPlotter
|
Name=LogarithmPlotter
|
||||||
Comment=Plotter to make BODE diagrams, sequences and repartition functions.
|
Comment=2D plotter software to make BODE diagrams, sequences and repartition functions.
|
||||||
Exec=/usr/bin/python3 ROOTFOLDER/run.py %F
|
Comment[fr]=Logiciel de traçage 2D pour les diagrammes de BODE, les suites et les fonctions de répartition.
|
||||||
Icon=ROOTFOLDER/logplotter.svg
|
|
||||||
MimeType=application/x-logarithm-plotter;
|
Exec=/usr/bin/python3 ROOTFOLDER/run.py %f
|
||||||
|
Icon=logarithmplotter
|
||||||
|
MimeType=application/x-logarithm-plot;
|
||||||
Terminal=false
|
Terminal=false
|
||||||
StartupNotify=false
|
StartupNotify=false
|
||||||
Categories=Math
|
Categories=Math
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||||
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/x-logarithm-plotter">
|
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/x-logarithm-plot">
|
||||||
<comment>Logarithm Plot File</comment>
|
<comment>Logarithm Plot File</comment>
|
||||||
<comment xml:lang="fr">Fichier Graphe Logarithmique</comment>
|
<comment xml:lang="fr">Fichier Graphe Logarithmique</comment>
|
||||||
<icon name="application-x-logarithm-plotter"/>
|
<icon name="application-x-logarithm-plot"/>
|
||||||
<glob-deleteall/>
|
<glob-deleteall/>
|
||||||
<glob pattern="*.json"/>
|
<glob pattern="*.json"/>
|
||||||
<glob pattern="*.lgg"/>
|
<glob pattern="*.lgg"/>
|
|
@ -24,7 +24,7 @@
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
<key>UTTypeIdentifier</key>
|
<key>UTTypeIdentifier</key>
|
||||||
<string>eu.ad5001.x-logarithm-plotter</string>
|
<string>eu.ad5001.x-logarithm-plot</string>
|
||||||
<key>UTTypeReferenceURL</key>
|
<key>UTTypeReferenceURL</key>
|
||||||
<string>https://git.ad5001.eu/Ad5001/LogarithmicPlotter/wiki/LogarithmPlotter-file-format-v1.0</string>
|
<string>https://git.ad5001.eu/Ad5001/LogarithmicPlotter/wiki/LogarithmPlotter-file-format-v1.0</string>
|
||||||
<key>UTTypeDescription</key>
|
<key>UTTypeDescription</key>
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
<string>Owner</string>
|
<string>Owner</string>
|
||||||
<key>LSItemContentTypes</key>
|
<key>LSItemContentTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>eu.ad5001.x-logarithm-plotter</string>
|
<string>eu.ad5001.x-logarithm-plot</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -58,8 +58,8 @@ def package_data():
|
||||||
data_files = []
|
data_files = []
|
||||||
if sys.platform == 'linux':
|
if sys.platform == 'linux':
|
||||||
data_files.append(('/usr/share/applications/', ['linux/logarithmplotter.desktop']))
|
data_files.append(('/usr/share/applications/', ['linux/logarithmplotter.desktop']))
|
||||||
data_files.append(('/usr/share/mime/packages/', ['linux/x-logarithm-plotter.xml']))
|
data_files.append(('/usr/share/mime/packages/', ['linux/x-logarithm-plot.xml']))
|
||||||
data_files.append(('/usr/share/icons/hicolor/scalable/mimetypes/', ['linux/application-x-logarithm-plotter.svg']))
|
data_files.append(('/usr/share/icons/hicolor/scalable/mimetypes/', ['linux/application-x-logarithm-plot.svg']))
|
||||||
data_files.append(('/usr/share/icons/hicolor/scalable/apps/', ['logplotter.svg']))
|
data_files.append(('/usr/share/icons/hicolor/scalable/apps/', ['logplotter.svg']))
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
|
|
Loading…
Reference in a new issue