summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2017-05-30 01:16:59 +0200
committerKali Kaneko (leap communications) <kali@leap.se>2017-05-30 01:18:27 +0200
commit35bec6cf556e7ed7b6b40d2c2b2d5d6e44dc8a6e (patch)
tree72421e6c0ded15b944d350bba6cdd5d15bdf7369
parent4b7df4ec5240d81475993c221a96b07b4dd38210 (diff)
[docs] add notes for osx/windows dev env
-rw-r--r--docs/hacking/index.rst6
-rw-r--r--docs/hacking/osx.rst21
-rw-r--r--docs/hacking/windows.rst8
-rw-r--r--src/leap/bitmask/gui/app.py7
4 files changed, 32 insertions, 10 deletions
diff --git a/docs/hacking/index.rst b/docs/hacking/index.rst
index 71002f01..489e257a 100644
--- a/docs/hacking/index.rst
+++ b/docs/hacking/index.rst
@@ -8,6 +8,12 @@ Hacking
So you want to hack on Bitmask?
Thanks, and welcome!
+This document assumes a ``Linux`` environment.
+
+There are also ongoing documents with notes for setting up an :ref:`osx <osx-dev>` and a
+:ref:`windows <win-dev>` working environments too, contribution is very much
+welcome on those docs!
+
Running tests
---------------------------------
diff --git a/docs/hacking/osx.rst b/docs/hacking/osx.rst
index 7accfc19..3a75dea7 100644
--- a/docs/hacking/osx.rst
+++ b/docs/hacking/osx.rst
@@ -5,20 +5,31 @@ Setting up a development environment in OSX™
(work in progress)
-Make sure you're using a new enough version of pip (1.8 or newest).
+* Make sure you're using a new enough version of pip (1.8 or newest).
+This will make all the problems with ``cryptography`` going away, since it will
+install the statically built wheel.
* Use ``brew`` to install ``OpenSSL``.
-* Use ``brew`` to install pyqt5::
+* **Problem**: pyqt5 in homebrew stopped shipping qtwebkit. I found the following
+workaround in an issue in qutebrowser's repo, works fine for me for now::
- brew install pyqt5 --with-python --without-python3
+ cd $(brew --prefix)/Library/Formula
+ curl -OO
+ https://raw.githubusercontent.com/Homebrew/homebrew/f802822b0fa35ad362aebd0101ccf83a638bed37/Library/Formula/{py,}qt5.rb
+ brew install qt5 pyqt5
- TODO:: --with-qt-webkit <<<< WORKS?
+Other notes
+-----------
- TODO:: Use PySide instead??
+PySide vs QtWebKit:
+
+http://qtwebkit.blogspot.nl/2016/08/qtwebkit-im-back.html
Running OSX on KVM
==================
+The following notes are not yet tested, but might be useful for development.
+
* https://github.com/kholia/OSX-KVM
diff --git a/docs/hacking/windows.rst b/docs/hacking/windows.rst
index f9e2f8fe..fcd2358f 100644
--- a/docs/hacking/windows.rst
+++ b/docs/hacking/windows.rst
@@ -4,7 +4,7 @@ Setting up a development environment in Windows™
================================================
This document gathers notes to setup a development environment inside a virtual
-machine or a metal one. Tested with Windows 7.
+machine or a baremetal one. Tested with Windows 7 so far.
There is some work in progress, that was done initially by Paixu, for building
the windows installers from within several docker containers running linux (see
@@ -12,4 +12,10 @@ the windows installers from within several docker containers running linux (see
* Install ``git``
* Install Microsoft Visual C++ Compiler for Python 2.7 https://aka.ms/vcpython27
+* ``scrypt`` needs some hacks. me (kali) have a .whl laying around, I needed to
+ drop several non-standard includes in the include path to allow compilation.
+* I'm using PySide for windows, the wheel installs without problems. The compat
+ hacks so far are not very terrible, although it's an afterthought since we
+ moved to PyQt5 a while ago.
+* There are some ugly looks in the ``bitmask_js`` ui that need to be fixed.
diff --git a/src/leap/bitmask/gui/app.py b/src/leap/bitmask/gui/app.py
index 57bed56d..99ecddeb 100644
--- a/src/leap/bitmask/gui/app.py
+++ b/src/leap/bitmask/gui/app.py
@@ -35,7 +35,6 @@ from leap.bitmask.core.launcher import run_bitmaskd, pid
from leap.bitmask.gui import app_rc
from leap.common.config import get_path_prefix
-
if platform.system() == 'Windows':
from multiprocessing import freeze_support
from PySide import QtCore, QtGui
@@ -54,12 +53,12 @@ else:
from PyQt5.QtWebKit import QWebSettings
-BITMASK_URI = 'http://localhost:7070/'
-PIXELATED_URI = 'http://localhost:9090/'
-
IS_WIN = platform.system() == "Windows"
DEBUG = os.environ.get("DEBUG", False)
+BITMASK_URI = 'http://localhost:7070/'
+PIXELATED_URI = 'http://localhost:9090/'
+
qApp = None
bitmaskd = None
browser = None