Howtos - Hack on Windows » History » Revision 79

« Previous | Revision 79/102 (diff) | Next »
Greg Burri, 05/25/2012 12:03 AM

Howtos - Hack on Windows Seven

You need to:

  1. Install Tortoise Git :
    1. Kind of SSH Client : TortoisePLink
  2. Install msysgit (needed by Tortoise Git) :
    1. Do not install in "Program files" or in a path which contains spaces. We recommend to install in C:\git.
  3. If you want an access to the master repository : generate a RSA 2048 bit with Puttygen (come with tortoisegit) and send it to a project manager.
  4. Install Qt 4.8.x from
  5. Install Qt Creator from
  6. Install the latest version of MinGW from GCC version 4.6.x or superior is required.
  7. Add <path to mingw>\mingw\bin;<path to qt>\bin to your path environment variable.
  8. Optional: It's now possible to recompile all Qt, see the section Custom Qt compilation below.
  9. Install proto buff library source
    1. Download the source zip here (2.4.x) : and unzip in C:\protobuf
    2. Edit <Qt dir>\mingw\lib\gcc\mingw32\4.4.0\ and replace library_names='libstdc++.dll.a' by library_names='libstdc++.a'
    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.
  10. Git clone the repository :
    1. git:// if you just want clone the repository (read-only).
    2. :Ummon/D-LAN.git if you have a full access (read+write).
  11. Generate the sources for the .proto files
    1. Launch "Git bash" and go to d-lan/application
    2. Type ./ (each time you modify the .proto files you have to run this script)
  12. Set up Qt Creator
    1. Launch Qt Creator
    2. Open the projects d-lan/application/ and d-lan/application/
    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


  • Add the support of C++11, it can improve a bit the performances, see 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.


  • 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
  • The compile with the command mingw32-make

Updated by Greg Burri about 10 years ago · 79 revisions