User Tools

Site Tools


wx-mingw64-en

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
wx-mingw64-en [2022/06/11 10:13] – [Installing MinGW] rjversluiswx-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}}]] 
-[[:develop-corner-en|Developer corner]]  
-  * **[[:develop-corner-en#windows|Windows]]** 
- \\ 
  
-|  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-scm.com/download/win]]\\ 
- 
-**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 <repository link> for the first time 
-   
- 
-\\ 
- 
-=====Installing MinGW===== 
-Download MinGW-w64 from https://sourceforge.net/projects/mingw-w64/files 
-  * [[https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe|Online installer]] 
-  * https://winlibs.com/#download-release -> **MSVCRT runtime** 
- 
-__**Notes:**__ 
-> Tested version: 8.1.3. 
- 
- \\ 
- 
-=====Get wxWidgets Source===== 
-<code> 
-git clone --recurse-submodules https://github.com/wxWidgets/wxWidgets.git 
-</code> 
- \\ 
-=====Enable Graphics Context===== 
-<html> 
-<!-- 
-| **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)| 
---> 
-</html> 
-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):\\ 
-<code c> 
-// 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 
-</code> 
- 
-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: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 
-  
- // ----------------------------------------------------------------------------</code> 
- 
- \\ 
-=====Build the libraries===== 
-Open a terminal. (cmd.exe)\\ 
-<code> 
-cd wxWidgets\build\msw 
-mingw32-make -f makefile.gcc BUILD=release UNICODE=1 MONOLITHIC=1 SHARED=0 USE_GUI=1 CXXFLAGS="-std=gnu++11" 
-</code> 
-After the build is ready, the libraries are found here: 
-<code> 
-wxWidgets\lib\gcc_lib 
-</code> 
- 
-====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: 
-<code> 
-lib\gcc_lib\mswu\wx\setup.h 
-</code> 
-See also [[#enable_graphics_context|Enable Graphics Context in the sources]]\\ 
- 
- \\ 
-=====Build Rocrail===== 
- 
-As a prerequisite move the full wxWidgets directory from 
- 
-<code> 
-Downloads\wxWidgets 
-</code> 
- 
-to 
- 
-<code> 
-\Users\<name>\wxWidgets 
-</code> 
- 
-(or any path you may use) 
-\\ 
-\\ 
- 
-=====Build the project===== 
-Open a terminal and: 
-====32 Bit==== 
-<code> 
-cd C:\Users\<name>\Rocrail 
-mingw32-make PLATFORM=WIN32 NATIVE=WIN32 DEBUG= MINGWINSTALL=C:\Users\<name>\wxWidgets 
-</code> 
- 
-====64 Bit==== 
-<code> 
-cd C:\Users\<name>\Rocrail 
-mingw32-make PLATFORM=WIN64 NATIVE=WIN64 DEBUG= MINGWINSTALL=C:\Users\<name>\wxWidgets 
-</code> 
- 
-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 
-<code> 
-C:\Users\<name>\Rocrail\winbin 
-</code> 
- 
-Move rocrail.exe, rocview.exe, all .dll and optional the svg directory in your operational Rocrail directory 
- 
-======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 
- 
-<code> 
-cd C:\Users\<name>\Rocrail 
-git pull  
-</code> 
-\\ 
- 
-=====Build the project===== 
-Open a terminal and: 
-====32 Bit==== 
-<code> 
-cd C:\Users\<name>\Rocrail 
-mingw32-make PLATFORM=WIN32 NATIVE=WIN32 DEBUG= MINGWINSTALL=C:\Users\<name>\wxWidgets 
-</code> 
- 
-====64 Bit==== 
-<code> 
-cd C:\Users\<name>\Rocrail 
-mingw32-make PLATFORM=WIN64 NATIVE=WIN64 DEBUG= MINGWINSTALL=C:\Users\<name>\wxWidgets 
-</code> 
- 
-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 
-<code> 
-C:\Users\<name>\(Projects)\Rocrail\winbin 
-</code> 
- 
-Move rocrail.exe, rocview.exe, all .dll and optional the svg directory in your operational Rocrail directory 
- 
- 
- 
- 
- 
-====== 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==== 
-<code> 
-cd C:\Users\<name>\Rocrail 
-mingw32-make PLATFORM=WIN32 NATIVE=WIN32 MINGWINSTALL=C:\Users\<name>\wxWidgets 
-</code> 
- 
-====64 Bit==== 
-<code> 
-cd C:\Users\<name>\Rocrail 
-mingw32-make PLATFORM=WIN64 NATIVE=WIN64 MINGWINSTALL=C:\Users\<name>\wxWidgets 
-</code> 
- 
-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 
-<code> 
-C:\Users\<name>\Rocrail\winbin 
-</code> 
- 
- 
-=====Start the Rocrail Server in gdb Environment ===== 
- 
-====Build environment==== 
-Open a console. 
-<code> 
-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 
-</code> 
- 
-====Installer environment==== 
-Open a console. 
-<code> 
-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 
-</code> 
- 
- 
-  * After starting the server with this options start Rocview and the plan to test&debug should be presented.\\ 
-  * 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.