diff --git a/.waf-tools/osx-frameworks.py b/.waf-tools/osx-frameworks.py
index 9936778..6a473c0 100644
--- a/.waf-tools/osx-frameworks.py
+++ b/.waf-tools/osx-frameworks.py
@@ -45,7 +45,7 @@
                     # Download to local path and retry
                     Logs.info ("Sparkle framework not found, trying to download it to 'build/'")
 
-                    urllib.urlretrieve ("https://github.com/sparkle-project/Sparkle/releases/download/1.16.0/Sparkle-1.16.0.tar.bz2", "build/Sparkle.tar.bz2")
+                    urllib.urlretrieve ("https://github.com/sparkle-project/Sparkle/releases/download/1.17.0/Sparkle-1.17.0.tar.bz2", "build/Sparkle.tar.bz2")
                     if os.path.exists('build/Sparkle.tar.bz2'):
                         try:
                             subprocess.check_call(['mkdir', 'build/Sparkle'])
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
new file mode 100644
index 0000000..28f8344
--- /dev/null
+++ b/RELEASE_NOTES.md
@@ -0,0 +1,10 @@
+Release Notes
+==============
+
+## Version 0.1.0
+
+Initial release of ChronoShare, featuring:
+
+- Decentralised file sharing
+
+- NDN-JS interface for versioning history browsing and checking out old version
\ No newline at end of file
diff --git a/auto-release.sh b/auto-release.sh
new file mode 100755
index 0000000..1fe446a
--- /dev/null
+++ b/auto-release.sh
@@ -0,0 +1,105 @@
+#!/usr/bin/env bash
+
+#######################################
+## Attention:
+##     Please make sure to update your wscript, RELEASE_NOTES.md and intro.md in
+##     docs beforehand, and then run this script to auto-release application.
+
+usage()
+{
+  echo "Usage:"
+  echo "  $0 <VERSION> <IDENTITY> <SPARKLE_KEY>"
+  echo ""
+  echo "Options:"
+  echo "  <VERSION>: the version that will be used for this release"
+  echo "  <IDENTITY>: XCode identity (Mac Developer) that will be used for signing the application"
+  echo "  <SPARKLE_KEY>: the path to your Sparkle private key for signing the application"
+  echo ""
+  exit
+}
+
+#######################################
+## Script for automatically release application binary
+
+VERSION=${VERSION:-$1}
+IDENTITY=${IDENTITY:-$2}
+KEY_LOCATION=${KEY_LOCATION:-$3}
+
+if [[ -z $VERSION ]] || [[ -z $IDENTITY ]] || [[ -z $KEY_LOCATION ]]; then
+  usage
+fi
+
+echo "Preparing release $VERSION"
+echo "  will sign with XCode identity: $IDENTITY"
+echo "  will sign with Sparkle key: $KEY_LOCATION"
+
+BINARY_WEBSERVER=${BINARY_WEBSERVER:-named-data.net:binaries/ChronoShare/}
+
+rm -rf build/release
+mkdir build/release
+
+#######################################
+## Build .dmg file with code sign with Apple Developer ID
+
+echo "[auto-release] Build .dmg file and sign with Apple Developer ID"
+
+./make-osx-bundle.py -r "${VERSION}" --codesign="${IDENTITY}"
+
+#######################################
+## Code sign with Sparkle (private key existed)
+
+cp build/ChronoShare-${VERSION}.dmg build/release/
+cp build/release-notes-${VERSION}.html build/release/
+
+#######################################
+## Code sign with Sparkle (private key needed)
+
+#OPENSSL="/usr/bin/openssl"
+#openssl gendsa <($OPENSSL dsaparam 4096) -out dsa_priv.pem
+#chmod 0400 dsa_priv.pem
+#openssl dsa -in dsa_priv.pem -pubout -out ndn_sparkle_pub.pem
+#mv ndn_sparkle_pub.pem ../res/
+#./bin/sign_update "../NDN-${VERSION}.dmg" "${KEY_LOCATION}"
+
+#######################################
+## Generate appcast xml file
+
+echo "[auto-release] Generate appcast xml file"
+
+./build/Sparkle/bin/generate_appcast "${KEY_LOCATION}" build/release/
+
+cp sparkle-appcast.xml build/
+cat <<EOF | python -
+import xml.etree.ElementTree
+cast = xml.etree.ElementTree.parse('build/sparkle-appcast.xml')
+item = xml.etree.ElementTree.parse('build/release/sparkle-appcast.xml')
+
+channel = cast.getroot()[0]
+
+for item in item.getroot().findall('./channel/item'):
+    version = item.findall('.//title')[0].text
+    item.findall('.//title')[0].text = "Version %s" % version
+    notes = xml.etree.ElementTree.Element('ns0:releaseNotesLink')
+    notes.text = 'https://named-data.net/binaries/ChronoShare/release-notes-%s.html' % version
+    item.append(notes)
+    channel.append(item)
+
+cast.write('sparkle-appcast.xml', encoding="utf-8")
+EOF
+
+cp sparkle-appcast.xml build/release/
+
+#######################################
+## Upload dmg & xml & html to https://named-data.net/binaries/ChronoShare/
+
+echo "[auto-release] Publish dmg xml and html file to website server"
+
+pushd build
+pushd release
+ln -s "ChronoShare-${VERSION}.dmg" ChronoShare.dmg
+ln -s "release-notes-${VERSION}.html" release-notes.html
+popd
+popd
+
+echo "Ready to upload:"
+echo "rsync -avz build/release/* \"${BINARY_WEBSERVER}\""
diff --git a/docs/intro.md b/docs/intro.md
new file mode 100644
index 0000000..9eeef9d
--- /dev/null
+++ b/docs/intro.md
@@ -0,0 +1,24 @@
+ChronoShare
+===========
+
+Decentralized File Sharing Over NDN
+
+- Version controlled
+- NDN-JS interface for versioning history browsing and checking out old version
+- Dropbox like user experience (ok, their UI is fancier)
+
+## Download
+
+- macOS 10.12
+
+    * [Latest version](https://named-data.net/binaries/ChronoShare/ChronoShare.dmg)
+
+- Source
+
+    * [Github](https://github.com/named-data/ChronoShare)
+
+- Issue requests and bug reporting
+
+    * [NDN Redmine](https://redmine.named-data.net/projects/chronoshare/issues)
+
+- [Release notes](https://github.com/named-data/ChronoShare/blob/master/RELEASE_NOTES.md#release-notes)
diff --git a/make-osx-bundle.py b/make-osx-bundle.py
new file mode 100755
index 0000000..fe4e64a
--- /dev/null
+++ b/make-osx-bundle.py
@@ -0,0 +1,415 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#
+# Loosely based on original bash-version by Sebastian Schlingmann (based, again, on a OSX application bundler
+# by Thomas Keller).
+#
+
+import sys, os, string, re, shutil, plistlib, tempfile, exceptions, datetime, tarfile
+from subprocess import Popen, PIPE
+from optparse import OptionParser
+
+os.environ['PATH'] += ":/usr/local/opt/qt5/bin:/opt/qt5/5.8/clang_64/bin"
+
+import platform
+
+if platform.system () != 'Darwin':
+  print "This script is indended to be run only on OSX platform"
+  exit (1)
+
+MIN_SUPPORTED_VERSION="10.12"
+
+current_version = tuple(int(i) for i in platform.mac_ver()[0].split('.')[0:2])
+min_supported_version = tuple(int(i) for i in MIN_SUPPORTED_VERSION.split('.')[0:2])
+
+if current_version < min_supported_version:
+  print "This script is indended to be run only on OSX >= %s platform" % MIN_SUPPORTED_VERSION
+  exit (1)
+
+options = None
+
+def gitrev():
+  return os.popen('git describe').read()[:-1]
+
+def codesign(path):
+  '''Call the codesign executable.'''
+
+  if hasattr(path, 'isalpha'):
+    path = (path,)
+
+  for p in path:
+    p = Popen(('codesign', '-vvvv', '--deep', '--force', '--sign', options.codesign, p))
+    retval = p.wait()
+    if retval != 0:
+      return retval
+  return 0
+
+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?
+    '''
+    if lib.startswith('/System/Library/'):
+      return True
+    if lib.startswith('/usr/lib/'):
+      return True
+
+    return False
+
+  def is_dylib(self, lib):
+    '''
+      Is the library a dylib?
+    '''
+    return lib.endswith('.dylib')
+
+  def get_framework_base(self, fw):
+    '''
+      Extracts the base .framework bundle path from a library in an abitrary place in a framework.
+    '''
+    paths = fw.split('/')
+    for i, str in enumerate(paths):
+      if str.endswith('.framework'):
+        return '/'.join(paths[:i+1])
+    return None
+
+  def is_framework(self, lib):
+    '''
+      Is the library a framework?
+    '''
+    return bool(self.get_framework_base(lib))
+
+  def get_binary_libs(self, path):
+    '''
+      Get a list of libraries that we depend on.
+    '''
+    m = re.compile('^\t(.*)\ \(.*$')
+    libs = Popen(['otool', '-L', path], stdout=PIPE).communicate()[0]
+    libs = string.split(libs, '\n')
+    ret = []
+    bn = os.path.basename(path)
+    for line in libs:
+      g = m.match(line)
+      if g is not None:
+        lib = g.groups()[0]
+        if lib != bn:
+          ret.append(lib)
+    return ret
+
+  def handle_libs(self):
+    '''
+      Copy non-system libraries that we depend on into our bundle, and fix linker
+      paths so they are relative to our bundle.
+    '''
+    print ' * Taking care of libraries'
+
+    # Does our fwpath exist?
+    fwpath = os.path.join(os.path.abspath(self.bundle), 'Contents', 'Frameworks')
+    if not os.path.exists(fwpath):
+      os.mkdir(fwpath)
+
+    self.handle_binary_libs()
+
+  def handle_binary_libs(self, macho=None, loader_path=None):
+    '''
+      Fix up dylib depends for a specific binary.
+    '''
+    # Does our fwpath exist already? If not, create it.
+    if not self.framework_path:
+      self.framework_path = self.bundle + '/Contents/Frameworks'
+      if not os.path.exists(self.framework_path):
+        os.mkdir(self.framework_path)
+      else:
+        shutil.rmtree(self.framework_path)
+        os.mkdir(self.framework_path)
+
+    # If we weren't explicitly told which binary to operate on, pick the
+    # bundle's default executable from its property list.
+    if macho is None:
+      macho = os.path.abspath(self.binary)
+    else:
+      macho = os.path.abspath(macho)
+
+    print "Processing [%s]" % macho
+
+    libs = self.get_binary_libs(macho)
+
+    for lib in libs:
+
+      # Skip system libraries
+      if self.is_system_lib(lib):
+        continue
+
+      if 'Qt' in lib:
+        continue
+
+      # Frameworks are 'special'.
+      if self.is_framework(lib):
+        fw_path = self.get_framework_base(lib)
+        basename = os.path.basename(fw_path)
+        name = basename.split('.framework')[0]
+        rel = basename + '/' + name
+
+        abs = self.framework_path + '/' + rel
+
+        if not basename in self.handled_libs:
+          dst = self.framework_path + '/' + basename
+          print "COPY ", fw_path, dst
+          shutil.copytree(fw_path, dst, symlinks=True)
+          if name.startswith('Qt'):
+            os.remove(dst + '/' + name + '.prl')
+            os.remove(dst + '/Headers')
+            shutil.rmtree(dst + '/Versions/Current/Headers')
+
+          os.chmod(abs, 0755)
+          os.system('install_name_tool -id "@executable_path/../Frameworks/%s" "%s"' % (rel, abs))
+          self.handled_libs[basename] = True
+          self.handle_binary_libs(abs)
+
+        os.chmod(macho, 0755)
+        # print 'install_name_tool -change "%s" "@executable_path/../Frameworks/%s" "%s"' % (lib, rel, macho)
+        os.system('install_name_tool -change "%s" "@executable_path/../Frameworks/%s" "%s"' % (lib, rel, macho))
+
+      # Regular dylibs
+      else:
+        basename = os.path.basename(lib)
+        rel = basename
+
+        if not basename in self.handled_libs:
+          if lib.startswith('@loader_path'):
+            copypath = lib.replace('@loader_path', loader_path)
+          else:
+            copypath = lib
+
+          print "COPY ", copypath
+          shutil.copy(copypath, self.framework_path  + '/' + basename)
+
+          abs = self.framework_path + '/' + rel
+          os.chmod(abs, 0755)
+          os.system('install_name_tool -id "@executable_path/../Frameworks/%s" "%s"' % (rel, abs))
+          self.handled_libs[basename] = True
+          self.handle_binary_libs(abs, loader_path=os.path.dirname(lib))
+
+        # print 'install_name_tool -change "%s" "@executable_path/../Frameworks/%s" "%s"' % (lib, rel, macho)
+        os.chmod(macho, 0755)
+        os.system('install_name_tool -change "%s" "@executable_path/../Frameworks/%s" "%s"' % (lib, rel, macho))
+
+  def copy_resources(self, rsrcs):
+    '''
+      Copy needed resources into our bundle.
+    '''
+    print ' * Copying needed resources'
+    rsrcpath = os.path.join(self.bundle, 'Contents', 'Resources')
+    if not os.path.exists(rsrcpath):
+      os.mkdir(rsrcpath)
+
+    # Copy resources already in the bundle
+    for rsrc in rsrcs:
+      b = os.path.basename(rsrc)
+      if os.path.isdir(rsrc):
+        shutil.copytree(rsrc, os.path.join(rsrcpath, b), symlinks=True)
+      elif os.path.isfile(rsrc):
+        shutil.copy(rsrc, os.path.join(rsrcpath, b))
+
+    return
+
+  def copy_etc(self, rsrcs):
+    '''
+      Copy needed config files into our bundle.
+    '''
+    print ' * Copying needed config files'
+    rsrcpath = os.path.join(self.bundle, 'Contents', 'etc', 'ndn')
+    if not os.path.exists(rsrcpath):
+      os.makedirs(rsrcpath)
+
+    # Copy resources already in the bundle
+    for rsrc in rsrcs:
+      b = os.path.basename(rsrc)
+      if os.path.isdir(rsrc):
+        shutil.copytree(rsrc, os.path.join(rsrcpath, b), symlinks=True)
+      elif os.path.isfile(rsrc):
+        shutil.copy(rsrc, os.path.join(rsrcpath, b))
+
+    return
+
+  def copy_framework(self, framework):
+    '''
+      Copy frameworks
+    '''
+    print ' * Copying framework'
+    rsrcpath = os.path.join(self.bundle, 'Contents', 'Frameworks', os.path.basename(framework))
+
+    shutil.copytree(framework, rsrcpath, symlinks = True)
+
+  def macdeployqt(self):
+    Popen(['macdeployqt', self.bundle, '-qmldir=src', '-executable=%s' % self.binary]).communicate()
+
+  def copy_ndn_deps(self, path):
+    '''
+      Copy over NDN dependencies (NFD and related apps)
+    '''
+    print ' * Copying NDN dependencies'
+
+    src = os.path.join(path, 'bin')
+    dst = os.path.join(self.bundle, 'Contents', 'Platform')
+    shutil.copytree(src, dst, symlinks=False)
+
+    for subdir, dirs, files in os.walk(dst):
+      for file in files:
+        abs = subdir + "/" + file
+        self.handle_binary_libs(abs)
+
+  def set_min_macosx_version(self, version):
+    '''
+      Set the minimum version of Mac OS X version that this App will run on.
+    '''
+    print ' * Setting minimum Mac OS X version to: %s' % (version)
+    self.infoplist['LSMinimumSystemVersion'] = version
+
+  def done(self):
+    plistlib.writePlist(self.infoplist, self.infopath)
+    print ' * Done!'
+    print ''
+
+class FolderObject(object):
+  class Exception(exceptions.Exception):
+    pass
+
+  def __init__(self):
+    self.tmp = tempfile.mkdtemp()
+
+  def copy(self, src, dst='/'):
+    '''
+      Copy a file or directory into foler
+    '''
+    asrc = os.path.abspath(src)
+
+    if dst[0] != '/':
+      raise self.Exception
+
+    # Determine destination
+    if dst[-1] == '/':
+      adst = os.path.abspath(self.tmp + '/' + dst + os.path.basename(src))
+    else:
+      adst = os.path.abspath(self.tmp + '/' + dst)
+
+    if os.path.isdir(asrc):
+      print ' * Copying directory: %s' % os.path.basename(asrc)
+      shutil.copytree(asrc, adst, symlinks=True)
+    elif os.path.isfile(asrc):
+      print ' * Copying file: %s' % os.path.basename(asrc)
+      shutil.copy(asrc, adst)
+
+  def symlink(self, src, dst):
+    '''
+      Create a symlink inside the folder
+    '''
+    asrc = os.path.abspath(src)
+    adst = self.tmp + '/' + dst
+    print " * Creating symlink %s" % os.path.basename(asrc)
+    os.symlink(asrc, adst)
+
+  def mkdir(self, name):
+    '''
+      Create a directory inside the folder.
+    '''
+    print ' * Creating directory %s' % os.path.basename(name)
+    adst = self.tmp + '/' + name
+    os.makedirs(adst)
+
+class DiskImage(FolderObject):
+
+  def __init__(self, filename, volname):
+    FolderObject.__init__(self)
+    print ' * Preparing to create diskimage'
+    self.filename = filename
+    self.volname = volname
+
+  def create(self):
+    '''
+      Create the disk image
+    '''
+    print ' * Creating disk image. Please wait...'
+    if os.path.exists(self.filename):
+      os.remove(self.filename)
+      shutil.rmtree(self.filename, ignore_errors=True)
+    p = Popen(['hdiutil', 'create',
+              '-srcfolder', self.tmp,
+              '-format', 'UDBZ',
+              '-volname', self.volname,
+              self.filename])
+
+    retval = p.wait()
+    print ' * Removing temporary directory.'
+    shutil.rmtree(self.tmp)
+    print ' * Done!'
+
+
+if __name__ == '__main__':
+  parser = OptionParser()
+  parser.add_option('-r', '--release', dest='release', help='Build a release. This determines the version number of the release.')
+  parser.add_option('-s', '--snapshot', dest='snapshot', help='Build a snapshot release. This determines the \'snapshot version\'.')
+  parser.add_option('-g', '--git', dest='git', help='Build a snapshot release. Use the git revision number as the \'snapshot version\'.', action='store_true', default=False)
+  parser.add_option('--no-dmg', dest='no_dmg', action='store_true', default=False, help='''Disable creation of DMG''')
+  parser.add_option('--codesign', dest='codesign', help='Identity to use for code signing. (If not set, no code signing will occur)')
+
+  options, args = parser.parse_args()
+
+  # Release
+  if options.release:
+    ver = options.release
+  # Snapshot
+  elif options.snapshot or options.git:
+    if not options.git:
+      ver = options.snapshot
+    else:
+      ver = gitrev()
+  else:
+    print 'ERROR: Neither snapshot or release selected. Bailing.'
+    parser.print_help ()
+    sys.exit(1)
+
+  # Do the finishing touches to our Application bundle before release
+  shutil.rmtree('build/dist/ChronoShare.app', ignore_errors=True)
+  a = AppBundle('build/dist/ChronoShare.app', ver, 'build/ChronoShare.app')
+  # a.copy_resources(['qt.conf'])
+  a.set_min_macosx_version('%s.0' % MIN_SUPPORTED_VERSION)
+  a.handle_binary_libs()
+  a.macdeployqt()
+  a.copy_framework("osx/Frameworks/Sparkle.framework")
+  a.done()
+
+  # Sign our binaries, etc.
+  if options.codesign:
+    print ' * Signing binaries with identity `%s\'' % options.codesign
+    codesign(a.bundle)
+    print ''
+
+  if not options.no_dmg:
+    # Create diskimage
+    title = "ChronoShare-%s" % ver
+    fn = "build/%s.dmg" % title
+    d = DiskImage(fn, title)
+    d.symlink('/Applications', '/Applications')
+    d.copy('build/dist/ChronoShare.app', '/ChronoShare.app')
+    d.create()
+
+    if options.codesign:
+      print ' * Signing .dmg with identity `%s\'' % options.codesign
+      codesign(fn)
+      print ''
+
+Popen('tail -n +3 RELEASE_NOTES.md | pandoc -f markdown -t html > build/release-notes-%s.html' % ver, shell=True).wait()
diff --git a/sparkle-appcast.xml b/sparkle-appcast.xml
index 60adc74..09ad7ba 100644
--- a/sparkle-appcast.xml
+++ b/sparkle-appcast.xml
@@ -1,4 +1,4 @@
-<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
+<rss xmlns:ns0="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
   <channel>
     <title>ChronoShare Changelog</title>
     <link>
@@ -6,5 +6,11 @@
     </link>
     <description>Most recent changes with links to updates.</description>
     <language>en</language>
-  </channel>
+<item>
+<title>Version 0.1.0</title>
+<pubDate>Thu, 23 Mar 2017 09:32:14 -0700</pubDate>
+<ns0:minimumSystemVersion>10.12.0</ns0:minimumSystemVersion>
+<enclosure length="17713425" type="application/octet-stream" url="https://named-data.net/binaries/ChronoShare/ChronoShare-0.1.0.dmg" ns0:dsaSignature="MC4CFQCCmLhRNO6aRv1GA+CwHAl+4AQ7OwIVAI1nERVItIqvzUtyScXTiTYWML8v" ns0:shortVersionString="0.1.0" ns0:version="0.1.0" />
+<ns0:releaseNotesLink>https://named-data.net/binaries/ChronoShare/release-notes-0.1.0.html</ns0:releaseNotesLink></item>
+</channel>
 </rss>
