Updated OS build script with locale support
This commit is contained in:
parent
02f40be0d7
commit
1189081b58
@ -48,23 +48,27 @@ setup(
|
|||||||
version = version,
|
version = version,
|
||||||
**extra_options
|
**extra_options
|
||||||
)
|
)
|
||||||
|
from distutils import dir_util
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
# Remove the copied py file
|
# Remove the copied py file
|
||||||
os.remove(mainscript)
|
os.remove(mainscript)
|
||||||
resource = "dist/" + name + ".app/Contents/Resources/"
|
resource = "dist/" + name + ".app/Contents/Resources/"
|
||||||
|
|
||||||
|
dir_util.copy_tree("locale", resource + "locale/")
|
||||||
# Try to locate qt_menu
|
# Try to locate qt_menu
|
||||||
# Let's try the port version first!
|
# Let's try the port version first!
|
||||||
if os.path.isfile("/opt/local/lib/Resources/qt_menu.nib"):
|
if os.path.isfile("/opt/local/lib/Resources/qt_menu.nib"):
|
||||||
qt_menu_location = "/opt/local/lib/Resources/qt_menu.nib"
|
qt_menu_location = "/opt/local/lib/Resources/qt_menu.nib"
|
||||||
else:
|
else:
|
||||||
# No dice? Then let's try the brew version
|
# No dice? Then let's try the brew version
|
||||||
qt_menu_location = os.popen("find /usr/local/Cellar -name qt_menu.nib | head").read()
|
qt_menu_location = os.popen("find /usr/local/Cellar -name qt_menu.nib | tail -n 1").read()
|
||||||
qt_menu_location = re.sub('\n','', qt_menu_location)
|
qt_menu_location = re.sub('\n','', qt_menu_location)
|
||||||
|
|
||||||
if(len(qt_menu_location) == 0):
|
if(len(qt_menu_location) == 0):
|
||||||
print "Sorry couldn't find your qt_menu.nib this probably won't work"
|
print "Sorry couldn't find your qt_menu.nib this probably won't work"
|
||||||
|
else:
|
||||||
|
print "Found your qib: " + qt_menu_location
|
||||||
|
|
||||||
# Need to include a copy of qt_menu.nib
|
# Need to include a copy of qt_menu.nib
|
||||||
shutil.copytree(qt_menu_location, resource + "qt_menu.nib")
|
shutil.copytree(qt_menu_location, resource + "qt_menu.nib")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user