This commit is contained in:
parent
49ea64c5e4
commit
eec1502465
1 changed files with 2 additions and 0 deletions
2
setup.py
2
setup.py
|
@ -75,6 +75,7 @@ if sys.platform == 'linux':
|
||||||
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:
|
if len(sys.argv) > 1:
|
||||||
|
print(sys.argv[1])
|
||||||
if sys.argv[1] == "install":
|
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)
|
||||||
|
@ -86,6 +87,7 @@ 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')
|
||||||
|
print("Wrote icon to ", os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/logplotter.svg')
|
||||||
if "FLATPAK_INSTALL" in os.environ:
|
if "FLATPAK_INSTALL" in os.environ:
|
||||||
os.makedirs(os.environ["PREFIX"] + '/metainfo/', exist_ok=True)
|
os.makedirs(os.environ["PREFIX"] + '/metainfo/', exist_ok=True)
|
||||||
copyfile(current_dir + '/linux/eu.ad5001.LogarithmPlotter.metainfo.flatpak.xml',
|
copyfile(current_dir + '/linux/eu.ad5001.LogarithmPlotter.metainfo.flatpak.xml',
|
||||||
|
|
Loading…
Reference in a new issue