This forum has been archived. All content is frozen. Please use KDE Discuss instead.

installing ktorrent 3.3.4 on ubuntu 10.10?

Tags: None
(comma "," separated)
ICANSEEYOU76
Registered Member
Posts
2
Karma
0
I have some sites that I use and I am not allowed to use ktorrent 4.x so I want to downgrade ktorrent to a 3.x.

Ktorrent 4.x is the only one in the synaptic package manager atleast for maverik 10.10. I tried downloading the files from ktorrent.org but cannot get them to install in the terminal.

Is there a more appropriate way of going about this. Any help would be appreciated, thanks!
George
Moderator
Posts
5421
Karma
1
First run sudo apt-get build-dep ktorrent

Then do this:

tar -xvjf ktorrent-3.3.4.tar.bz2
cd ktorrent-3.3.4
cmake -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install

And your done
Berilac
Registered Member
Posts
4
Karma
0
Ah excellent I was having issues with 4.03 after upgrading from 4.02 on ubuntu 10.10.
Followed these instructions and am now all go again, thanks george.
Just one problem the plugins function seems to be not available, the icon is there on the sidebar but no pluggins?

**edit**
Since rebooting all options have returned thanks again George
ICANSEEYOU76
Registered Member
Posts
2
Karma
0
Thanks for the reply, before i recieved the reply someone else sent me a link to some .deb files that I got working after some fiddling. But thanks for the reply, I really appreciate it!

I wish the site would just OK 4.0.3 haha
henge
Registered Member
Posts
8
Karma
0
OS
hi,
using same instructions to downgrade to ktorrent 4.1.0, executed 'make' and all was going well until....

[ 83%] Building CXX object plasma/applet/CMakeFiles/plasma_applet_ktorrent.dir/applet.o
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp: In member function ‘void ktplasma::Applet::iconClicked()’:
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp:343:3: error: ‘TaskDict’ is not a member of ‘TaskManager’
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp:343:25: error: expected ‘;’ before ‘tasks’
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp:344:21: error: ‘TaskManager::TaskDict’ has not been declared
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp:344:40: error: expected ‘;’ before ‘i’
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp:344:58: error: ‘i’ was not declared in this scope
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp:344:63: error: ‘tasks’ was not declared in this scope
make[2]: *** [plasma/applet/CMakeFiles/plasma_applet_ktorrent.dir/applet.o] Error 1
make[1]: *** [plasma/applet/CMakeFiles/plasma_applet_ktorrent.dir/all] Error 2
make: *** [all] Error 2

can anyone shed any light?
cheers!
George
Moderator
Posts
5421
Karma
1
henge wrote:hi,
using same instructions to downgrade to ktorrent 4.1.0, executed 'make' and all was going well until....

[ 83%] Building CXX object plasma/applet/CMakeFiles/plasma_applet_ktorrent.dir/applet.o
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp: In member function ‘void ktplasma::Applet::iconClicked()’:
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp:343:3: error: ‘TaskDict’ is not a member of ‘TaskManager’
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp:343:25: error: expected ‘;’ before ‘tasks’
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp:344:21: error: ‘TaskManager::TaskDict’ has not been declared
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp:344:40: error: expected ‘;’ before ‘i’
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp:344:58: error: ‘i’ was not declared in this scope
/media/Data/Data/Tech/Apps/ktorrent-4.1.0/plasma/applet/applet.cpp:344:63: error: ‘tasks’ was not declared in this scope
make[2]: *** [plasma/applet/CMakeFiles/plasma_applet_ktorrent.dir/applet.o] Error 1
make[1]: *** [plasma/applet/CMakeFiles/plasma_applet_ktorrent.dir/all] Error 2
make: *** [all] Error 2

can anyone shed any light?
cheers!


Older versions of the plasma applet will not compile with a recent KDE version.

Your best bet would be to disable the plasma stuff by removing the add_subdirectory(plasma) line in the toplevel CMakeLists.txt and rerunning cmake. I'm guessing that you can live without the plasma applet.
henge
Registered Member
Posts
8
Karma
0
OS
thanks George, worked perfectly and i now have 4.1.0 installed!
User avatar
ulatekh
Registered Member
Posts
5
Karma
0
This patch gets ktorrent 4.1.3 building and running under Fedora Core 17...I assume it'll work for Ubuntu 10.10 also. I just copied a little code from the ktorrent 4.2 source code to make this work.

ktorrent 4.2 wasn't respecting the per-torrent upload speed limit, and the ktorrent people said they couldn't reproduce the problem, so I wanted to downgrade.

Code: Select all
--- ktorrent-4.1.3/plasma/applet/applet.cpp   2011-11-22 10:23:25.000000000 -0700
+++ ktorrent-4.1.3-sb/plasma/applet/applet.cpp   2013-01-06 13:13:07.021103763 -0700
@@ -21,6 +21,9 @@
 #include "applet.h"
 #include <QFile>
 #include <QGraphicsLinearLayout>
+#include <QDBusConnection>
+#include <QDBusConnectionInterface>
+#include <QDBusMessage>
 #include <KConfigDialog>
 #include <KLocale>
 #include <KRun>
@@ -340,19 +343,37 @@
 
    void Applet::iconClicked()
    {
-      TaskManager::TaskDict tasks = TaskManager::TaskManager::self()->tasks();
-      for (TaskManager::TaskDict::iterator i = tasks.begin();i != tasks.end();i ++)
+      QDBusConnection session_bus = QDBusConnection::sessionBus();
+      QDBusConnectionInterface* dbus_service = session_bus.interface();
+      if (!session_bus.isConnected() || !dbus_service || !dbus_service->isServiceRegistered("org.ktorrent.ktorrent"))
+      {
+         // can't find the window, try launching it
+         KUrl::List empty;
+         KRun::run("ktorrent", empty, 0);
+      }
+      else
       {
-         if (i.value()->className() == "ktorrent")
-         {
-            KWindowSystem::activateWindow(i.key());
-            return;
-         }
+         QDBusMessage msg = QDBusMessage::createMethodCall("org.ktorrent.ktorrent", "/ktorrent/MainWindow_1", "org.kde.KMainWindow", "winId");
+         QDBusPendingCall call = session_bus.asyncCall(msg, 5000);
+         QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher(call ,this);
+         connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(dbusCallFinished(QDBusPendingCallWatcher*)));
       }
-
-      // can't find the window, try launching it
-      KUrl::List empty;
-      KRun::run("ktorrent", empty, 0);
+   }
+   
+   void Applet::dbusCallFinished(QDBusPendingCallWatcher* self)
+   {
+      if (self->isError())
+      {
+         // call failed, try launching it
+         KUrl::List empty;
+         KRun::run("ktorrent", empty, 0);
+      }
+      else
+      {
+         QDBusPendingReply<qlonglong> reply = *self;
+         KWindowSystem::activateWindow(reply.value());      
+      }
+      self->deleteLater();
    }
 
    void Applet::clearData()
--- ktorrent-4.1.3/plasma/applet/applet.h   2011-11-22 10:23:25.000000000 -0700
+++ ktorrent-4.1.3-sb/plasma/applet/applet.h   2013-01-06 13:14:50.611291345 -0700
@@ -27,6 +27,7 @@
 #include "fadingnavigationwidget.h"
 
 class QGraphicsLinearLayout;
+class QDBusPendingCallWatcher;
 
 namespace Plasma
 {
@@ -68,6 +69,7 @@
       void iconClicked();
       void selectPrev();
       void selectNext();
+      void dbusCallFinished(QDBusPendingCallWatcher* self);
       
    private:
       void updateTorrentCombo();


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]