937 os.path.join(eric6SourceDir, "pixmaps", "eric_icon.png"), |
937 os.path.join(eric6SourceDir, "pixmaps", "eric_icon.png"), |
938 os.path.join(dst, "eric.png")) |
938 os.path.join(dst, "eric.png")) |
939 shutilCopy( |
939 shutilCopy( |
940 os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), |
940 os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), |
941 os.path.join(dst, "ericWeb.png")) |
941 os.path.join(dst, "ericWeb.png")) |
|
942 |
|
943 dst = os.path.normpath( |
|
944 os.path.join(distDir, "usr/share/icons/hicolor/48x48/apps")) |
|
945 if not os.path.exists(dst): |
|
946 os.makedirs(dst) |
|
947 shutilCopy( |
|
948 os.path.join(eric6SourceDir, "pixmaps", "eric48_icon.png"), |
|
949 os.path.join(dst, "eric.png")) |
|
950 shutilCopy( |
|
951 os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), |
|
952 os.path.join(dst, "ericWeb.png")) |
|
953 |
942 dst = os.path.normpath( |
954 dst = os.path.normpath( |
943 os.path.join(distDir, "usr/share/applications")) |
955 os.path.join(distDir, "usr/share/applications")) |
944 if not os.path.exists(dst): |
956 if not os.path.exists(dst): |
945 os.makedirs(dst) |
957 os.makedirs(dst) |
946 copyDesktopFile(os.path.join(sourceDir, "linux", "eric6.desktop.in"), |
958 copyDesktopFile(os.path.join(sourceDir, "linux", "eric6.desktop.in"), |
947 os.path.join(dst, "eric6.desktop")) |
959 os.path.join(dst, "eric6.desktop")) |
948 copyDesktopFile( |
960 copyDesktopFile( |
949 os.path.join(sourceDir, "linux", "eric6_browser.desktop.in"), |
961 os.path.join(sourceDir, "linux", "eric6_browser.desktop.in"), |
950 os.path.join(dst, "eric6_browser.desktop")) |
962 os.path.join(dst, "eric6_browser.desktop")) |
|
963 |
951 dst = os.path.normpath( |
964 dst = os.path.normpath( |
952 os.path.join(distDir, "usr/share/metainfo")) |
965 os.path.join(distDir, "usr/share/metainfo")) |
953 if not os.path.exists(dst): |
966 if not os.path.exists(dst): |
954 os.makedirs(dst) |
967 os.makedirs(dst) |
955 copyAppStreamFile( |
968 copyAppStreamFile( |
957 os.path.join(dst, "eric6.appdata.xml")) |
970 os.path.join(dst, "eric6.appdata.xml")) |
958 elif os.getuid() == 0: |
971 elif os.getuid() == 0: |
959 shutilCopy( |
972 shutilCopy( |
960 os.path.join(eric6SourceDir, "pixmaps", "eric_icon.png"), |
973 os.path.join(eric6SourceDir, "pixmaps", "eric_icon.png"), |
961 "/usr/share/icons/eric.png") |
974 "/usr/share/icons/eric.png") |
|
975 shutilCopy( |
|
976 os.path.join(eric6SourceDir, "pixmaps", "eric48_icon.png"), |
|
977 "/usr/share/icons/hicolor/48x48/apps/eric.png") |
962 copyDesktopFile( |
978 copyDesktopFile( |
963 os.path.join(sourceDir, "linux", "eric6.desktop.in"), |
979 os.path.join(sourceDir, "linux", "eric6.desktop.in"), |
964 "/usr/share/applications/eric6.desktop") |
980 "/usr/share/applications/eric6.desktop") |
965 if os.path.exists("/usr/share/metainfo"): |
981 if os.path.exists("/usr/share/metainfo"): |
966 copyAppStreamFile( |
982 copyAppStreamFile( |
971 os.path.join(sourceDir, "linux", "eric6.appdata.xml.in"), |
987 os.path.join(sourceDir, "linux", "eric6.appdata.xml.in"), |
972 "/usr/share/appdata/eric6.appdata.xml") |
988 "/usr/share/appdata/eric6.appdata.xml") |
973 shutilCopy( |
989 shutilCopy( |
974 os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), |
990 os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), |
975 "/usr/share/icons/ericWeb.png") |
991 "/usr/share/icons/ericWeb.png") |
|
992 shutilCopy( |
|
993 os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), |
|
994 "/usr/share/icons/hicolor/48x48/apps/ericWeb.png") |
976 copyDesktopFile( |
995 copyDesktopFile( |
977 os.path.join(sourceDir, "linux", "eric6_browser.desktop.in"), |
996 os.path.join(sourceDir, "linux", "eric6_browser.desktop.in"), |
978 "/usr/share/applications/eric6_browser.desktop") |
997 "/usr/share/applications/eric6_browser.desktop") |
979 elif os.getuid() >= 1000: |
998 elif os.getuid() >= 1000: |
980 # it is assumed, that user ids start at 1000 |
999 # it is assumed, that user ids start at 1000 |
981 localPath = os.path.join(os.path.expanduser("~"), |
1000 localPath = os.path.join(os.path.expanduser("~"), |
982 ".local", "share") |
1001 ".local", "share") |
983 # create directories first |
1002 # create directories first |
984 for directory in [os.path.join(localPath, name) |
1003 for directory in [os.path.join(localPath, name) |
985 for name in ("icons", "applications", |
1004 for name in ("icons", "icons/hicolor/48x48/apps", |
986 "metainfo", "appdata")]: |
1005 "applications", "metainfo", "appdata")]: |
987 if not os.path.isdir(directory): |
1006 if not os.path.isdir(directory): |
988 os.makedirs(directory) |
1007 os.makedirs(directory) |
989 # now copy the files |
1008 # now copy the files |
990 shutilCopy( |
1009 shutilCopy( |
991 os.path.join(eric6SourceDir, "pixmaps", "eric_icon.png"), |
1010 os.path.join(eric6SourceDir, "pixmaps", "eric_icon.png"), |
992 os.path.join(localPath, "icons", "eric.png")) |
1011 os.path.join(localPath, "icons", "eric.png")) |
|
1012 shutilCopy( |
|
1013 os.path.join(eric6SourceDir, "pixmaps", "eric48_icon.png"), |
|
1014 os.path.join(localPath, "icons/hicolor/48x48/apps", "eric.png")) |
993 copyDesktopFile( |
1015 copyDesktopFile( |
994 os.path.join(sourceDir, "linux", "eric6.desktop.in"), |
1016 os.path.join(sourceDir, "linux", "eric6.desktop.in"), |
995 os.path.join(localPath, "applications", "eric6.desktop")) |
1017 os.path.join(localPath, "applications", "eric6.desktop")) |
996 copyAppStreamFile( |
1018 copyAppStreamFile( |
997 os.path.join(sourceDir, "linux", "eric6.appdata.xml.in"), |
1019 os.path.join(sourceDir, "linux", "eric6.appdata.xml.in"), |
1000 os.path.join(sourceDir, "linux", "eric6.appdata.xml.in"), |
1022 os.path.join(sourceDir, "linux", "eric6.appdata.xml.in"), |
1001 os.path.join(localPath, "appdata", "eric6.appdata.xml")) |
1023 os.path.join(localPath, "appdata", "eric6.appdata.xml")) |
1002 shutilCopy( |
1024 shutilCopy( |
1003 os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), |
1025 os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), |
1004 os.path.join(localPath, "icons", "ericWeb.png")) |
1026 os.path.join(localPath, "icons", "ericWeb.png")) |
|
1027 shutilCopy( |
|
1028 os.path.join(eric6SourceDir, "pixmaps", "ericWeb48_icon.png"), |
|
1029 os.path.join(localPath, "icons/hicolor/48x48/apps", "ericWeb.png")) |
1005 copyDesktopFile( |
1030 copyDesktopFile( |
1006 os.path.join(sourceDir, "linux", "eric6_browser.desktop.in"), |
1031 os.path.join(sourceDir, "linux", "eric6_browser.desktop.in"), |
1007 os.path.join(localPath, "applications", "eric6_browser.desktop")) |
1032 os.path.join(localPath, "applications", "eric6_browser.desktop")) |
1008 |
1033 |
1009 |
1034 |