Reordered the code and managed to get a clean install. We still lack proper icon installation.

This commit is contained in:
José Carlos Cuevas 2014-07-15 13:53:28 +02:00
parent 3ded9098dd
commit c100527f1c
6 changed files with 25 additions and 10 deletions

View file

@ -1,9 +1,8 @@
[Desktop Entry]
Name=JSON Inspector
GenericName=JSON Inspector
Exec=jsoninspector.py
Terminal=false
Icon=/usr/local/share/jsoninspector/
Icon=jsoninspector
Type=Application
Categories=Application;Programming;
Categories=GNOME;GTK;Development;
Comment=JSON Inspector

View file

@ -9,6 +9,7 @@
<property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="destroy_with_parent">True</property>
<property name="icon_name">jsoninspector</property>
<property name="type_hint">normal</property>
<property name="deletable">False</property>
<property name="gravity">center</property>

View file

@ -59,13 +59,13 @@ class CustomInstall(install):
except:
print "Warning: error copying .desktop entry."
setup(
name = "jsoninspector",
name = "Jsoninspector",
version = "2.0",
packages = find_packages('src', exclude=['ez_setup']),
scripts = ['src/jsoninspector.py'],
packages = find_packages('src', exclude = ['ez_setup']),
entry_points = { 'gui_scripts' : [ 'jsoninspector = jsoninspector:main_start' ] },
include_package_data = True,
package_dir = { '' : 'src' },
package_data = {
# If any package contains *.glade files, include them:
'src': ['*.glade'],

View file

View file

@ -0,0 +1,13 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from jsoninspector import LogicObject, MainWindowMethods
def main_start():
"""
So setuptools makes a nice startup script
"""
logicObject = LogicObject()
mainWindow = MainWindowMethods(logicObject)
mainWindow.run(None)

View file

@ -11,10 +11,10 @@ import locale
APP = "jsoninspector"
if os.path.exists('../locale/po') and os.path.exists('../res'):
if os.path.exists('../locale/po') and os.path.exists('../../res'):
# We're in the development tree
DIR = "../locale/po/"
RESOURCES = "../res/"
DIR = "../../locale/po/"
RESOURCES = "../../res/"
elif sys.platform != 'win32' and sys.platform != 'darwin':
DIR = "/usr/share/locale/"
@ -281,6 +281,8 @@ class LogicObject(object):
str(type(elems[key_val]))])
# Main procedure
if __name__ == "__main__":