Spinning Topp Logo BlackTopp Studios
inc
dev_tools_windows.h
1 // © Copyright 2010 - 2016 BlackTopp Studios Inc.
2 /* This file is part of The Mezzanine Engine.
3 
4  The Mezzanine Engine is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  The Mezzanine Engine is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with The Mezzanine Engine. If not, see <http://www.gnu.org/licenses/>.
16 */
17 /* The original authors have included a copy of the license specified above in the
18  'Docs' folder. See 'gpl.txt'
19 */
20 /* We welcome the use of the Mezzanine engine to anyone, including companies who wish to
21  Build professional software and charge for their product.
22 
23  However there are some practical restrictions, so if your project involves
24  any of the following you should contact us and we will try to work something
25  out:
26  - DRM or Copy Protection of any kind(except Copyrights)
27  - Software Patents You Do Not Wish to Freely License
28  - Any Kind of Linking to Non-GPL licensed Works
29  - Are Currently In Violation of Another Copyright Holder's GPL License
30  - If You want to change our code and not add a few hundred MB of stuff to
31  your distribution
32 
33  These and other limitations could cause serious legal problems if you ignore
34  them, so it is best to simply contact us or the Free Software Foundation, if
35  you have any questions.
36 
37  Joseph Toppi - toppij@gmail.com
38  John Blackwood - makoenergy02@gmail.com
39 */
40 
41 #ifndef _dox_dev_tools_windows_h
42 #define _dox_dev_tools_windows_h
43 
44 /**
45  @page dev_tools_windows Windows Development Tools
46  This is a walk-through that Sqeaky, MakoEnergy and HydroWolfy have made for so other people can
47  use the same tools as them. If anyone cares to make Project files for Visual Studio, Eclipse or
48  any other development platform please let us know your steps, and where possible please allow us
49  to use a copy of the files.
50 
51  @section windows_dev_tools_core The Core Tools
52  These are the main resources to get this working. You can most likely use different version of
53  these tools and they will most likely work just fine. We recommend that you go to each of these
54  sites and find the installation packages before continuing any further.
55 
56  - @htmlonly<a href="http://tdm-gcc.tdragon.net">@endhtmlonly
57  TDM-MinGW64
58  @htmlonly</a>@endhtmlonly
59  — This is the compiler package using a newer version of GCC and enables the compilation of
60  64-bit binaries with MinGW. This is the compiler we recommend to use on Windows.
61 
62  - @htmlonly<a href="http://www.codeblocks.org/downloads/26">@endhtmlonly
63  Code::blocks IDE
64  @htmlonly</a>@endhtmlonly
65  — This is the development environment we use. The version used at the time of this writing was
66  12.11 (the version is the year and month of the release). Do not get the Code::Blocks/MinGW
67  download bundle offered on the Code::Blocks webpage. They have an older version of MinGW which
68  will not compile the engine.
69 
70  - @htmlonly<a href="http://code.google.com/p/msysgit/downloads/list">@endhtmlonly
71  GIT
72  @htmlonly</a>@endhtmlonly
73  — We used the newest version of msysgit. This tool will allow you to get the most recent version
74  of the Source Code and Stay in sync with everyone else. Primarily used with
75  @htmlonly<a href="https://github.com/BlackToppStudios/Mezzanine">@endhtmlonly
76  github.com
77  @htmlonly</a>@endhtmlonly
78  but can be to directly sync with other developers.
79 
80  - @htmlonly<a href="http://www.cmake.org/cmake/resources/software.html">@endhtmlonly
81  CMake
82  @htmlonly</a>@endhtmlonly
83  — This is used to construct project or make files to instruct the compiler on how to do it’s
84  job. We used 2.8.3, 2.8.6, 3.0.2 and 3.3.2 but any version newer than 2.8.0 should work. (There
85  is a bug in some versions of 3.4), so maybe avoid that)
86 
87  @subsection windows_dev_tools_core_alternatives Dev Tool Alternatives
88 
89  - @htmlonly<a href="http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/">
90  @endhtmlonly
91  MinGW32 from MSYS
92  @htmlonly</a>@endhtmlonly
93  — These are the compiler, debugger and other closely associated tools for building 32-bit
94  binaries with MinGW. We have used mingw-get-inst-20110316 and mingw-get-inst-20120426 (the
95  version is date), but newer versions should work too. If you have the installer download the
96  latest version be ready for a long download.
97 
98  - @htmlonly<a href="http://www.qt.io/ide/">@endhtmlonly
99  Qt Creator
100  @htmlonly</a>@endhtmlonly
101  — This flexible IDE can be used with either MinGW or Microsoft’s compiler.
102 
103  - @htmlonly<a href="http://www.microsoft.com/visualstudio/eng/downloads">@endhtmlonly
104  Visual Studio
105  @htmlonly</a>@endhtmlonly
106  — This IDE should be usable. Cmake produces an odd project structure, Two extra projects are
107  added “ALL_BUILD” and “ZERO_CHECK”. These can be ignored safely. Be sure to set your startup
108  project from the default. Another oddity is that Visual Studio strongly wants to set whether a
109  build has debug symbols immediately before compilation. To accommodate this “CMAKE_BUILD_TYPE”
110  cannot be set with Visual Studio, this could affect automated build processes.
111 
112  - @htmlonly<a href="https://git-for-windows.github.io/">@endhtmlonly
113  Git Gui
114  @htmlonly</a>@endhtmlonly
115  — This graphical tool can be used instead of the command line tool. It is basic and to the
116  point. It can generate SSH keys too.
117 
118  @section windows_dev_tools_installing Installing
119  Like most windows installers you can get most of the work done by double clicking on it then
120  ‘next’ until it is done. But thereare some specific option and extra steps you should be aware
121  of.
122 
123  @subsection windows_dev_tools_mingw_special_config MinGW32 Special configuration
124  During the installation of MinGW be sure to include the C++ compiler, MSYS Basic System and the
125  MinGW Developer toolkit. This will include tool like Make and a Bash shell will be used by other
126  tools later and may be useful if you want to dig into the gritty details.
127 
128  @subsection windows_dev_tools_mingw_32_64_config MinGW32 and MinGW64 Special configuration
129  For some reason on Windows this compilers doesn’t work well with any spaces in its installation
130  path. The default install directory is “c:\\mingw” this works well most the time, but you can
131  select any folder without spaces.
132  @n @n
133  For the compiler to work correctly the system needs to made aware of it. The system
134  @htmlonly<a href="http://en.wikipedia.org/wiki/PATH_(variable)">@endhtmlonly
135  PATH
136  @htmlonly</a>@endhtmlonly
137  is a listing of folders that Windows (and most other operating systems) will search for programs
138  when it is told run a program without being told its location. You can add it to just your
139  current user’s PATH if you do not want to interfere with other users or to the system wide
140  PATH if you think there will be other Mezzanine developers using the system. Here is how you
141  add the minGW tools to windows PATH variable:
142 
143  @subsection windows_dev_tools_mingw_xp_path Window XP PATH Setup
144  1. Right-click “My Computer” or “Computer”, click “properties”
145  2. Click “Advanced” Tab
146  3. Click “Environment Variables” Button
147  4. Find the “PATH” variable and add “;C:\\MinGW\\bin” to the end (do not erase what is already
148  in there, it _will_ screw your computer)
149  5. Click “OK” 3 times
150 
151  @subsection windows_dev_tools_mingw_vista_path Vista and Windows 7 PATH Setup
152  1. Right-click “My Computer” or “Computer”, click “properties”
153  2. Click “Advanced System Settings” Link
154  3. If a UAC Prompt requests you permission to continue click “Continue”
155  4. Click “Environment Variables” Button
156  5. Find the “PATH” variable and add “;C:\\MinGW\\bin” to the end (do not erase what is already in
157  there, it _will_ screw your computer)
158  6. Click “OK” 3 times
159 
160  @section windows_dev_tools_ide_configuration IDE Special configuration
161  Most development environments have some configuration that they require.
162 
163  @subsection windows_dev_tools_codeblocks32_config Code::Blocks – Using MinGW32
164  If you chose to use the version of Code::Blocks that came with the compiler you will still have
165  to follow the instructions for editing the system PATH as listed above. The following steps
166  assume you have installed MinGW64 to “C:\\MinGW”. If you have it installed elsewhere, adjust
167  the paths provided below accordingly.
168  @n @n
169  Also, by default Code::Blocks looks for “make.exe” as it’s primary make program. MinGW doesn’t
170  call it’s make executable “make.exe” though. So you will have to tell Code::Blocks to look for
171  MinGW’s make executable. To do this:
172  @n @n
173  1. At the menu across the top, click “Settings” and go to “Compiler…”.
174  2. In the window that appears, ensure the “Selected Compiler” is set to “GNU GCC Compiler”.
175  3. Just below the “Selected Compiler”, there should be a row of tabs. Click on the “Toolchain
176  Executables” tab.
177  4. You should see a list of executables, and at the bottom of the list should have a box labeled
178  “Make Program:”, with “make.exe” listed. To the right of that click the “…” button.
179  5. Navigate to the “mingw32-make.exe” executable. This should be located in “C:\\MinGW\\bin”.
180  6. Select the “mingw32-make.exe” executable and click “Open”. Then click “Ok” to close the
181  configuration window
182 
183  @subsection windows_dev_tools_codeblocks64_config Code::Blocks – Using MinGW64
184  MinGW64 needs a bit more help when it comes with integration with Code::Blocks. Ensure the
185  MinGW64 install location has been added to the system
186  @htmlonly<a href="http://en.wikipedia.org/wiki/PATH_(variable)">@endhtmlonly
187  PATH
188  @htmlonly</a>@endhtmlonly
189  before proceeding. The following steps assume you have installed MinGW64 to “C:\\MinGW”. If you
190  have it installed elsewhere, adjust the paths provided below accordingly.
191  @n
192  1. At the menu across the top, click “Settings” and go to “Compiler…”.
193  2. In the window that appears, ensure the “Selected Compiler” is set to “GNU GCC Compiler”.
194  3. In the “Compiler Settings” tab, select the “Other options” sub-tab and then enter “-m64”.
195  This will force 64-bit builds. Entering “-m32” will force 32-bit builds.
196  4. In the “Search directories” tab, select the “Compiler” sub-tab and enter the following 3
197  directories: “C:\\MinGW\\include”, “C:\\MinGW\\x86_64-w64-mingw32\\include”, and
198  “C:\\MinGW\\lib\\gcc\\x86_64-w64-mingw32\\4.8.1\\include”.
199  5. Still in the “Search directories” tab, select the “Linker” sub-tab and enter the following 2
200  directories: “C:\\MinGW\\lib” and “C:\\MinGW\\x86_64-w64-mingw32\\lib”.
201  6. In the “Toolchain executables” tab, ensure the “Compiler’s installation directory” is set
202  properly (for example “C:\\MinGW”).
203  7. In the “Toolchain executables” tab, most of the executables defined have to be changed. Use
204  the quoted text below to set each executable appropriately:
205  @verbatim
206  C Compiler: x86_64-w64-mingw32-gcc.exe
207  C++ Compiler: x86_64-w64-mingw32-g++.exe
208  Linker for dynamic libs: x86_64-w64-mingw32-g++.exe
209  Linker for static libs: ar.exe
210  Debugger: GDB/CDB debugger : Default
211  Resource compiler: windres.exe
212  Make Program: mingw32-make.exe
213  @endverbatim
214 
215  @subsection windows_dev_tools_qt_creator_config Qt Creator
216  For the debugger to work with any compiler make sure that the “CMAKE_BUILD_TYPE” option in Cmake
217  is set too “Debug”. Additionally, some versions of the microsoft compiler do not come with a
218  debugger. Be sure to install a copy of the
219  @htmlonly<a href="http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx">@endhtmlonly
220  windows software development kit
221  @htmlonly</a>@endhtmlonly
222  if you are using some version of
223  @htmlonly<a href="http://www.microsoft.com/visualstudio/eng/downloads">@endhtmlonly
224  Visual Studio
225  @htmlonly</a>@endhtmlonly
226  for the compiler.
227 
228  @subsection windows_dev_tools_visual_studio_creator_config Visual Studio
229  In theory this should just work. In practice we have only shown that this can be used to compile
230  the source. There hasn’t been thorough testing of game compilation, bug parity or build
231  configuration options.
232 
233  @section windows_dev_tools_git_config Git Special configuration
234  When installing you will be asked where you will want to use the git tools from. This again,
235  works with the system PATH. Use the default settings. If you select an option that puts the msys
236  git tools into the windows path, it will conflict with cmake. Git can go into your PATH, but its
237  tools cannot.
238 
239  @subsection windows_dev_tools_git_push_config Git Push
240  If you plan on making pushes to
241  @htmlonly<a href="https://github.com/BlackToppStudios/Mezzanine">@endhtmlonly
242  Github.com
243  @htmlonly</a>@endhtmlonly
244  you will need to configure an account and an ssh key with them. From the git bash command prompt
245  you can type “ssh-keygen” to make a set of keys. Alternatively if you are using the
246  @htmlonly<a href="https://git-for-windows.github.io/">@endhtmlonly
247  Git Gui
248  @htmlonly</a>@endhtmlonly
249  installed with msysgit, with a repo opened you can go to the “Help” pulldown menu at the top of
250  the window, then “Show SSH Key”. This will open a new small window that should have a “Generate
251  Key” button in the top right corner, and a “Copy to Clipboard” button in the bottom left corner.
252  @n @n
253  You will need to copy your public sshkey into your Github profile. When creating your keypair,
254  let it use the default location to save your keys. That way you won’t have to configure git
255  with the locations. It will output the location of the file, and you can open it notepad/wordpad
256  or any text editor and copy/paste into the webpage.
257  @n @n
258  During your first clone/pull of the repository you will want to verify the authenticity of the
259  ssh servers RSA fingerprint, which can be found in
260  @htmlonly<a href="https://help.github.com/articles/generating-ssh-keys">@endhtmlonly
261  Github’s documentation
262  @htmlonly</a>@endhtmlonly
263  , as well as a more detailed explanation of the key creation process.
264 
265  @section windows_dev_tools_cmake_config CMake Special configuration
266  During the Installation you will be asked about the system
267  @htmlonly<a href="http://en.wikipedia.org/wiki/PATH_(variable)">@endhtmlonly
268  PATH
269  @htmlonly</a>@endhtmlonly
270  . even though it is not strictly required, it can be useful to set CMake to be in the path for
271  the current user (or all users if other will develop software). This will simplify the running
272  of command line commands and enable you to copy/paste commands published by others. This is an
273  option you will be presented during the installation.
274 
275  @section windows_dev_tools_other Other Tools
276  Currently these tools aren’t required, but they are popular and you might find them useful.
277 
278  - @htmlonly<a href="http://notepad-plus-plus.org/">@endhtmlonly
279  Notepad++
280  @htmlonly</a>@endhtmlonly
281  — A really good text editor with syntax highlighting.
282 
283  - @htmlonly<a href="https://tortoisegit.org/">@endhtmlonly
284  TortioseGIT
285  @htmlonly</a>@endhtmlonly
286  — Make sure to grab the right version for your platform (32 vs 64 bit). A better user interface
287  to Git, it makes staying up to data much easier.
288 
289  - @htmlonly<a href="http://winmerge.org/">@endhtmlonly
290  WinMerge
291  @htmlonly</a>@endhtmlonly
292  — A tool for comparing to similar files.
293 
294  - Visual Studio
295  — More info or even CMake configuration adjustments would be welcome and helpful
296 
297  - @htmlonly<a href="https://eclipse.org/downloads/">@endhtmlonly
298  Eclipse
299  @htmlonly</a>@endhtmlonly
300  — Any special project files that would allow users of this IDE to work more easily with the
301  engine would be appreciated.
302 
303  @section windows_dev_tools_next What’s next
304  If you aren’t comfortable with your codings skills @ref cxx_training_and_tools is a good idea.
305  If you are comfortable with you coding skill and have the tools installed check out the
306  @ref engine_dependencies, if you already have what you need from that you could take a look at
307  what it takes for @ref building_the_engine_menu.
308 
309 */
310 
311 #endif