Added default icon size and improved a bit more the setup.py installation file
This commit is contained in:
parent
f13c0302a3
commit
4495a27d6d
3 changed files with 10 additions and 5 deletions
|
@ -174,7 +174,6 @@
|
|||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">JSON Inspector</property>
|
||||
<property name="window_position">center</property>
|
||||
<property name="icon">jsoninspector.png</property>
|
||||
<signal name="delete-event" handler="onMainWindowDelete" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkBox" id="box1">
|
||||
|
|
BIN
res/jsoninspector48x48.png
Normal file
BIN
res/jsoninspector48x48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
14
setup.py
14
setup.py
|
@ -1,4 +1,4 @@
|
|||
import ez_setup, sys, shutil, os
|
||||
import ez_setup, sys, shutil, os, os.path
|
||||
ez_setup.use_setuptools()
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
@ -14,20 +14,24 @@ class CustomInstall(install):
|
|||
# Now we do our own magic
|
||||
if sys.platform != 'win32' and sys.platform != 'darwin':
|
||||
try:
|
||||
print "Creating shared directory..."
|
||||
os.mkdir("/usr/local/share/jsoninspector", mode = 0755)
|
||||
|
||||
except:
|
||||
print "Warning: Couldn't create /usr/local/share/jsoninspector"
|
||||
if not os.path.exists("/usr/local/share/jsoninspector"):
|
||||
print "Warning: Couldn't create /usr/local/share/jsoninspector"
|
||||
|
||||
# Copy the translations
|
||||
try:
|
||||
print "Installing translations..."
|
||||
copy_tree('locale/po/', '/usr/share/locale/')
|
||||
|
||||
except:
|
||||
print "Warning: error copying translation files."
|
||||
|
||||
# Copy the icons
|
||||
for icon_size in ['16x16', '32x32', '64x64', '128x128']:
|
||||
print "Installing application icons..."
|
||||
for icon_size in ['16x16', '32x32', '48x48', '64x64', '128x128']:
|
||||
try:
|
||||
shutil.copyfile('res/jsoninspector' + icon_size + ".png",
|
||||
'/usr/share/icons/hicolor/' + icon_size + "/apps/jsoninspector.png")
|
||||
|
@ -36,12 +40,14 @@ class CustomInstall(install):
|
|||
print "Warning: error copying icon {size}.".format(icon_size)
|
||||
|
||||
try:
|
||||
print "Installing glade file..."
|
||||
shutil.copyfile('res/jsoninspector.glade', '/usr/local/share/jsoninspector/jsoninspector.desktop')
|
||||
|
||||
except:
|
||||
print "Warning: error copyin .glade file."
|
||||
print "Warning: error copying .glade file."
|
||||
|
||||
try:
|
||||
print "Installing desktop entry..."
|
||||
shutil.copyfile('res/jsoninspector.desktop', '/usr/share/applications/jsoninspector.desktop')
|
||||
|
||||
except:
|
||||
|
|
Loading…
Reference in a new issue