mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Tool/process for including correct qt translations in mac .App
This commit is contained in:
parent
ba1fce94b5
commit
6be6be2ed9
22
contrib/qt_translations.py
Executable file
22
contrib/qt_translations.py
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
# Helpful little script that spits out a comma-separated list of
|
||||||
|
# language codes for Qt icons that should be included
|
||||||
|
# in binary bitcoin distributions
|
||||||
|
|
||||||
|
import glob
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if len(sys.argv) != 3:
|
||||||
|
sys.exit("Usage: %s $QTDIR/translations $BITCOINDIR/src/qt/locale"%sys.argv[0])
|
||||||
|
|
||||||
|
d1 = sys.argv[1]
|
||||||
|
d2 = sys.argv[2]
|
||||||
|
|
||||||
|
l1 = set([ re.search(r'qt_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d1, 'qt_*.qm')) ])
|
||||||
|
l2 = set([ re.search(r'bitcoin_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d2, 'bitcoin_*.qm')) ])
|
||||||
|
|
||||||
|
print ",".join(sorted(l1.intersection(l2)))
|
||||||
|
|
@ -80,7 +80,8 @@
|
|||||||
qmake USE_SSL=1 USE_UPNP=1 bitcoin-qt.pro
|
qmake USE_SSL=1 USE_UPNP=1 bitcoin-qt.pro
|
||||||
make
|
make
|
||||||
export QTDIR=/opt/local/share/qt4 # needed to find translations/qt_*.qm files
|
export QTDIR=/opt/local/share/qt4 # needed to find translations/qt_*.qm files
|
||||||
contrib/macdeploy/macdeployqtplus Bitcoin-Qt.app -add-qt-tr de,es,ru -dmg -fancy contrib/macdeploy/fancy.plist
|
T=$(contrib/qt_translations.py $QTDIR/translations src/qt/locale)
|
||||||
|
contrib/macdeploy/macdeployqtplus Bitcoin-Qt.app -add-qt-tr $T -dmg -fancy contrib/macdeploy/fancy.plist
|
||||||
|
|
||||||
Build output expected:
|
Build output expected:
|
||||||
Bitcoin-Qt.dmg
|
Bitcoin-Qt.dmg
|
||||||
|
Loading…
Reference in New Issue
Block a user