Merge upstream source for version “60+dfsg.1”.
[debian_mullvad-client.git] / README.rst
blobba13caffa9681073e9a155c7af10ac03513c72f8
1 Mullvad VPN Client Build Instructions
2 =====================================
4 Most of the instructions in this file is for internal use at Mullvad to create installers.
5 If you have downloaded our source distribution and read this because you want to be able to install that,
6 skip directly to **Installing from source distribution**.
8 Running unit tests
9 -------------------------------------------------------
11 Run all tests
15     python -m unittest discover [-v] src/
18 To run specific test modules you can provide a path as the last argument to the above command
22     python -m unittest discover [-v] src/ test_config.py
23     python -m unittest discover [-v] src/ "test_*"
25 You can also run indicidual tests or test cases with the following command, if you are located in the package root, i.e. src
29     python -m unittest tests.test_config
30     python -m unittest tests.test_config.TestSettings
31     python -m unittest tests.test_config.TestSettings.test_set
33 Generate new pot/po files
34 -------------------------------------------------------
38     python setup.py pot
40 Compile locale directory from po files
41 -------------------------------------------------------
45     sudo aptitude install python-setuptools gettext
46     python setup.py locale
48 Source distribution
49 -------------------------------------------------------
53     python setup.py sdist
55 Debian package
56 -------------------------------------------------------
57 Do the locale steps above and then issue these commands:
61     sudo aptitude install python-stdeb
62     python setup.py --command-packages=stdeb.command bdist_deb
64 OSX App
65 -------------------------------------------------------
66 Download and install the following:
68 * `wxPython 3.0.2`_ *(wxPython3.0-osx-3.0.2.0-cocoa-py2.7.dmg)*
70 Install the following Python dependencies using pip::
72     pip install appdirs ipaddr netifaces psutil
74 .. _wxPython 3.0.2: http://downloads.sourceforge.net/wxpython/wxPython3.0-osx-3.0.2.0-cocoa-py2.7.dmg
76 Build Mullvad::
78     python setup.py locale
79     python setup.py py2app
80     python setup.py dmg
82 Troubleshooting on OSX
83 ''''''''''''''''''''''
84 If the locale step fails for OSX because of a missing "msgfmt" command it might be that you installed gettext from homebrew, which does not link the binaries to the standard path because of collisions with OSX native gettext library, in that case manually add it to your path in the terminal where you build it:
88     export PATH=/usr/local/Cellar/gettext/<version>/bin:$PATH
90 Windows installer
91 -------------------------------------------------------
93 **Setup build environment**
95 Download and install the following:
97 * `Python 2.7.10`_ *(python-2.7.10.msi)*
98 * `wxPython 3.0`_ *(wxPython3.0-win32-3.0.2.0-py27.exe)*
99 * `py2exe 0.6.9`_ *(py2exe-0.6.9.win32-py2.7.exe)*
100 * `NSIS 2.46`_ *(nsis-2.46-setup.exe)*
102 NSIS also needs the following plug-ins to support the Windows installer script.
103 They are installed by placing the relevant files in the NSIS/Plugins directory.
105 * `FindProcDLL`_ *(FindProcDLL.dll)*
107 Install the following Python dependencies using pip::
109     pip install appdirs ipaddr netifaces psutil jinja2
111 **Build the installer**
113 Generate the locale files (must be done on linux)::
115     python setup.py locale
117 Run ``build.bat`` on the Windows build machine
119 .. _Python 2.7.10: https://www.python.org/ftp/python/2.7.10/python-2.7.10.msi
120 .. _wxPython 3.0: http://downloads.sourceforge.net/wxpython/wxPython3.0-win32-3.0.2.0-py27.exe
121 .. _py2exe 0.6.9: http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/py2exe-0.6.9.win32-py2.7.exe/download
122 .. _NSIS 2.46: http://prdownloads.sourceforge.net/nsis/nsis-2.46-setup.exe?download
123 .. _FindProcDLL: http://nsis.sourceforge.net/FindProcDLL_plug-in
126 Installing from source distribution
127 -------------------------------------------------------
131     pip install appdirs ipaddr netifaces psutil
132     pip install mullvad-XX.tar.gz  # XX is the version that you have
134 You also need the other dependencies: openvpn, python-wxgtk3.0 or python-wxgtk2.8, python-gtk2, python-appindicator and resolvconf.
135 If you want to use obfsproxy you have to build it yourself from https://git.torproject.org/debian/obfsproxy-legacy.git as the newer versions currently don't work with Mullvad.