917 if distDir: |
917 if distDir: |
918 dst = os.path.normpath(os.path.join(distDir, "usr/share/pixmaps")) |
918 dst = os.path.normpath(os.path.join(distDir, "usr/share/pixmaps")) |
919 if not os.path.exists(dst): |
919 if not os.path.exists(dst): |
920 os.makedirs(dst) |
920 os.makedirs(dst) |
921 shutilCopy( |
921 shutilCopy( |
922 os.path.join(eric6SourceDir, "icons", "default", "eric.png"), |
922 os.path.join(eric6SourceDir, "pixmaps", "eric_icon.png"), |
923 os.path.join(dst, "eric.png")) |
923 os.path.join(dst, "eric.png")) |
924 shutilCopy( |
924 shutilCopy( |
925 os.path.join(eric6SourceDir, "icons", "default", "ericWeb48.png"), |
925 os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), |
926 os.path.join(dst, "ericWeb.png")) |
926 os.path.join(dst, "ericWeb.png")) |
927 dst = os.path.normpath( |
927 dst = os.path.normpath( |
928 os.path.join(distDir, "usr/share/applications")) |
928 os.path.join(distDir, "usr/share/applications")) |
929 if not os.path.exists(dst): |
929 if not os.path.exists(dst): |
930 os.makedirs(dst) |
930 os.makedirs(dst) |
939 os.makedirs(dst) |
939 os.makedirs(dst) |
940 copyAppStreamFile( |
940 copyAppStreamFile( |
941 os.path.join(sourceDir, "linux", "eric6.appdata.xml.in"), |
941 os.path.join(sourceDir, "linux", "eric6.appdata.xml.in"), |
942 os.path.join(dst, "eric6.appdata.xml")) |
942 os.path.join(dst, "eric6.appdata.xml")) |
943 elif os.getuid() == 0: |
943 elif os.getuid() == 0: |
944 shutilCopy(os.path.join( |
944 shutilCopy( |
945 eric6SourceDir, "icons", "default", "eric.png"), |
945 os.path.join(eric6SourceDir, "pixmaps", "eric_icon.png"), |
946 "/usr/share/pixmaps/eric.png") |
946 "/usr/share/pixmaps/eric.png") |
947 copyDesktopFile( |
947 copyDesktopFile( |
948 os.path.join(sourceDir, "linux", "eric6.desktop.in"), |
948 os.path.join(sourceDir, "linux", "eric6.desktop.in"), |
949 "/usr/share/applications/eric6.desktop") |
949 "/usr/share/applications/eric6.desktop") |
950 if os.path.exists("/usr/share/metainfo"): |
950 if os.path.exists("/usr/share/metainfo"): |
953 "/usr/share/metainfo/eric6.appdata.xml") |
953 "/usr/share/metainfo/eric6.appdata.xml") |
954 elif os.path.exists("/usr/share/appdata"): |
954 elif os.path.exists("/usr/share/appdata"): |
955 copyAppStreamFile( |
955 copyAppStreamFile( |
956 os.path.join(sourceDir, "linux", "eric6.appdata.xml.in"), |
956 os.path.join(sourceDir, "linux", "eric6.appdata.xml.in"), |
957 "/usr/share/appdata/eric6.appdata.xml") |
957 "/usr/share/appdata/eric6.appdata.xml") |
958 shutilCopy(os.path.join( |
958 shutilCopy( |
959 eric6SourceDir, "icons", "default", "ericWeb48.png"), |
959 os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), |
960 "/usr/share/pixmaps/ericWeb.png") |
960 "/usr/share/pixmaps/ericWeb.png") |
961 copyDesktopFile( |
961 copyDesktopFile( |
962 os.path.join(sourceDir, "linux", "eric6_browser.desktop.in"), |
962 os.path.join(sourceDir, "linux", "eric6_browser.desktop.in"), |
963 "/usr/share/applications/eric6_browser.desktop") |
963 "/usr/share/applications/eric6_browser.desktop") |
964 elif os.getuid() >= 1000: |
964 elif os.getuid() >= 1000: |
971 "metainfo", "appdata")]: |
971 "metainfo", "appdata")]: |
972 if not os.path.isdir(directory): |
972 if not os.path.isdir(directory): |
973 os.makedirs(directory) |
973 os.makedirs(directory) |
974 # now copy the files |
974 # now copy the files |
975 shutilCopy( |
975 shutilCopy( |
976 os.path.join(eric6SourceDir, "icons", "default", "eric.png"), |
976 os.path.join(eric6SourceDir, "pixmaps", "eric_icon.png"), |
977 os.path.join(localPath, "pixmaps", "eric.png")) |
977 os.path.join(localPath, "pixmaps", "eric.png")) |
978 copyDesktopFile( |
978 copyDesktopFile( |
979 os.path.join(sourceDir, "linux", "eric6.desktop.in"), |
979 os.path.join(sourceDir, "linux", "eric6.desktop.in"), |
980 os.path.join(localPath, "applications", "eric6.desktop")) |
980 os.path.join(localPath, "applications", "eric6.desktop")) |
981 copyAppStreamFile( |
981 copyAppStreamFile( |
983 os.path.join(localPath, "metainfo", "eric6.appdata.xml")) |
983 os.path.join(localPath, "metainfo", "eric6.appdata.xml")) |
984 copyAppStreamFile( |
984 copyAppStreamFile( |
985 os.path.join(sourceDir, "linux", "eric6.appdata.xml.in"), |
985 os.path.join(sourceDir, "linux", "eric6.appdata.xml.in"), |
986 os.path.join(localPath, "appdata", "eric6.appdata.xml")) |
986 os.path.join(localPath, "appdata", "eric6.appdata.xml")) |
987 shutilCopy( |
987 shutilCopy( |
988 os.path.join(eric6SourceDir, "icons", "default", "ericWeb48.png"), |
988 os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), |
989 os.path.join(localPath, "pixmaps", "ericWeb.png")) |
989 os.path.join(localPath, "pixmaps", "ericWeb.png")) |
990 copyDesktopFile( |
990 copyDesktopFile( |
991 os.path.join(sourceDir, "linux", "eric6_browser.desktop.in"), |
991 os.path.join(sourceDir, "linux", "eric6_browser.desktop.in"), |
992 os.path.join(localPath, "applications", "eric6_browser.desktop")) |
992 os.path.join(localPath, "applications", "eric6_browser.desktop")) |
993 |
993 |