Howtos - Hack on Windows » History » Revision 77
Revision 76 (Greg Burri, 05/24/2012 11:54 PM) → Revision 77/102 (Greg Burri, 05/24/2012 11:56 PM)
h1. Howtos - Hack on Windows Seven
You need to:
# Install _Tortoise Git_ : http://code.google.com/p/tortoisegit/.
## Kind of SSH Client : TortoisePLink
# Install _msysgit_ (needed by _Tortoise Git_) : http://code.google.com/p/msysgit/.
## Do not install in "Program files" or in a path which contains spaces. We recommend to install in @C:\git@.
# 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.
# Install _Qt 4.8.x_ from http://qt.nokia.com/downloads/windows-cpp
# Install _Qt Creator_ from http://qt.nokia.com/downloads/qt-creator-binary-for-windows
# Install the latest version of MinGW from http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/. GCC version 4.6.x or superior is required.
## It's now possible to recompile all Qt (not necessary), see the section _Custom Qt compilation_ below.
# Add @<path to mingw>\mingw\bin;<path to qt>\bin@ to your _path_ environment variable.
# Install proto buff library source
## Download the source zip here (2.4.0a) : http://code.google.com/p/protobuf/downloads/list and unzip in @C:\protobuf@
## Edit @<Qt dir>\mingw\lib\gcc\mingw32\4.4.0\libstdc++.la@ and replace @library_names='libstdc++.dll.a'@ by @library_names='libstdc++.a'@
## Launch "Git Bash" and go to @/c/protobuf@ then type :
### @export MAKE=mingw32-make@
### @./configure CXXFLAGS=-O2 --enable-shared=no@
### @mingw32-make@
## Add to your path these directories : @C:\protobuf\src\;C:\protobuf\src\.libs@ to reach executable _protoc_ and library _libprotobuf.a_.
# Git clone the repository :
## _git://github.com/Ummon/D-LAN.git_ if you just want clone the repository (read-only).
## _git@github.com:Ummon/D-LAN.git_ if you have a full access (read+write).
# Generate the sources for the .proto files
## Launch "Git bash" and go to @d-lan/application@
## Type @./1.generate_proto_cpp.sh@ (each time you modify the .proto files you have to run this script)
# Set up _Qt Creator_
## Launch Qt Creator
## Open the projects @d-lan/application/GUI.pro@ and @d-lan/application/Core.pro@
## For both projects:
### Uncheck _Shadow build_ in the _Build Settings_ tab.
### 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.
## Add @-e@ as an argument and check[1] @Run in terminal@ in the _Run Settings_ tab of the _Core_ project.
## You can now compile and run the two projects.
fn1. Without this option the Core cannot be launched in debug mode (stderr cannot be used).
h2. Custom Qt compilation
* 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
<pre>
./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
</pre>
* The compile with the command @mingw32-make@