403 return |
403 return |
404 |
404 |
405 global pyModDir, progLanguages |
405 global pyModDir, progLanguages |
406 |
406 |
407 # Remove the menu entry for Linux systems |
407 # Remove the menu entry for Linux systems |
408 if sys.platform.startswith("linux"): |
408 if sys.platform.startswith("linux") and os.getuid() == 0: |
409 for name in ["/usr/share/pixmaps/eric.png", |
409 for name in ["/usr/share/pixmaps/eric.png", |
410 "/usr/share/applications/eric5.desktop", |
410 "/usr/share/applications/eric5.desktop", |
411 "/usr/share/appdata/eric5.appdata.xml", |
411 "/usr/share/appdata/eric5.appdata.xml", |
412 "/usr/share/pixmaps/ericWeb.png", |
412 "/usr/share/pixmaps/ericWeb.png", |
413 "/usr/share/applications/eric5_webbrowser.desktop"]: |
413 "/usr/share/applications/eric5_webbrowser.desktop"]: |
724 dst = os.path.normpath( |
724 dst = os.path.normpath( |
725 os.path.join(distDir, "usr/share/appdata")) |
725 os.path.join(distDir, "usr/share/appdata")) |
726 if not os.path.exists(dst): |
726 if not os.path.exists(dst): |
727 os.makedirs(dst) |
727 os.makedirs(dst) |
728 shutilCopy(os.path.join(sourceDir, "eric5.appdata.xml"), dst) |
728 shutilCopy(os.path.join(sourceDir, "eric5.appdata.xml"), dst) |
729 else: |
729 elif os.getuid() == 0: |
730 shutilCopy(os.path.join( |
730 shutilCopy(os.path.join( |
731 sourceDir, "icons", "default", "eric.png"), |
731 sourceDir, "icons", "default", "eric.png"), |
732 "/usr/share/pixmaps/eric.png") |
732 "/usr/share/pixmaps/eric.png") |
733 shutilCopy(os.path.join( |
733 shutilCopy(os.path.join( |
734 sourceDir, "eric5.desktop"), |
734 sourceDir, "eric5.desktop"), |