|
@ -27,15 +27,17 @@ if platform.system() in ['Linux', 'FreeBSD', 'DragonFly']: |
|
|
parser.add_argument('--root=', dest='root_path', metavar='dir', default='/') |
|
|
parser.add_argument('--root=', dest='root_path', metavar='dir', default='/') |
|
|
opts, _ = parser.parse_known_args(sys.argv[1:]) |
|
|
opts, _ = parser.parse_known_args(sys.argv[1:]) |
|
|
usr_share = os.path.join(sys.prefix, "share") |
|
|
usr_share = os.path.join(sys.prefix, "share") |
|
|
|
|
|
icons_dirname = 'pixmaps' |
|
|
if not os.access(opts.root_path + usr_share, os.W_OK) and \ |
|
|
if not os.access(opts.root_path + usr_share, os.W_OK) and \ |
|
|
not os.access(opts.root_path, os.W_OK): |
|
|
not os.access(opts.root_path, os.W_OK): |
|
|
|
|
|
icons_dirname = 'icons' |
|
|
if 'XDG_DATA_HOME' in os.environ.keys(): |
|
|
if 'XDG_DATA_HOME' in os.environ.keys(): |
|
|
usr_share = os.environ['XDG_DATA_HOME'] |
|
|
usr_share = os.environ['XDG_DATA_HOME'] |
|
|
else: |
|
|
else: |
|
|
usr_share = os.path.expanduser('~/.local/share') |
|
|
usr_share = os.path.expanduser('~/.local/share') |
|
|
data_files += [ |
|
|
data_files += [ |
|
|
(os.path.join(usr_share, 'applications/'), ['electrum.desktop']), |
|
|
(os.path.join(usr_share, 'applications/'), ['electrum.desktop']), |
|
|
(os.path.join(usr_share, 'pixmaps/'), ['icons/electrum.png']) |
|
|
(os.path.join(usr_share, icons_dirname), ['icons/electrum.png']) |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
setup( |
|
|
setup( |
|
|