Remove support for non-extended font builds.

This commit is contained in:
Bartosz Taudul 2020-03-26 23:04:44 +01:00
parent 5ec1bd0f5e
commit 58bb5d40c5
7 changed files with 5 additions and 652 deletions

View File

@ -568,7 +568,6 @@ The following defines may be of interest:
\begin{itemize}
\item \texttt{TRACY\_FILESELECTOR} -- controls whether a system load/save dialog is compiled in. If it's left out, the saved traces will be named \texttt{trace.tracy}.
\item \texttt{TRACY\_NO\_STATISTICS} -- Tracy will perform statistical data collection on the fly, if this macro is \emph{not} defined. This allows extended analysis of the trace (for example, you can perform a live search for matching zones) at a small CPU processing cost and a considerable memory usage increase (at least 8 bytes per zone).
\item \texttt{TRACY\_EXTENDED\_FONT} -- use this define, if you have loaded extra symbol ranges in your font and added icons\footnote{See the \texttt{profiler} utility source code for reference.}. Otherwise, some characters will be replaced with an ASCII compatible version. For example, the micro (\si\micro) symbol will be replaced with \texttt{u}, and \faExclamationTriangle{} icon will be replaced with \texttt{/!\textbackslash}.
\item \texttt{TRACY\_ROOT\_WINDOW} -- the main profiler view will occupy whole window if this macro is defined. Additional setup is required for this to work. If you are embedding the server into your application you probably do \emph{not} want this.
\end{itemize}

View File

@ -1,6 +1,6 @@
CFLAGS +=
CXXFLAGS := $(CFLAGS) -std=c++17
DEFINES += -DTRACY_FILESELECTOR -DTRACY_EXTENDED_FONT -DTRACY_ROOT_WINDOW -DIMGUI_IMPL_OPENGL_LOADER_GL3W
DEFINES += -DTRACY_FILESELECTOR -DTRACY_ROOT_WINDOW -DIMGUI_IMPL_OPENGL_LOADER_GL3W
INCLUDES := $(shell pkg-config --cflags glfw3 freetype2 capstone) -I../../../imgui -I../../libs/gl3w
LIBS := $(shell pkg-config --libs glfw3 freetype2 capstone) -lpthread -ldl
PROJECT := Tracy

View File

@ -56,7 +56,7 @@
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>TRACY_FILESELECTOR;TRACY_EXTENDED_FONT;TRACY_ROOT_WINDOW;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>TRACY_FILESELECTOR;TRACY_ROOT_WINDOW;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\libs\gl3w;..\..\..\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
@ -81,7 +81,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>TRACY_FILESELECTOR;TRACY_EXTENDED_FONT;TRACY_ROOT_WINDOW;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>TRACY_FILESELECTOR;TRACY_ROOT_WINDOW;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\libs\gl3w;..\..\..\imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ConformanceMode>true</ConformanceMode>

View File

@ -34,9 +34,7 @@ void BadVersionImpl( BadVersionState& badVer )
}
if( ImGui::BeginPopupModal( "Bad file", nullptr, ImGuiWindowFlags_AlwaysAutoResize ) )
{
#ifdef TRACY_EXTENDED_FONT
TextCentered( ICON_FA_EXCLAMATION_TRIANGLE );
#endif
ImGui::Text( "The file you are trying to open is not a tracy dump." );
ImGui::Separator();
if( ImGui::Button( "Oops" ) )
@ -48,9 +46,7 @@ void BadVersionImpl( BadVersionState& badVer )
}
if( ImGui::BeginPopupModal( "File read error", nullptr, ImGuiWindowFlags_AlwaysAutoResize ) )
{
#ifdef TRACY_EXTENDED_FONT
TextCentered( ICON_FA_EXCLAMATION_TRIANGLE );
#endif
ImGui::Text( "The file you are trying to open cannot be mapped to memory." );
ImGui::Separator();
if( ImGui::Button( "OK" ) )
@ -62,9 +58,7 @@ void BadVersionImpl( BadVersionState& badVer )
}
if( ImGui::BeginPopupModal( "Unsupported file version", nullptr, ImGuiWindowFlags_AlwaysAutoResize ) )
{
#ifdef TRACY_EXTENDED_FONT
TextCentered( ICON_FA_CLOUD_DOWNLOAD_ALT );
#endif
ImGui::Text( "The file you are trying to open is unsupported.\nYou should update to tracy %i.%i.%i or newer and try again.", badVer.version >> 16, ( badVer.version >> 8 ) & 0xFF, badVer.version & 0xFF );
ImGui::Separator();
if( ImGui::Button( "I understand" ) )
@ -76,9 +70,7 @@ void BadVersionImpl( BadVersionState& badVer )
}
if( ImGui::BeginPopupModal( "Legacy file version", nullptr, ImGuiWindowFlags_AlwaysAutoResize ) )
{
#ifdef TRACY_EXTENDED_FONT
TextCentered( ICON_FA_GHOST );
#endif
ImGui::Text( "You are trying to open a file which was created by legacy version %i.%i.%i.\nUse the update utility from an older version of the profiler to convert the file to a supported version.", badVer.version >> 16, ( badVer.version >> 8 ) & 0xFF, badVer.version & 0xFF );
ImGui::Separator();
if( ImGui::Button( "Maybe I don't need it" ) )

View File

@ -176,11 +176,7 @@ const char* TimeToString( int64_t _ns )
else if( ns < 1000ll * 1000 )
{
PrintSmallIntFrac( buf, ns );
#ifdef TRACY_EXTENDED_FONT
memcpy( buf, " \xce\xbcs", 5 );
#else
memcpy( buf, " us", 4 );
#endif
}
else if( ns < 1000ll * 1000 * 1000 )
{

View File

@ -9,9 +9,7 @@
#include "TracySourceView.hpp"
#include "TracyWorker.hpp"
#ifdef TRACY_EXTENDED_FONT
# include "IconsFontAwesome5.h"
#endif
#include "IconsFontAwesome5.h"
namespace tracy
{
@ -139,11 +137,7 @@ void SourceView::Render( const Worker& worker )
{
if( !m_asm.empty() )
{
#ifdef TRACY_EXTENDED_FONT
if( SmallCheckbox( ICON_FA_MICROCHIP " Show assembly", &m_showAsm ) )
#else
if( SmallCheckbox( "Show assembly", &m_showAsm ) )
#endif
{
if( m_showAsm )
{

File diff suppressed because it is too large Load Diff