mirror of
				https://github.com/edubart/otclient.git
				synced 2025-11-04 04:36:23 +01:00 
			
		
		
		
	crash handler, logger and oengles changes
* save log messages to otclient.txt * fixes in FrameBuffer and HardwareBuffer to work with OpenGLES * possibility to get compilation information from lua (compiler version, build date, build revision, build type) * make crash handler more informatave * handle assert crash signals (SIGABRT)
This commit is contained in:
		@@ -10,6 +10,7 @@ SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake;${CMAKE_MODULE_PATH}")
 | 
			
		||||
OPTION(WINDOWS_CONSOLE "Enables console window on Windows platform" OFF)
 | 
			
		||||
OPTION(CRASH_HANDLER "Generate crash reports" OFF)
 | 
			
		||||
OPTION(USE_OPENGL_ES2 "Use OpenGL ES 2.0 (for mobiles devices)" OFF)
 | 
			
		||||
SET(BUILD_REVISION "custom" CACHE "Git revision string (intended for releases)" STRING)
 | 
			
		||||
 | 
			
		||||
# set debug as default build type
 | 
			
		||||
IF(NOT CMAKE_BUILD_TYPE)
 | 
			
		||||
@@ -47,12 +48,18 @@ SET(CMAKE_C_FLAGS_RELEASE          "-Ofast -fomit-frame-pointer")
 | 
			
		||||
SET(CMAKE_CXX_LINK_FLAGS           "${CMAKE_CXX_LINK_FLAGS} -static-libgcc -static-libstdc++ -Wl,--as-needed")
 | 
			
		||||
 | 
			
		||||
MESSAGE(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
 | 
			
		||||
ADD_DEFINITIONS(-DBUILD_TYPE="${CMAKE_BUILD_TYPE}")
 | 
			
		||||
 | 
			
		||||
ADD_DEFINITIONS(-DBUILD_REVISION="${BUILD_REVISION}")
 | 
			
		||||
MESSAGE(STATUS "Build revision: ${BUILD_REVISION}")
 | 
			
		||||
 | 
			
		||||
IF(USE_OPENGL_ES2)
 | 
			
		||||
    MESSAGE(STATUS "Renderer: OpenGL ES 2.0")
 | 
			
		||||
ELSE()
 | 
			
		||||
    MESSAGE(STATUS "Renderer: OpenGL")
 | 
			
		||||
ENDIF()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
IF(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
 | 
			
		||||
    ADD_DEFINITIONS(-DDEBUG)
 | 
			
		||||
    MESSAGE(STATUS "Debug information: ON")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user