-
Notifications
You must be signed in to change notification settings - Fork 108
Compiling on Windows
You can compile ScreenCloud using both MSVC and MinGW on Windows. Step by step instructions for both compilers are given below. Please note that the MSVC instructions are for Qt5, while the MinGW instructions are for Qt4 (The MinGW instructions need to be updated at some point).
-
Download and install Visual Studio.
-
Download and install Python 3.
-
Download and build OpenSSL. You'll need working installations of Perl and NASM added to your PATH. Extract the files in a way that preserves symlinks. Enter the following commands in a Visual Studio command prompt:
perl Configure VC-WIN32 --prefix=C:\OpenSSL
ms\do_nasm
nmake -f ms\ntdll.mak
nmake -f ms\ntdll.mak install
-
Download and compile Qt. As of right now there are no prebuilt libraries for Visual Studio 2015.
configure -platform win32-msvc2015 -opensource -nomake examples -openssl -I C:/OpenSSL/include
nmake
-
Download and build zlib:
nmake -f win32\Makefile.msc
-
Download and compile 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 .. -G "NMake Makefiles" -DCMAKE_PREFIX_PATH=<path to qt>\qtbase\lib\cmake -DZLIB_INCLUDE_DIRS=<path to zlib> -DZLIB_LIBRARIES=<path to zlib>\zdll.lib -DQT_QTCORE_LIBRARY=<path to qt>\qtbase\lib\Qt5Core.lib
nmake
nmake install
-
Download and compile PythonQt. We'll use a fork that makes it easier to compile with qt5 and python 3.
git clone https://github.com/Orochimarufan/PythonQt
cd PythonQt/build
cmake ..
nmake
nmake install
-
You should now be able to build ScreenCloud:
git clone https://github.com/olav-st/screencloud.git
mkdir build
cd build
cmake ../screencloud -G "NMake Makefiles" -DZLIB_INCLUDE_DIRS=<path to zlib>
nmake
- Download and install the newest version of MinGW with MSYS.
- Download and build OpenSSL. You'll need a working Perl installation. Run these commands from an MSYS shell:
tar xf openssl-1.0.1c.tar.gz #Use tar to preserve symlinks
perl Configure mingw --prefix=/c/OpenSSL shared
make
make install
- Download and compile Qt. We cannot use the prebuilt binaries since they were built for an older version of MinGW.
configure.exe -platform win32-g++ -no-phonon -no-phonon-backend -no-webkit -no-qt3support -no-script -no-scripttools -nomake demos -nomake examples -openssl -I C:/OpenSSL/include
mingw32-make
Add <path to qt>/bin to your PATH.
Note: You might run into this issue. - Download and compile Qxt. ScreenCloud only needs two modules so you can safely ignore the rest:
configure.bat -nomake web -nomake sql -nomake zeroconf -nomake berkeley -nomake designer -nomake network
mingw32-make
mingw32-make install
- Download and compile QuaZip.
mkdir build
cd build
cmake .. -G "MinGW Makefiles" -DZLIB_INCLUDE_DIRS=<path to qt>/src/3rdparty/zlib
mingw32-make
- The last library we need is Python. We need to use a patched version since the official one is built with MSVC.
- You should now be able to build ScreenCloud:
git clone https://github.com/olav-st/screencloud.git
mkdir build
cd build
cmake ../screencloud -G "MinGW Makefiles" -DZLIB_INCLUDE_DIRS=<path to qt>/src/3rdparty/zlib
mingw32-make