339 return |
339 return |
340 |
340 |
341 global pyModDir, progLanguages |
341 global pyModDir, progLanguages |
342 |
342 |
343 # Remove the menu entry for Linux systems |
343 # Remove the menu entry for Linux systems |
344 if sys.platform.startswith("linux"): |
344 if sys.platform.startswith("linux") and os.getuid() == 0: |
345 for name in ["/usr/share/pixmaps/eric.png", |
345 for name in ["/usr/share/pixmaps/eric.png", |
346 "/usr/share/applications/eric5.desktop", |
346 "/usr/share/applications/eric5.desktop", |
347 "/usr/share/appdata/eric5.appdata.xml", |
347 "/usr/share/appdata/eric5.appdata.xml", |
348 "/usr/share/pixmaps/ericWeb.png", |
348 "/usr/share/pixmaps/ericWeb.png", |
349 "/usr/share/applications/eric5_webbrowser.desktop"]: |
349 "/usr/share/applications/eric5_webbrowser.desktop"]: |
653 dst = os.path.normpath( |
653 dst = os.path.normpath( |
654 os.path.join(distDir, "usr/share/appdata")) |
654 os.path.join(distDir, "usr/share/appdata")) |
655 if not os.path.exists(dst): |
655 if not os.path.exists(dst): |
656 os.makedirs(dst) |
656 os.makedirs(dst) |
657 shutilCopy(os.path.join(sourceDir, "eric5.appdata.xml"), dst) |
657 shutilCopy(os.path.join(sourceDir, "eric5.appdata.xml"), dst) |
658 else: |
658 elif os.getuid() == 0: |
659 shutilCopy(os.path.join( |
659 shutilCopy(os.path.join( |
660 sourceDir, "icons", "default", "eric.png"), |
660 sourceDir, "icons", "default", "eric.png"), |
661 "/usr/share/pixmaps/eric.png") |
661 "/usr/share/pixmaps/eric.png") |
662 shutilCopy(os.path.join( |
662 shutilCopy(os.path.join( |
663 sourceDir, "eric5.desktop"), |
663 sourceDir, "eric5.desktop"), |