Howtos - Hack on Windows » History » Revision 89
Revision 88 (Greg Burri, 04/04/2020 08:53 AM) → Revision 89/102 (Greg Burri, 04/04/2020 08:54 AM)
h1. Howtos - Hack on Windows 7, 8 and 10
You need to:
# Install _Git for Windows_ (needed by _Tortoise Git_) : https://gitforwindows.org/.
## Do not install in "Program files" or in a path which contains spaces. We recommend to install in @C:\git@.
# Install _Tortoise Git_ : http://code.google.com/p/tortoisegit/.
## Kind of SSH Client : TortoisePLink
# 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
# 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
# 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.
# Add @<path to mingw>\mingw\bin;<path to qt>\bin@ to your _path_ environment variable.
# Optional: It's now possible to recompile all Qt, see the section _Custom Qt compilation_ below.
# Install proto buff library source
## Download and uncompress the following file : https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
## Rename the directory to @protbuf@
## 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 C++ code from the Protocol Buffer files (only for version 1.1)
## Open a Bash command line, you can use the shortcut "Git Bash" installed with git
## Go to the directory "D-LAN/application"
## Run the shell script file @1.generate_protos_cpp@ to generate the _.h_ and _.cc_ files in the directory _Protos_.
# 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
h3. 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.
h3. 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
<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>
* Then compile with the command @mingw32-make@