Skip to content

Latest commit

 

History

History
110 lines (74 loc) · 3.12 KB

installing.md

File metadata and controls

110 lines (74 loc) · 3.12 KB

#Installing

First install the following components (if you have not yet):
  • XCode 7.2 or higher
  • Homebrew the latest available version
  • Command Line tools: run xcode-select --install in terminal
Run the following in terminal:
brew tap crossroadlabs/tap
brew install swift-express
First install the following components (if you have not yet):
apt-get install clang binutils libicu-dev
  • Swift, the latest development snapshot from here
    • You should have swift at least of 25.02.2016
    • Installation instructions are here
  • Dependency libraries:

If you are using Ubuntu 15.10, you are lucky. Skip the following step. If you are on Ubuntu 14.04 you need to add our repo to your apt:

sudo add-apt-repository ppa:swiftexpress/swiftexpress
sudo apt-get update

Following is common for both Ubuntu 14.04 and Ubuntu 15.10:

sudo apt-get install libevhtp-dev libevent-dev libssl-dev git
We have not ported our command line tools to Linux yet, so either generate project on OS X and then use it or use this temporary script:
TBD
# download the script

Installing Dispatch on Linux

Dispatch is not available as a prebuilt package yet, so we have to build it from sources:

  • Install prerequisites:
sudo apt-get install autoconf libtool pkg-config systemtap-sdt-dev libblocksruntime-dev libkqueue-dev libbsd-dev git make
  • Clone dispatch repository and get into it:
git clone https://github.com/apple/swift-corelibs-libdispatch.git
cd swift-corelibs-libdispatch
  • Initialize submodules:
git submodule init
git submodule update
  • Generate build toolset:
sh ./autogen.sh
  • Configure build:
./configure --with-swift-toolchain=<path-to-swift>/usr --prefix=<path-to-swift>/usr

path-to-swift whould point exactly to your swift distribution. Pay attension that you have to put /usr after it.

  • Build:
make
  • Install (Don't worry, it will NOT install system wide)
make install

Next tutorial: Hello Express