= rTorrent on Windows = * [#cygwin Installing Cygwin] * [#libsigc Installing libsigc++] * [#libtorrent Installing libTorrent] * [#xmlrpc Installing XMLRPC-C (optional)] * [#rtorrent Installing rTorrent] * [#screenshots Screenshots] To be able to run [http://libtorrent.rakshasa.no/ rTorrent] on Windows, you are going to need [http://www.cygwin.com/ Cygwin]. == Installing Cygwin == #cygwin Download Cygwin 1.7 from the [http://www.cygwin.com/ Cygwin page]. Please keep in mind, that version 1.7 is in beta status at the time of writing this manual ([http://cygwin.com/setup-1.7.exe direct link]). Start the installer, choose "Install from internet", select a directory to install cygwin, and one for the packages to be downloaded to, then set up your connection and pick a mirror. You're going to need the following packages in order to compile and run [http://libtorrent.rakshasa.no/ rTorrent]: curl-devel, gcc, libncurses-devel, libtool, make, openssl-devel, pkg-config, subversion, wget. These might require some other packages, let them be installed. Wait, till the installer downloads and installs the neccessary packages, check wherever you want shortcuts, and close the installer. When you're done, start Cygwin (if you choose not create any shortcuts, you can start Cygwin with the cygwin.bat in your installation directory). Now we can proceed with [http://libtorrent.rakshasa.no/ rTorrent]. == Installing libsigc++ == #libsigc Since there is no [http://libsigc.sourceforge.net/ libsigc++] package for [http://www.cygwin.com/ Cygwin], we're going to need to compile this one first. By default, [http://www.cygwin.com/ Cygwin] has no /usr/localr/src, so create one. {{{ mkdir /usr/local/src cd /usr/local/src }}} Download, compile and install the latest [http://libsigc.sourceforge.net/ libsigc++] source from the [http://ftp.gnome.org/pub/GNOME/sources/libsigc++/ Gnome ftp site] - for me, it was 2.2.3. {{{ wget http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-2.2.3.tar.bz2 tar xjvf libsigc++-2.2.3.tar.bz2 cd libsigc++-2.2.3 ./configure make make install cd .. }}} == Installing libTorrent == #libtorrent Now download the latest [http://libtorrent.rakshasa.no/ libTorrent] source from the [http://libtorrent.rakshasa.no/browser/trunk svn repository], compile, and install it. {{{ svn co svn://rakshasa.no/libtorrent/trunk/libtorrent libtorrent-svn cd libtorrent-svn ./autogen.sh ./configure --disable-mincore make make install cd .. }}} == Installing XMLRPC-C (optional) == #xmlrpc Of course, we want to be able to control [http://libtorrent.rakshasa.no/ rTorrent] via [http://xmlrpc-c.sourceforge.net/ XMLRPC-C], let's say by [wiki:WikiStart rTWi]. For that, we need to install [http://xmlrpc-c.sourceforge.net/ XMLRPC-C], preferably something over version 1.07. {{{ svn co https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable/ xmlrpc-c-svn cd xmlrpc-c-svn ./configure --disable-cplusplus make make install cd .. }}} Unfortunately the 'make install' has failed for me with every version of [http://xmlrpc-c.sourceforge.net/ XMLRPC-C] I've tried, so I decided to copy the neccessary files by myself. {{{ mkdir /usr/local/include/xmlrpc-c cp /usr/local/src/xmlrpc-c-svn/include/xmlrpc-c/*.h /usr/local/include/xmlrpc-c/ ln -s /usr/local/include/xmlrpc-c/oldxmlrpc.h /usr/local/include/xmlrpc.h ln -s /usr/local/include/xmlrpc-c/server.h /usr/local/include/xmlrpc_server.h ln -s /usr/local/include/xmlrpc-c/server_abyss.h /usr/local/include/xmlrpc_abyss.h ln -s /usr/local/include/xmlrpc-c/server_w32httpsys.h /usr/local/include/xmlrpc_server_w32httpsys.h ln -s /usr/local/include/xmlrpc-c/client.h /usr/local/include/xmlrpc_client.h ln -s /usr/local/include/xmlrpc-c/server_cgi.h /usr/local/include/xmlrpc_cgi.h; cp /usr/local/src/xmlrpc-c-svn/xmlrpc-c-config /usr/local/bin/ cp /usr/local/src/xmlrpc-c-svn/lib/abyss/src/*.a /usr/local/lib/ cp /usr/local/src/xmlrpc-c-svn/lib/abyss/src/*.dll /usr/local/lib/ cp /usr/local/src/xmlrpc-c-svn/lib/expat/xmlparse/*.a /usr/local/lib/ cp /usr/local/src/xmlrpc-c-svn/lib/expat/xmlparse/*.dll /usr/local/lib/ cp /usr/local/src/xmlrpc-c-svn/lib/expat/xmltok/*.a /usr/local/lib/ cp /usr/local/src/xmlrpc-c-svn/lib/expat/xmltok/*.dll /usr/local/lib/ cp /usr/local/src/xmlrpc-c-svn/lib/libutil/*.a /usr/local/lib/ cp /usr/local/src/xmlrpc-c-svn/lib/libutil/*.dll /usr/local/lib/ cp /usr/local/src/xmlrpc-c-svn/src/*.a /usr/local/lib/ cp /usr/local/src/xmlrpc-c-svn/src/*.dll /usr/local/lib/ }}} == Installing rTorrent == #rtorrent Now download the latest [http://libtorrent.rakshasa.no/ rTorrent] source from the [http://libtorrent.rakshasa.no/browser/trunk svn repository]. {{{ svn co svn://rakshasa.no/libtorrent/trunk/rtorrent rtorrent-svn cd rtorrent-svn ./autogen.sh ./configure --with-xmlrpc-c }}} We are going to need to do some modification on the source code, to be able to compile [http://libtorrent.rakshasa.no/ rTorrent]. First add some extra lines to src/display/window_file_list.cc ([http://libtorrent.rakshasa.no/ rTorrent] trac, [http://libtorrent.rakshasa.no/ticket/1495 ticket #1495]). in src/display/window_file_list.cc: {{{ #include namespace std { typedef std::basic_string wstring; }; }}} The remaining modifications are described in the [http://libtorrent.rakshasa.no/ rTorrent] trac, [http://libtorrent.rakshasa.no/ticket/1184 ticket #1184]. in src/input/path_input.cc: {{{ #include #include #include #include struct _transform_filename { void operator () (utils::directory_entry& entry) { if (S_ISDIR(entry.d_type)) entry.d_name += '/'; } }; }}} in src/utils/directory.cc: {{{ #include #include #include #include bool Directory::update(int flags) { if (m_path.empty()) throw torrent::input_error("Directory::update() tried to open an empty path."); std::string path=rak::path_expand(m_path); DIR* d = opendir(path.c_str()); if (d == NULL) return false; struct dirent* entry; while ((entry = readdir(d)) != NULL) { if ((flags & update_hide_dot) && entry->d_name[0] == '.') continue; std::string full_path=path+'/'; full_path+=entry->d_name; struct stat sb; if(stat(full_path.c_str(),&sb)) continue; iterator itr = base_type::insert(end(),value_type()); itr->d_fileno = sb.st_ino; itr->d_reclen = 0; // doesn't seem to get used anywhere. itr->d_type = sb.st_mode; #ifdef DIRENT_NAMLEN_EXISTS_FOOBAR itr->d_name = std::string(entry->d_name, entry->d_name + entry->d_namlen); #else itr->d_name = std::string(entry->d_name); #endif } closedir(d); if (flags & update_sort) std::sort(begin(), end()); return true; } }}} in src/rpc/scgi.cc: change AF_LOCAL to AF_UNIX in src/signal_handler.h: use signal.h instead off sys/signal.h Modify the files, save them, compile and install [http://libtorrent.rakshasa.no/ rTorrent]. == Screenshots == #screenshots [[myImage(/rtwi/screenshots/rtorrent_on_windows/rtorrent_on_windows_startup.th.png, /rtwi/screenshots/rtorrent_on_windows/rtorrent_on_windows_startup.png, rTorrent on Windows (startup))]] [[myImage(/rtwi/screenshots/rtorrent_on_windows/rtorrent_on_windows.th.png, /rtwi/screenshots/rtorrent_on_windows/rtorrent_on_windows.png, rTorrent on Windows)]]