I think it's need to make some changes to the patches for the rtorrent 0.9.6:
- patches\command_pyroscope.cc and ui_pyroscope.cc
I should apply the follow patches else it will have the error: command_pyroscope.cc:49:22: error:‘tr1’ undefined. In fact, rtorrent 0.9.4 also needs these patches.
patch for command_pyroscope.cc
--- command_pyroscope_backup.cc 2014-07-10 13:03:01.812145000 +0800
+++ command_pyroscope.cc 2014-07-14 15:56:41.578104590 +0800
@@ -45,11 +45,11 @@
#include "control.h"
#include "command_helpers.h"
-#if (RT_HEX_VERSION >= 0x000901)
- #define _cxxstd_ tr1
-#else
+//#if (RT_HEX_VERSION >= 0x000901)
+// #define _cxxstd_ tr1
+//#else
#define _cxxstd_ std
-#endif
+//#endif
// handle for message log file
patch for ui_pyroscope.cc
--- ui_pyroscope_backup.cc 2014-07-10 13:03:01.824145000 +0800
+++ ui_pyroscope.cc 2014-07-15 10:26:58.401085617 +0800
@@ -38,11 +38,11 @@
#include "control.h"
#include "command_helpers.h"
-#if (RT_HEX_VERSION >= 0x000901)
- #define _cxxstd_ tr1
-#else
+//#if (RT_HEX_VERSION >= 0x000901)
+// #define _cxxstd_ tr1
+//#else
#define _cxxstd_ std
-#endif
+//#endif
#define D_INFO(item) (item->info())
#include "rpc/object_storage.h"
2.patches\ps-throttle-steps_all.patch
"std::tr1::bind" should be replaced for std::bind
3.patches\ps-ssl_verify_host_all.patch
It seems that rtorrent 0.9.6 had already add the ssl_verify_host, so this patch is not need.
4.patches\pyroscope.patch(rtorrent 0.9.4 also needs this)
diff -ur '--exclude=.git' rtorrent/src/command_helpers.cc rtorrent-new/src/command_helpers.cc
--- rtorrent/src/command_helpers.cc 2014-07-04 16:59:50.991171000 +0800
+++ rtorrent-new/src/command_helpers.cc 2014-07-10 16:23:28.168287710 +0800
@@ -50,6 +50,7 @@
void initialize_command_peer();
void initialize_command_local();
void initialize_command_logging();
+void initialize_command_pyroscope();
void initialize_command_network();
void initialize_command_groups();
void initialize_command_throttle();
@@ -65,6 +66,7 @@
initialize_command_groups();
initialize_command_local();
initialize_command_logging();
+ initialize_command_pyroscope();
initialize_command_ui();
initialize_command_download();
initialize_command_file();
diff -ur '--exclude=.git' rtorrent/src/Makefile.am rtorrent-new/src/Makefile.am
--- rtorrent/src/Makefile.am 2014-07-04 16:59:50.911171000 +0800
+++ rtorrent-new/src/Makefile.am 2014-07-10 16:24:23.008288357 +0800
@@ -25,6 +25,7 @@
command_tracker.cc \
command_scheduler.cc \
command_ui.cc \
+ command_pyroscope.cc \
control.cc \
control.h \
globals.cc \
diff -ur '--exclude=.git' rtorrent/src/ui/download_list.h rtorrent-new/src/ui/download_list.h
--- rtorrent/src/ui/download_list.h 2014-07-04 16:59:52.171171000 +0800
+++ rtorrent-new/src/ui/download_list.h 2014-07-10 16:21:48.756286537 +0800
@@ -97,6 +97,8 @@
void activate_display(Display d);
+ ElementBase* display(Display d) { return d < DISPLAY_MAX_SIZE ? m_uiArray[d] : 0; }
+
core::View* current_view();
void set_current_view(const std::string& name);
5.patches\ui_pyroscope.patch(rtorrent 0.9.4 also needs this)
diff -ur '--exclude=.git' rtorrent/src/command_helpers.cc rtorrent-new/src/command_helpers.cc
--- rtorrent/src/command_helpers.cc 2014-07-04 16:59:50.991171000 +0800
+++ rtorrent-new/src/command_helpers.cc 2014-07-10 16:35:05.400295939 +0800
@@ -57,6 +57,7 @@
void initialize_command_tracker();
void initialize_command_scheduler();
void initialize_command_ui();
+void initialize_command_ui_pyroscope();
void
initialize_commands() {
@@ -75,4 +76,5 @@
initialize_command_throttle();
initialize_command_tracker();
initialize_command_scheduler();
+ initialize_command_ui_pyroscope();
}
diff -ur '--exclude=.git' rtorrent/src/display/canvas.cc rtorrent-new/src/display/canvas.cc
--- rtorrent/src/display/canvas.cc 2014-07-04 16:59:51.579171000 +0800
+++ rtorrent-new/src/display/canvas.cc 2014-07-10 16:43:36.952301977 +0800
@@ -99,6 +99,8 @@
m_isInitialized = true;
initscr();
+ extern void ui_pyroscope_canvas_init();
+ ui_pyroscope_canvas_init();
raw();
noecho();
nodelay(stdscr, TRUE);
diff -ur '--exclude=.git' rtorrent/src/display/canvas.h rtorrent-new/src/display/canvas.h
--- rtorrent/src/display/canvas.h 2014-07-04 16:59:51.579171000 +0800
+++ rtorrent-new/src/display/canvas.h 2014-07-10 16:36:53.580297216 +0800
@@ -131,8 +131,10 @@
va_list arglist;
va_start(arglist, str);
+ if (y < height()) {
wmove(m_window, y, x);
vw_printw(m_window, const_cast(str), arglist);
+ }
va_end(arglist);
}
diff -ur '--exclude=.git' rtorrent/src/display/window_download_list.cc rtorrent-new/src/display/window_download_list.cc
--- rtorrent/src/display/window_download_list.cc 2014-07-04 16:59:51.667171000 +0800
+++ rtorrent-new/src/display/window_download_list.cc 2014-07-10 16:43:07.120301625 +0800
@@ -82,6 +82,8 @@
m_canvas->print(0, 0, "%s", ("[View: " + m_view->name() + "]").c_str());
+ bool ui_pyroscope_download_list_redraw(Window* window, display::Canvas* canvas, core::View* view);
+ if (ui_pyroscope_download_list_redraw(this, m_canvas, m_view)) return;
if (m_view->empty_visible() || m_canvas->width() < 5 || m_canvas->height() < 2)
return;
@@ -113,6 +115,8 @@
print_download_status(buffer, last, *range.first);
m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer);
+ void ui_pyroscope_download_list_redraw_item(Window* window, display::Canvas* canvas, core::View* view, int pos, Range& range);
+ ui_pyroscope_download_list_redraw_item(this, m_canvas, m_view, pos, range);
++range.first;
}
}
diff -ur '--exclude=.git' rtorrent/src/display/window_statusbar.cc rtorrent-new/src/display/window_statusbar.cc
--- rtorrent/src/display/window_statusbar.cc 2014-07-04 16:59:51.835171000 +0800
+++ rtorrent-new/src/display/window_statusbar.cc 2014-07-10 16:39:38.968299168 +0800
@@ -66,7 +66,8 @@
position = print_status_extra(buffer, last);
m_canvas->print(m_canvas->width() - (position - buffer), 0, "%s", buffer);
}
-
+ void ui_pyroscope_statusbar_redraw(Window* window, display::Canvas* canvas);
+ ui_pyroscope_statusbar_redraw(this, m_canvas);
m_lastTick = control->tick();
}
diff -ur '--exclude=.git' rtorrent/src/Makefile.am rtorrent-new/src/Makefile.am
--- rtorrent/src/Makefile.am 2014-07-04 16:59:50.911171000 +0800
+++ rtorrent-new/src/Makefile.am 2014-07-10 16:31:58.868293738 +0800
@@ -30,6 +30,7 @@
control.h \
globals.cc \
globals.h \
+ ui_pyroscope.cc \
option_parser.cc \
option_parser.h \
signal_handler.cc \
6.patches\ps-ui_pyroscope_all.patch(rtorrent 0.9.4 also needs this)
--- orig/src/rpc/object_storage.h 2011-04-07 09:44:06.000000000 +0200
+++ rtorrent-0.8.8/src/rpc/object_storage.h 2011-06-05 13:20:24.000000000 +0200
@@ -149,6 +149,8 @@
void list_push_back(const torrent::raw_string& key, const torrent::Object& object);
void list_push_back_str(const std::string& str, const torrent::Object& object) { list_push_back(torrent::raw_string::from_string(str), object); }
+ const torrent::Object& set_color_string(const torrent::raw_string& key, const std::string& object);
+
// Functions callers:
torrent::Object call_function(const torrent::raw_string& key, target_type target, const torrent::Object& object);
torrent::Object call_function_str(const std::string& key, target_type target, const torrent::Object& object);