Support
Wiki Documentation
Support Forum
Mobile
- Rocweb Browser
- WIO-Control ESP32
- andRoc Android
- Rocview Tablet
DIY
User
Wiki writer
Legal
Support
Wiki Documentation
Support Forum
Mobile
DIY
User
Wiki writer
Legal
Download GIT from http://git-scm.com/download/win
Git-2.14.2.3-64-bit.exe (or current version)
Just follow the installer with all its defaults.
start the Git CMD application
Download TDM-GCC from http://tdm-gcc.tdragon.net/download
32bit: tdm-gcc-5.1.0-3.exe
64bit: tdm64-gcc-5.1.0-2.exe (Make sure the 32 bit compiler is deinstalled.)
Just follow the installer with all its defaults.
git clone --recurse-submodules https://github.com/wxWidgets/wxWidgets.git
wxGraphicsContext is disabled by default for other compilers than Visual C++.
To enable it you just have to edit the "setup.h" file (in the include\wx\msw subfolder of the wxWidgets sources).
If the file is not present, make a copy of the one named "setup0.h" and name it "setup.h"
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):
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is // included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined #ifdef _MSC_VER # if _MSC_VER >= 1310 // MSVC7.1+ comes with new enough Platform SDK, enable // wxGraphicsContext support for it # define wxUSE_GRAPHICS_CONTEXT 1 # else // MSVC 6 didn't include GDI+ headers so disable by default, enable it // here if you use MSVC 6 with a newer SDK # define wxUSE_GRAPHICS_CONTEXT 0 # 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. # define wxUSE_GRAPHICS_CONTEXT 0 #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.
diff -u setup0.h setup.h --- setup0.h 2019-08-21 22:09:37.000000000 +0200 +++ setup.h 2019-08-22 08:51:03.000000000 +0200 @@ -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 #endif // Enable wxGraphicsContext implementation using Cairo library. @@ -1590,7 +1590,7 @@ #if defined(_MSC_VER) && _MSC_VER >= 1600 #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT #else - #define wxUSE_GRAPHICS_DIRECT2D 0 + #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT #endif // ----------------------------------------------------------------------------
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="-std=gnu++11"
After the build is ready, the libraries are found here:
wxWidgets\lib\gcc_lib
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 Enable Graphics Context in the sources
As a prerequisite move the full wxWidgets directory from
Downloads\wxWidgets
to
\Users\<name>\wxWidgets
(or any path you may use)
Open a terminal and:
cd C:\Users\<name>\Rocrail mingw32-make PLATFORM=WIN32 NATIVE=WIN32 DEBUG= MINGWINSTALL=C:\Users\<name>\wxWidgets
cd C:\Users\<name>\Rocrail mingw32-make PLATFORM=WIN64 NATIVE=WIN64 DEBUG= MINGWINSTALL=C:\Users\<name>\wxWidgets
If another path for wxwidgets was chosen, then MINGWINSTALL= have to point the selected path.
After successful compilation the new build is located in
C:\Users\<name>\Rocrail\winbin
Move rocrail.exe, rocview.exe, all .dll and optional the svg directory in your operational Rocrail directory
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:\Users\<name>\Rocrail git pull
Open a terminal and:
cd C:\Users\<name>\Rocrail mingw32-make PLATFORM=WIN32 NATIVE=WIN32 DEBUG= MINGWINSTALL=C:\Users\<name>\wxWidgets
cd C:\Users\<name>\Rocrail mingw32-make PLATFORM=WIN64 NATIVE=WIN64 DEBUG= MINGWINSTALL=C:\Users\<name>\wxWidgets
If another path for wxwidgets was chosen, then MINGWINSTALL= have to point the selected path.
After successful compilation the new build is located in
C:\Users\<name>\(Projects)\Rocrail\winbin
Move rocrail.exe, rocview.exe, all .dll and optional the svg directory in your operational Rocrail directory
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:
cd C:\Users\<name>\Rocrail mingw32-make PLATFORM=WIN32 NATIVE=WIN32 MINGWINSTALL=C:\Users\<name>\wxWidgets
cd C:\Users\<name>\Rocrail mingw32-make PLATFORM=WIN64 NATIVE=WIN64 MINGWINSTALL=C:\Users\<name>\wxWidgets
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:\Users\<name>\Rocrail\winbin
Open a console.
cd C:\Users\<name>\Rocrail\winbin gdb --args rocrail.exe -l <your-dll-directory> -w <your-workspace-directory> [example: gdb --args rocrail.exe -l c:\users\xxx\rocrail\winbin -w c:\users\xxx\documents\ROCRAIL\Taktplan_8_FPA5] run
Open a console.
cd C:\Users\<name>\AppData\Local\Programs\Rocrail gdb --args rocrail.exe -l C:\Users\<name>\AppData\Local\Programs\Rocrail -w <your-workspace-directory> run