Project

General

Profile

Actions

Howtos - Hack on Windows » History » Revision 87

« Previous | Revision 87/102 (diff) | Next »
Greg Burri, 04/04/2020 08:52 AM


Howtos - Hack on Windows 7, 8 and 10

You need to:

  1. Install Git for Windows (needed by Tortoise Git) : https://gitforwindows.org/.
  2. Install Tortoise Git : http://code.google.com/p/tortoisegit/.
    1. Kind of SSH Client : TortoisePLink
    2. Do not install in "Program files" or in a path which contains spaces. We recommend to install in C:\git.
  3. Install Qt 4.8.5 from http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-win-opensource-4.8.5-mingw.exe
  4. Install Qt Creator from http://download.qt-project.org/official_releases/qtcreator/2.8/2.8.1/qt-creator-windows-opensource-2.8.1.exe
  5. Install the latest version of MinGW from http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download. GCC version 4.6.x or superior is required.
  6. Add <path to mingw>\mingw\bin;<path to qt>\bin to your path environment variable.
  7. Optional: It's now possible to recompile all Qt, see the section Custom Qt compilation below.
  8. Install proto buff library source
    1. Download and uncompress the following file : https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
    2. Rename the directory to protbuf
    3. Launch "Git Bash" and go to /c/protobuf then type :
      1. export MAKE=mingw32-make
      2. ./configure CXXFLAGS=-O2 --enable-shared=no
      3. mingw32-make
    4. Add to your path these directories : C:\protobuf\src\;C:\protobuf\src\.libs to reach executable protoc and library libprotobuf.a.
  9. Git clone the repository :
    1. git://github.com/Ummon/D-LAN.git if you just want clone the repository (read-only).
    2. :Ummon/D-LAN.git if you have a full access (read+write).
  10. Generate the C++ code from the Protocol Buffer files (only for version 1.1)
    1. Open a Bash command line, you can use the shortcut "Git Bash" installed with git
    2. Go to the directory "D-LAN/application"
    3. Run the shell script file 1.generate_protos_cpp to generate the .h and .cc files in the directory Protos.
  11. Set up Qt Creator
    1. Launch Qt Creator
    2. Open the projects d-lan/application/GUI.pro and d-lan/application/Core.pro
    3. For both projects:
      1. Uncheck Shadow build in the Build Settings tab.
      2. Add the argument debug -f Makefile-Core to Make for the build configuration Debug and release -f Makefile-Core for the build configuration Release. Replace 'Core' by 'GUI' for the GUI project.
    4. Add -e as an argument and check1 Run in terminal in the Run Settings tab of the Core project.
    5. You can now compile and run the two projects.

1 Without this option the Core cannot be launched in debug mode (stderr cannot be used).

Custom Qt compilation

Goals

  • Add the support of C++11, it can improve a bit the performances, see http://labs.qt.nokia.com/2011/05/26/cpp0x-in-qt/ for more information.
  • Recompile Qt with a more recent version of GCC. Qt binaries are released compiled with GCC 4.4.
  • Remove unused components and reduce the size of DLL files.

Steps

  • Add QMAKE_CXXFLAGS += -std=gnu++0x at the end of the file mkspecs/win32-g++-4.6/qmake.conf
  • Configure Qt with the following command
    ./configure.exe -ltcg -opensource -debug-and-release -platform win32-g++-4.6 -nomake demos -nomake examples -qt-style-windowsxp -qt-style-windowsvista -no-style-plastique -no-style-cleanlooks -no-style-motif -no-style-cde -no-qt3support -no-opengl -no-accessibility -no-native-gestures
    
  • Then compile with the command mingw32-make

Updated by Greg Burri about 4 years ago · 87 revisions