Disabling generation of HDPI latex pngs, as they aren't used in PySide6.

This commit is contained in:
Adsooi 2023-05-24 11:49:45 +02:00
parent 803670635b
commit 16effe064c
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
2 changed files with 4 additions and 7 deletions

View file

@ -98,9 +98,9 @@ class Latex(QObject):
self.cleanup(latex_path) self.cleanup(latex_path)
# Creating four pictures of different sizes to better handle dpi. # 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, 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+"@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+"@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+"@4", font_size*4, color)
except Exception as e: # One of the processes failed. A message will be sent every time. except Exception as e: # One of the processes failed. A message will be sent every time.
raise e raise e
img = QImage(export_path); img = QImage(export_path);

View file

@ -25,6 +25,7 @@ print(sys.argv)
current_dir = os.path.realpath(os.path.dirname(os.path.realpath(__file__))) 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': if "PREFIX" not in os.environ and sys.platform == 'linux':
from getopt import getopt from getopt import getopt
optlist, args = getopt(sys.argv, '', ['prefix=', 'root=']) 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"] + '/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 "FLATPAK_INSTALL" not in os.environ:
data_files.append((os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/', ['logplotter.svg']))
if len(sys.argv) > 1: if len(sys.argv) > 1:
if sys.argv[1] == "install": if sys.argv[1] == "install":
os.makedirs(os.environ["PREFIX"] + '/applications/', exist_ok=True) 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', copyfile(current_dir + '/linux/application-x-logarithm-plot.svg',
os.environ["PREFIX"] + '/icons/hicolor/scalable/mimetypes/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')
#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": elif sys.argv[1] == "uninstall":
os.remove(os.environ["PREFIX"] + '/applications/logarithmplotter.desktop') os.remove(os.environ["PREFIX"] + '/applications/logarithmplotter.desktop')
os.remove(os.environ["PREFIX"] + '/mime/packages/x-logarithm-plot.xml') os.remove(os.environ["PREFIX"] + '/mime/packages/x-logarithm-plot.xml')