Most of the instructions in this file is for internal use at Mullvad to create installers. If you have downloaded our source distribution and read this because you want to be able to install that, skip directly to Installing from source distribution.
Run all tests
python -m unittest discover [-v] src/
To run specific test modules you can provide a path as the last argument to the above command
python -m unittest discover [-v] src/ test_config.py python -m unittest discover [-v] src/ "test_*"
You can also run indicidual tests or test cases with the following command, if you are located in the package root, i.e. src
python -m unittest tests.test_config python -m unittest tests.test_config.TestSettings python -m unittest tests.test_config.TestSettings.test_set
python setup.py pot
sudo aptitude install python-setuptools gettext python setup.py locale
python setup.py sdist
Do the locale steps above and then issue these commands:
sudo aptitude install python-stdeb python setup.py --command-packages=stdeb.command bdist_deb
Download and install the following:
- wxPython 3.0.2 (wxPython3.0-osx-3.0.2.0-cocoa-py2.7.dmg)
Install the following Python dependencies using pip:
pip install appdirs ipaddr netifaces psutil
Build Mullvad:
python setup.py locale python setup.py py2app python setup.py dmg
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:
export PATH=/usr/local/Cellar/gettext/<version>/bin:$PATH
Setup build environment
Download and install the following:
- Python 2.7.10 (python-2.7.10.msi)
- wxPython 3.0 (wxPython3.0-win32-3.0.2.0-py27.exe)
- py2exe 0.6.9 (py2exe-0.6.9.win32-py2.7.exe)
- NSIS 2.46 (nsis-2.46-setup.exe)
NSIS also needs the following plug-ins to support the Windows installer script. They are installed by placing the relevant files in the NSIS/Plugins directory.
- FindProcDLL (FindProcDLL.dll)
Install the following Python dependencies using pip:
pip install appdirs ipaddr netifaces psutil jinja2
Build the installer
Generate the locale files (must be done on linux):
python setup.py locale
Run build.bat
on the Windows build machine
Build the package from source:
pip install mullvad-XX.tar.gz # XX is the version that you have
Install the run-time dependencies:
sudo aptitude install openvpn resolvconf sudo aptitude install python-wxgtk3.0 python-gtk2 python-appindicator
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.