From 16effe064ccea1be195ce7812ad2e7a2defd29f9 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Wed, 24 May 2023 11:49:45 +0200 Subject: [PATCH] Disabling generation of HDPI latex pngs, as they aren't used in PySide6. --- LogarithmPlotter/util/latex.py | 6 +++--- setup.py | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/LogarithmPlotter/util/latex.py b/LogarithmPlotter/util/latex.py index d5e362e..3690f83 100644 --- a/LogarithmPlotter/util/latex.py +++ b/LogarithmPlotter/util/latex.py @@ -98,9 +98,9 @@ class Latex(QObject): self.cleanup(latex_path) # Creating four pictures of different sizes to better handle dpi. self.convert_dvi_to_png(latex_path, export_path, font_size, color) - self.convert_dvi_to_png(latex_path, export_path+"@2", font_size*2, color) - self.convert_dvi_to_png(latex_path, export_path+"@3", font_size*3, color) - self.convert_dvi_to_png(latex_path, export_path+"@4", font_size*4, color) + # self.convert_dvi_to_png(latex_path, export_path+"@2", font_size*2, color) + # self.convert_dvi_to_png(latex_path, export_path+"@3", font_size*3, color) + # self.convert_dvi_to_png(latex_path, export_path+"@4", font_size*4, color) except Exception as e: # One of the processes failed. A message will be sent every time. raise e img = QImage(export_path); diff --git a/setup.py b/setup.py index cb3d90a..dd59380 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ print(sys.argv) current_dir = os.path.realpath(os.path.dirname(os.path.realpath(__file__))) +# Check where to install by default if "PREFIX" not in os.environ and sys.platform == 'linux': from getopt import getopt optlist, args = getopt(sys.argv, '', ['prefix=', 'root=']) @@ -100,8 +101,6 @@ if sys.platform == 'linux': 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/apps/', ['logplotter.svg'])) - if "FLATPAK_INSTALL" not in os.environ: - data_files.append((os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/', ['logplotter.svg'])) if len(sys.argv) > 1: if sys.argv[1] == "install": os.makedirs(os.environ["PREFIX"] + '/applications/', exist_ok=True) @@ -113,8 +112,6 @@ if sys.platform == 'linux': 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 + '/linux/eu.ad5001.LogarithmPlotter.metainfo.xml', os.environ["PREFIX"] + '/metainfo/eu.ad5001.LogarithmPlotter.metainfo.xml') - #copyfile(current_dir + '/linux/logarithmplotter.desktop', os.environ["PREFIX"] + '/applications/logarithmplotter.desktop') elif sys.argv[1] == "uninstall": os.remove(os.environ["PREFIX"] + '/applications/logarithmplotter.desktop') os.remove(os.environ["PREFIX"] + '/mime/packages/x-logarithm-plot.xml')