Installation¶
Scapi is simple enough to install, the installation varies on different operating systems. Scapi currently supports Linux, Mac OS X, and Windows.
Prerequisites on Linux¶
There are a few prerequisites you must install before being able to compile scapi on your machine.
- Install git
- Install java, junit4, and ant
- Install the gcc compiler environment: gcc, make, ar, ld, etc. Under Ubuntu you can simply run sudo apt-get install build-essential.
On Ubuntu environment is should look like:
$ sudo apt-get update
$ sudo apt-get install git
$ sudo apt-get install default-jre
$ sudo apt-get install default-jdk
$ sudo apt-get install build-essential
$ sudo apt-get install ant
$ sudo apt-get install junit4
Note
Notice that scapi should compile with gcc 4.7 or higher (if you also compile the c++ version - see specific instruction in c++ section)
Prerequisites on Mac OS X¶
On Mac OS X, git is usually preinstalled, and so are java and the gcc compiler environment. However, ant is not preinstalled, and you must install it via homebrew:
$ brew install ant
Prerequisites OS X 10.9 (Mavericks) and above¶
Starting in OS X Mavericks, apple has switched the default compiler from gcc to clang. Since Scapi’s buildsystem is based on gcc, you must install gcc manually using homebrew:
$ brew tap homebrew/versions
$ brew install gcc49
Note
Homebrew compiles gcc from source, and it can take a lot of time (usually around 20-50 minutes). DO NOT stop the shell process even though it seems to be stuck, it’s not stuck.
Installing Scapi from Source (On UNIX-based Operating Systems)¶
In order to install scapi:
$ git clone git://github.com/cryptobiu/scapi.git
$ cd scapi
$ git submodule init
$ git submodule update
$ sudo make prefix=/usr
$ sudo make install prefix=/usr
In case you want to install the latest java build as well and not use the pre-compiled header:
$ sudo make compile-scapi
Note
Seems that JDK 1.8 introduced a change of behavior regarding JNI include file locations. Details on the problem and workaround can be found in the following link: jdk-1-8-on-linux
Instructions for Windows¶
We currently do not have a makefile for windows, but we intend to add one in the near future.
In order to use SCAPI on windows, we included precompiled assets on the assets/ dir.
Needed Files¶
- ScapiWin-{version}.jar (Scapi)
- bcprov-{version}.jar (Bouncy Castle)
- commons-exec-{version}.jar (Apache Commons utilities)
- activemq-all-{version}.jar (Apache ActiveMQ ™ is an open source messaging and Integration Patterns server)
- Precompiled DLLs under win32Dlls (for 32-bit windows) or under x64Dlls (for 64-bit windows)
- msvcp100.dll, msvcr100.dll, msvcp120.dll and msvcr120.dll(Microsoft DLLs used by the native code)
In order to install SCAPI¶
On Eclipse:
- Configure build path: go to Libraries tab, and add external JARS.
- Add ScapiWin-{version}.jar.
- Add bcprov-{version}.jar.
- Add commons-exec-{version}.jar.
- Add activemq-all-{version}.jar
- Configure build path: go to Source tab and locate the Native Library Location section.
- Add the lib folder where you have the precompiled DLLs (assets/win32Dlls or assets/x64Dlls).
- Place the msvcp100.dll and msvcr100.dll in [C:]WindowsSystem32 folder if they are missing there.