Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Compiling

Symeon Huang edited this page Jan 11, 2018 · 19 revisions

Dependencies

  • Qt >= 5.5
  • Botan-2 >= 2.3.0
    • Or Botan-1.10 (Not recommended)
  • CMake >= 3.1
  • A C++ Compiler that supports C++14 features (i.e. GCC >= 4.9)

Building

Building on GNU/Linux

Download and extract the latest source code tarball from release (DON'T use master branch code in production environment beacause it's always under development. You may be able to use stable branch if you wish so)

mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make -j4
sudo make install

The above procedures will compile and install both libQtShadowsocks and shadowsocks-libQtShadowsocks. If you're a packager, you might need to split it into two or three packages depending on your distribution's guidelines.

Botan-1.10 vs Botan-2

libQtShadowsocks is compiled against Botan-1.10 by default, to use Botan-2, you need to pass an additional argument -DUSE_BOTAN2=ON to cmake command.

Building on Microsoft Windows w/ MSYS2 MinGW

Setup Environment

pacman -Syu mingw-w64-x86_64-qt5 mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake

botan-2 needs to be manually compiled:

./configure.py --prefix=/mingw64 --disable-modules=tls --os=mingw --without-stack-protector
make -j4
make install

libQtShadowsocks Installation

mkdir build && cd build
cmake -G "MSYS Makefiles" .. -DUSE_BOTAN2=ON -DCMAKE_INSTALL_PREFIX=/mingw64
make -j4
make install

Building on macOS

Requirements

Setup Environment

Install Qt and other dependencies if you don't have them installed.

brew update
brew install qt5 botan

libQtShadowsocks Installation

mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local
make all
make install