install.py

branch
6_1_x
changeset 5103
dac66bb81340
parent 5058
41df96c4c8ce
child 5216
113279c2a38b
equal deleted inserted replaced
5097:5c3c8bd1cf04 5103:dac66bb81340
509 marker = PythonMarkers[sys.version_info.major] 509 marker = PythonMarkers[sys.version_info.major]
510 else: 510 else:
511 marker = "" 511 marker = ""
512 for name in ["/usr/share/applications/eric6" + marker + ".desktop", 512 for name in ["/usr/share/applications/eric6" + marker + ".desktop",
513 "/usr/share/appdata/eric6" + marker + ".appdata.xml", 513 "/usr/share/appdata/eric6" + marker + ".appdata.xml",
514 "/usr/share/metainfo/eric6" + marker + ".appdata.xml",
514 "/usr/share/applications/eric6_webbrowser" + marker + 515 "/usr/share/applications/eric6_webbrowser" + marker +
515 ".desktop"]: 516 ".desktop"]:
516 if os.path.exists(name): 517 if os.path.exists(name):
517 os.remove(name) 518 os.remove(name)
518 519
813 copyDesktopFile( 814 copyDesktopFile(
814 os.path.join(sourceDir, "eric6_webbrowser.desktop"), 815 os.path.join(sourceDir, "eric6_webbrowser.desktop"),
815 os.path.join(dst, "eric6_webbrowser" + marker + ".desktop"), 816 os.path.join(dst, "eric6_webbrowser" + marker + ".desktop"),
816 marker) 817 marker)
817 dst = os.path.normpath( 818 dst = os.path.normpath(
818 os.path.join(distDir, "usr/share/appdata")) 819 os.path.join(distDir, "usr/share/metainfo"))
819 if not os.path.exists(dst): 820 if not os.path.exists(dst):
820 os.makedirs(dst) 821 os.makedirs(dst)
821 copyDesktopFile( 822 copyDesktopFile(
822 os.path.join(sourceDir, "eric6.appdata.xml"), 823 os.path.join(sourceDir, "eric6.appdata.xml"),
823 os.path.join(dst, "eric6" + marker + ".appdata.xml"), 824 os.path.join(dst, "eric6" + marker + ".appdata.xml"),
828 "/usr/share/pixmaps/eric" + marker + ".png") 829 "/usr/share/pixmaps/eric" + marker + ".png")
829 copyDesktopFile( 830 copyDesktopFile(
830 os.path.join(sourceDir, "eric6.desktop"), 831 os.path.join(sourceDir, "eric6.desktop"),
831 "/usr/share/applications/eric6" + marker + ".desktop", 832 "/usr/share/applications/eric6" + marker + ".desktop",
832 marker) 833 marker)
833 if os.path.exists("/usr/share/appdata"): 834 if os.path.exists("/usr/share/metainfo"):
835 copyDesktopFile(
836 os.path.join(sourceDir, "eric6.appdata.xml"),
837 "/usr/share/metainfo/eric6" + marker + ".appdata.xml",
838 marker)
839 elif os.path.exists("/usr/share/appdata"):
834 copyDesktopFile( 840 copyDesktopFile(
835 os.path.join(sourceDir, "eric6.appdata.xml"), 841 os.path.join(sourceDir, "eric6.appdata.xml"),
836 "/usr/share/appdata/eric6" + marker + ".appdata.xml", 842 "/usr/share/appdata/eric6" + marker + ".appdata.xml",
837 marker) 843 marker)
838 shutilCopy(os.path.join( 844 shutilCopy(os.path.join(

eric ide

mercurial