diff options
author | Jonas Schnelli <jonas.schnelli@include7.ch> | 2013-04-15 16:15:11 +0200 |
---|---|---|
committer | Jonas Schnelli <jonas.schnelli@include7.ch> | 2013-04-15 16:15:11 +0200 |
commit | f95279ba79be1c46fe14468269ae53cdb3ac9c24 (patch) | |
tree | 32a36d77c60e4d9fc41bfae760e74bf4a6639bd0 /share/qt/clean_mac_info_plist.py | |
parent | a3e7577a8199d95f0035570195f68a1acb2fa86e (diff) | |
download | bitcoin-f95279ba79be1c46fe14468269ae53cdb3ac9c24.tar.xz |
fixes #2506: mac binary with proper version and copyright meta-informations (Info.plist)
Due a bug in QT (https://bugreports.qt-project.org/browse/QTBUG-21267), the mac binary of the last release contains bulk meta informations.
The url-handler (bitcoin://) is also not working in current release
Should be fixed with this commit.
Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
Diffstat (limited to 'share/qt/clean_mac_info_plist.py')
-rwxr-xr-x | share/qt/clean_mac_info_plist.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/share/qt/clean_mac_info_plist.py b/share/qt/clean_mac_info_plist.py new file mode 100755 index 0000000000..df677f50b7 --- /dev/null +++ b/share/qt/clean_mac_info_plist.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# Jonas Schnelli, 2013 +# make sure the Bitcoin-Qt.app contains the right plist (including the right version) +# fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267) + +from string import Template +from datetime import date + +bitcoinDir = "./"; + +inFile = bitcoinDir+"/share/qt/Info.plist" +outFile = "Bitcoin-Qt.app/Contents/Info.plist" +version = "unknown"; + +fileForGrabbingVersion = bitcoinDir+"bitcoin-qt.pro" +for line in open(fileForGrabbingVersion): + lineArr = line.replace(" ", "").split("="); + if lineArr[0].startswith("VERSION"): + version = lineArr[1].replace("\n", ""); + +fIn = open(inFile, "r") +fileContent = fIn.read() +s = Template(fileContent) +newFileContent = s.substitute(VERSION=version,YEAR=date.today().year) + +fOut = open(outFile, "w"); +fOut.write(newFileContent); + +print "Info.plist fresh created"
\ No newline at end of file |