Merge pull request #109 from vertoe/devel-0.9

Fix icons and install shortcuts (debian & macdeploy).
This commit is contained in:
Darkcoin 2015-01-16 08:03:43 -07:00
commit 2eda66f680
22 changed files with 187 additions and 100 deletions

View File

@ -1,4 +1,5 @@
Copyright (c) 2009-2013 Bitcoin Developers Copyright (c) 2009-2015 Bitcoin Developers
Copyright (c) 2014-2015 Darkcoin Developers
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

17
INSTALL
View File

@ -1,5 +1,16 @@
Building Bitcoin Building Darkcoin
See doc/build-*.md for instructions on building bitcoind, Use the autogen script to prepare the build environment.
./autogen.sh
./configure
make
Precompiled binaries are available at github, see
https://github.com/darkcoinproject/darkcoin-binaries
Always verify the signatures and checksums.
See doc/build-*.md for instructions on building darkcoind,
the intended-for-services, no-graphical-interface, reference the intended-for-services, no-graphical-interface, reference
implementation of Bitcoin. implementation of Darkcoin.

View File

@ -1,21 +1,21 @@
Debian Debian
==================== ====================
This directory contains files used to package bitcoind/bitcoin-qt This directory contains files used to package darkcoind/darkcoin-qt
for Debian-based Linux systems. If you compile bitcoind/bitcoin-qt yourself, there are some useful files here. for Debian-based Linux systems. If you compile darkcoind/darkcoin-qt yourself, there are some useful files here.
## bitcoin: URI support ## ## darkcoin: URI support ##
bitcoin-qt.desktop (Gnome / Open Desktop) darkcoin-qt.desktop (Gnome / Open Desktop)
To install: To install:
sudo desktop-file-install bitcoin-qt.desktop sudo desktop-file-install darkcoin-qt.desktop
sudo update-desktop-database sudo update-desktop-database
If you build yourself, you will either need to modify the paths in If you build yourself, you will either need to modify the paths in
the .desktop file or copy or symlink your bitcoin-qt binary to `/usr/bin` the .desktop file or copy or symlink your darkcoin-qt binary to `/usr/bin`
and the `../../share/pixmaps/bitcoin128.png` to `/usr/share/pixmaps` and the `../../share/pixmaps/darkcoin128.png` to `/usr/share/pixmaps`
bitcoin-qt.protocol (KDE) darkcoin-qt.protocol (KDE)

View File

@ -1,6 +0,0 @@
usr/local/bin/bitcoin-qt usr/bin
share/pixmaps/bitcoin32.xpm usr/share/pixmaps
share/pixmaps/bitcoin16.xpm usr/share/pixmaps
share/pixmaps/bitcoin128.png usr/share/pixmaps
debian/bitcoin-qt.desktop usr/share/applications
debian/bitcoin-qt.protocol usr/share/kde4/services/

View File

@ -1 +0,0 @@
contrib/bitcoind.bash-completion bitcoind

View File

@ -1,2 +0,0 @@
usr/local/bin/bitcoind usr/bin
usr/local/bin/bitcoin-cli usr/bin

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Encoding=UTF-8
Name=Darkcoin
Comment=Darkcoin P2P Cryptocurrency
Comment[fr]=Darkcoin, monnaie virtuelle cryptographique pair à pair
Comment[tr]=Darkcoin, eşten eşe kriptografik sanal para birimi
Exec=darkcoin-qt %u
Terminal=false
Type=Application
Icon=darkcoin128
MimeType=x-scheme-handler/darkcoin;
Categories=Office;Finance;

View File

@ -2,11 +2,10 @@
Encoding=UTF-8 Encoding=UTF-8
Name=Bitcoin Name=Bitcoin
Comment=Bitcoin P2P Cryptocurrency Comment=Bitcoin P2P Cryptocurrency
Comment[fr]=Bitcoin, monnaie virtuelle cryptographique pair à pair
Comment[tr]=Bitcoin, eşten eşe kriptografik sanal para birimi
Exec=bitcoin-qt %u Exec=bitcoin-qt %u
Terminal=false Terminal=false
Type=Application Type=Application
Icon=bitcoin128 Icon=bitcoin128
MimeType=x-scheme-handler/bitcoin; MimeType=x-scheme-handler/bitcoin;
Categories=Office;Finance; Categories=Office;Finance;
Name[en_US]=darkcoin-qt.desktop

View File

@ -0,0 +1,6 @@
usr/local/bin/darkcoin-qt usr/bin
share/pixmaps/darkcoin32.xpm usr/share/pixmaps
share/pixmaps/darkcoin16.xpm usr/share/pixmaps
share/pixmaps/darkcoin128.png usr/share/pixmaps
debian/darkcoin-qt.desktop usr/share/applications
debian/darkcoin-qt.protocol usr/share/kde4/services/

View File

@ -1,2 +1,2 @@
# Linked code is Expat - only Debian packaging is GPL-2+ # Linked code is Expat - only Debian packaging is GPL-2+
bitcoin-qt: possible-gpl-code-linked-with-openssl darkcoin-qt: possible-gpl-code-linked-with-openssl

View File

@ -1,6 +1,6 @@
[Protocol] [Protocol]
exec=bitcoin-qt '%u' exec=darkcoin-qt '%u'
protocol=bitcoin protocol=darkcoin
input=none input=none
output=none output=none
helper=true helper=true

View File

@ -0,0 +1 @@
contrib/darkcoind.bash-completion darkcoind

View File

@ -0,0 +1,2 @@
usr/local/bin/darkcoind usr/bin
usr/local/bin/darkcoin-cli usr/bin

View File

@ -1,2 +1,2 @@
# Linked code is Expat - only Debian packaging is GPL-2+ # Linked code is Expat - only Debian packaging is GPL-2+
bitcoind: possible-gpl-code-linked-with-openssl darkcoind: possible-gpl-code-linked-with-openssl

View File

@ -5,7 +5,7 @@ You will need the appscript package for the fancy disk image creation to work:
sudo easy_install appscript sudo easy_install appscript
For Snow Leopard (which uses [Python 2.6](http://www.python.org/download/releases/2.6/)), you will need the param_parser package: For Snow Leopard (which uses [Python 2.6](http://www.python.org/download/releases/2.6/)), you will need the param_parser package:
sudo easy_install argparse sudo easy_install argparse
This script should not be run manually, instead, after building as usual: This script should not be run manually, instead, after building as usual:
@ -15,5 +15,5 @@ This script should not be run manually, instead, after building as usual:
During the process, the disk image window will pop up briefly where the fancy During the process, the disk image window will pop up briefly where the fancy
settings are applied. This is normal, please do not interfere. settings are applied. This is normal, please do not interfere.
When finished, it will produce `Bitcoin-Qt.dmg`. When finished, it will produce `Darkcoin-Qt.dmg`.

View File

@ -22,7 +22,7 @@
<integer>370</integer> <integer>370</integer>
<integer>156</integer> <integer>156</integer>
</array> </array>
<key>Bitcoin-Qt.app</key> <key>Darkcoin-Qt.app</key>
<array> <array>
<integer>128</integer> <integer>128</integer>
<integer>156</integer> <integer>156</integer>

View File

@ -42,13 +42,13 @@ class FrameworkInfo(object):
self.sourceContentsDirectory = "" self.sourceContentsDirectory = ""
self.destinationResourcesDirectory = "" self.destinationResourcesDirectory = ""
self.destinationVersionContentsDirectory = "" self.destinationVersionContentsDirectory = ""
def __eq__(self, other): def __eq__(self, other):
if self.__class__ == other.__class__: if self.__class__ == other.__class__:
return self.__dict__ == other.__dict__ return self.__dict__ == other.__dict__
else: else:
return False return False
def __str__(self): def __str__(self):
return """ Framework name: %s return """ Framework name: %s
Framework directory: %s Framework directory: %s
@ -72,51 +72,51 @@ class FrameworkInfo(object):
self.deployedInstallName, self.deployedInstallName,
self.sourceFilePath, self.sourceFilePath,
self.destinationDirectory) self.destinationDirectory)
def isDylib(self): def isDylib(self):
return self.frameworkName.endswith(".dylib") return self.frameworkName.endswith(".dylib")
def isQtFramework(self): def isQtFramework(self):
if self.isDylib(): if self.isDylib():
return self.frameworkName.startswith("libQt") return self.frameworkName.startswith("libQt")
else: else:
return self.frameworkName.startswith("Qt") return self.frameworkName.startswith("Qt")
reOLine = re.compile(r'^(.+) \(compatibility version [0-9.]+, current version [0-9.]+\)$') reOLine = re.compile(r'^(.+) \(compatibility version [0-9.]+, current version [0-9.]+\)$')
bundleFrameworkDirectory = "Contents/Frameworks" bundleFrameworkDirectory = "Contents/Frameworks"
bundleBinaryDirectory = "Contents/MacOS" bundleBinaryDirectory = "Contents/MacOS"
@classmethod @classmethod
def fromOtoolLibraryLine(cls, line): def fromOtoolLibraryLine(cls, line):
# Note: line must be trimmed # Note: line must be trimmed
if line == "": if line == "":
return None return None
# Don't deploy system libraries (exception for libQtuitools and libQtlucene). # Don't deploy system libraries (exception for libQtuitools and libQtlucene).
if line.startswith("/System/Library/") or line.startswith("@executable_path") or (line.startswith("/usr/lib/") and "libQt" not in line): if line.startswith("/System/Library/") or line.startswith("@executable_path") or (line.startswith("/usr/lib/") and "libQt" not in line):
return None return None
m = cls.reOLine.match(line) m = cls.reOLine.match(line)
if m is None: if m is None:
raise RuntimeError("otool line could not be parsed: " + line) raise RuntimeError("otool line could not be parsed: " + line)
path = m.group(1) path = m.group(1)
info = cls() info = cls()
info.sourceFilePath = path info.sourceFilePath = path
info.installName = path info.installName = path
if path.endswith(".dylib"): if path.endswith(".dylib"):
dirname, filename = os.path.split(path) dirname, filename = os.path.split(path)
info.frameworkName = filename info.frameworkName = filename
info.frameworkDirectory = dirname info.frameworkDirectory = dirname
info.frameworkPath = path info.frameworkPath = path
info.binaryDirectory = dirname info.binaryDirectory = dirname
info.binaryName = filename info.binaryName = filename
info.binaryPath = path info.binaryPath = path
info.version = "-" info.version = "-"
info.installName = path info.installName = path
info.deployedInstallName = "@executable_path/../Frameworks/" + info.binaryName info.deployedInstallName = "@executable_path/../Frameworks/" + info.binaryName
info.sourceFilePath = path info.sourceFilePath = path
@ -131,26 +131,26 @@ class FrameworkInfo(object):
i += 1 i += 1
if i == len(parts): if i == len(parts):
raise RuntimeError("Could not find .framework or .dylib in otool line: " + line) raise RuntimeError("Could not find .framework or .dylib in otool line: " + line)
info.frameworkName = parts[i] info.frameworkName = parts[i]
info.frameworkDirectory = "/".join(parts[:i]) info.frameworkDirectory = "/".join(parts[:i])
info.frameworkPath = os.path.join(info.frameworkDirectory, info.frameworkName) info.frameworkPath = os.path.join(info.frameworkDirectory, info.frameworkName)
info.binaryName = parts[i+3] info.binaryName = parts[i+3]
info.binaryDirectory = "/".join(parts[i+1:i+3]) info.binaryDirectory = "/".join(parts[i+1:i+3])
info.binaryPath = os.path.join(info.binaryDirectory, info.binaryName) info.binaryPath = os.path.join(info.binaryDirectory, info.binaryName)
info.version = parts[i+2] info.version = parts[i+2]
info.deployedInstallName = "@executable_path/../Frameworks/" + os.path.join(info.frameworkName, info.binaryPath) info.deployedInstallName = "@executable_path/../Frameworks/" + os.path.join(info.frameworkName, info.binaryPath)
info.destinationDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, info.binaryDirectory) info.destinationDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, info.binaryDirectory)
info.sourceResourcesDirectory = os.path.join(info.frameworkPath, "Resources") info.sourceResourcesDirectory = os.path.join(info.frameworkPath, "Resources")
info.sourceContentsDirectory = os.path.join(info.frameworkPath, "Contents") info.sourceContentsDirectory = os.path.join(info.frameworkPath, "Contents")
info.sourceVersionContentsDirectory = os.path.join(info.frameworkPath, "Versions", info.version, "Contents") info.sourceVersionContentsDirectory = os.path.join(info.frameworkPath, "Versions", info.version, "Contents")
info.destinationResourcesDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, "Resources") info.destinationResourcesDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, "Resources")
info.destinationContentsDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, "Contents") info.destinationContentsDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, "Contents")
info.destinationVersionContentsDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, "Versions", info.version, "Contents") info.destinationVersionContentsDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, "Versions", info.version, "Contents")
return info return info
class ApplicationBundleInfo(object): class ApplicationBundleInfo(object):
@ -168,7 +168,7 @@ class DeploymentInfo(object):
self.qtPath = None self.qtPath = None
self.pluginPath = None self.pluginPath = None
self.deployedFrameworks = [] self.deployedFrameworks = []
def detectQtPath(self, frameworkDirectory): def detectQtPath(self, frameworkDirectory):
parentDir = os.path.dirname(frameworkDirectory) parentDir = os.path.dirname(frameworkDirectory)
if os.path.exists(os.path.join(parentDir, "translations")): if os.path.exists(os.path.join(parentDir, "translations")):
@ -187,7 +187,7 @@ class DeploymentInfo(object):
pluginPath = os.path.join(self.qtPath, "plugins") pluginPath = os.path.join(self.qtPath, "plugins")
if os.path.exists(pluginPath): if os.path.exists(pluginPath):
self.pluginPath = pluginPath self.pluginPath = pluginPath
def usesFramework(self, name): def usesFramework(self, name):
nameDot = "%s." % name nameDot = "%s." % name
libNameDot = "lib%s." % name libNameDot = "lib%s." % name
@ -211,12 +211,12 @@ def getFrameworks(binaryPath, verbose):
sys.stderr.write(o_stderr) sys.stderr.write(o_stderr)
sys.stderr.flush() sys.stderr.flush()
raise RuntimeError("otool failed with return code %d" % otool.returncode) raise RuntimeError("otool failed with return code %d" % otool.returncode)
otoolLines = o_stdout.split("\n") otoolLines = o_stdout.split("\n")
otoolLines.pop(0) # First line is the inspected binary otoolLines.pop(0) # First line is the inspected binary
if ".framework" in binaryPath or binaryPath.endswith(".dylib"): if ".framework" in binaryPath or binaryPath.endswith(".dylib"):
otoolLines.pop(0) # Frameworks and dylibs list themselves as a dependency. otoolLines.pop(0) # Frameworks and dylibs list themselves as a dependency.
libraries = [] libraries = []
for line in otoolLines: for line in otoolLines:
info = FrameworkInfo.fromOtoolLibraryLine(line.strip()) info = FrameworkInfo.fromOtoolLibraryLine(line.strip())
@ -225,7 +225,7 @@ def getFrameworks(binaryPath, verbose):
print "Found framework:" print "Found framework:"
print info print info
libraries.append(info) libraries.append(info)
return libraries return libraries
def runInstallNameTool(action, *args): def runInstallNameTool(action, *args):
@ -262,16 +262,16 @@ def copyFramework(framework, path, verbose):
fromPath = framework.sourceFilePath fromPath = framework.sourceFilePath
toDir = os.path.join(path, framework.destinationDirectory) toDir = os.path.join(path, framework.destinationDirectory)
toPath = os.path.join(toDir, framework.binaryName) toPath = os.path.join(toDir, framework.binaryName)
if not os.path.exists(fromPath): if not os.path.exists(fromPath):
raise RuntimeError("No file at " + fromPath) raise RuntimeError("No file at " + fromPath)
if os.path.exists(toPath): if os.path.exists(toPath):
return None # Already there return None # Already there
if not os.path.exists(toDir): if not os.path.exists(toDir):
os.makedirs(toDir) os.makedirs(toDir)
shutil.copy2(fromPath, toPath) shutil.copy2(fromPath, toPath)
if verbose >= 3: if verbose >= 3:
print "Copied:", fromPath print "Copied:", fromPath
@ -314,53 +314,53 @@ def copyFramework(framework, path, verbose):
if verbose >= 3: if verbose >= 3:
print "Copied for libQtGui:", qtMenuNibSourcePath print "Copied for libQtGui:", qtMenuNibSourcePath
print " to:", qtMenuNibDestinationPath print " to:", qtMenuNibDestinationPath
return toPath return toPath
def deployFrameworks(frameworks, bundlePath, binaryPath, strip, verbose, deploymentInfo=None): def deployFrameworks(frameworks, bundlePath, binaryPath, strip, verbose, deploymentInfo=None):
if deploymentInfo is None: if deploymentInfo is None:
deploymentInfo = DeploymentInfo() deploymentInfo = DeploymentInfo()
while len(frameworks) > 0: while len(frameworks) > 0:
framework = frameworks.pop(0) framework = frameworks.pop(0)
deploymentInfo.deployedFrameworks.append(framework.frameworkName) deploymentInfo.deployedFrameworks.append(framework.frameworkName)
if verbose >= 2: if verbose >= 2:
print "Processing", framework.frameworkName, "..." print "Processing", framework.frameworkName, "..."
# Get the Qt path from one of the Qt frameworks # Get the Qt path from one of the Qt frameworks
if deploymentInfo.qtPath is None and framework.isQtFramework(): if deploymentInfo.qtPath is None and framework.isQtFramework():
deploymentInfo.detectQtPath(framework.frameworkDirectory) deploymentInfo.detectQtPath(framework.frameworkDirectory)
if framework.installName.startswith("@executable_path"): if framework.installName.startswith("@executable_path"):
if verbose >= 2: if verbose >= 2:
print framework.frameworkName, "already deployed, skipping." print framework.frameworkName, "already deployed, skipping."
continue continue
# install_name_tool the new id into the binary # install_name_tool the new id into the binary
changeInstallName(framework.installName, framework.deployedInstallName, binaryPath, verbose) changeInstallName(framework.installName, framework.deployedInstallName, binaryPath, verbose)
# Copy farmework to app bundle. # Copy farmework to app bundle.
deployedBinaryPath = copyFramework(framework, bundlePath, verbose) deployedBinaryPath = copyFramework(framework, bundlePath, verbose)
# Skip the rest if already was deployed. # Skip the rest if already was deployed.
if deployedBinaryPath is None: if deployedBinaryPath is None:
continue continue
if strip: if strip:
runStrip(deployedBinaryPath, verbose) runStrip(deployedBinaryPath, verbose)
# install_name_tool it a new id. # install_name_tool it a new id.
changeIdentification(framework.deployedInstallName, deployedBinaryPath, verbose) changeIdentification(framework.deployedInstallName, deployedBinaryPath, verbose)
# Check for framework dependencies # Check for framework dependencies
dependencies = getFrameworks(deployedBinaryPath, verbose) dependencies = getFrameworks(deployedBinaryPath, verbose)
for dependency in dependencies: for dependency in dependencies:
changeInstallName(dependency.installName, dependency.deployedInstallName, deployedBinaryPath, verbose) changeInstallName(dependency.installName, dependency.deployedInstallName, deployedBinaryPath, verbose)
# Deploy framework if necessary. # Deploy framework if necessary.
if dependency.frameworkName not in deploymentInfo.deployedFrameworks and dependency not in frameworks: if dependency.frameworkName not in deploymentInfo.deployedFrameworks and dependency not in frameworks:
frameworks.append(dependency) frameworks.append(dependency)
return deploymentInfo return deploymentInfo
def deployFrameworksForAppBundle(applicationBundle, strip, verbose): def deployFrameworksForAppBundle(applicationBundle, strip, verbose):
@ -401,7 +401,7 @@ def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose):
# Deploy the bearer plugins only if QtNetwork is in use # Deploy the bearer plugins only if QtNetwork is in use
if not deploymentInfo.usesFramework("QtNetwork"): if not deploymentInfo.usesFramework("QtNetwork"):
continue continue
for pluginName in filenames: for pluginName in filenames:
pluginPath = os.path.join(pluginDirectory, pluginName) pluginPath = os.path.join(pluginDirectory, pluginName)
if pluginName.endswith("_debug.dylib"): if pluginName.endswith("_debug.dylib"):
@ -419,32 +419,32 @@ def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose):
# Deploy the opengl graphicssystem plugin only if QtOpenGL is in use # Deploy the opengl graphicssystem plugin only if QtOpenGL is in use
if not deploymentInfo.usesFramework("QtOpenGL"): if not deploymentInfo.usesFramework("QtOpenGL"):
continue continue
plugins.append((pluginDirectory, pluginName)) plugins.append((pluginDirectory, pluginName))
for pluginDirectory, pluginName in plugins: for pluginDirectory, pluginName in plugins:
if verbose >= 2: if verbose >= 2:
print "Processing plugin", os.path.join(pluginDirectory, pluginName), "..." print "Processing plugin", os.path.join(pluginDirectory, pluginName), "..."
sourcePath = os.path.join(deploymentInfo.pluginPath, pluginDirectory, pluginName) sourcePath = os.path.join(deploymentInfo.pluginPath, pluginDirectory, pluginName)
destinationDirectory = os.path.join(appBundleInfo.pluginPath, pluginDirectory) destinationDirectory = os.path.join(appBundleInfo.pluginPath, pluginDirectory)
if not os.path.exists(destinationDirectory): if not os.path.exists(destinationDirectory):
os.makedirs(destinationDirectory) os.makedirs(destinationDirectory)
destinationPath = os.path.join(destinationDirectory, pluginName) destinationPath = os.path.join(destinationDirectory, pluginName)
shutil.copy2(sourcePath, destinationPath) shutil.copy2(sourcePath, destinationPath)
if verbose >= 3: if verbose >= 3:
print "Copied:", sourcePath print "Copied:", sourcePath
print " to:", destinationPath print " to:", destinationPath
if strip: if strip:
runStrip(destinationPath, verbose) runStrip(destinationPath, verbose)
dependencies = getFrameworks(destinationPath, verbose) dependencies = getFrameworks(destinationPath, verbose)
for dependency in dependencies: for dependency in dependencies:
changeInstallName(dependency.installName, dependency.deployedInstallName, destinationPath, verbose) changeInstallName(dependency.installName, dependency.deployedInstallName, destinationPath, verbose)
# Deploy framework if necessary. # Deploy framework if necessary.
if dependency.frameworkName not in deploymentInfo.deployedFrameworks: if dependency.frameworkName not in deploymentInfo.deployedFrameworks:
deployFrameworks([dependency], appBundleInfo.path, destinationPath, strip, verbose, deploymentInfo) deployFrameworks([dependency], appBundleInfo.path, destinationPath, strip, verbose, deploymentInfo)
@ -511,7 +511,7 @@ if len(config.fancy) == 1:
if verbose >= 1: if verbose >= 1:
sys.stderr.write("Error: Could not import plistlib which is required for fancy disk images.\n") sys.stderr.write("Error: Could not import plistlib which is required for fancy disk images.\n")
sys.exit(1) sys.exit(1)
if verbose >= 3: if verbose >= 3:
print "Fancy: Importing appscript..." print "Fancy: Importing appscript..."
try: try:
@ -521,7 +521,7 @@ if len(config.fancy) == 1:
sys.stderr.write("Error: Could not import appscript which is required for fancy disk images.\n") sys.stderr.write("Error: Could not import appscript which is required for fancy disk images.\n")
sys.stderr.write("Please install it e.g. with \"sudo easy_install appscript\".\n") sys.stderr.write("Please install it e.g. with \"sudo easy_install appscript\".\n")
sys.exit(1) sys.exit(1)
p = config.fancy[0] p = config.fancy[0]
if verbose >= 3: if verbose >= 3:
print "Fancy: Loading \"%s\"..." % p print "Fancy: Loading \"%s\"..." % p
@ -529,14 +529,14 @@ if len(config.fancy) == 1:
if verbose >= 1: if verbose >= 1:
sys.stderr.write("Error: Could not find fancy disk image plist at \"%s\"\n" % (p)) sys.stderr.write("Error: Could not find fancy disk image plist at \"%s\"\n" % (p))
sys.exit(1) sys.exit(1)
try: try:
fancy = plistlib.readPlist(p) fancy = plistlib.readPlist(p)
except: except:
if verbose >= 1: if verbose >= 1:
sys.stderr.write("Error: Could not parse fancy disk image plist at \"%s\"\n" % (p)) sys.stderr.write("Error: Could not parse fancy disk image plist at \"%s\"\n" % (p))
sys.exit(1) sys.exit(1)
try: try:
assert not fancy.has_key("window_bounds") or (isinstance(fancy["window_bounds"], list) and len(fancy["window_bounds"]) == 4) assert not fancy.has_key("window_bounds") or (isinstance(fancy["window_bounds"], list) and len(fancy["window_bounds"]) == 4)
assert not fancy.has_key("background_picture") or isinstance(fancy["background_picture"], str) assert not fancy.has_key("background_picture") or isinstance(fancy["background_picture"], str)
@ -550,7 +550,7 @@ if len(config.fancy) == 1:
if verbose >= 1: if verbose >= 1:
sys.stderr.write("Error: Bad format of fancy disk image plist at \"%s\"\n" % (p)) sys.stderr.write("Error: Bad format of fancy disk image plist at \"%s\"\n" % (p))
sys.exit(1) sys.exit(1)
if fancy.has_key("background_picture"): if fancy.has_key("background_picture"):
bp = fancy["background_picture"] bp = fancy["background_picture"]
if verbose >= 3: if verbose >= 3:
@ -571,7 +571,7 @@ else:
if os.path.exists("dist"): if os.path.exists("dist"):
if verbose >= 2: if verbose >= 2:
print "+ Removing old dist folder +" print "+ Removing old dist folder +"
shutil.rmtree("dist") shutil.rmtree("dist")
# ------------------------------------------------ # ------------------------------------------------
@ -611,7 +611,7 @@ except RuntimeError as e:
if config.plugins: if config.plugins:
if verbose >= 2: if verbose >= 2:
print "+ Deploying plugins +" print "+ Deploying plugins +"
try: try:
deployPlugins(applicationBundle, deploymentInfo, config.strip, verbose) deployPlugins(applicationBundle, deploymentInfo, config.strip, verbose)
except RuntimeError as e: except RuntimeError as e:
@ -708,26 +708,26 @@ if config.dmg is not None:
elif verbose >= 3: elif verbose >= 3:
hdiutil_args.append("-verbose") hdiutil_args.append("-verbose")
run = subprocess.check_call run = subprocess.check_call
for key, value in kwargs.iteritems(): for key, value in kwargs.iteritems():
hdiutil_args.append("-" + key) hdiutil_args.append("-" + key)
if not value is True: if not value is True:
hdiutil_args.append(str(value)) hdiutil_args.append(str(value))
return run(hdiutil_args) return run(hdiutil_args)
if verbose >= 2: if verbose >= 2:
if fancy is None: if fancy is None:
print "+ Creating .dmg disk image +" print "+ Creating .dmg disk image +"
else: else:
print "+ Preparing .dmg disk image +" print "+ Preparing .dmg disk image +"
if config.dmg != "": if config.dmg != "":
dmg_name = config.dmg dmg_name = config.dmg
else: else:
spl = app_bundle_name.split(" ") spl = app_bundle_name.split(" ")
dmg_name = spl[0] + "".join(p.capitalize() for p in spl[1:]) dmg_name = spl[0] + "".join(p.capitalize() for p in spl[1:])
if fancy is None: if fancy is None:
try: try:
runHDIUtil("create", dmg_name, srcfolder="dist", format="UDBZ", volname=app_bundle_name, ov=True) runHDIUtil("create", dmg_name, srcfolder="dist", format="UDBZ", volname=app_bundle_name, ov=True)
@ -741,28 +741,28 @@ if config.dmg is not None:
for file in files: for file in files:
size += os.path.getsize(os.path.join(path, file)) size += os.path.getsize(os.path.join(path, file))
size += int(size * 0.1) size += int(size * 0.1)
if verbose >= 3: if verbose >= 3:
print "Creating temp image for modification..." print "Creating temp image for modification..."
try: try:
runHDIUtil("create", dmg_name + ".temp", srcfolder="dist", format="UDRW", size=size, volname=app_bundle_name, ov=True) runHDIUtil("create", dmg_name + ".temp", srcfolder="dist", format="UDRW", size=size, volname=app_bundle_name, ov=True)
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
sys.exit(e.returncode) sys.exit(e.returncode)
if verbose >= 3: if verbose >= 3:
print "Attaching temp image..." print "Attaching temp image..."
try: try:
output = runHDIUtil("attach", dmg_name + ".temp", readwrite=True, noverify=True, noautoopen=True, capture_stdout=True) output = runHDIUtil("attach", dmg_name + ".temp", readwrite=True, noverify=True, noautoopen=True, capture_stdout=True)
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
sys.exit(e.returncode) sys.exit(e.returncode)
m = re.search("/Volumes/(.+$)", output) m = re.search("/Volumes/(.+$)", output)
disk_root = m.group(0) disk_root = m.group(0)
disk_name = m.group(1) disk_name = m.group(1)
if verbose >= 2: if verbose >= 2:
print "+ Applying fancy settings +" print "+ Applying fancy settings +"
if fancy.has_key("background_picture"): if fancy.has_key("background_picture"):
bg_path = os.path.join(disk_root, os.path.basename(fancy["background_picture"])) bg_path = os.path.join(disk_root, os.path.basename(fancy["background_picture"]))
if verbose >= 3: if verbose >= 3:
@ -770,10 +770,10 @@ if config.dmg is not None:
shutil.copy2(fancy["background_picture"], bg_path) shutil.copy2(fancy["background_picture"], bg_path)
else: else:
bg_path = None bg_path = None
if fancy.get("applications_symlink", False): if fancy.get("applications_symlink", False):
os.symlink("/Applications", os.path.join(disk_root, "Applications")) os.symlink("/Applications", os.path.join(disk_root, "Applications"))
# The Python appscript package broke with OSX 10.8 and isn't being fixed. # The Python appscript package broke with OSX 10.8 and isn't being fixed.
# So we now build up an AppleScript string and use the osascript command # So we now build up an AppleScript string and use the osascript command
# to make the .dmg file pretty: # to make the .dmg file pretty:
@ -809,7 +809,7 @@ if config.dmg is not None:
items_positions.append(itemscript.substitute(params)) items_positions.append(itemscript.substitute(params))
params = { params = {
"disk" : "Bitcoin-Qt", "disk" : "Darkcoin-Qt",
"window_bounds" : "300,300,800,620", "window_bounds" : "300,300,800,620",
"icon_size" : "96", "icon_size" : "96",
"background_commands" : "", "background_commands" : "",
@ -838,12 +838,12 @@ if config.dmg is not None:
if verbose >= 2: if verbose >= 2:
print "+ Finalizing .dmg disk image +" print "+ Finalizing .dmg disk image +"
try: try:
runHDIUtil("convert", dmg_name + ".temp", format="UDBZ", o=dmg_name + ".dmg", ov=True) runHDIUtil("convert", dmg_name + ".temp", format="UDBZ", o=dmg_name + ".dmg", ov=True)
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
sys.exit(e.returncode) sys.exit(e.returncode)
os.unlink(dmg_name + ".temp.dmg") os.unlink(dmg_name + ".temp.dmg")
# ------------------------------------------------ # ------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -0,0 +1,24 @@
/* XPM */
static char *bitcoin__[] = {
/* columns rows colors chars-per-pixel */
"16 16 2 1",
" c #2D98CE",
". c None",
/* pixels */
"................",
"................",
"................",
"... ..",
"... .",
".... ",
" .. ...... ",
". . ...... ",
".. ........ ",
"... ....... ",
"... ",
".... .",
"..... ..",
"................",
"................",
"................"
};

View File

@ -0,0 +1,40 @@
/* XPM */
static char *bitcoin__[] = {
/* columns rows colors chars-per-pixel */
"32 32 2 1",
" c #2D98CE",
". c None",
/* pixels */
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"..... .....",
"...... ..",
"....... .",
"....... ",
"........ ",
". .. ............ ",
". ... ............ ",
".. .. ............. ",
"... .. ............. ",
"... .. ............. ",
".... ... ............. ",
"..... ............... ",
"...... .............. ",
"....... ",
"....... ",
"........ .",
"......... ..",
".......... ...",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................"
};