summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewerlinux.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappviewerlinux.cpp')
-rw-r--r--indra/newview/llappviewerlinux.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index c1e8f38c51..1dfca17686 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -39,8 +39,7 @@
#include "llfindlocale.h"
#include <exception>
-
-#if LL_GLIB
+#ifdef LL_GLIB
#include <gio/gio.h>
#endif
#include <netinet/in.h>
@@ -71,8 +70,7 @@ extern "C"
#include "breakpad/common/linux/http_upload.h"
#include "lldir.h"
#include "../llcrashlogger/llcrashlogger.h"
-#include "jsoncpp/reader.h" // JSON
-
+#include "boost/json.hpp"
#endif
#define VIEWERAPI_SERVICE "com.secondlife.ViewerAppAPIService"
@@ -118,6 +116,11 @@ static void exceptionTerminateHandler()
int main( int argc, char **argv )
{
+ // Call Tracy first thing to have it allocate memory
+ // https://github.com/wolfpld/tracy/issues/196
+ LL_PROFILER_FRAME_END;
+ LL_PROFILER_SET_THREAD_NAME("App");
+
gArgC = argc;
gArgV = argv;
@@ -135,7 +138,7 @@ int main( int argc, char **argv )
return -1;
}
- // Run the application main loop
+ // Run the application main loop
while (! viewer_app_ptr->frame())
{}
@@ -186,26 +189,28 @@ void setupBreadpad()
return;
}
- Json::Reader reader;
- Json::Value build_data;
- if(!reader.parse(inf, build_data, false))
+ boost::json::error_code ec;
+ boost::json::value build_data = boost::json::parse(inf, ec);
+ if(ec.failed())
{
LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, can't parse '" << build_data_fname << "': "
- << reader.getFormatedErrorMessages() << LL_ENDL;
+ << ec.what() << LL_ENDL;
return;
}
- Json::Value BugSplat_DB = build_data["BugSplat DB"];
- if(!BugSplat_DB)
+ if (!build_data.is_object() || !build_data.as_object().contains("BugSplat DB"))
{
LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, no 'BugSplat DB' entry in '" << build_data_fname
<< "'" << LL_ENDL;
return;
}
+
gVersion = STRINGIZE(
LL_VIEWER_VERSION_MAJOR << '.' << LL_VIEWER_VERSION_MINOR << '.' << LL_VIEWER_VERSION_PATCH
<< '.' << LL_VIEWER_VERSION_BUILD);
- gBugsplatDB = BugSplat_DB.asString();
+
+ boost::json::value BugSplat_DB = build_data.at("BugSplat DB");
+ gBugsplatDB = boost::json::value_to<std::string>(BugSplat_DB);
LL_INFOS("BUGSPLAT") << "Initializing with crash logger: " << gCrashLogger << " database: " << gBugsplatDB << " version: " << gVersion << LL_ENDL;