Rename a number of libraries and executables to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent c43637b57f
commit c82fea0807

@ -11,5 +11,5 @@ X-TDE-Library=kcontrol_module
X-TDE-FactoryName=kcontrol_module
X-TDE-RootOnly=false
Type=Application
Exec=kcmshell kcontrol_module
Exec=tdecmshell kcontrol_module
Categories=QT;TDE;X-TDE-settings-system;

@ -17,7 +17,7 @@
import kdedistutils
kdedistutils.setup(name="kioslave",
kdedistutils.setup(name="tdeioslave",
version="0.1.0",
author="AUTHOR",
author_email="YOUR@EMAIL.com",
@ -25,6 +25,6 @@ kdedistutils.setup(name="kioslave",
min_kde_version = "3.0.0",
min_qt_version = "3.0.0",
license = "GPL",
application_data = ['src/kioslave.py'],
application_data = ['src/tdeioslave.py'],
docbooks = [ ('doc/en','en') ],
kioslaves = [ ('src/kioslave.protocol','kioslave.py')] )
tdeioslaves = [ ('src/tdeioslave.protocol','tdeioslave.py')] )

@ -1,6 +1,6 @@
[Protocol]
exec=kioslave
protocol=kioslave
exec=tdeioslave
protocol=tdeioslave
input=none
output=filesystem
listing=Name,Type,Size,Date

@ -1,6 +1,6 @@
#!/usr/bin/python
###########################################################################
# kioslave - description #
# tdeioslave - description #
# ------------------------------ #
# begin : Mon May 2 2005 #
# copyright : (C) 2005 by AUTHOR #
@ -31,13 +31,13 @@ DEBUG = 1
class SlaveClass(KIO.SlaveBase):
"""SlaveClass(KIO.SlaveBase)
See tdelibs/kio/kio/slavebase.h for virtual functions to override.
See tdelibs/tdeio/tdeio/slavebase.h for virtual functions to override.
"""
########################################################################
def __init__(self, pool, app):
# We must call the initialisation method of the base class.
KIO.SlaveBase.__init__(self, "kioslave", pool, app)
KIO.SlaveBase.__init__(self, "tdeioslave", pool, app)
# Attach the DCOP client object associated with this IOSlave to the
# DCOP server.
@ -355,7 +355,7 @@ class SlaveClass(KIO.SlaveBase):
############################################################################
def debug(self,msg):
if DEBUG == 0: return
print "kioslave:"+str(msg)+"\n"
print "tdeioslave:"+str(msg)+"\n"
sys.stdout.flush()
############################################################################
@ -496,7 +496,7 @@ class RAMDir(object):
def debug(self,msg):
if DEBUG == 0: return
print "kioslave:"+str(msg)+"\n"
print "tdeioslave:"+str(msg)+"\n"
sys.stdout.flush()
############################################################################

@ -424,19 +424,19 @@ features in <literal role="extension">.desktop</literal> files.
</chapter>
<!-- KIO-Slaves -->
<chapter id="kioslaves">
<chapter id="tdeioslaves">
<title>KIO Slaves</title>
<para>
&appname; can be used for the creation of kio-slaves. &appname; handles the C++
glue code needed for making kioslaves in Python.
glue code needed for making tdeioslaves in Python.
<ulink url="http://developer.kde.org/documentation/library/kdeqt/trinityarch/nettransparency.html">developer.kde.org</ulink>
has some documentation about KIO-slaves aimed at C++ programmers.
</para>
<para>
In your <filename>setup.py</filename> file you can specify the list of kioslaves
In your <filename>setup.py</filename> file you can specify the list of tdeioslaves
that need to be installed.
<programlisting>
kioslaves = [ ('src/kioslave.protocol','kioslave.py')] )
tdeioslaves = [ ('src/tdeioslave.protocol','tdeioslave.py')] )
</programlisting>
This is just a list of tuples. The first item is name of the
<literal role="extension">.protocol</literal> file that you've made for your
@ -577,13 +577,13 @@ application outside of KControl to ease development and debugging.
</para>
</sect1>
<sect1 id="app-template-kioslave">
<sect1 id="app-template-tdeioslave">
<title>KIO-slave Application Template</title>
<para>
The <filename>kioslave</filename> application template is a simple
The <filename>tdeioslave</filename> application template is a simple
KIO-slave that implements a simple RAM disk. Once installed it can be
accessed using kioslave:/ in konqueror. It is initially empty. Files and
directories can be made and deposited. <filename>kioslave.py</filename>
accessed using tdeioslave:/ in konqueror. It is initially empty. Files and
directories can be made and deposited. <filename>tdeioslave.py</filename>
contains more information and comments.
</para>
<note>
@ -591,7 +591,7 @@ contains more information and comments.
Note that the KIO subsystem usually creates multiple running instances
of a kio-slave backend. For the application template, files and directories
are specific to each particular backend instance. When using konqueror the
same instance will be used, but if you try to access kioslave:/ from a
same instance will be used, but if you try to access tdeioslave:/ from a
different process a new (empty!) instance will be craeted. This can be
confusing! Be aware.
</para>

@ -64,8 +64,8 @@ def setup(**arg_dict):
'build_html' : BuildDocbookHTML,
'install_html' : InstallDocbookHTML,
'install_lib' : InstallLibWithRoot,
'build_kioslave' : BuildKioslave,
'install_kioslave' : InstallKioslave}
'build_tdeioslave' : BuildKioslave,
'install_tdeioslave' : InstallKioslave}
for key in kdecmdclass.iterkeys():
cmdclass.setdefault(key,kdecmdclass[key])
@ -80,7 +80,7 @@ class KDEDistribution(Distribution):
self.min_kde_version = None
self.min_qt_version = None
self.kcontrol_modules = None
self.kioslaves = None
self.tdeioslaves = None
self.executable_links = None
self.docbooks = None
self.application_data = None
@ -108,10 +108,10 @@ def has_application_data(self):
return 0
return len(self.distribution.application_data)!=0
def has_kioslaves(self):
if self.distribution.kioslaves is None:
def has_tdeioslaves(self):
if self.distribution.tdeioslaves is None:
return 0
return len(self.distribution.kioslaves)!=0
return len(self.distribution.tdeioslaves)!=0
###########################################################################
# Our slightly extended build command. This also does kcontrol modules.
@ -123,14 +123,14 @@ class BuildKDE(build):
sub_commands = build.sub_commands[:]
sub_commands.append( ('build_kcm',has_kcms) )
sub_commands.append( ('build_kioslave',has_kioslaves) )
sub_commands.append( ('build_tdeioslave',has_tdeioslaves) )
sub_commands.append( ('build_html',has_docbook_html) )
sub_commands.append( ('build_messages',has_messages) )
def __init__(self,dist):
build.__init__(self,dist)
self.has_kcms = has_kcms
self.has_kioslaves = has_kioslaves
self.has_tdeioslaves = has_tdeioslaves
self.has_docbook_html = has_docbook_html
self.has_messages = has_messages
@ -173,8 +173,8 @@ class InstallKDE(install):
user_options.append( ('install-cmd=',None,"Command to use to install the files") )
user_options.append( ('install-xdg-apps=',None,"directory for XDG app files") )
user_options.append( ('install-kcm=',None,"directory for kcm library files") )
user_options.append( ('install-kioslave',None,"directory for kioslave library files") )
user_options.append( ('install-protocol',None,"directory for kioslave protocol files") )
user_options.append( ('install-tdeioslave',None,"directory for tdeioslave library files") )
user_options.append( ('install-protocol',None,"directory for tdeioslave protocol files") )
sub_commands = install.sub_commands[:]
sub_commands.insert(0, ('checkpytde',None) )
@ -183,7 +183,7 @@ class InstallKDE(install):
sub_commands.append( ('install_messages',has_messages) )
sub_commands.append( ('install_html',has_docbook_html) )
sub_commands.append( ('install_kcm',has_kcms) )
sub_commands.append( ('install_kioslave',has_kioslaves) )
sub_commands.append( ('install_tdeioslave',has_tdeioslaves) )
sub_commands.append( ('install_application_data',has_application_data) )
def initialize_options(self):
@ -193,7 +193,7 @@ class InstallKDE(install):
self.install_cmd = None
self.install_xdg_apps = None
self.install_kcm = None
self.install_kioslave = None
self.install_tdeioslave = None
self.install_protocol = None
self.install_application_data = None
install.initialize_options(self)
@ -259,15 +259,15 @@ class InstallKDE(install):
self.install_kcm = os.path.join(ask_kde_config('--install lib --expandvars').strip(),'trinity')
self.announce(" ...kcm library directory is %s" % self.install_kcm)
if self.install_kioslave is None:
self.announce("Detecting kioslave library directory...")
self.install_kioslave = os.path.join(ask_kde_config('--install lib --expandvars').strip(),'trinity')
self.announce(" ...kioslave library directory is %s" % self.install_kioslave)
if self.install_tdeioslave is None:
self.announce("Detecting tdeioslave library directory...")
self.install_tdeioslave = os.path.join(ask_kde_config('--install lib --expandvars').strip(),'trinity')
self.announce(" ...tdeioslave library directory is %s" % self.install_tdeioslave)
if self.install_protocol is None:
self.announce("Detecting kioslave protocol directory...")
self.announce("Detecting tdeioslave protocol directory...")
self.install_protocol = ask_kde_config('--install services --expandvars').strip()
self.announce(" ...kioslave protocol directory is %s" % self.install_protocol)
self.announce(" ...tdeioslave protocol directory is %s" % self.install_protocol)
install.finalize_options(self)
@ -1432,14 +1432,14 @@ class InstallI18NMessages(Command):
class BuildKioslave(Command):
description = "Build Kioslaves"
user_options = [('no-kioslave',None,"Don't build kioslaves"),
user_options = [('no-tdeioslave',None,"Don't build tdeioslaves"),
('build-dir=','b', "build directory (where to install from)"),
('python-dir=',None,'Directory containing the Python installation'),
('python-inc-dir=',None,'Directory containing C Header files for Python'),
('kde-inc-dir=',None,'Directory containing C++ header files for KDE'),
('kde-lib-dir=',None,'Directory containing library files for KDE'),
('kde-kioslave-lib-dir=',None,'Directory for KDE kioslave library files'),
('kde-protocol-dir=',None,'Directory for KDE kioslave protocol files'),
('kde-tdeioslave-lib-dir=',None,'Directory for KDE tdeioslave library files'),
('kde-protocol-dir=',None,'Directory for KDE tdeioslave protocol files'),
('qt-inc-dir=',None,'Directory containing C++ header files for Qt'),
('qt-lib-dir=',None,'Directory containing library files for Qt'),
('sip-dir=','/usr/lib/pyshared/python*','Directory containing the sip library files'),
@ -1449,13 +1449,13 @@ class BuildKioslave(Command):
('data-dir=',None,'installation directory for data (script) files')]
def initialize_options(self):
self.no_kioslave = 0
self.no_tdeioslave = 0
self.build_dir = None
self.python_inc_dir = None
self.python_dir = None
self.kde_inc_dir = None
self.kde_lib_dir = None
self.kde_kioslave_lib_dir = None
self.kde_tdeioslave_lib_dir = None
self.kde_protocol_dir = None
self.qt_inc_dir = None
self.qt_lib_dir = None
@ -1466,7 +1466,7 @@ class BuildKioslave(Command):
self.data_dir = None
def finalize_options(self):
if self.no_kioslave==0:
if self.no_tdeioslave==0:
self.set_undefined_options('install', ('build_base', 'build_dir'),('install_application_data','data_dir'))
install = self.get_finalized_command('install')
@ -1494,13 +1494,13 @@ class BuildKioslave(Command):
self.kde_lib_dir = "/opt/trinity/lib/"
self.announce("Using %s for KDE library files" % self.kde_lib_dir)
# KDE kioslave lib dir
#if self.kde_kioslave_lib_dir is None:
# self.kde_kioslave_lib_dir = os.path.join(self.kde_lib_dir,"trinity")
self.kde_kioslave_lib_dir = "/opt/trinity/lib/trinity/"
if FindFileInPaths('kio_*.so',[self.kde_kioslave_lib_dir]) is None:
raise SystemExit, "Failed to find KDE Kioslave library files in: %s" % self.kde_kioslave_lib_dir
self.announce("Using %s for KDE Kioslave library files" % self.kde_kioslave_lib_dir)
# KDE tdeioslave lib dir
#if self.kde_tdeioslave_lib_dir is None:
# self.kde_tdeioslave_lib_dir = os.path.join(self.kde_lib_dir,"trinity")
self.kde_tdeioslave_lib_dir = "/opt/trinity/lib/trinity/"
if FindFileInPaths('kio_*.so',[self.kde_tdeioslave_lib_dir]) is None:
raise SystemExit, "Failed to find KDE Kioslave library files in: %s" % self.kde_tdeioslave_lib_dir
self.announce("Using %s for KDE Kioslave library files" % self.kde_tdeioslave_lib_dir)
# Qt inc dir
if self.qt_inc_dir is None:
@ -1618,17 +1618,17 @@ class BuildKioslave(Command):
self.python_sub_dirs.append(base)
def get_command_name(self):
return 'build_kioslave'
return 'build_tdeioslave'
def run(self):
if self.no_kioslave:
if self.no_tdeioslave:
self.announce("Skipping KIO Slaves")
return
if not os.path.isdir(self.build_dir):
os.mkdir(self.build_dir)
for moduletuple in self.distribution.kioslaves:
for moduletuple in self.distribution.tdeioslaves:
self.announce("Building KIO Slave from protocol file %s." % moduletuple[0])
protocolfilename = moduletuple[0]
@ -1646,7 +1646,7 @@ class BuildKioslave(Command):
pass
fhandle.close()
except IOError:
raise SystemExit, "Failed to find kioslave protocol file: %s" % moduletuple[0]
raise SystemExit, "Failed to find tdeioslave protocol file: %s" % moduletuple[0]
# Sanity check.
if libraryname is None:
@ -1745,7 +1745,7 @@ class BuildKioslave(Command):
cmdlist.append("-export-dynamic")
# object
cmdlist.append(outputfile)
cmdlist.append("-rpath"); cmdlist.append(self.kde_kioslave_lib_dir)
cmdlist.append("-rpath"); cmdlist.append(self.kde_tdeioslave_lib_dir)
cmdlist.append("-o"); cmdlist.append(os.path.join(self.build_dir,stub_la_name))
# Link libs
linklist = []
@ -1805,7 +1805,7 @@ PyObject* call_function(PyObject *callable, PyObject *args) {
PyObject *result, *pArgs;
if (callable == NULL) {
printf(MODULE_NAME " kioslave error: callable == NULL in call_function\n");
printf(MODULE_NAME " tdeioslave error: callable == NULL in call_function\n");
return NULL;
}
@ -1852,7 +1852,7 @@ extern "C" {
Py_XDECREF(pName);
if(pModule == NULL) {
printf(MODULE_NAME " kioslave error: pModule == NULL\n");
printf(MODULE_NAME " tdeioslave error: pModule == NULL\n");
return 1;
} else {
PyObject *pClass, *pMethod, *pArgs, *pArg1, *pArg2, *pInstance;
@ -1864,7 +1864,7 @@ extern "C" {
pClass = PyDict_GetItemString(pDict, FACTORY);
if(pClass == NULL) {
printf(MODULE_NAME " kioslave error: pClass == NULL\n");
printf(MODULE_NAME " tdeioslave error: pClass == NULL\n");
return 1;
} else {
pArgs = PyTuple_New(2);
@ -1895,9 +1895,9 @@ class InstallKioslave(Command):
description = "Install Kioslave files"
user_options = [
('install-dir=', 'd', "base directory for installing kioslave module files"),
('install-dir=', 'd', "base directory for installing tdeioslave module files"),
('install-cmd=', None, "Command to use to install the files"),
('install-protocol-dir=',None,"directory for kioslave protocol files"),
('install-protocol-dir=',None,"directory for tdeioslave protocol files"),
('build-dir=','b', "build directory (where to install from)"),
('root=', None, "install everything relative to this alternate root directory"),
('force', 'f', "force installation (overwrite existing files)"),
@ -1922,7 +1922,7 @@ class InstallKioslave(Command):
self.set_undefined_options('install',
('build_base', 'build_dir'),
('install_kioslave', 'install_dir'),
('install_tdeioslave', 'install_dir'),
('root', 'root'),
('force', 'force'),
('skip_build', 'skip_build'),
@ -1937,15 +1937,15 @@ class InstallKioslave(Command):
self.install_protocol_dir = change_root(self.root,self.install_protocol_dir)
def get_command_name(self):
return 'install_kioslave'
return 'install_tdeioslave'
def run(self):
if not self.skip_build:
self.run_command('build_kioslave')
self.run_command('build_tdeioslave')
self.announce("Installing Kioslave files...")
for moduletuple in self.distribution.kioslaves:
for moduletuple in self.distribution.tdeioslaves:
self.announce("Building Kioslave module from protocol file %s." % moduletuple[0])
protocolfilename = moduletuple[0]
@ -1963,7 +1963,7 @@ class InstallKioslave(Command):
pass
fhandle.close()
except IOError:
raise SystemExit, "Failed to find kioslave protocol file: %s" % moduletuple[0]
raise SystemExit, "Failed to find tdeioslave protocol file: %s" % moduletuple[0]
if libraryname is None:
raise SystemExit, "Failed to find library name (Was there a exec entry in the protocol file?)"
@ -2045,7 +2045,7 @@ class CheckPyTDE(Command):
self.announce("Checking for a working PyTDE...")
# Try to import modules one by one.
for k_module in ('dcop', 'tdecore', 'tdeui', 'kio', 'kfile', 'tdeparts', 'tdehtml', 'tdespell'):
for k_module in ('dcop', 'tdecore', 'tdeui', 'kio', 'tdefile', 'tdeparts', 'tdehtml', 'tdespell'):
self.announce(k_module)
try:
exec('import ' + k_module)

Loading…
Cancel
Save