ChronoSync dependency update and small change in binary creation scripts for OSX
diff --git a/ChronoSync b/ChronoSync
index ce00169..7804c23 160000
--- a/ChronoSync
+++ b/ChronoSync
@@ -1 +1 @@
-Subproject commit ce0016970f93e279a24374c2bf1ee2e14a52ef9a
+Subproject commit 7804c2329bf53bcdd3b32aa028edcb665db0079c
diff --git a/osxdist.py b/contrib/osxdist-10.7.py
similarity index 93%
rename from osxdist.py
rename to contrib/osxdist-10.7.py
index 8551e1a..6e7cf8d 100755
--- a/osxdist.py
+++ b/contrib/osxdist-10.7.py
@@ -10,6 +10,19 @@
from subprocess import Popen, PIPE
from optparse import OptionParser
+import platform
+
+if platform.system () != 'Darwin':
+ print "This script is indended to be run only on OSX platform"
+ exit (1)
+
+SUPPORTED_VERSION = "10.7"
+BINARY_POSTFIX = "Lion-10.7"
+
+if '.'.join (platform.mac_ver()[0].split('.')[0:2]) != SUPPORTED_VERSION:
+ print "This script is indended to be run only on OSX %s platform" % SUPPORTED_VERSION
+ exit (1)
+
options = None
def gitrev():
@@ -29,6 +42,18 @@
class AppBundle(object):
+ def __init__(self, bundle, version, binary):
+ shutil.copytree (src = binary, dst = bundle, symlinks = True)
+
+ self.framework_path = ''
+ self.handled_libs = {}
+ self.bundle = bundle
+ self.version = version
+ self.infopath = os.path.join(os.path.abspath(bundle), 'Contents', 'Info.plist')
+ self.infoplist = plistlib.readPlist(self.infopath)
+ self.binary = os.path.join(os.path.abspath(bundle), 'Contents', 'MacOS', self.infoplist['CFBundleExecutable'])
+ print ' * Preparing AppBundle'
+
def is_system_lib(self, lib):
'''
Is the library a system library, meaning that we should not include it in our bundle?
@@ -232,21 +257,6 @@
os.system('install_name_tool -id %s %s' % (file, abs))
self.handle_binary_libs(abs)
- def update_plist(self):
- '''
- Modify our bundle's Info.plist to make it ready for release.
- '''
- if self.version is not None:
- print ' * Changing version in Info.plist'
- p = self.infoplist
- p['CFBundleVersion'] = self.version
- p['CFBundleExecutable'] = "ChronoChat"
- p['CFBundleIconFile'] = 'demo.icns'
- p['CFBundleGetInfoString'] = '''
- '''
- plistlib.writePlist(p, self.infopath)
-
-
def set_min_macosx_version(self, version):
'''
Set the minimum version of Mac OS X version that this App will run on.
@@ -259,16 +269,6 @@
print ' * Done!'
print ''
- def __init__(self, bundle, version=None):
- self.framework_path = ''
- self.handled_libs = {}
- self.bundle = bundle
- self.version = version
- self.infopath = os.path.join(os.path.abspath(bundle), 'Contents', 'Info.plist')
- self.infoplist = plistlib.readPlist(self.infopath)
- self.binary = os.path.join(os.path.abspath(bundle), 'Contents', 'MacOS', self.infoplist['CFBundleExecutable'])
- print ' * Preparing AppBundle'
-
class FolderObject(object):
class Exception(exceptions.Exception):
pass
@@ -361,7 +361,6 @@
ver = options.snapshot
else:
ver = gitrev()
- #ver = "0.0.1"
else:
print 'ERROR: Neither snapshot or release selected. Bailing.'
parser.print_help ()
@@ -369,12 +368,11 @@
# Do the finishing touches to our Application bundle before release
- a = AppBundle('build/ChronoChat.app', ver)
+ a = AppBundle('build/%s/ChronoChat.app' % (BINARY_POSTFIX), ver, 'build/ChronoChat.app')
a.copy_qt_plugins()
a.handle_libs()
a.copy_resources(['qt.conf'])
- # a.update_plist()
- a.set_min_macosx_version('10.8.0')
+ a.set_min_macosx_version('%s.0' % SUPPORTED_VERSION)
a.done()
# Sign our binaries, etc.
@@ -388,11 +386,10 @@
print ''
# Create diskimage
- title = "ChronoChat-%s" % ver
+ title = "ChronoChat-%s-%s" % (ver, BINARY_POSTFIX)
fn = "build/%s.dmg" % title
d = DiskImage(fn, title)
d.symlink('/Applications', '/Applications')
- d.copy('build/ChronoChat.app', '/ChronoChat.app')
- d.copy('README.md', '/README.txt')
+ d.copy('build/%s/ChronoChat.app' % BINARY_POSTFIX, '/ChronoChat.app')
d.create()
diff --git a/osxdist.py b/contrib/osxdist-10.8.py
similarity index 92%
copy from osxdist.py
copy to contrib/osxdist-10.8.py
index 8551e1a..5f1757b 100755
--- a/osxdist.py
+++ b/contrib/osxdist-10.8.py
@@ -10,6 +10,19 @@
from subprocess import Popen, PIPE
from optparse import OptionParser
+import platform
+
+if platform.system () != 'Darwin':
+ print "This script is indended to be run only on OSX platform"
+ exit (1)
+
+SUPPORTED_VERSION = "10.8"
+BINARY_POSTFIX = "MountainLion-10.8"
+
+if '.'.join (platform.mac_ver()[0].split('.')[0:2]) != SUPPORTED_VERSION:
+ print "This script is indended to be run only on OSX %s platform" % SUPPORTED_VERSION
+ exit (1)
+
options = None
def gitrev():
@@ -29,6 +42,18 @@
class AppBundle(object):
+ def __init__(self, bundle, version, binary):
+ shutil.copytree (src = binary, dst = bundle, symlinks = True)
+
+ self.framework_path = ''
+ self.handled_libs = {}
+ self.bundle = bundle
+ self.version = version
+ self.infopath = os.path.join(os.path.abspath(bundle), 'Contents', 'Info.plist')
+ self.infoplist = plistlib.readPlist(self.infopath)
+ self.binary = os.path.join(os.path.abspath(bundle), 'Contents', 'MacOS', self.infoplist['CFBundleExecutable'])
+ print ' * Preparing AppBundle'
+
def is_system_lib(self, lib):
'''
Is the library a system library, meaning that we should not include it in our bundle?
@@ -232,21 +257,6 @@
os.system('install_name_tool -id %s %s' % (file, abs))
self.handle_binary_libs(abs)
- def update_plist(self):
- '''
- Modify our bundle's Info.plist to make it ready for release.
- '''
- if self.version is not None:
- print ' * Changing version in Info.plist'
- p = self.infoplist
- p['CFBundleVersion'] = self.version
- p['CFBundleExecutable'] = "ChronoChat"
- p['CFBundleIconFile'] = 'demo.icns'
- p['CFBundleGetInfoString'] = '''
- '''
- plistlib.writePlist(p, self.infopath)
-
-
def set_min_macosx_version(self, version):
'''
Set the minimum version of Mac OS X version that this App will run on.
@@ -259,16 +269,6 @@
print ' * Done!'
print ''
- def __init__(self, bundle, version=None):
- self.framework_path = ''
- self.handled_libs = {}
- self.bundle = bundle
- self.version = version
- self.infopath = os.path.join(os.path.abspath(bundle), 'Contents', 'Info.plist')
- self.infoplist = plistlib.readPlist(self.infopath)
- self.binary = os.path.join(os.path.abspath(bundle), 'Contents', 'MacOS', self.infoplist['CFBundleExecutable'])
- print ' * Preparing AppBundle'
-
class FolderObject(object):
class Exception(exceptions.Exception):
pass
@@ -361,7 +361,6 @@
ver = options.snapshot
else:
ver = gitrev()
- #ver = "0.0.1"
else:
print 'ERROR: Neither snapshot or release selected. Bailing.'
parser.print_help ()
@@ -369,12 +368,11 @@
# Do the finishing touches to our Application bundle before release
- a = AppBundle('build/ChronoChat.app', ver)
+ a = AppBundle('build/%s/ChronoChat.app' % (BINARY_POSTFIX), ver, 'build/ChronoChat.app')
a.copy_qt_plugins()
a.handle_libs()
a.copy_resources(['qt.conf'])
- # a.update_plist()
- a.set_min_macosx_version('10.8.0')
+ a.set_min_macosx_version('%s.0' % SUPPORTED_VERSION)
a.done()
# Sign our binaries, etc.
@@ -388,11 +386,10 @@
print ''
# Create diskimage
- title = "ChronoChat-%s" % ver
+ title = "ChronoChat-%s-%s" % (ver, BINARY_POSTFIX)
fn = "build/%s.dmg" % title
d = DiskImage(fn, title)
d.symlink('/Applications', '/Applications')
- d.copy('build/ChronoChat.app', '/ChronoChat.app')
- d.copy('README.md', '/README.txt')
+ d.copy('build/%s/ChronoChat.app' % BINARY_POSTFIX, '/ChronoChat.app')
d.create()
diff --git a/wscript b/wscript
index ab251e7..291d83e 100644
--- a/wscript
+++ b/wscript
@@ -31,7 +31,9 @@
else:
conf.add_supported_cxxflags (cxxflags = ['-O3', '-g'])
- conf.check_cfg (package='libChronoSync', args=['--cflags', '--libs'], uselib_store='SYNC', mandatory=True)
+ conf.check_cfg (package='ChronoSync',
+ args=['ChronoSync >= 0.1', '--cflags', '--libs'],
+ uselib_store='SYNC', mandatory=True)
conf.define ("CHRONOCHAT_VERSION", VERSION)