mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Made graph output dependent on GraphVis being present in the BOSS install.
Also disabled the masterlist updater as a time-saver for testers.
This commit is contained in:
@@ -61,4 +61,6 @@ namespace boss {
|
||||
const boost::filesystem::path g_path_settings = g_path_local / "settings.yaml";
|
||||
const boost::filesystem::path g_path_log = g_path_local / "BOSSDebugLog.txt";
|
||||
const boost::filesystem::path g_path_l10n = "resources/l10n";
|
||||
const boost::filesystem::path g_path_graphvis = "resources/graphvis/dot.exe";
|
||||
const boost::filesystem::path g_path_graph = g_path_local / "graph.svg";
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@ namespace boss {
|
||||
extern const boost::filesystem::path g_path_svn;
|
||||
extern const boost::filesystem::path g_path_log;
|
||||
extern const boost::filesystem::path g_path_l10n;
|
||||
extern const boost::filesystem::path g_path_graphvis;
|
||||
extern const boost::filesystem::path g_path_graph;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+6
-3
@@ -415,7 +415,7 @@ void Launcher::OnSortPlugins(wxCommandEvent& event) {
|
||||
vector<string> parsingErrors;
|
||||
string revision;
|
||||
try {
|
||||
revision = UpdateMasterlist(_game, parsingErrors);
|
||||
// revision = UpdateMasterlist(_game, parsingErrors);
|
||||
} catch (boss::error& e) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Masterlist update failed. Details: " << e.what();
|
||||
messages.push_back(boss::Message(boss::g_message_error, (format(loc::translate("Masterlist update failed. Details: %1%")) % e.what()).str()));
|
||||
@@ -664,8 +664,11 @@ void Launcher::OnSortPlugins(wxCommandEvent& event) {
|
||||
|
||||
//Just for fun - output the graph as a ".dot" file for external rendering. If I can get this pretty, I might add it to a tab in the BOSS Report - here's a few Javascript libraries for displaying .dot files, but in my test case the graph is too complex and both libraries I found ran out of memory.
|
||||
//The .dot file can be converted to an SVG using Graphviz: the command is `dot -Tsvg output.dot -o output.svg`.
|
||||
BOOST_LOG_TRIVIAL(trace) << "Outputting the graph.";
|
||||
boss::SaveGraph(graph, "output.dot");
|
||||
if (fs::exists(g_path_graphvis)) {
|
||||
BOOST_LOG_TRIVIAL(trace) << "Outputting the graph.";
|
||||
boss::SaveGraph(graph, "output.dot");
|
||||
|
||||
}
|
||||
|
||||
//Check for back-edges, then perform a topological sort.
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user