Skip to content

Compiling on Mac OS X

Olav Sortland Thoresen edited this page Jan 15, 2016 · 10 revisions

To compile ScreenCloud on Mac OS X, follow these instructions:

  1. Download and install Qt 5.

  2. Download and build QuaZip. We need to pass some extra paramsto cmake because of a bug in the 0.7 version (has been fixed upstream).
    mkdir build
    cd build
    cmake .. -DCMAKE_PREFIX_PATH=<path to qt>/lib/cmake -DQT_QTCORE_LIBRARY=<path to qt>/lib/QtCore.framework make
    sudo make install

  3. Download and build PythonQt. We'll use qmake since cmake builds dosen't work properly with qt5 yet (as of PythonQt 3.0). First, edit build/python.prf to use the correct python version. (Mac OS X ships with python 2.7 at the time of writing.)
    cd PythonQt3.0
    qmake CONFIG+=debug_and_release
    make all
    sudo make install

  4. Patch pyport.h to avoid compiler errors later on. cd sudo cp pyport.h pyport.h.bak curl https://trac.macports.org/raw-attachment/ticket/44288/patch-Include-pyport.h.diff | sudo patch pyport.h

  5. You should now be able to build ScreenCloud:
    git clone https://github.com/olav-st/screencloud.git
    mkdir screencloud/build
    cd screencloud/build
    cmake .. -DCMAKE_BUILD_TYPE=Release -DPYTHON_USE_PYTHON3=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=<path to qt>/lib/cmake -DPYTHONQT_INCLUDE_DIR=<path to pythonqt>/src -DPYTHONQT_LIBRARY=<path to pythonqt>/lib/libPythonQt.dylib -DPYTHONQT_QTALL_INCLUDE_DIR=<path to pythonqt>/extensions/PythonQt_QtAll -DPYTHONQT_QTALL_LIBRARY=<path to pythonqt>/lib/libPythonQt_QtAll.dylib
    make

Note: You might run into this warning:

CMake Warning at CMakeLists.txt:23 (MESSAGE):
  ScreenCloud API keys not set, you won't be able to use the client with
  screencloud.net.  (You'll still be able to compile)

To use your self-compiled version with screencloud.net, you'll need to get a set of API keys here.

Clone this wiki locally