diff --git a/docs/Install.linux b/docs/Install.linux index fdb10a8e..a943ae02 100644 --- a/docs/Install.linux +++ b/docs/Install.linux @@ -1,115 +1,122 @@ SIP SIMPLE SDK installation on Linux ------------------------------------ -Home page: http://sipsimpleclient.org +http://sipsimpleclient.org -This document described the installation procedure on -Linux operating systems. +This document described the installation procedure on Linux operating systems. Step 1. Prerequisites --------------------- Install the C compiling environment, Python3 and the development version for the following packages: * openssl * ffmpeg Step 2. Install system dependencies ----------------------------------- SIP SIMPLE SDK depends upon the following third party sources: - PJSIP base revision 210 from 2020-02-14 https://github.com/pjsip/pjproject/archive/2.10.tar.gz - ZRTP tag 6b3cd8e6783642292bad0c21e3e5e5ce45ff3e03 https://github.com/wernerd/ZRTPCPP.git - Fetch and patch the dependencies using ./get_dependencies.sh script See Dependencies.txt for detailed description of the required libraries and their minimum version number. Use the appropriate package manager for your Linux distribution to install the following packages, notice the minimum version numbers. Using pip3 inside your user environment: pip3 install --user cython==0.29.37 dnspython lxml twisted python-dateutil \ greenlet zope.interface requests gmpy2 wheel gevent Step 3. Install AG Projects dependencies ---------------------------------------- - python3-application - python3-eventlib - python3-gnutls - python3-otr - python3-msrplib - python3-xcaplib For each of them, in the exact order as listed above, retrieve the packages -as follows: +using one of the following methods: Using darcs: darcs clone http://devel.ag-projects.com/repositories/PROJECT replace PROJECT with each of the names above +Using git: + +git clone https://github.com/AGProjects/PROJECT + +replace PROJECT with each of the names above + As tar archives from: http://download.ag-projects.com/SipSimpleSDK/Python3/ Install these packages by going into each directory. -Using pip3 inside your user environment: +Install the software inside your user environment: pip3 install --user . -System-wide using setup.py: +Install system-wide using setup.py: sudo python3 setup.py install -As a debian package: +Build a debian package, check if makedeb.sh exists and run it for each project: ./makedeb.sh The debian package can be found inside ./dist folder +Install the built debian package: + sudo dpkg -i *.deb -Step 4. Install the SDK ------------------------ +Step 4. Install SIP SIMPLE SDK +------------------------------ Using pip3 inside your user environment: pip3 install --user . System-wide using setup.py: sudo python3 setup.py install As a debian package: ./makedeb.sh The debian package can be found inside ./dist folder sudo dpkg -i *.deb -Step 5. Testing the SDK ------------------------ +Step 5. Testing SIP SIMPLE SDK +------------------------------ + +Use the command line tools provided by sipclients3 package. -Use the command line tools provided by sipclients3 package, the executables -start with sip- prefix. +The executables start with sip- prefix. diff --git a/docs/Install.windows b/docs/Install.windows index 45b6d2c3..04878255 100644 --- a/docs/Install.windows +++ b/docs/Install.windows @@ -1,203 +1,159 @@ SIP SIMPLE SDK installation on Microsoft Windows ------------------------------------------------ Home page: http://sipsimpleclient.org This document describes the installation procedure on Microsoft Windows operating systems. Supported versions are Windows XP or higher. Step 1. Prerequisites --------------------- The building process is designed to work with the MSYS2 environment and the MinGW-w64 compiler toolchain. Other approaches might work but they are not tested nor supported. MSYS2: MSYS2 is a minimal Unix-like environment for Windows. It includes a port of the 'pacman' package manager (ported from Arch Linux) and a pretty extensive collection of packages which can be easily installed. It contains packages for the MinGW-w64 toolchain, for 32 and 64 bit architectures. MinGW-w64: MinGW is a minimal compilation toolchain for Windows. It contains GCC and allows for compilation of native applications for Windows. The original MinGW project (available at http://mingw.org, henceforth referred to as 'MinGW32') didn't support 64 bit Windows so the MinGW-w64 project was created. It contains support for both 32 and 64 bit architectures and generally it's better maintained than MinGW32. Step 1.1. Installing MSYS2 and MinGW-w64 ---------------------------------------- The following instructions will guide you through the installation of a MSYS2 and MinGW-w64. * Go to http://msys2.github.io and download the MSYS2 installer * Run it and install it on C:\msys2 (or any other path, but note it has to be ASCII only and with no spaces! The no spaces restriction also applies to the paths of the packages that will be built during the installation) * Upgrade the system packages by following the instructions from: http://msys2.github.io Launch MSYS MINGW64 * Install the compiler toolchain and assorted tools: pacman -S mingw-w64-x86_64-toolchain Step 1.2. Installing Python-PIP ------------------------------- The Python binaries that are available for download on Python's official website are compiled with Visual Studio, and if we use MinGW to compile libraries which are then used by Python modules we are at risk because the resulting application would load 2 different C runtimes. So you should remove python3 if it is installed in Windows. * Install pip/setuptools: pacman -S mingw-w64-x86_64-python3-pip Step 2. Install dependencies ---------------------------- See Dependencies.txt for detailed description of the required libraries and their minimum version number. * Install required dependencies with pacman: pacman -S mingw-w64-x86_64-gnutls mingw-w64-x86_64-python3-lxml \ mingw-w64-x86_64-ffmpeg mingw-w64-x86_64-sqlite3 msys2-w32api-headers \ mingw-w64-x86_64-gmp mingw-w64-x86_64-mpc mingw-w64-x86_64-mpfr * Install the Python package dependencies: pip3 install cython==0.29.37 dnspython twisted python-dateutil greenlet Step 2.1. Install python3-application, python3-gnults and python3-otr --------------------------------------------------------------------- * Install git: pacman -S git * Install python3-application pip3 install git+https://github.com/AGProjects/python3-application.git * Install python3-gnutls: pacman -S mingw-w64-x86_64-python-pyopenssl pip install git+https://github.com/AGProjects/python3-gnutls.git --no-build-isolation * Install cryptography: pacman -S --overwrite '*' mingw-w64-x86_64-python-setuptools-rust patch wget https://mirror.msys2.org/mingw/sources/mingw-w64-python-cryptography-38.0.4-1.src.tar.zst Extract this and cd into the dir: tar --zstd -xvf ./mingw-w64-python-cryptography-38.0.4-1.src.tar.zst cd mingw-w64-python-cryptography makepkg-mingw -cfiL --nocheck --nosign * Install gmpy2: pacman -S mingw-w64-x86_64-python-gmpy2 * Install python3-otr: pip install git+https://github.com/AGProjects/python3-otr.git --no-build-isolation Step 2.2. Build and install some extra packages ----------------------------------------------- mingw-w64-intsafe-headers * Get the package code: darcs get http://devel.ag-projects.com/repositories/windows/mingw-w64-intsafe-headers * Enter the directory and build+install the package: cd mingw-w64-intsafe-headers && makepkg-mingw -cfiL --nocheck --nosign * Install will probably fail, so install with pacman -U --overwrite '*' ./mingw-w64-intsafe-headers-1.1.0-1-any.pkg.tar.zst mingw-w64-dshow-baseclasses * Get the package code: darcs get http://devel.ag-projects.com/repositories/windows/mingw-w64-dshow-baseclasses * Enter the directory and build+install the package: cd mingw-w64-dshow-baseclasses && makepkg-mingw -cfiL --nocheck --nosign Step 3. Install SIP SIMPLE client SDK ------------------------------------- The SDK consists of four parts: 1. python-eventlib 2. XCAP library 3. MSRP library 4. SIP SIMPLE library itself Make sure that the path where you download the software below does not contain any space in its name. # Eventlib - git clone https://github.com/AGProjects/python3-eventlib.git - cd python3-eventlib - - Eventlib needs to be patched: - - diff --git a/eventlib/green/socket.py b/eventlib/green/socket.py - index 7a4623b..0455e2e 100644 - - --- a/eventlib/green/socket.py - +++ b/eventlib/green/socket.py - @@ -1,5 +1,5 @@ - import socket as __socket - -from socket import (__all__, error, AF_INET, AF_UNIX, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR, getdefaulttimeout, gethostname, getnameinfo, getservbyname, herror, htonl, SOCK_DGRAM, timeout, gaierror, SOCK_RAW, setdefaulttimeout, getservbyport, gethostbyaddr, ntohl, htons, ntohs, getfqdn, SOCK_RDM, SOCK_SEQPACKET) - +from socket import (__all__, error, AF_INET, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR, getdefaulttimeout, gethostname, getnameinfo, getservbyname, herror, htonl, SOCK_DGRAM, timeout, gaierror, SOCK_RAW, setdefaulttimeout, getservbyport, gethostbyaddr, ntohl, htons, ntohs, getfqdn, SOCK_RDM, SOCK_SEQPACKET) - - from eventlib.api import get_hub - from eventlib.greenio import GreenSocket as socket - - pip install . - cd .. + pip install git+https://github.com/AGProjects/python3-eventlib.git --no-build-isolation # XCAP library - git clone https://github.com/AGProjects/python3-xcaplib.git - cd python3-xcaplib - - Gevent does not work yet. So we need to patch xcaplib: - - diff --git a/xcaplib/client.py b/xcaplib/client.py - index 6b489cb..3f904ca 100644 - --- a/xcaplib/client.py - +++ b/xcaplib/client.py - @@ -1,8 +1,8 @@ - -import gevent - -from gevent import monkey - +#import gevent - +#from gevent import monkey - - -monkey.patch_socket() - -monkey.patch_ssl() - +#monkey.patch_socket() - +#monkey.patch_ssl() - - from xcaplib import __version__ - from xcaplib.httpclient import HTTPClient - - pip install . - cd .. + pip install git+https://github.com/AGProjects/python3-xcaplib.git --no-build-isolation # MSRP library pip install git+https://github.com/AGProjects/python3-msrplib.git --no-build-isolation # SIPSimple SDK + git clone https://github.com/AGProjects/python3-sipsimple.git - pacman -S msys/make patch + cd python3-sipsimple - ./get_dependencies.sh - Gevent does not work yet, we skip it for the time being by patching xcap: - patch -p1 < ./deps/patches/windows/001_disable_gevent.patch + ./get_dependencies.sh pip install . --no-build-isolation