diff options
Diffstat (limited to 'makescripts/desktop_luncher.py')
-rw-r--r-- | makescripts/desktop_luncher.py | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/makescripts/desktop_luncher.py b/makescripts/desktop_luncher.py deleted file mode 100644 index 6f050cd..0000000 --- a/makescripts/desktop_luncher.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# Copyright (C) 2012 S. Daniel Francis <francis@sugarlabs.org> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. - -import sys -import os -os.environ['INFO_L10N'] = '0' -import pwd -sys.path.append(os.path.abspath('./')) -import info -user = pwd.getpwuid(os.getuid()).pw_name -execdir = '/usr/bin' if user == 'root' else os.path.abspath('./') -appdir = '/usr/share/%s' % info.lower_name if user ==\ - 'root' else os.path.abspath('./') - -desktop_file = open('app-entry.desktop', 'w') -string = '[Desktop Entry]\nEncoding=UTF-8\n' -string += 'Name=' + info.name -string += '\nGenericName=' + info.generic_name -string += '\nComment=' + info.description -if user == 'root': - string += '\nExec=/usr/bin/command %U'.replace('command', info.lower_name) -else: - string += '\nExec=' + os.path.join(appdir, info.lower_name) + ' %U' -string += '\nIcon=' + os.path.join(appdir, info.lower_name + '.png') -string += '\nTerminal=false' -string += '\nCategories=' + ';'.join(info.categories) -if info.file_filter_mime: - string += '\nMimeType=' + info.file_filter_mime + ';' -string += '\nType=Application' -desktop_file.write(string) -desktop_file.close() |