Compare commits

..

No commits in common. "08edd7be14f69d495b9a124fb534969615a18e87" and "98f01845e186fa342552e6775fd49b0c18298d69" have entirely different histories.

2 changed files with 7 additions and 4 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,7 +25,6 @@ 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='])
@ -101,6 +100,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 "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)
@ -112,6 +113,8 @@ 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')