wx-mingw64-en
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
wx-mingw64-en [2022/06/11 10:13] – [Installing MinGW] rjversluis | wx-mingw64-en [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Build Rocrail from sources ====== | ||
- | [[english|{{ rocrail-logo-35.png}}]] | ||
- | [[: | ||
- | * **[[: | ||
- | \\ | ||
- | | Make sure all tools, git, mingw64 and wxWidgets, does __NOT__ contain any blanks in their paths. | ||
- | \\ | ||
- | ====== From the scratch ====== | ||
- | =====Installing GIT===== | ||
- | Download GIT from [[http:// | ||
- | |||
- | **Git-2.14.2.3-64-bit.exe** (or current version) | ||
- | \\ | ||
- | Just follow the installer with all its defaults.\\ | ||
- | \\ | ||
- | |||
- | =====Get Rocrail Sources===== | ||
- | start the **Git CMD** application | ||
- | * git clone < | ||
- | | ||
- | |||
- | \\ | ||
- | |||
- | =====Installing MinGW===== | ||
- | Download MinGW-w64 from https:// | ||
- | * [[https:// | ||
- | * https:// | ||
- | |||
- | __**Notes: | ||
- | > Tested version: 8.1.3. | ||
- | |||
- | \\ | ||
- | |||
- | =====Get wxWidgets Source===== | ||
- | < | ||
- | git clone --recurse-submodules https:// | ||
- | </ | ||
- | \\ | ||
- | =====Enable Graphics Context===== | ||
- | < | ||
- | <!-- | ||
- | | **Note:** The latest wxWidgets sources do have a correction for the MINGW compiler, so it is no longer necessary to modify the setup.h. (22-08-2019)| | ||
- | --> | ||
- | </ | ||
- | wxGraphicsContext is disabled by default for other compilers than Visual C++.\\ | ||
- | To enable it you just have to edit the " | ||
- | If the file is not present, make a copy of the one named " | ||
- | In this file, search for wxGraphicsContext.\\ | ||
- | You should find a section like the following (this is the wx-3.0.x version of the setup.h file):\\ | ||
- | <code c> | ||
- | // notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is | ||
- | // included from wx/ | ||
- | #ifdef _MSC_VER | ||
- | # if _MSC_VER >= 1310 | ||
- | // MSVC7.1+ comes with new enough Platform SDK, enable | ||
- | // wxGraphicsContext support for it | ||
- | # | ||
- | # else | ||
- | // MSVC 6 didn't include GDI+ headers so disable by default, enable it | ||
- | // here if you use MSVC 6 with a newer SDK | ||
- | # | ||
- | # endif | ||
- | #else | ||
- | // Disable support for other Windows compilers, enable it if your compiler | ||
- | // comes with new enough SDK or you installed the headers manually. | ||
- | // | ||
- | // Notice that this will be set by configure under non-Windows platforms | ||
- | // anyhow so the value there is not important. | ||
- | # | ||
- | #endif | ||
- | </ | ||
- | |||
- | Replace the last # define wxUSE_GRAPHICS_CONTEXT 0 by **# define wxUSE_GRAPHICS_CONTEXT 1**\\ | ||
- | Save and launch the build process and wxGraphicsContext should be enabled.\\ | ||
- | |||
- | ====Update 20190822==== | ||
- | <code c++> | ||
- | diff -u setup0.h setup.h | ||
- | --- setup0.h 2019-08-21 22: | ||
- | +++ setup.h 2019-08-22 08: | ||
- | @@ -818,7 +818,7 @@ | ||
- | // | ||
- | // Notice that this will be set by configure under non-Windows platforms | ||
- | // anyhow so the value there is not important. | ||
- | -#define wxUSE_GRAPHICS_CONTEXT 0 | ||
- | +#define wxUSE_GRAPHICS_CONTEXT 1 | ||
- | # | ||
- | |||
- | // Enable wxGraphicsContext implementation using Cairo library. | ||
- | @@ -1590,7 +1590,7 @@ | ||
- | #if defined(_MSC_VER) && _MSC_VER >= 1600 | ||
- | # | ||
- | #else | ||
- | - #define wxUSE_GRAPHICS_DIRECT2D 0 | ||
- | + #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT | ||
- | # | ||
- | |||
- | // ----------------------------------------------------------------------------</ | ||
- | |||
- | \\ | ||
- | =====Build the libraries===== | ||
- | Open a terminal. (cmd.exe)\\ | ||
- | < | ||
- | cd wxWidgets\build\msw | ||
- | mingw32-make -f makefile.gcc BUILD=release UNICODE=1 MONOLITHIC=1 SHARED=0 USE_GUI=1 CXXFLAGS=" | ||
- | </ | ||
- | After the build is ready, the libraries are found here: | ||
- | < | ||
- | wxWidgets\lib\gcc_lib | ||
- | </ | ||
- | |||
- | ====Enable Graphics Context==== | ||
- | In the build setup.h file the wxUSE_GRAPHICS_CONTEXT must also be set to 1.\\ | ||
- | Path to the setup.h is: | ||
- | < | ||
- | lib\gcc_lib\mswu\wx\setup.h | ||
- | </ | ||
- | See also [[# | ||
- | |||
- | \\ | ||
- | =====Build Rocrail===== | ||
- | |||
- | As a prerequisite move the full wxWidgets directory from | ||
- | |||
- | < | ||
- | Downloads\wxWidgets | ||
- | </ | ||
- | |||
- | to | ||
- | |||
- | < | ||
- | \Users\< | ||
- | </ | ||
- | |||
- | (or any path you may use) | ||
- | \\ | ||
- | \\ | ||
- | |||
- | =====Build the project===== | ||
- | Open a terminal and: | ||
- | ====32 Bit==== | ||
- | < | ||
- | cd C: | ||
- | mingw32-make PLATFORM=WIN32 NATIVE=WIN32 DEBUG= MINGWINSTALL=C: | ||
- | </ | ||
- | |||
- | ====64 Bit==== | ||
- | < | ||
- | cd C: | ||
- | mingw32-make PLATFORM=WIN64 NATIVE=WIN64 DEBUG= MINGWINSTALL=C: | ||
- | </ | ||
- | |||
- | If another path for wxwidgets was chosen, then MINGWINSTALL= have to point the selected path. | ||
- | \\ | ||
- | \\ | ||
- | |||
- | =====Transfer into operational Rocrail environment ===== | ||
- | After successful compilation the new build is located in | ||
- | < | ||
- | C: | ||
- | </ | ||
- | |||
- | Move rocrail.exe, | ||
- | |||
- | ======Build Rocrail Update ====== | ||
- | |||
- | =====Get Rocrail Update===== | ||
- | Updates are only possible after the procedure from the scratch. The whole environment and a local git clone & build have to be in place. | ||
- | |||
- | Start the **Git CMD** application | ||
- | |||
- | < | ||
- | cd C: | ||
- | git pull | ||
- | </ | ||
- | \\ | ||
- | |||
- | =====Build the project===== | ||
- | Open a terminal and: | ||
- | ====32 Bit==== | ||
- | < | ||
- | cd C: | ||
- | mingw32-make PLATFORM=WIN32 NATIVE=WIN32 DEBUG= MINGWINSTALL=C: | ||
- | </ | ||
- | |||
- | ====64 Bit==== | ||
- | < | ||
- | cd C: | ||
- | mingw32-make PLATFORM=WIN64 NATIVE=WIN64 DEBUG= MINGWINSTALL=C: | ||
- | </ | ||
- | |||
- | If another path for wxwidgets was chosen, then MINGWINSTALL= have to point the selected path. | ||
- | \\ | ||
- | \\ | ||
- | |||
- | =====Transfer into operational Rocrail environment ===== | ||
- | After successful compilation the new build is located in | ||
- | < | ||
- | C: | ||
- | </ | ||
- | |||
- | Move rocrail.exe, | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ====== Build Rocrail with debug option ====== | ||
- | Sometimes debugging will create useful information for the developers, especially when there is a Rocrail server crash.\\ | ||
- | Building Rocrail from sources for debugging needs the same environment as described above.\\ | ||
- | \\ | ||
- | Open a terminal and: | ||
- | |||
- | ====32 Bit==== | ||
- | < | ||
- | cd C: | ||
- | mingw32-make PLATFORM=WIN32 NATIVE=WIN32 MINGWINSTALL=C: | ||
- | </ | ||
- | |||
- | ====64 Bit==== | ||
- | < | ||
- | cd C: | ||
- | mingw32-make PLATFORM=WIN64 NATIVE=WIN64 MINGWINSTALL=C: | ||
- | </ | ||
- | |||
- | If another path for wxwidgets was chosen, then MINGWINSTALL= have to point the selected path. | ||
- | \\ | ||
- | \\ | ||
- | After successful compilation the new debug build is located in | ||
- | < | ||
- | C: | ||
- | </ | ||
- | |||
- | |||
- | =====Start the Rocrail Server in gdb Environment ===== | ||
- | |||
- | ====Build environment==== | ||
- | Open a console. | ||
- | < | ||
- | cd C: | ||
- | gdb --args rocrail.exe -l < | ||
- | |||
- | [example: gdb --args rocrail.exe -l c: | ||
- | |||
- | run | ||
- | </ | ||
- | |||
- | ====Installer environment==== | ||
- | Open a console. | ||
- | < | ||
- | cd C: | ||
- | gdb --args rocrail.exe -l C: | ||
- | run | ||
- | </ | ||
- | |||
- | |||
- | * After starting the server with this options start Rocview and the plan to test& | ||
- | * When the server crash occurs, switch immediately to the console windows and enter the cmd **bt** (which means backtrace)\\ | ||
- | * Copy the full information of the **bt** output into a editor, save the file and post it in the Rocrail Forum for analysis. |