aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_emscripten.sh34
-rwxr-xr-xscripts/docs.sh32
-rwxr-xr-xscripts/fix_homebrew_paths_in_standalone_zip.py65
-rw-r--r--scripts/install_deps.bat61
-rwxr-xr-xscripts/install_deps.sh367
-rw-r--r--scripts/release.bat34
-rwxr-xr-xscripts/release.sh92
-rwxr-xr-xscripts/release_emscripten.sh33
-rwxr-xr-xscripts/release_ppa.sh241
-rwxr-xr-xscripts/tests.sh61
-rwxr-xr-xscripts/travis-emscripten/build_emscripten.sh128
-rw-r--r--scripts/travis-emscripten/deploy_key.encbin0 -> 1680 bytes
-rwxr-xr-xscripts/travis-emscripten/install_deps.sh44
-rwxr-xr-xscripts/travis-emscripten/publish_binary.sh70
14 files changed, 1262 insertions, 0 deletions
diff --git a/scripts/build_emscripten.sh b/scripts/build_emscripten.sh
new file mode 100755
index 00000000..6046978e
--- /dev/null
+++ b/scripts/build_emscripten.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+
+#------------------------------------------------------------------------------
+# Bash script for building Solidity for emscripten.
+#
+# The documentation for solidity is hosted at:
+#
+# https://solidity.readthedocs.org
+#
+# ------------------------------------------------------------------------------
+# This file is part of solidity.
+#
+# solidity is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# solidity is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with solidity. If not, see <http://www.gnu.org/licenses/>
+#
+# (c) 2016 solidity contributors.
+#------------------------------------------------------------------------------
+
+set -e
+
+if [[ "$OSTYPE" != "darwin"* ]]; then
+ ./scripts/travis-emscripten/install_deps.sh
+ docker run -v $(pwd):/src trzeci/emscripten:sdk-tag-1.35.4-64bit ./scripts/travis-emscripten/build_emscripten.sh
+fi
diff --git a/scripts/docs.sh b/scripts/docs.sh
new file mode 100755
index 00000000..42400bc7
--- /dev/null
+++ b/scripts/docs.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+#------------------------------------------------------------------------------
+# Bash script to build the Solidity Sphinx documentation locally.
+#
+# The documentation for solidity is hosted at:
+#
+# https://solidity.readthedocs.org
+#
+# ------------------------------------------------------------------------------
+# This file is part of solidity.
+#
+# solidity is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# solidity is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with solidity. If not, see <http://www.gnu.org/licenses/>
+#
+# (c) 2016 solidity contributors.
+#------------------------------------------------------------------------------
+
+set -e
+cd docs
+sphinx-build -nW -b html -d _build/doctrees . _build/html
+cd ..
diff --git a/scripts/fix_homebrew_paths_in_standalone_zip.py b/scripts/fix_homebrew_paths_in_standalone_zip.py
new file mode 100755
index 00000000..38aa9685
--- /dev/null
+++ b/scripts/fix_homebrew_paths_in_standalone_zip.py
@@ -0,0 +1,65 @@
+# ------------------------------------------------------------------------------
+# This Python script is used within the OS X release process, to ensure
+# that the standalone OS X ZIP files which we make are actually
+# standalone, and not implicitly dependent on Homebrew installs for
+# external libraries which we use.
+#
+# This implicit dependencies seem to show up only where we have
+# external dependencies which are dependent on each other, and the
+# path from one to another is an absolute path to "/usr/local/opt",
+# the Homebrew install location. External dependencies which only
+# depend on system libraries are fine. Our main applications seem
+# to be fine.
+#
+# An example of a dependency which requires this fix-up at the time
+# of writing is the following dependency edge:
+#
+# libjsonrpccpp-client.0.dylib
+# -> /usr/local/opt/jsoncpp/lib/libjsoncpp.0.dylib
+#
+# See https://blogs.oracle.com/dipol/entry/dynamic_libraries_rpath_and_mac
+# for a little overview of "install_name_tool" and "otool".
+#
+# ------------------------------------------------------------------------------
+# This file is part of solidity.
+#
+# solidity is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# solidity is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with solidity. If not, see <http://www.gnu.org/licenses/>
+#
+# (c) 2016 solidity contributors.
+# -----------------------------------------------------------------------------
+
+import os
+import subprocess
+import sys
+
+
+def readDependencies(fname):
+ with open(fname) as f:
+ o = subprocess.Popen(['otool', '-L', fname], stdout=subprocess.PIPE)
+ for line in o.stdout:
+ if line[0] == '\t':
+ library = line.split(' ', 1)[0][1:]
+ if library.startswith("/usr/local/lib") or library.startswith("/usr/local/opt") or library.startswith("/Users/"):
+ if (os.path.basename(library) != os.path.basename(fname)):
+ command = "install_name_tool -change " + \
+ library + " @executable_path/./" + \
+ os.path.basename(library) + " " + fname
+ print command
+ os.system("chmod +w " + fname)
+ os.system(command)
+
+root = sys.argv[1]
+for (dirpath, dirnames, filenames) in os.walk(root):
+ for filename in filenames:
+ readDependencies(os.path.join(root, filename))
diff --git a/scripts/install_deps.bat b/scripts/install_deps.bat
new file mode 100644
index 00000000..512a28df
--- /dev/null
+++ b/scripts/install_deps.bat
@@ -0,0 +1,61 @@
+@ECHO OFF
+
+REM ---------------------------------------------------------------------------
+REM Batch file for installing pre-requisite packages for solidity on
+REM Windows platforms. That is implemented using CMake targets which
+REM extract pre-built ZIPs hosted on GitHub into "deps\install_deps".
+REM
+REM See https://github.com/ethereum/cpp-dependencies
+REM
+REM The CMake files then point into that directory as an alternative
+REM to the Homebrew, PPA or other global package server locations
+REM available on Linux and UNIX platforms.
+REM
+REM The lack of a standard C++ packaging system for Windows is problematic
+REM for us, and we have considered various options for improving the
+REM situation, such as the following:
+REM
+REM See "Windows - Add support for Chocolatey packages"
+REM https://github.com/ethereum/webthree-umbrella/issues/345
+REM
+REM See "Windows - Try to use NuGet C++ packages"
+REM https://github.com/ethereum/webthree-umbrella/issues/509
+REM
+REM See "CM - Can we switch to NuGet delivery for our external dependencies"
+REM https://github.com/ethereum/webthree-umbrella/issues/376
+REM
+REM Another possible option, which would benefit build robustness on
+REM multiple platforms, not just Windows, is to add dependencies as
+REM git-submodules (or downloading on demand) so that we aren'targets
+REM depend on platform-specific packaging systems at all. We have
+REM already done just that for LLVM within evmjit. The downside of
+REM that approach is that those dependencies then need to be
+REM built-from-source, which adds time to the build process. It
+REM gives us an unbeatable degree of control, though, because we
+REM then perfectly control versioning and build flags for the binaries
+REM for those packages.
+REM
+REM The documentation for solidity is hosted at:
+REM
+REM http://solidity.readthedocs.org
+REM
+REM ---------------------------------------------------------------------------
+REM This file is part of solidity.
+REM
+REM solidity is free software: you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation, either version 3 of the License, or
+REM (at your option) any later version.
+REM
+REM solidity is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with solidity. If not, see <http://www.gnu.org/licenses/>
+REM
+REM Copyright (c) 2016 solidity contributors.
+REM ---------------------------------------------------------------------------
+
+cmake -P deps\install_deps.cmake
diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh
new file mode 100755
index 00000000..bbf28d95
--- /dev/null
+++ b/scripts/install_deps.sh
@@ -0,0 +1,367 @@
+#!/usr/bin/env bash
+
+#------------------------------------------------------------------------------
+# Bash script for installing pre-requisite packages for solidity on a
+# variety of Linux and other UNIX-derived platforms.
+#
+# This is an "infrastucture-as-code" alternative to the manual build
+# instructions pages which we previously maintained at:
+# http://solidity.readthedocs.io/en/latest/installing-solidity.html
+#
+# The aim of this script is to simplify things down to the following basic
+# flow for all supported operating systems:
+#
+# - git clone --recursive
+# - ./install_deps.sh
+# - cmake && make
+#
+# At the time of writing we are assuming that 'lsb_release' is present for all
+# Linux distros, which is not a valid assumption. We will need a variety of
+# approaches to actually get this working across all the distros which people
+# are using.
+#
+# See http://unix.stackexchange.com/questions/92199/how-can-i-reliably-get-the-operating-systems-name
+# for some more background on this common problem.
+#
+# TODO - There is no support here yet for cross-builds in any form, only
+# native builds. Expanding the functionality here to cover the mobile,
+# wearable and SBC platforms covered by doublethink and EthEmbedded would
+# also bring in support for Android, iOS, watchOS, tvOS, Tizen, Sailfish,
+# Maemo, MeeGo and Yocto.
+#
+# The documentation for solidity is hosted at:
+#
+# http://solidity.readthedocs.io/
+#
+# ------------------------------------------------------------------------------
+# This file is part of solidity.
+#
+# solidity is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# solidity is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with solidity. If not, see <http://www.gnu.org/licenses/>
+#
+# (c) 2016 solidity contributors.
+#------------------------------------------------------------------------------
+
+# Check for 'uname' and abort if it is not available.
+uname -v > /dev/null 2>&1 || { echo >&2 "ERROR - solidity requires 'uname' to identify the platform."; exit 1; }
+
+case $(uname -s) in
+
+#------------------------------------------------------------------------------
+# macOS
+#------------------------------------------------------------------------------
+
+ Darwin)
+ case $(sw_vers -productVersion | awk -F . '{print $1"."$2}') in
+ 10.9)
+ echo "Installing solidity dependencies on OS X 10.9 Mavericks."
+ ;;
+ 10.10)
+ echo "Installing solidity dependencies on OS X 10.10 Yosemite."
+ ;;
+ 10.11)
+ echo "Installing solidity dependencies on OS X 10.11 El Capitan."
+ ;;
+ 10.12)
+ echo "Installing solidity dependencies on macOS 10.12 Sierra."
+ echo ""
+ echo "NOTE - You are in unknown territory with this preview OS."
+ echo "Even Homebrew doesn't have official support yet, and there are"
+ echo "known issues (see https://github.com/ethereum/webthree-umbrella/issues/614)."
+ echo "If you would like to partner with us to work through these issues, that"
+ echo "would be fantastic. Please just comment on that issue. Thanks!"
+ ;;
+ *)
+ echo "Unsupported macOS version."
+ echo "We only support Mavericks, Yosemite and El Capitan, with work-in-progress on Sierra."
+ exit 1
+ ;;
+ esac
+
+ # Check for Homebrew install and abort if it is not installed.
+ brew -v > /dev/null 2>&1 || { echo >&2 "ERROR - solidity requires a Homebrew install. See http://brew.sh."; exit 1; }
+
+ brew update
+ brew upgrade
+
+ brew install boost
+ brew install cmake
+ brew install jsoncpp
+
+ # We should really 'brew install' our eth client here, but at the time of writing
+ # the bottle is known broken, so we will just cheat and use a hardcoded ZIP for
+ # the time being, which is good enough. The cause of the breaks will go away
+ # when we commit the repository reorg changes anyway.
+ curl -L -O https://github.com/bobsummerwill/cpp-ethereum/releases/download/v1.3.0/cpp-ethereum-osx-mavericks-v1.3.0.zip
+ unzip cpp-ethereum-osx-mavericks-v1.3.0.zip
+
+ ;;
+
+#------------------------------------------------------------------------------
+# FreeBSD
+#------------------------------------------------------------------------------
+
+ FreeBSD)
+ echo "Installing solidity dependencies on FreeBSD."
+ echo "ERROR - 'install_deps.sh' doesn't have FreeBSD support yet."
+ echo "Please let us know if you see this error message, and we can work out what is missing."
+ echo "Drop us a message at https://gitter.im/ethereum/solidity."
+ exit 1
+ ;;
+
+#------------------------------------------------------------------------------
+# Linux
+#------------------------------------------------------------------------------
+
+ Linux)
+ case $(lsb_release -is) in
+
+#------------------------------------------------------------------------------
+# Arch Linux
+#------------------------------------------------------------------------------
+
+ Arch)
+ #Arch
+ echo "Installing solidity dependencies on Arch Linux."
+
+ # All our dependencies can be found in the Arch Linux official repositories.
+ # See https://wiki.archlinux.org/index.php/Official_repositories
+ sudo pacman -Sy \
+ base-devel \
+ boost \
+ cmake \
+ git \
+ ;;
+
+#------------------------------------------------------------------------------
+# Alpine Linux
+#------------------------------------------------------------------------------
+
+ Alpine)
+ #Alpine
+ echo "Installing solidity dependencies on Alpine Linux."
+
+ # All our dependencies can be found in the Alpine Linux official repositories.
+ # See https://pkgs.alpinelinux.org/
+
+ apk update
+ apk upgrade
+ apk add boost-dev build-base cmake jsoncpp-dev
+
+ ;;
+
+#------------------------------------------------------------------------------
+# Debian
+#------------------------------------------------------------------------------
+
+ Debian)
+ #Debian
+ case $(lsb_release -cs) in
+ wheezy)
+ #wheezy
+ echo "Installing solidity dependencies on Debian Wheezy (7.x)."
+ echo "ERROR - 'install_deps.sh' doesn't have Debian Wheezy support yet."
+ echo "See http://solidity.readthedocs.io/en/latest/installing-solidity.html for manual instructions."
+ echo "If you would like to get 'install_deps.sh' working for Debian Wheezy, that would be fantastic."
+ echo "Drop us a message at https://gitter.im/ethereum/solidity."
+ echo "See also https://github.com/ethereum/webthree-umbrella/issues/495 where we are working through Alpine support."
+ exit 1
+ ;;
+ jessie)
+ #jessie
+ echo "Installing solidity dependencies on Debian Jesse (8.x)."
+ ;;
+ stretch)
+ #stretch
+ echo "Installing solidity dependencies on Debian Stretch (9.x)."
+ echo "ERROR - 'install_deps.sh' doesn't have Debian Stretch support yet."
+ echo "See http://solidity.readthedocs.io/en/latest/installing-solidity.html for manual instructions."
+ echo "If you would like to get 'install_deps.sh' working for Debian Stretch, that would be fantastic."
+ echo "Drop us a message at https://gitter.im/ethereum/solidity."
+ exit 1
+ ;;
+ *)
+ #other Debian
+ echo "Installing solidity dependencies on unknown Debian version."
+ echo "ERROR - Debian Jessie is the only Debian version which solidity has been tested on."
+ echo "If you are using a different release and would like to get 'install_deps.sh'"
+ echo "working for that release that would be fantastic."
+ echo "Drop us a message at https://gitter.im/ethereum/solidity."
+ exit 1
+ ;;
+ esac
+
+ # Install "normal packages"
+ sudo apt-get -y update
+ sudo apt-get -y install \
+ python-sphinx \
+ build-essential \
+ cmake \
+ g++ \
+ gcc \
+ git \
+ libboost-all-dev \
+ libjsoncpp-dev \
+ unzip
+
+ ;;
+
+#------------------------------------------------------------------------------
+# Fedora
+#------------------------------------------------------------------------------
+
+ Fedora)
+ #Fedora
+ echo "Installing solidity dependencies on Fedora."
+
+ # Install "normal packages"
+ # See https://fedoraproject.org/wiki/Package_management_system.
+ dnf install \
+ autoconf \
+ automake \
+ boost-devel \
+ cmake \
+ gcc \
+ gcc-c++ \
+ git \
+ libtool
+
+ ;;
+
+#------------------------------------------------------------------------------
+# OpenSUSE
+#------------------------------------------------------------------------------
+
+ "openSUSE project")
+ #openSUSE
+ echo "Installing solidity dependencies on openSUSE."
+ echo "ERROR - 'install_deps.sh' doesn't have openSUSE support yet."
+ echo "See http://solidity.readthedocs.io/en/latest/installing-solidity.html for manual instructions."
+ echo "If you would like to get 'install_deps.sh' working for openSUSE, that would be fantastic."
+ echo "See https://github.com/ethereum/webthree-umbrella/issues/552."
+ exit 1
+ ;;
+
+#------------------------------------------------------------------------------
+# Ubuntu
+#
+# TODO - I wonder whether all of the Ubuntu-variants need some special
+# treatment?
+#
+# TODO - We should also test this code on Ubuntu Server, Ubuntu Snappy Core
+# and Ubuntu Phone.
+#
+# TODO - Our Ubuntu build is only working for amd64 and i386 processors.
+# It would be good to add armel, armhf and arm64.
+# See https://github.com/ethereum/webthree-umbrella/issues/228.
+#------------------------------------------------------------------------------
+
+ Ubuntu)
+ #Ubuntu
+ case $(lsb_release -cs) in
+ trusty)
+ #trusty
+ echo "Installing solidity dependencies on Ubuntu Trusty Tahr (14.04)."
+ ;;
+ utopic)
+ #utopic
+ echo "Installing solidity dependencies on Ubuntu Utopic Unicorn (14.10)."
+ ;;
+ vivid)
+ #vivid
+ echo "Installing solidity dependencies on Ubuntu Vivid Vervet (15.04)."
+ ;;
+ wily)
+ #wily
+ echo "Installing solidity dependencies on Ubuntu Wily Werewolf (15.10)."
+ ;;
+ xenial)
+ #xenial
+ echo "Installing solidity dependencies on Ubuntu Xenial Xerus (16.04)."
+ ;;
+ yakkety)
+ #yakkety
+ echo "Installing solidity dependencies on Ubuntu Yakkety Yak (16.10)."
+ echo ""
+ echo "NOTE - You are in unknown territory with this preview OS."
+ echo "We will need to update the Ethereum PPAs, work through build and runtime breaks, etc."
+ echo "See https://github.com/ethereum/webthree-umbrella/issues/624."
+ echo "If you would like to partner with us to work through these, that"
+ echo "would be fantastic. Please just comment on that issue. Thanks!"
+ ;;
+ *)
+ #other Ubuntu
+ echo "ERROR - Unknown or unsupported Ubuntu version (" $(lsb_release -cs) ")"
+ echo "We only support Trusty, Utopic, Vivid, Wily and Xenial, with work-in-progress on Yakkety."
+ exit 1
+ ;;
+ esac
+
+ sudo apt-get -y update
+ sudo apt-get -y install \
+ python-sphinx \
+ build-essential \
+ cmake \
+ git \
+ libboost-all-dev \
+ libjsoncpp-dev
+
+ # Install 'eth', for use in the Solidity Tests-over-IPC.
+ sudo add-apt-repository -y ppa:ethereum/ethereum
+ sudo add-apt-repository -y ppa:ethereum/ethereum-dev
+ sudo apt-get -y update
+ sudo apt-get -y install eth
+
+ # And install the English language package and reconfigure the locales.
+ # We really shouldn't need to do this, and should instead force our locales to "C"
+ # within our application runtimes, because this issue shows up on multiple Linux distros,
+ # and each will need fixing in the install steps, where we should really just fix it once
+ # in the code.
+ #
+ # See https://github.com/ethereum/webthree-umbrella/issues/169
+ sudo apt-get -y install language-pack-en-base
+ sudo dpkg-reconfigure locales
+
+ ;;
+ *)
+
+#------------------------------------------------------------------------------
+# Other (unknown) Linux
+# Major and medium distros which we are missing would include Mint, CentOS,
+# RHEL, Raspbian, Cygwin, OpenWrt, gNewSense, Trisquel and SteamOS.
+#------------------------------------------------------------------------------
+
+ #other Linux
+ echo "ERROR - Unsupported or unidentified Linux distro."
+ echo "See http://solidity.readthedocs.io/en/latest/installing-solidity.html for manual instructions."
+ echo "If you would like to get your distro working, that would be fantastic."
+ echo "Drop us a message at https://gitter.im/ethereum/solidity."
+ exit 1
+ ;;
+ esac
+ ;;
+
+#------------------------------------------------------------------------------
+# Other platform (not Linux, FreeBSD or macOS).
+# Not sure what might end up here?
+# Maybe OpenBSD, NetBSD, AIX, Solaris, HP-UX?
+#------------------------------------------------------------------------------
+
+ *)
+ #other
+ echo "ERROR - Unsupported or unidentified operating system."
+ echo "See http://solidity.readthedocs.io/en/latest/installing-solidity.html for manual instructions."
+ echo "If you would like to get your operating system working, that would be fantastic."
+ echo "Drop us a message at https://gitter.im/ethereum/solidity."
+ ;;
+esac
diff --git a/scripts/release.bat b/scripts/release.bat
new file mode 100644
index 00000000..6f0ef6b0
--- /dev/null
+++ b/scripts/release.bat
@@ -0,0 +1,34 @@
+@ECHO OFF
+
+REM ---------------------------------------------------------------------------
+REM Batch file for implementing release flow for solidity for Windows.
+REM
+REM The documentation for solidity is hosted at:
+REM
+REM https://solidity.readthedocs.org
+REM
+REM ---------------------------------------------------------------------------
+REM This file is part of solidity.
+REM
+REM solidity is free software: you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation, either version 3 of the License, or
+REM (at your option) any later version.
+REM
+REM solidity is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with solidity. If not, see <http://www.gnu.org/licenses/>
+REM
+REM Copyright (c) 2016 solidity contributors.
+REM ---------------------------------------------------------------------------
+
+set CONFIGURATION=%1
+
+REM TODO - Add soltest\%CONFIGURATION%\soltest.exe, when that is buildable.
+7z a solidity-develop-windows.zip ^
+ .\build\solc\%CONFIGURATION%\solc.exe ^
+ "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvc*.dll"
diff --git a/scripts/release.sh b/scripts/release.sh
new file mode 100755
index 00000000..275e53bb
--- /dev/null
+++ b/scripts/release.sh
@@ -0,0 +1,92 @@
+#!/usr/bin/env bash
+
+#------------------------------------------------------------------------------
+# Bash script implementing release flow for solidity for Linux and macOS.
+#
+# TODO - At the time of writing, we only have ZIPs working. Need to hook up
+# support for Homebrew and PPAs.
+#
+# The documentation for solidity is hosted at:
+#
+# https://solidity.readthedocs.org
+#
+# ------------------------------------------------------------------------------
+# This file is part of solidity.
+#
+# solidity is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# solidity is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with solidity. If not, see <http://www.gnu.org/licenses/>
+#
+# (c) 2016 solidity contributors.
+#------------------------------------------------------------------------------
+
+ZIP_SUFFIX=$1
+ZIP_TEMP_DIR=$(pwd)/build/zip/
+
+# There is an implicit assumption here that we HAVE to run from root directory.
+REPO_ROOT=$(pwd)
+
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ DLL_EXT=dylib
+else
+ DLL_EXT=so
+fi
+
+mkdir -p $ZIP_TEMP_DIR
+
+# Copy all the solidity executables into a temporary directory prior to ZIP creation
+
+cp $REPO_ROOT/build/lllc/lllc $ZIP_TEMP_DIR
+cp $REPO_ROOT/build/solc/solc $ZIP_TEMP_DIR
+cp $REPO_ROOT/build/soltest/soltest $ZIP_TEMP_DIR
+
+# Copy all the dynamic libraries into a temporary directory prior to ZIP creation.
+# There are a lot of these, and it would be great if we didn't have to worry about them.
+# There is work-in-progress to support static-linkage on the UNIX platforms, which
+# is most promising on Alpine Linux using musl. macOS doesn't support statically
+# linked binaries (ie. executables which make direct system calls to the kernel.
+#
+# See https://developer.apple.com/library/mac/qa/qa1118/_index.html.
+# See https://github.com/ethereum/webthree-umbrella/issues/495.
+
+cp $REPO_ROOT/build/libdevcore/*.$DLL_EXT $ZIP_TEMP_DIR
+cp $REPO_ROOT/build/libevmasm/*.$DLL_EXT $ZIP_TEMP_DIR
+cp $REPO_ROOT/build/libsolidity/*.$DLL_EXT $ZIP_TEMP_DIR
+
+# For macOS, we also copy the dynamic libraries for our external dependencies.
+# When building from source on your own machine, these libraries will be installed
+# globally, using Homebrew, but we don't want to rely on that for these ZIPs, so
+# we copy these into the ZIP temporary directory too.
+#
+# TODO - So what happens for Linux and other UNIX distros in this case?
+# There will be runtime dependencies on equivalent SO files being present, likely in
+# a completely analogous way. Does that mean that ZIPs are actually useless on such
+# distros, because there will be symbol links to global install locations (distro-specific)
+# and those files will just be missing on the target machines?
+
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ cp /usr/local/opt/jsoncpp/lib/libjsoncpp.1.dylib $ZIP_TEMP_DIR
+fi
+
+# For macOS, we run a fix-up script which alters all of the symbolic links within
+# the executables and dynamic libraries such that the ZIP becomes self-contained, by
+# revectoring all the dylib references to be relative to the directory containing the
+# application, so that the ZIPs are self-contained, with the only external references
+# being for kernel-level dylibs.
+
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ python $REPO_ROOT/scripts/fix_homebrew_paths_in_standalone_zip.py $ZIP_TEMP_DIR
+fi
+
+# And ZIP it all up, with a filename suffix passed in on the command-line.
+
+zip -j $REPO_ROOT/solidity-develop-$ZIP_SUFFIX.zip $ZIP_TEMP_DIR/*
diff --git a/scripts/release_emscripten.sh b/scripts/release_emscripten.sh
new file mode 100755
index 00000000..8db9a049
--- /dev/null
+++ b/scripts/release_emscripten.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+#------------------------------------------------------------------------------
+# Bash script which calls the Emscripten "publish binary" script on Ubuntu
+# and does nothing on macOS. We should probably merge these two scripts in
+# the near future.
+#
+# The documentation for solidity is hosted at:
+#
+# https://solidity.readthedocs.org
+#
+# ------------------------------------------------------------------------------
+# This file is part of solidity.
+#
+# solidity is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# solidity is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with solidity. If not, see <http://www.gnu.org/licenses/>
+#
+# (c) 2016 solidity contributors.
+#------------------------------------------------------------------------------
+
+if [[ "$OSTYPE" != "darwin"* ]]; then
+ ./scripts/travis-emscripten/publish_binary.sh
+fi
diff --git a/scripts/release_ppa.sh b/scripts/release_ppa.sh
new file mode 100755
index 00000000..2fd286fd
--- /dev/null
+++ b/scripts/release_ppa.sh
@@ -0,0 +1,241 @@
+#!/usr/bin/env bash
+##############################################################################
+## This is used to package .deb packages and upload them to the launchpad
+## ppa servers for building.
+##
+## If no argument is given, creates a package for the develop branch
+## and uploads it to the ethereum/ethereum-dev ppa.
+##
+## If an argument is given, it is used as a tag and the resulting package
+## is uploaded to the ethereum/ethereum ppa.
+##
+## The gnupg key for "builds@ethereum.org" has to be present in order to sign
+## the package.
+##
+## It will clone the Solidity git from github, determine the version,
+## create a source archive and push it to the ubuntu ppa servers.
+##
+##############################################################################
+
+set -ev
+
+if [ -z "$1" ]
+then
+ branch=develop
+else
+ branch=$1
+fi
+
+if [ "$branch" = develop ]
+then
+ pparepo=ethereum/ethereum-dev
+ ppafilesurl=https://launchpad.net/~ethereum/+archive/ubuntu/ethereum-dev/+files
+else
+ pparepo=ethereum/ethereum
+ ppafilesurl=https://launchpad.net/~ethereum/+archive/ubuntu/ethereum/+files
+fi
+
+keyid=703F83D0
+email=builds@ethereum.org
+packagename=solc
+
+for distribution in trusty vivid wily xenial yakkety
+do
+cd /tmp/
+mkdir $distribution
+cd $distribution
+
+# Fetch source
+git clone --recursive https://github.com/ethereum/solidity.git -b "$branch"
+mv solidity solc
+
+# Determine version
+cd solc
+version=`grep -oP "PROJECT_VERSION \"?\K[0-9.]+(?=\")"? CMakeLists.txt`
+commithash=`git rev-parse --short HEAD`
+committimestamp=`git show --format=%ci HEAD | head -n 1`
+commitdate=`git show --format=%ci HEAD | head -n 1 | cut - -b1-10`
+
+# TODO store the commit hash in a file so that the build info mechanism can pick it up even without git
+
+if [ $branch = develop ]
+then
+ debversion="$version-nightly-$commitdate-$commithash"
+else
+ debversion="$version"
+fi
+
+# gzip will create different tars all the time and we are not allowed
+# to upload the same file twice with different contents, so we only
+# create it once.
+if [ ! -e /tmp/${packagename}_${debversion}.orig.tar.gz ]
+then
+ tar --exclude .git -czf /tmp/${packagename}_${debversion}.orig.tar.gz .
+fi
+cp /tmp/${packagename}_${debversion}.orig.tar.gz ../
+
+# Create debian package information
+
+case $distribution in
+ trusty)
+ jsoncpplib=libjsoncpp0
+ ;;
+ vivid)
+ jsoncpplib=libjsoncpp0
+ ;;
+ wily)
+ jsoncpplib=libjsoncpp0v5
+ ;;
+ *)
+ jsoncpplib=libjsoncpp1
+ ;;
+esac
+
+mkdir debian
+echo 9 > debian/compat
+cat <<EOF > debian/control
+Source: solc
+Section: science
+Priority: extra
+Maintainer: Christian (Buildserver key) <builds@ethereum.org>
+Build-Depends: debhelper (>= 9.0.0),
+ libcryptopp-dev,
+ cmake,
+ g++-4.8,
+ git,
+ libgmp-dev,
+ libboost-all-dev,
+ automake,
+ libtool,
+ scons,
+ libjsoncpp-dev
+Standards-Version: 3.9.5
+Homepage: https://ethereum.org
+Vcs-Git: git://github.com/ethereum/solidity.git
+Vcs-Browser: https://github.com/ethereum/solidity
+
+Package: solc
+Architecture: any-i386 any-amd64
+Multi-Arch: same
+Depends: \${shlibs:Depends}, \${misc:Depends}, $jsoncpplib
+Replaces: lllc (<< 1:0.3.6)
+Conflicts: libethereum (<= 1.2.9)
+Description: Solidity compiler.
+ The commandline interface to the Solidity smart contract compiler.
+EOF
+cat <<EOF > debian/rules
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+#
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets by Bill Allombert 2001
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+
+%:
+ dh \$@ --buildsystem=cmake #--with sphinxdoc
+
+override_dh_auto_test:
+
+#override_dh_installdocs:
+# make -C docs html
+# dh_installdocs docs/_build/html
+
+override_dh_shlibdeps:
+ dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
+EOF
+cat <<EOF > debian/copyright
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: solc
+Source: https://github.com/ethereum/solidity
+
+Files: *
+Copyright: 2014-2016 Ethereum
+License: GPL-3.0+
+
+Files: debian/*
+Copyright: 2016 Ethereum
+License: GPL-3.0+
+
+License: GPL-3.0+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
+EOF
+cat <<EOF > debian/changelog
+solc (0.0.1-0ubuntu1) saucy; urgency=low
+
+ * Initial release.
+
+ -- Christian <build@ethereum.org> Mon, 03 Feb 2016 14:50:20 +0000
+EOF
+echo docs > debian/docs
+mkdir debian/source
+echo "3.0 (quilt)" > debian/source/format
+chmod +x debian/rules
+
+versionsuffix=0ubuntu1~${distribution}
+# bump version / add entry to changelog
+EMAIL="$email" dch -v 1:${debversion}-${versionsuffix} "git build of ${commithash}"
+
+
+# build source package
+# If packages is rejected because original source is already present, add
+# -sd to remove it from the .changes file
+debuild -S -sa -us -uc
+
+# prepare .changes file for Launchpad
+sed -i -e s/UNRELEASED/${distribution}/ -e s/urgency=medium/urgency=low/ ../*.changes
+
+# check if ubuntu already has the source tarball
+(
+cd ..
+orig=${packagename}_${debversion}.orig.tar.gz
+orig_size=$(ls -l $orig | cut -d ' ' -f 5)
+orig_sha1=$(sha1sum $orig | cut -d ' ' -f 1)
+orig_sha256=$(sha256sum $orig | cut -d ' ' -f 1)
+orig_md5=$(md5sum $orig | cut -d ' ' -f 1)
+
+if wget --quiet -O $orig-tmp "$ppafilesurl/$orig"
+then
+ echo "[WARN] Original tarball found in Ubuntu archive, using it instead"
+ mv $orig-tmp $orig
+ new_size=$(ls -l *.orig.tar.gz | cut -d ' ' -f 5)
+ new_sha1=$(sha1sum $orig | cut -d ' ' -f 1)
+ new_sha256=$(sha256sum $orig | cut -d ' ' -f 1)
+ new_md5=$(md5sum $orig | cut -d ' ' -f 1)
+ sed -i -e s,$orig_sha1,$new_sha1,g -e s,$orig_sha256,$new_sha256,g -e s,$orig_size,$new_size,g -e s,$orig_md5,$new_md5,g *.dsc
+ sed -i -e s,$orig_sha1,$new_sha1,g -e s,$orig_sha256,$new_sha256,g -e s,$orig_size,$new_size,g -e s,$orig_md5,$new_md5,g *.changes
+fi
+)
+
+# sign the package
+debsign --re-sign -k ${keyid} ../${packagename}_${debversion}-${versionsuffix}_source.changes
+
+# upload
+dput ppa:${pparepo} ../${packagename}_${debversion}-${versionsuffix}_source.changes
+
+done
diff --git a/scripts/tests.sh b/scripts/tests.sh
new file mode 100755
index 00000000..5c482d3d
--- /dev/null
+++ b/scripts/tests.sh
@@ -0,0 +1,61 @@
+#!/usr/bin/env bash
+
+#------------------------------------------------------------------------------
+# Bash script to execute the Solidity tests.
+#
+# The documentation for solidity is hosted at:
+#
+# https://solidity.readthedocs.org
+#
+# ------------------------------------------------------------------------------
+# This file is part of solidity.
+#
+# solidity is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# solidity is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with solidity. If not, see <http://www.gnu.org/licenses/>
+#
+# (c) 2016 solidity contributors.
+#------------------------------------------------------------------------------
+
+set -e
+
+# There is an implicit assumption here that we HAVE to run from root directory.
+REPO_ROOT=$(pwd)
+
+# This conditional is only needed because we don't have a working Homebrew
+# install for `eth` at the time of writing, so we unzip the ZIP file locally
+# instead. This will go away soon.
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ ETH_PATH="$REPO_ROOT/eth"
+else
+ ETH_PATH="eth"
+fi
+
+# This trailing ampersand directs the shell to run the command in the background,
+# that is, it is forked and run in a separate sub-shell, as a job,
+# asynchronously. The shell will immediately return the return status of 0 for
+# true and continue as normal, either processing further commands in a script
+# or returning the cursor focus back to the user in a Linux terminal.
+$ETH_PATH --test -d /tmp/test &
+
+# Wait until the IPC endpoint is available. That won't be available instantly.
+# The node needs to get a little way into its startup sequence before the IPC
+# is available and is ready for the unit-tests to start talking to it.
+while [ ! -S /tmp/test/geth.ipc ]; do sleep 2; done
+
+# And then run the Solidity unit-tests, pointing to that IPC endpoint.
+"$REPO_ROOT"/build/test/soltest --ipc /tmp/test/geth.ipc
+ERROR_CODE=$?
+pkill eth || true
+sleep 4
+pgrep eth && pkill -9 eth || true
+exit $ERROR_CODE
diff --git a/scripts/travis-emscripten/build_emscripten.sh b/scripts/travis-emscripten/build_emscripten.sh
new file mode 100755
index 00000000..285c6338
--- /dev/null
+++ b/scripts/travis-emscripten/build_emscripten.sh
@@ -0,0 +1,128 @@
+#!/usr/bin/env bash
+
+#------------------------------------------------------------------------------
+# This script builds the solidity binary using Emscripten.
+# Emscripten is a way to compile C/C++ to JavaScript.
+#
+# http://kripken.github.io/emscripten-site/
+#
+# First run install_dep.sh OUTSIDE of docker and then
+# run this script inside a docker image trzeci/emscripten
+#
+# The documentation for solidity is hosted at:
+#
+# http://solidity.readthedocs.io/
+#
+# ------------------------------------------------------------------------------
+# This file is part of solidity.
+#
+# solidity is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# solidity is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with solidity. If not, see <http://www.gnu.org/licenses/>
+#
+# (c) 2016 solidity contributors.
+#------------------------------------------------------------------------------
+
+set -ev
+
+# We need git for extracting the commit hash
+apt-get update
+apt-get -y install git-core
+
+export WORKSPACE=/src
+
+# CryptoPP
+echo -en 'travis_fold:start:compiling_cryptopp\\r'
+cd "$WORKSPACE/cryptopp"
+# if .git exists, it is a fresh checkout, otherwise it comes from the cache
+# and is already compiled
+test -e .git && (
+emcmake cmake -DCRYPTOPP_LIBRARY_TYPE=STATIC -DCRYPTOPP_RUNTIME_TYPE=STATIC && emmake make -j 4
+ln -s . src/cryptopp || true
+rm -rf .git
+)
+echo -en 'travis_fold:end:compiling_cryptopp\\r'
+
+# Json-CPP
+echo -en 'travis_fold:start:compiling_jsoncpp\\r'
+cd "$WORKSPACE/jsoncpp"
+# if .git exists, it is a fresh checkout, otherwise it comes from the cache
+# and is already compiled
+test -e .git && (
+emcmake cmake -DJSONCPP_LIB_BUILD_STATIC=ON -DJSONCPP_LIB_BUILD_SHARED=OFF \
+ -DJSONCPP_WITH_TESTS=OFF -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF \
+ -G "Unix Makefiles" .
+emmake make -j 4
+rm -rf .git
+)
+echo -en 'travis_fold:end:compiling_jsoncpp\\r'
+
+# Boost
+echo -en 'travis_fold:start:compiling_boost\\r'
+cd "$WORKSPACE"/boost_1_57_0
+# if b2 exists, it is a fresh checkout, otherwise it comes from the cache
+# and is already compiled
+test -e b2 && (
+sed -i 's|using gcc ;|using gcc : : /usr/local/bin/em++ ;|g' ./project-config.jam
+sed -i 's|$(archiver\[1\])|/usr/local/bin/emar|g' ./tools/build/src/tools/gcc.jam
+sed -i 's|$(ranlib\[1\])|/usr/local/bin/emranlib|g' ./tools/build/src/tools/gcc.jam
+./b2 link=static variant=release threading=single runtime-link=static \
+ thread system regex date_time chrono filesystem unit_test_framework program_options random
+find . -name 'libboost*.a' -exec cp {} . \;
+rm -rf b2 libs doc tools more bin.v2 status
+)
+echo -en 'travis_fold:end:compiling_boost\\r'
+
+# Build dependent components and solidity itself
+echo -en 'travis_fold:start:compiling_solidity\\r'
+cd $WORKSPACE
+mkdir -p build
+cd build
+emcmake cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DEMSCRIPTEN=1 \
+ -DBoost_FOUND=1 \
+ -DBoost_USE_STATIC_LIBS=1 \
+ -DBoost_USE_STATIC_RUNTIME=1 \
+ -DBoost_INCLUDE_DIR="$WORKSPACE"/boost_1_57_0/ \
+ -DBoost_CHRONO_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_chrono.a \
+ -DBoost_CHRONO_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_chrono.a \
+ -DBoost_DATE_TIME_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_date_time.a \
+ -DBoost_DATE_TIME_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_date_time.a \
+ -DBoost_FILESYSTEM_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_filesystem.a \
+ -DBoost_FILESYSTEM_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_filesystem.a \
+ -DBoost_PROGRAM_OPTIONS_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_program_options.a \
+ -DBoost_PROGRAM_OPTIONS_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_program_options.a \
+ -DBoost_RANDOM_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_random.a \
+ -DBoost_RANDOM_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_random.a \
+ -DBoost_REGEX_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_regex.a \
+ -DBoost_REGEX_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_regex.a \
+ -DBoost_SYSTEM_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_system.a \
+ -DBoost_SYSTEM_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_system.a \
+ -DBoost_THREAD_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_thread.a \
+ -DBoost_THREAD_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_thread.a \
+ -DBoost_UNIT_TEST_FRAMEWORK_LIBRARY="$WORKSPACE"/boost_1_57_0/libboost_unit_test_framework.a \
+ -DBoost_UNIT_TEST_FRAMEWORK_LIBRARIES="$WORKSPACE"/boost_1_57_0/libboost_unit_test_framework.a \
+ -DJSONCPP_LIBRARY="$WORKSPACE"/jsoncpp/src/lib_json/libjsoncpp.a \
+ -DJSONCPP_INCLUDE_DIR="$WORKSPACE"/jsoncpp/include/ \
+ -DCRYPTOPP_LIBRARY="$WORKSPACE"/cryptopp/src/libcryptlib.a \
+ -DCRYPTOPP_INCLUDE_DIR="$WORKSPACE"/cryptopp/src/ \
+ -DDev_DEVCORE_LIBRARY="$WORKSPACE"/solidity/build/libdevcore/libsoldevcore.a \
+ -DEth_EVMASM_LIBRARY="$WORKSPACE"/solidity/build/libevmasm/libsolevmasm.a \
+ -DETH_STATIC=1 -DTESTS=0 \
+ ..
+emmake make -j 4
+
+cd ..
+cp build/solc/soljson.js ./
+
+echo -en 'travis_fold:end:compiling_solidity\\r'
diff --git a/scripts/travis-emscripten/deploy_key.enc b/scripts/travis-emscripten/deploy_key.enc
new file mode 100644
index 00000000..e6e9e0e6
--- /dev/null
+++ b/scripts/travis-emscripten/deploy_key.enc
Binary files differ
diff --git a/scripts/travis-emscripten/install_deps.sh b/scripts/travis-emscripten/install_deps.sh
new file mode 100755
index 00000000..2c0e9f26
--- /dev/null
+++ b/scripts/travis-emscripten/install_deps.sh
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+
+#------------------------------------------------------------------------------
+# Bash script for installing pre-requisite packages for building solidity
+# using Emscripten on Ubuntu Trusty.
+#
+# The documentation for solidity is hosted at:
+#
+# http://solidity.readthedocs.io/
+#
+# ------------------------------------------------------------------------------
+# This file is part of solidity.
+#
+# solidity is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# solidity is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with solidity. If not, see <http://www.gnu.org/licenses/>
+#
+# (c) 2016 solidity contributors.
+#------------------------------------------------------------------------------
+
+set -ev
+
+echo -en 'travis_fold:start:installing_dependencies\\r'
+test -e cryptopp -a -e cryptopp/src || git clone https://github.com/mmoss/cryptopp.git
+test -e jsoncpp -a -e jsoncpp/include || git clone https://github.com/open-source-parsers/jsoncpp.git
+test -e boost_1_57_0 -a -e boost_1_57_0/boost || (
+wget 'http://downloads.sourceforge.net/project/boost/boost/'\
+'1.57.0/boost_1_57_0.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2F'\
+'projects%2Fboost%2Ffiles%2Fboost%2F1.57.0%2F&ts=1421887207'\
+ -O - | tar xj
+cd boost_1_57_0
+./bootstrap.sh --with-toolset=gcc --with-libraries=thread,system,regex,date_time,chrono,filesystem,program_options,random
+)
+cd ..
+echo -en 'travis_fold:end:installing_dependencies\\r'
diff --git a/scripts/travis-emscripten/publish_binary.sh b/scripts/travis-emscripten/publish_binary.sh
new file mode 100755
index 00000000..a62d4b47
--- /dev/null
+++ b/scripts/travis-emscripten/publish_binary.sh
@@ -0,0 +1,70 @@
+#!/usr/bin/env bash
+
+#------------------------------------------------------------------------------
+# Bash script for publishing Solidity Emscripten binaries to Github.
+#
+# The results are committed to https://github.com/ethereum/solc-bin.
+#
+# The documentation for solidity is hosted at:
+#
+# http://solidity.readthedocs.io/
+#
+# ------------------------------------------------------------------------------
+# This file is part of solidity.
+#
+# solidity is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# solidity is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with solidity. If not, see <http://www.gnu.org/licenses/>
+#
+# (c) 2016 solidity contributors.
+#------------------------------------------------------------------------------
+
+set -e
+
+VER=$(cat CMakeLists.txt | grep 'set(PROJECT_VERSION' | sed -e 's/.*set(PROJECT_VERSION "\(.*\)".*/\1/')
+test -n "$VER"
+VER="v$VER"
+COMMIT=$(git rev-parse --short HEAD)
+DATE=$(date --date="$(git log -1 --date=iso --format=%ad HEAD)" --utc +%F)
+
+ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
+ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
+ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
+ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
+openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in scripts/travis-emscripten/deploy_key.enc -out deploy_key -d
+chmod 600 deploy_key
+eval `ssh-agent -s`
+ssh-add deploy_key
+
+git clone --depth 2 git@github.com:ethereum/solc-bin.git
+cd solc-bin
+git config user.name "travis"
+git config user.email "chris@ethereum.org"
+git checkout -B gh-pages origin/gh-pages
+git clean -f -d -x
+# We only want one release per day and we do not want to push the same commit twice.
+if ls ./bin/soljson-"$VER-$DATE"-*.js ./bin/soljson-*-"$COMMIT.js" > /dev/null
+then
+ true
+else
+ # This file is assumed to be the product of the build_emscripten.sh script.
+ cp ../soljson.js ./bin/"soljson-$VER-$DATE-$COMMIT.js"
+ ./update-index.sh
+ cd bin
+ LATEST=$(ls -r soljson-v* | head -n 1)
+ cp "$LATEST" soljson-latest.js
+ cp soljson-latest.js ../soljson.js
+ git add .
+ git add ../soljson.js
+ git commit -m "Added compiler version $LATEST"
+ git push origin gh-pages
+fi