summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--CMakeL10n.txt3
-rw-r--r--CMakeLists.txt14
-rw-r--r--INSTALL29
-rw-r--r--README.md32
-rw-r--r--admin/detect_uds_hidden.diff29
-rw-r--r--admin/generic.py635
-rw-r--r--admin/kde.py843
m---------cmake0
-rw-r--r--doc/en/CMakeLists.txt12
-rw-r--r--doc/en/tdeioslave/locate/index.docbook (renamed from doc/en/index.docbook)0
-rw-r--r--doc/en/tdeioslave/locate/screenshot.png (renamed from doc/en/screenshot.png)bin22602 -> 22602 bytes
-rw-r--r--po/CMakeLists.txt17
-rwxr-xr-xpo/messages.sh69
-rw-r--r--src/CMakeL10n.txt9
-rw-r--r--src/CMakeLists.txt15
-rw-r--r--src/locate.desktop3
-rw-r--r--src/locate.protocol9
-rw-r--r--src/locater.cpp18
-rw-r--r--src/locater.h3
-rw-r--r--src/locater.protocol9
-rw-r--r--src/rlocate.protocol9
-rw-r--r--src/tdeio_locate.cpp46
-rw-r--r--templates/cpp22
-rw-r--r--templates/h22
-rw-r--r--translations/desktop_files/tdeio-locate-desktops.pot27
-rw-r--r--translations/messages/de.po (renamed from po/de/tdeio-locate.po)85
-rw-r--r--translations/messages/fr.po (renamed from po/fr/tdeio-locate.po)6
-rw-r--r--translations/messages/pt.po348
-rw-r--r--translations/messages/tdeio-locate.pot (renamed from po/tdeio-locate.pot)21
30 files changed, 563 insertions, 1775 deletions
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 69dd7b2..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "cmake"]
- path = cmake
- url = https://system@scm.trinitydesktop.org/scm/git/tde-common-cmake
diff --git a/CMakeL10n.txt b/CMakeL10n.txt
index a525b71..a91bd2a 100644
--- a/CMakeL10n.txt
+++ b/CMakeL10n.txt
@@ -9,12 +9,11 @@
#
#################################################
-cmake_minimum_required( VERSION 2.8 )
+cmake_minimum_required( VERSION 3.1 )
##### include our cmake modules #################
-set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEL10n )
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e315b3c..599bc5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,12 +9,12 @@
#
#################################################
-cmake_minimum_required( VERSION 2.8 )
+cmake_minimum_required( VERSION 3.1 )
##### general package setup #####################
-project( tdeio-locate )
+project( tdeio_locate )
##### include essential cmake modules ###########
@@ -31,10 +31,14 @@ include( FindPkgConfig )
##### include our cmake modules #################
-set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
+##### set version number ########################
+
+tde_set_project_version( )
+
+
##### setup install paths #######################
include( TDESetupPaths )
@@ -68,8 +72,8 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined"
##### source directories ########################
add_subdirectory( src )
-tde_conditional_add_subdirectory( BUILD_DOC doc )
-tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
+tde_conditional_add_project_docs( BUILD_DOC )
+tde_conditional_add_project_translations( BUILD_TRANSLATIONS )
##### write configure files #####################
diff --git a/INSTALL b/INSTALL
index d6881ba..3c687d6 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,19 +1,16 @@
-This package requires CMake and tdelibs to build
+Basic Installation
+==================
-==================== BUILDING ====================
+tdeio-locate relies on cmake to build.
-mkdir /tmp/tdeio-locate
-cd /tmp/tdeio-locate
+Here are suggested default options:
-cmake <this source directory> \
- -DCMAKE_INSTALL_PREFIX=/opt/trinity \
- -DCMAKE_VERBOSE_MAKEFILE=ON \
- -DWITH_QT3=ON \
- -DQTDIR=/opt/qt \
- -DQT_LIBRARY_DIRS=/opt/qt/lib \
- -DBUILD_ALL=ON
-make VERBOSE=1
-
-================== INSTALLATION ===================
-
-make install
+ -DCMAKE_INSTALL_PREFIX="/opt/trinity" \
+ -DCONFIG_INSTALL_DIR="/etc/trinity" \
+ -DSYSCONF_INSTALL_DIR="/etc/trinity" \
+ -DXDG_MENU_INSTALL_DIR="/etc/xdg/menus" \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_VERBOSE_MAKEFILE="ON" \
+ -DCMAKE_SKIP_RPATH="OFF" \
+ -DBUILD_ALL="ON" \
+ -DWITH_ALL_OPTIONS="ON"
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f7b778f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,32 @@
+TDEIO locate
+
+The TDEIO locate slave adds support for the "locate:" and "locater:"
+protocols to Konqueror and other TDE applications.
+
+This enables to perform locate searches as they would be done in a terminal.
+The result is displayed just as a directory.
+
+.
+
+Contributing
+--------------
+
+If you wish to contribute to tdeio-locate, you might do so:
+
+- TDE Gitea Workspace (TGW) collaboration tool.
+ https://mirror.git.trinitydesktop.org/gitea
+
+- TDE Weblate Translation Workspace (TWTW) collaboration tool.
+ https://mirror.git.trinitydesktop.org/weblate
+
+
+Translations status
+---------------------
+
+### messages
+[![Translations status](https://mirror.git.trinitydesktop.org/weblate/widgets/applications/-/tdeio-locate/multi-auto.svg
+"Engage in translating")](https://mirror.git.trinitydesktop.org/weblate/projects/applications/tdeio-locate/)
+
+### desktop files
+[![Translations status](https://mirror.git.trinitydesktop.org/weblate/widgets/applications/-/tdeio-locate-desktop-files/multi-auto.svg
+"Engage in translating")](https://mirror.git.trinitydesktop.org/weblate/projects/applications/tdeio-locate-desktop-files/)
diff --git a/admin/detect_uds_hidden.diff b/admin/detect_uds_hidden.diff
deleted file mode 100644
index d92ccaf..0000000
--- a/admin/detect_uds_hidden.diff
+++ /dev/null
@@ -1,29 +0,0 @@
-Only in tdeio-locate/admin/: .arch-ids
-diff -ur bksys-1.5.1.pre4/admin/kde.py tdeio-locate/admin/kde.py
---- bksys-1.5.1.pre4/admin/kde.py 2005-08-16 23:16:32.000000000 +0200
-+++ tdeio-locate/admin/kde.py 2005-08-17 12:27:49.000000000 +0200
-@@ -242,6 +242,15 @@
- qtlibs=qtdir+"/lib"+libsuffix
- env['QTLIBPATH']=qtlibs
-
-+ ## check if KDE has the UDS_HIDDEN patch
-+ print "Checking KDE for UDS_HIDDEN : ",
-+ if 'UDS_HIDDEN' in os.popen('cat ' + env['KDEINCLUDEPATH'] + '/tdeio/global.h').read():
-+ env['HAVE_UDS_HIDDEN']='1'
-+ p('GREEN', 'yes')
-+ else:
-+ env['HAVE_UDS_HIDDEN']='0'
-+ p('YELLOW', 'no')
-+
- def generate(env):
- """"Set up the qt and kde environment and builders - the moc part is difficult to understand """
-
-@@ -304,7 +313,7 @@
- ('KDELOCALE', ''), ('KDEDOC', ''), ('KDEKCFG', ''),
- ('KDEXDG', ''), ('KDEXDGDIR', ''), ('KDEMENU', ''),
- ('KDEMIME', ''), ('KDEICONS', ''), ('KDESERV', ''),
-- ('KDESERVTYPES', ''), ('KDEAPPS', ''),
-+ ('KDESERVTYPES', ''), ('KDEAPPS', ''), ('HAVE_UDS_HIDDEN', ''),
- )
- opts.Update(env)
-
diff --git a/admin/generic.py b/admin/generic.py
deleted file mode 100644
index b86d0b7..0000000
--- a/admin/generic.py
+++ /dev/null
@@ -1,635 +0,0 @@
-## Thomas Nagy, 2005
-""" Run scons -h to display the associated help, or look below """
-
-import os, re, types, sys, string, shutil, stat, glob
-import SCons.Defaults
-import SCons.Tool
-import SCons.Util
-from SCons.Script.SConscript import SConsEnvironment
-from SCons.Options import Options, PathOption
-
-def getreldir(lenv):
- cwd=os.getcwd()
- root=SCons.Node.FS.default_fs.Dir('#').abspath
- return cwd.replace(root,'').lstrip('/')
-
-def dist(env, appname, version=None):
- ### To make a tarball of your masterpiece, use 'scons dist'
- import os
- if 'dist' in sys.argv:
- if not version: VERSION=os.popen("cat VERSION").read().rstrip()
- else: VERSION=version
- FOLDER = appname+'-'+VERSION
- TMPFOLD = ".tmp"+FOLDER
- ARCHIVE = FOLDER+'.tar.bz2'
-
- ## check if the temporary directory already exists
- os.popen('rm -rf %s %s %s' % (FOLDER, TMPFOLD, ARCHIVE) )
-
- ## create a temporary directory
- startdir = os.getcwd()
-
- os.popen("mkdir -p "+TMPFOLD)
- os.popen("cp -R * "+TMPFOLD)
- os.popen("mv "+TMPFOLD+" "+FOLDER)
-
- ## remove scons-local if it is unpacked
- os.popen("rm -rf "+FOLDER+"/scons "+FOLDER+"/sconsign "+FOLDER+"/scons-local-0.96.1")
-
- ## remove our object files first
- os.popen("find "+FOLDER+" -name \"cache\" | xargs rm -rf")
- os.popen("find "+FOLDER+" -name \"build\" | xargs rm -rf")
- os.popen("find "+FOLDER+" -name \"*.pyc\" | xargs rm -f")
-
- ## CVS cleanup
- os.popen("find "+FOLDER+" -name \"CVS\" | xargs rm -rf")
- os.popen("find "+FOLDER+" -name \".cvsignore\" | xargs rm -rf")
-
- ## Subversion cleanup
- os.popen("find %s -name .svn -type d | xargs rm -rf" % FOLDER)
-
- ## GNU Arch cleanup
- os.popen("find "+FOLDER+" -name \"{arch}\" | xargs rm -rf")
- os.popen("find "+FOLDER+" -name \".arch-i*\" | xargs rm -rf")
-
- ## Create the tarball (coloured output)
- print "\033[92m"+"Writing archive "+ARCHIVE+"\033[0m"
- os.popen("tar cjf "+ARCHIVE+" "+FOLDER)
-
- ## Remove the temporary directory
- os.popen('rm -rf '+FOLDER)
- env.Exit(0)
-
- if 'distclean' in sys.argv:
- ## Remove the cache directory
- import os, shutil
- if os.path.isdir(env['CACHEDIR']): shutil.rmtree(env['CACHEDIR'])
- os.popen("find . -name \"*.pyc\" | xargs rm -rf")
- env.Exit(0)
-
-colors= {
-'BOLD' :"\033[1m",
-'RED' :"\033[91m",
-'GREEN' :"\033[92m",
-'YELLOW':"\033[1m", #"\033[93m" # unreadable on white backgrounds
-'CYAN' :"\033[96m",
-'NORMAL':"\033[0m",
-}
-
-def pprint(env, col, str, label=''):
- if env.has_key('NOCOLORS'):
- print "%s %s" % (str, label)
- return
- try: mycol=colors[col]
- except: mycol=''
- print "%s%s%s %s" % (mycol, str, colors['NORMAL'], label)
-
-class genobj:
- def __init__(self, val, env):
- if not val in "program shlib tdeioslave staticlib".split():
- print "unknown genobj given: "+val
- env.Exit(1)
-
- self.type = val
- self.orenv = env
- self.env = None
- self.executed = 0
-
- self.target=''
- self.src=None
-
- self.cxxflags=''
- self.cflags=''
- self.includes=''
-
- self.linkflags=''
- self.libpaths=''
- self.libs=''
-
- # vars used by shlibs
- self.vnum=''
- self.libprefix=''
-
- # a directory where to install the targets (optional)
- self.instdir=''
-
- # change the working directory before reading the targets
- self.chdir=''
-
- # unix permissions
- self.perms=''
-
- # these members are private
- self.chdir_lock=None
- self.dirprefix='./'
- self.old_os_dir=''
- self.old_fs_dir=''
- self.p_local_shlibs=[]
- self.p_local_staticlibs=[]
- self.p_global_shlibs=[]
-
- self.p_localsource=None
- self.p_localtarget=None
-
- # work directory
- self.workdir_lock=None
- self.orig_fs_dir=SCons.Node.FS.default_fs.getcwd()
- self.not_orig_fs_dir=''
- self.not_orig_os_dir=''
-
- if not env.has_key('USE_THE_FORCE_LUKE'): env['USE_THE_FORCE_LUKE']=[self]
- else: env['USE_THE_FORCE_LUKE'].append(self)
-
- def joinpath(self, val):
- dir=self.dirprefix
-
- thing=self.orenv.make_list(val)
- files=[]
- bdir="./"
- if self.orenv.has_key('_BUILDDIR_'): bdir=self.orenv['_BUILDDIR_']
-
- for v in thing:
- files.append( self.orenv.join(bdir, dir, v) )
-
- #for f in files: print f
- #print "\n"
- return files
-
- # a list of paths, with absolute and relative ones
- def fixpath(self, val):
- dir=self.dirprefix
-
- thing=self.orenv.make_list(val)
- ret=[]
- bdir="./"
- if self.orenv.has_key('_BUILDDIR_'): bdir=self.orenv['_BUILDDIR_']
- for v in thing:
- if v[:2] == "./" or v[:3] == "../":
- ret.append( self.orenv.join(bdir, dir, v) )
- elif v[:1] == "#" or v[:1] == "/":
- ret.append( v )
- else:
- ret.append( self.orenv.join(bdir, dir, v) )
- return ret
-
- def lockworkdir(self):
- if self.workdir_lock: return
- self.workdir_lock=1
- self.not_orig_fs_dir=SCons.Node.FS.default_fs.getcwd()
- self.not_orig_os_dir=os.getcwd()
- SCons.Node.FS.default_fs.chdir( self.orig_fs_dir, change_os_dir=1)
-
- def unlockworkdir(self):
- if not self.workdir_lock: return
- SCons.Node.FS.default_fs.chdir( self.not_orig_fs_dir, change_os_dir=0)
- os.chdir(self.not_orig_os_dir)
- self.workdir_lock=None
-
- def lockchdir(self):
- if not self.chdir: return
- if self.chdir_lock: return
- self.chdir_lock=1
- SConfFS=SCons.Node.FS.default_fs
- self.old_fs_dir=SConfFS.getcwd()
- self.old_os_dir=os.getcwd()
- SConfFS.chdir( SConfFS.Dir('#/'+self.chdir), change_os_dir=1)
-
- def unlockchdir(self):
- if not self.chdir: return
- if not self.chdir_lock: return
- SCons.Node.FS.default_fs.chdir(self.old_fs_dir, change_os_dir=0)
- os.chdir(self.old_os_dir)
- self.chdir_lock=None
-
- def execute(self):
- if self.executed: return
-
- self.lockchdir()
-
- if self.orenv.has_key('DUMPCONFIG'):
- print self.xml()
- self.unlockchdir()
- self.executed=1
- return
-
- self.env = self.orenv.Copy()
-
- if not self.p_localtarget: self.p_localtarget = self.joinpath(self.target)
- if not self.p_localsource: self.p_localsource = self.joinpath(self.src)
-
- if (not self.src or len(self.src) == 0) and not self.p_localsource:
- self.env.pprint('RED',"no source file given to object - self.src")
- self.env.Exit(1)
- if not self.target:
- self.env.pprint('RED',"no target given to object - self.target")
- self.env.Exit(1)
- if not self.env.has_key('nosmart_includes'): self.env.AppendUnique(CPPPATH=['./'])
- if self.type == "tdeioslave": self.libprefix=''
-
- if len(self.includes)>0: self.env.AppendUnique(CPPPATH=self.fixpath(self.includes))
- if len(self.cxxflags)>0: self.env.AppendUnique(CXXFLAGS=self.env.make_list(self.cxxflags))
- if len(self.cflags)>0: self.env.AppendUnique(CCFLAGS=self.env.make_list(self.cflags))
-
- llist=self.env.make_list(self.libs)
- lext=['.so', '.la']
- sext='.a'.split()
- for l in llist:
- sal=SCons.Util.splitext(l)
- if len(sal)>1:
- if sal[1] in lext: self.p_local_shlibs.append(self.fixpath(sal[0]+'.so')[0])
- elif sal[1] in sext: self.p_local_staticlibs.append(sal[0]+'.a')
- else: self.p_global_shlibs.append(l)
-
- if len(self.p_global_shlibs)>0: self.env.AppendUnique(LIBS=self.p_global_shlibs)
- if len(self.libpaths)>0: self.env.PrependUnique(LIBPATH=self.fixpath(self.libpaths))
- if len(self.linkflags)>0: self.env.PrependUnique(LINKFLAGS=self.env.make_list(self.linkflags))
- if len(self.p_local_shlibs)>0:
- self.env.link_local_shlib(self.p_local_shlibs)
- if len(self.p_local_staticlibs)>0:
- self.env.link_local_staticlib(self.p_local_staticlibs)
-
- # the target to return - no more self.env modification is allowed after this part
- ret=None
- if self.type=='shlib' or self.type=='tdeioslave':
- ret=self.env.bksys_shlib(self.p_localtarget, self.p_localsource, self.instdir,
- self.libprefix, self.vnum)
- elif self.type=='program':
- ret=self.env.Program(self.p_localtarget, self.p_localsource)
- if not self.env.has_key('NOAUTOINSTALL'):
- ins=self.env.bksys_install(self.instdir, ret)
- if self.perms: self.env.AddPostAction(ins, self.env.Chmod(ins, self.perms))
- elif self.type=='staticlib':
- ret=self.env.StaticLibrary(self.p_localtarget, self.p_localsource)
-
- # we link the program against a shared library made locally, add the dependency
- if len(self.p_local_shlibs)>0:
- if ret: self.env.Depends( ret, self.p_local_shlibs )
- if len(self.p_local_staticlibs)>0:
- if ret: self.env.Depends( ret, self.p_local_staticlibs )
-
- self.unlockchdir()
- self.executed=1
-
-## Copy function that honors symlinks
-def copy_bksys(dest, source, env):
- if os.path.islink(source):
- #print "symlinking "+source+" "+dest
- if os.path.islink(dest):
- os.unlink(dest)
- os.symlink(os.readlink(source), dest)
- else:
- shutil.copy2(source, dest)
- st=os.stat(source)
- os.chmod(dest, stat.S_IMODE(st[stat.ST_MODE]) | stat.S_IWRITE)
- return 0
-
-## Return a list of things
-def make_list(env, s):
- if type(s) is types.ListType: return s
- else:
- try: return s.split()
- except AttributeError: return s
-
-def join(lenv, s1, s2, s3=None, s4=None):
- if s4 and s3: return lenv.join(s1, s2, lenv.join(s3, s4))
- if s3 and s2: return lenv.join(s1, lenv.join(s2, s3))
- elif not s2: return s1
- # having s1, s2
- #print "path1 is "+s1+" path2 is "+s2+" "+os.path.join(s1,string.lstrip(s2,'/'))
- if not s1: s1="/"
- return os.path.join(s1,string.lstrip(s2,'/'))
-
-def exists(env):
- return true
-
-def generate(env):
- ## Bksys requires scons 0.96
- env.EnsureSConsVersion(0, 96)
-
- SConsEnvironment.pprint = pprint
- SConsEnvironment.make_list = make_list
- SConsEnvironment.join = join
- SConsEnvironment.dist = dist
- SConsEnvironment.getreldir = getreldir
-
- env['HELP']=0
- if '--help' in sys.argv or '-h' in sys.argv or 'help' in sys.argv: env['HELP']=1
- if env['HELP']:
- p=env.pprint
- p('BOLD','*** Instructions ***')
- p('BOLD','--------------------')
- p('BOLD','* scons ','to compile')
- p('BOLD','* scons -j4 ','to compile with several instances')
- p('BOLD','* scons install ','to compile and install')
- p('BOLD','* scons -c install','to uninstall')
- p('BOLD','\n*** Generic options ***')
- p('BOLD','--------------------')
- p('BOLD','* debug ','debug=1 (-g) or debug=full (-g3, slower) else use environment CXXFLAGS, or -O2 by default')
- p('BOLD','* prefix ','the installation path')
- p('BOLD','* extraincludes','a list of paths separated by ":"')
- p('BOLD','* scons configure debug=full prefix=/usr/local extraincludes=/tmp/include:/usr/local')
- p('BOLD','* scons install prefix=/opt/local DESTDIR=/tmp/blah\n')
- return
-
- ## Global cache directory
- # Put all project files in it so a rm -rf cache will clean up the config
- if not env.has_key('CACHEDIR'): env['CACHEDIR'] = env.join(os.getcwd(),'/cache/')
- if not os.path.isdir(env['CACHEDIR']): os.mkdir(env['CACHEDIR'])
-
- ## SCons cache directory
- # This avoids recompiling the same files over and over again:
- # very handy when working with cvs
- if os.getuid() != 0: env.CacheDir(os.getcwd()+'/cache/objects')
-
- # Avoid spreading .sconsign files everywhere - keep this line
- env.SConsignFile(env['CACHEDIR']+'/scons_signatures')
-
- def makeHashTable(args):
- table = { }
- for arg in args:
- if len(arg) > 1:
- lst=arg.split('=')
- if len(lst) < 2: continue
- key=lst[0]
- value=lst[1]
- if len(key) > 0 and len(value) >0: table[key] = value
- return table
-
- env['ARGS']=makeHashTable(sys.argv)
-
- SConsEnvironment.Chmod = SCons.Action.ActionFactory(os.chmod, lambda dest, mode: 'Chmod("%s", 0%o)' % (dest, mode))
-
- ## Special trick for installing rpms ...
- env['DESTDIR']=''
- if 'install' in sys.argv:
- dd=''
- if os.environ.has_key('DESTDIR'): dd=os.environ['DESTDIR']
- if not dd:
- if env['ARGS'] and env['ARGS'].has_key('DESTDIR'): dd=env['ARGS']['DESTDIR']
- if dd:
- env['DESTDIR']=dd
- env.pprint('CYAN','** Enabling DESTDIR for the project ** ',env['DESTDIR'])
-
- ## install symlinks for shared libraries properly
- env['INSTALL'] = copy_bksys
-
- ## Use the same extension .o for all object files
- env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
-
- ## no colors
- if os.environ.has_key('NOCOLORS'): env['NOCOLORS']=1
-
- ## load the options
- cachefile=env['CACHEDIR']+'generic.cache.py'
- opts = Options(cachefile)
- opts.AddOptions(
- ( 'GENCCFLAGS', 'C flags' ),
- ( 'GENCXXFLAGS', 'debug level for the project : full or just anything' ),
- ( 'GENLINKFLAGS', 'additional link flags' ),
- ( 'PREFIX', 'prefix for installation' ),
- ( 'EXTRAINCLUDES', 'extra include paths for the project' ),
- ( 'ISCONFIGURED', 'is the project configured' ),
- )
- opts.Update(env)
-
- # Use this to avoid an error message 'how to make target configure ?'
- env.Alias('configure', None)
-
- # Check if the following command line arguments have been given
- # and set a flag in the environment to show whether or not it was
- # given.
- if 'install' in sys.argv: env['_INSTALL']=1
- else: env['_INSTALL']=0
- if 'configure' in sys.argv: env['_CONFIGURE']=1
- else: env['_CONFIGURE']=0
-
- # Configure the environment if needed
- if not env['HELP'] and (env['_CONFIGURE'] or not env.has_key('ISCONFIGURED')):
- # be paranoid, unset existing variables
- for var in ['GENCXXFLAGS', 'GENCCFLAGS', 'GENLINKFLAGS', 'PREFIX', 'EXTRAINCLUDES', 'ISCONFIGURED', 'EXTRAINCLUDES']:
- if env.has_key(var): env.__delitem__(var)
-
- if env['ARGS'].get('debug', None):
- debuglevel = env['ARGS'].get('debug', None)
- env.pprint('CYAN','** Enabling debug for the project **')
- if (debuglevel == "full"): env['GENCXXFLAGS'] = ['-DDEBUG', '-g3', '-Wall']
- else: env['GENCXXFLAGS'] = ['-DDEBUG', '-g', '-Wall']
- else:
- if os.environ.has_key('CXXFLAGS'):
- # user-defined flags (gentooers will be elighted)
- env['GENCXXFLAGS'] = SCons.Util.CLVar( os.environ['CXXFLAGS'] )
- env.Append( GENCXXFLAGS = ['-DNDEBUG', '-DNO_DEBUG'] )
- else:
- env.Append(GENCXXFLAGS = ['-O2', '-DNDEBUG', '-DNO_DEBUG'])
-
- if os.environ.has_key('CFLAGS'): env['GENCCFLAGS'] = SCons.Util.CLVar( os.environ['CFLAGS'] )
-
- ## FreeBSD settings (contributed by will at freebsd dot org)
- if os.uname()[0] == "FreeBSD":
- if os.environ.has_key('PTHREAD_LIBS'):
- env.AppendUnique( GENLINKFLAGS = SCons.Util.CLVar( os.environ['PTHREAD_LIBS'] ) )
- else:
- syspf = os.popen('/sbin/sysctl kern.osreldate')
- osreldate = int(syspf.read().split()[1])
- syspf.close()
- if osreldate < 500016:
- env.AppendUnique( GENLINKFLAGS = ['-pthread'])
- env.AppendUnique( GENCXXFLAGS = ['-D_THREAD_SAFE'])
- elif osreldate < 502102:
- env.AppendUnique( GENLINKFLAGS = ['-lc_r'])
- env.AppendUnique( GENCXXFLAGS = ['-D_THREAD_SAFE'])
- else:
- env.AppendUnique( GENLINKFLAGS = ['-pthread'])
-
- # User-specified prefix
- if env['ARGS'].has_key('prefix'):
- env['PREFIX'] = os.path.abspath( env['ARGS'].get('prefix', '') )
- env.pprint('CYAN','** installation prefix for the project set to:',env['PREFIX'])
-
- # User-specified include paths
- env['EXTRAINCLUDES'] = env['ARGS'].get('extraincludes', None)
- if env['EXTRAINCLUDES']:
- env.pprint('CYAN','** extra include paths for the project set to:',env['EXTRAINCLUDES'])
-
- env['ISCONFIGURED']=1
-
- # And finally save the options in the cache
- opts.Save(cachefile, env)
-
- def bksys_install(lenv, subdir, files, destfile=None, perms=None):
- """ Install files on 'scons install' """
- if not env['_INSTALL']: return
- basedir = env['DESTDIR']
- install_list=None
- if not destfile: install_list = env.Install(lenv.join(basedir,subdir), lenv.make_list(files))
- elif subdir: install_list = env.InstallAs(lenv.join(basedir,subdir,destfile), lenv.make_list(files))
- else: install_list = env.InstallAs(lenv.join(basedir,destfile), lenv.make_list(files))
- if perms and install_list: lenv.AddPostAction(install_list, lenv.Chmod(install_list, perms))
- env.Alias('install', install_list)
- return install_list
-
- def build_la_file(target, source, env):
- """ Writes a .la file, used by libtool """
- dest=open(target[0].path, 'w')
- sname=source[0].name
- dest.write("# Generated by ltmain.sh - GNU libtool 1.5.18 - (pwn3d by bksys)\n#\n#\n")
- if len(env['BKSYS_VNUM'])>0:
- vnum=env['BKSYS_VNUM']
- nums=vnum.split('.')
- src=source[0].name
- name = src.split('so.')[0] + 'so'
- strn = src+" "+name+"."+str(nums[0])+" "+name
- dest.write("dlname='%s'\n" % (name+'.'+str(nums[0])) )
- dest.write("library_names='%s'\n" % (strn) )
- else:
- dest.write("dlname='%s'\n" % sname)
- dest.write("library_names='%s %s %s'\n" % (sname, sname, sname) )
- dest.write("old_library=''\ndependency_libs=''\ncurrent=0\n")
- dest.write("age=0\nrevision=0\ninstalled=yes\nshouldnotlink=no\n")
- dest.write("dlopen=''\ndlpreopen=''\n")
- dest.write("libdir='%s'" % env['BKSYS_DESTDIR'])
- dest.close()
- return 0
-
- def string_la_file(target, source, env):
- print "building '%s' from '%s'" % (target[0].name, source[0].name)
- la_file = env.Action(build_la_file, string_la_file, 'BKSYS_VNUM', 'BKSYS_DESTDIR')
- env['BUILDERS']['LaFile'] = env.Builder(action=la_file,suffix='.la',src_suffix=env['SHLIBSUFFIX'])
-
- ## Function for building shared libraries
- def bksys_shlib(lenv, ntarget, source, libdir, libprefix='lib', vnum='', noinst=None):
- """ Install a shared library.
-
- Installs a shared library, with or without a version number, and create a
- .la file for use by libtool.
-
- If library version numbering is to be used, the version number
- should be passed as a period-delimited version number (e.g.
- vnum = '1.2.3'). This causes the library to be installed
- with its full version number, and with symlinks pointing to it.
-
- For example, for libfoo version 1.2.3, install the file
- libfoo.so.1.2.3, and create symlinks libfoo.so and
- libfoo.so.1 that point to it.
- """
- # parameter can be a list
- if type(ntarget) is types.ListType: target=ntarget[0]
- else: target=ntarget
-
- thisenv = lenv.Copy() # copying an existing environment is cheap
- thisenv['BKSYS_DESTDIR']=libdir
- thisenv['BKSYS_VNUM']=vnum
- thisenv['SHLIBPREFIX']=libprefix
-
- if len(vnum)>0:
- thisenv['SHLIBSUFFIX']='.so.'+vnum
- thisenv.Depends(target, thisenv.Value(vnum))
- num=vnum.split('.')[0]
- lst=target.split('/')
- tname=lst[len(lst)-1]
- libname=tname.split('.')[0]
- thisenv.AppendUnique(LINKFLAGS = ["-Wl,--soname=%s.so.%s" % (libname, num)] )
-
- # Fix against a scons bug - shared libs and ordinal out of range(128)
- if type(source) is types.ListType:
- src2=[]
- for i in source: src2.append( str(i) )
- source=src2
-
- library_list = thisenv.SharedLibrary(target, source)
- lafile_list = thisenv.LaFile(target, library_list)
-
- ## Install the libraries automatically
- if not thisenv.has_key('NOAUTOINSTALL') and not noinst:
- thisenv.bksys_install(libdir, library_list)
- thisenv.bksys_install(libdir, lafile_list)
-
- ## Handle the versioning
- if len(vnum)>0:
- nums=vnum.split('.')
- symlinkcom = ('cd $TARGET.dir && rm -f $TARGET.name && ln -s $SOURCE.name $TARGET.name')
- tg = target+'.so.'+vnum
- nm1 = target+'.so'
- nm2 = target+'.so.'+nums[0]
- thisenv.Command(nm1, tg, symlinkcom)
- thisenv.Command(nm2, tg, symlinkcom)
- thisenv.bksys_install(libdir, nm1)
- thisenv.bksys_install(libdir, nm2)
- return library_list
-
- # Declare scons scripts to process
- def subdirs(lenv, folderlist):
- flist=lenv.make_list(folderlist)
- for i in flist:
- lenv.SConscript(lenv.join(i, 'SConscript'))
- # take all objects - warn those who are not already executed
- if lenv.has_key('USE_THE_FORCE_LUKE'):
- for ke in lenv['USE_THE_FORCE_LUKE']:
- if ke.executed: continue
- #lenv.pprint('GREEN',"you forgot to execute object "+ke.target)
- ke.lockworkdir()
- ke.execute()
- ke.unlockworkdir()
-
- def link_local_shlib(lenv, str):
- """ Links against a shared library made in the project """
- lst = lenv.make_list(str)
- for file in lst:
- import re
- reg=re.compile("(.*)/lib(.*).(la|so)$")
- result=reg.match(file)
- if not result:
- reg = re.compile("(.*)/lib(.*).(la|so)\.(.)")
- result=reg.match(file)
- if not result:
- print "Unknown la file given "+file
- continue
- dir = result.group(1)
- link = result.group(2)
- else:
- dir = result.group(1)
- link = result.group(2)
-
- lenv.AppendUnique(LIBS = [link])
- lenv.PrependUnique(LIBPATH = [dir])
-
- def link_local_staticlib(lenv, str):
- """ Links against a shared library made in the project """
- lst = lenv.make_list(str)
- for file in lst:
- import re
- reg = re.compile("(.*)/(lib.*.a)")
- result = reg.match(file)
- if not result:
- print "Unknown archive file given "+file
- continue
- f=SCons.Node.FS.default_fs.File(file)
- lenv.Append(LINKFLAGS=[f.path])
-
- def set_build_dir(lenv, dirs, buildto):
- lenv.SetOption('duplicate', 'soft-copy')
- lenv['_BUILDDIR_']=buildto
- ldirs=lenv.make_list(dirs)
- for dir in ldirs:
- lenv.BuildDir(buildto+os.path.sep+dir, dir)
-
- #valid_targets = "program shlib tdeioslave staticlib".split()
- SConsEnvironment.bksys_install = bksys_install
- SConsEnvironment.bksys_shlib = bksys_shlib
- SConsEnvironment.subdirs = subdirs
- SConsEnvironment.link_local_shlib = link_local_shlib
- SConsEnvironment.link_local_staticlib = link_local_staticlib
- SConsEnvironment.genobj=genobj
- SConsEnvironment.set_build_dir=set_build_dir
-
- if env.has_key('GENCXXFLAGS'): env.AppendUnique( CPPFLAGS = env['GENCXXFLAGS'] )
- if env.has_key('GENCCFLAGS'): env.AppendUnique( CCFLAGS = env['GENCCFLAGS'] )
- if env.has_key('GENLINKFLAGS'): env.AppendUnique( LINKFLAGS = env['GENLINKFLAGS'] )
-
- if env.has_key('EXTRAINCLUDES'):
- if env['EXTRAINCLUDES']:
- incpaths = []
- for dir in str(env['EXTRAINCLUDES']).split(':'): incpaths.append( dir )
- env.Append(CPPPATH = incpaths)
-
- env.Export('env')
diff --git a/admin/kde.py b/admin/kde.py
deleted file mode 100644
index 3b7c179..0000000
--- a/admin/kde.py
+++ /dev/null
@@ -1,843 +0,0 @@
-# Thomas Nagy, 2005 <tnagy2^8@yahoo.fr>
-""" Run scons -h to display the associated help, or look below """
-
-import os, re, types
-from SCons.Script.SConscript import SConsEnvironment
-
-# Returns the name of the shared object (i.e. libtdeui.so.4)
-# referenced by a libtool archive (like libtdeui.la)
-def getSOfromLA(lafile):
- contents = open(lafile, 'r').read()
- match = re.search("^dlname='([^']*)'$", contents, re.M)
- if match: return match.group(1)
- return None
-
-# A helper, needed .. everywhere
-def KDEuse(lenv, flags):
- if lenv['HELP']: lenv.Exit(0)
-
- _flags=lenv.make_list(flags)
- if 'environ' in _flags:
- ## The scons developers advise against using this but it is mostly innocuous :)
- lenv.AppendUnique( ENV = os.environ )
- if not 'lang_qt' in _flags:
- ## Use this define if you are using the kde translation scheme (.po files)
- lenv.Append( CPPFLAGS = '-DQT_NO_TRANSLATION' )
- if 'rpath' in _flags:
- ## Use this to set rpath - this may cause trouble if folders are moved (chrpath)
- kdelibpaths=[]
- if lenv['KDELIBPATH'] == lenv['KDELIB']: kdelibpaths = [lenv['KDELIB']]
- else: kdelibpaths = [lenv['KDELIBPATH'], lenv['KDELIB']]
- lenv.Append( RPATH = [lenv['QTLIBPATH'], lenv['KDEMODULE']]+kdelibpaths )
- if 'thread' in _flags:
- ## Uncomment the following if you need threading support
- lenv.KDEaddflags_cxx( ['-DQT_THREAD_SUPPORT', '-D_REENTRANT'] )
- if 'fastmoc' in _flags:
- lenv['BKSYS_FASTMOC']=1
- if not 'nohelp' in _flags:
- if lenv['_CONFIGURE'] or lenv['HELP']: lenv.Exit(0)
- if not 'nosmart' or not lenv.has_key('nosmart_includes'):
- lenv.AppendUnique(CPPPATH=['#/'])
- lst=[]
- if lenv.has_key('USE_THE_FORCE_LUKE'):
- lst=lenv['USE_THE_FORCE_LUKE']
- lenv.__delitem__('USE_THE_FORCE_LUKE')
- for v in lst: v.execute()
- else: lenv['nosmart_includes']=1
-
- ## To use kdDebug(intvalue)<<"some trace"<<endl; you need to define -DDEBUG
- ## it is done in admin/generic.py automatically when you do scons configure debug=1
-
-def exists(env):
- return True
-
-def detect_kde(env):
- """ Detect the qt and kde environment using tde-config mostly """
- def getpath(varname):
- if not env.has_key('ARGS'): return None
- v=env['ARGS'].get(varname, None)
- if v: v=os.path.abspath(v)
- return v
-
- def getstr(varname):
- if env.has_key('ARGS'): return env['ARGS'].get(varname, '')
- return ''
-
- prefix = getpath('prefix')
- execprefix = getpath('execprefix')
- datadir = getpath('datadir')
- libdir = getpath('libdir')
-
- tdedir = getstr('tdedir')
- kdeincludes = getpath('kdeincludes')
- tdelibs = getpath('tdelibs')
-
- qtdir = getstr('qtdir')
- qtincludes = getpath('qtincludes')
- qtlibs = getpath('qtlibs')
- libsuffix = getstr('libsuffix')
-
- p=env.pprint
-
- if libdir: libdir = libdir+libsuffix
-
- ## Detect the kde libraries
- print "Checking for tde-config : ",
- str="which tde-config 2>/dev/null"
- if tdedir: str="which %s 2>/dev/null" % (tdedir+'/bin/tde-config')
- kde_config = os.popen(str).read().strip()
- if len(kde_config):
- p('GREEN', 'tde-config was found as '+kde_config)
- else:
- if tdedir: p('RED','tde-config was NOT found in the folder given '+tdedir)
- else: p('RED','tde-config was NOT found in your PATH')
- print "Make sure kde is installed properly"
- print "(missing package tdebase-devel?)"
- env.Exit(1)
- if tdedir: env['TDEDIR']=tdedir
- else: env['TDEDIR'] = os.popen(kde_config+' -prefix').read().strip()
-
- print "Checking for kde version : ",
- kde_version = os.popen(kde_config+" --version|grep KDE").read().strip().split()[1]
- if int(kde_version[0]) != 3 or int(kde_version[2]) < 2:
- p('RED', kde_version)
- p('RED',"Your kde version can be too old")
- p('RED',"Please make sure kde is at least 3.2")
- else:
- p('GREEN',kde_version)
-
- ## Detect the qt library
- print "Checking for the tqt library : ",
- if not qtdir: qtdir = os.getenv("QTDIR")
- if qtdir:
- p('GREEN',"tqt is in "+qtdir)
- else:
- try:
- tmplibdir = os.popen(kde_config+' --expandvars --install lib').read().strip()
- libtdeuiSO = env.join(tmplibdir, getSOfromLA(env.join(tmplibdir,'/libtdeui.la')) )
- m = re.search('(.*)/lib/libtqt.*', os.popen('ldd ' + libtdeuiSO + ' | grep libtqt').read().strip().split()[2])
- except: m=None
- if m:
- qtdir = m.group(1)
- p('YELLOW',"tqt was found as "+m.group(1))
- else:
- p('RED','tqt was not found')
- p('RED','Please set QTDIR first (/usr/lib/qt3?) or try scons -h for more options')
- env.Exit(1)
- env['QTDIR'] = qtdir.strip()
-
- ## Find the necessary programs uic and moc
- print "Checking for uic-tqt : ",
- uic = qtdir + "/bin/uic-tqt"
- if os.path.isfile(uic):
- p('GREEN',"uic-tqt was found as "+uic)
- else:
- uic = os.popen("which uic-tqt 2>/dev/null").read().strip()
- if len(uic):
- p('YELLOW',"uic-tqt was found as "+uic)
- else:
- uic = os.popen("which uic-tqt 2>/dev/null").read().strip()
- if len(uic):
- p('YELLOW',"uic-tqt was found as "+uic)
- else:
- p('RED',"uic-tqt was not found - set QTDIR put it in your PATH ?")
- env.Exit(1)
- env['QT_UIC'] = uic
-
- print "Checking for moc : ",
- moc = qtdir + "/bin/moc"
- if os.path.isfile(moc):
- p('GREEN',"moc was found as "+moc)
- else:
- moc = os.popen("which moc 2>/dev/null").read().strip()
- if len(moc):
- p('YELLOW',"moc was found as "+moc)
- elif os.path.isfile("/usr/share/qt3/bin/moc"):
- moc = "/usr/share/qt3/bin/moc"
- p('YELLOW',"moc was found as "+moc)
- else:
- p('RED',"moc was not found - set QTDIR or put it in your PATH ?")
- env.Exit(1)
- env['QT_MOC'] = moc
-
- ## check for the qt and kde includes
- print "Checking for the qt includes : ",
- if qtincludes and os.path.isfile(qtincludes + "/qlayout.h"):
- # The user told where to look for and it looks valid
- p('GREEN',"ok "+qtincludes)
- else:
- if os.path.isfile(qtdir + "/include/qlayout.h"):
- # Automatic detection
- p('GREEN',"ok "+qtdir+"/include/")
- qtincludes = qtdir + "/include/"
- elif os.path.isfile("/usr/include/qt3/qlayout.h"):
- # Debian probably
- p('YELLOW','the qt headers were found in /usr/include/qt3/')
- qtincludes = "/usr/include/qt3"
- elif os.path.isfile("/usr/include/qt4/Qt/qglobal.h"):
- # Debian probably
- p('YELLOW', 'the qt headers were found in /usr/include/qt4/')
- qtincludes = "/usr/include/qt4"
- else:
- p('RED',"the qt headers were not found")
- env.Exit(1)
-
- print "Checking for the kde includes : ",
- kdeprefix = os.popen(kde_config+" --prefix").read().strip()
- if not kdeincludes:
- kdeincludes = kdeprefix+"/include/"
- if os.path.isfile(kdeincludes + "/klineedit.h"):
- p('GREEN',"ok "+kdeincludes)
- else:
- if os.path.isfile(kdeprefix+"/include/tde/klineedit.h"):
- # Debian, Fedora probably
- p('YELLOW',"the kde headers were found in %s/include/tde/"%kdeprefix)
- kdeincludes = kdeprefix + "/include/tde/"
- else:
- p('RED',"The kde includes were NOT found")
- env.Exit(1)
-
- # tde-config options
- kdec_opts = {'KDEBIN' : 'exe', 'KDEAPPS' : 'apps',
- 'KDEDATA' : 'data', 'KDEICONS' : 'icon',
- 'KDEMODULE' : 'module', 'KDELOCALE' : 'locale',
- 'KDEKCFG' : 'kcfg', 'KDEDOC' : 'html',
- 'KDEMENU' : 'apps', 'KDEXDG' : 'xdgdata-apps',
- 'KDEMIME' : 'mime', 'KDEXDGDIR' : 'xdgdata-dirs',
- 'KDESERV' : 'services','KDESERVTYPES' : 'servicetypes',
- 'KDEINCLUDE': 'include' }
-
- if prefix:
- ## use the user-specified prefix
- if not execprefix: execprefix=prefix
- if not datadir: datadir=env.join(prefix,'share')
- if not libdir: libdir=env.join(execprefix, "lib"+libsuffix)
-
- subst_vars = lambda x: x.replace('${exec_prefix}', execprefix)\
- .replace('${datadir}', datadir)\
- .replace('${libdir}', libdir)\
- .replace('${prefix}', prefix)
- debian_fix = lambda x: x.replace('/usr/share', '${datadir}')
- env['PREFIX'] = prefix
- env['KDELIB'] = libdir
- for (var, option) in kdec_opts.items():
- dir = os.popen(kde_config+' --install ' + option).read().strip()
- if var == 'KDEDOC': dir = debian_fix(dir)
- env[var] = subst_vars(dir)
-
- else:
- env['PREFIX'] = os.popen(kde_config+' --expandvars --prefix').read().strip()
- env['KDELIB'] = os.popen(kde_config+' --expandvars --install lib').read().strip()
- for (var, option) in kdec_opts.items():
- dir = os.popen(kde_config+' --expandvars --install ' + option).read().strip()
- env[var] = dir
-
- env['QTPLUGINS']=os.popen(kde_config+' --expandvars --install qtplugins').read().strip()
-
- ## kde libs and includes
- env['KDEINCLUDEPATH']=kdeincludes
- if not tdelibs:
- tdelibs=os.popen(kde_config+' --expandvars --install lib').read().strip()
- env['KDELIBPATH']=tdelibs
-
- ## qt libs and includes
- env['QTINCLUDEPATH']=qtincludes
- if not qtlibs:
- qtlibs=qtdir+"/lib"+libsuffix
- env['QTLIBPATH']=qtlibs
-
- ## check if KDE has the UDS_HIDDEN patch
- print "Checking KDE for UDS_HIDDEN : ",
- if 'UDS_HIDDEN' in os.popen('cat ' + env['KDEINCLUDEPATH'] + '/tdeio/global.h').read():
- env['HAVE_UDS_HIDDEN']='1'
- p('GREEN', 'yes')
- else:
- env['HAVE_UDS_HIDDEN']='0'
- p('YELLOW', 'no')
-
-def generate(env):
- """"Set up the qt and kde environment and builders - the moc part is difficult to understand """
-
- # attach this function immediately
- SConsEnvironment.KDEuse=KDEuse
-
- if env['HELP']:
- p=env.pprint
- p('BOLD','*** KDE options ***')
- p('BOLD','--------------------')
- p('BOLD','* prefix ','base install path, ie: /usr/local')
- p('BOLD','* execprefix ','install path for binaries, ie: /usr/bin')
- p('BOLD','* datadir ','install path for the data, ie: /usr/local/share')
- p('BOLD','* libdir ','install path for the libs, ie: /usr/lib')
-
- p('BOLD','* qtdir ','base of the kde libraries')
- p('BOLD','* tdedir ','base of the qt libraries')
-
- p('BOLD','* libsuffix ','suffix of libraries on amd64, ie: 64, 32')
- p('BOLD','* kdeincludes','kde includes path (/usr/include/tde on debian, ..)')
- p('BOLD','* qtincludes ','qt includes path (/usr/include/qt on debian, ..)')
- p('BOLD','* tdelibs ','kde libraries path, for linking the programs')
- p('BOLD','* qtlibs ','qt libraries path, for linking the program')
-
- p('BOLD','* scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt\n')
- return
-
- import SCons.Defaults
- import SCons.Tool
- import SCons.Util
- import SCons.Node
-
- CLVar = SCons.Util.CLVar
- splitext = SCons.Util.splitext
- Builder = SCons.Builder.Builder
-
- # Detect the environment - replaces ./configure implicitely and store the options into a cache
- from SCons.Options import Options
- cachefile=env['CACHEDIR']+'kde.cache.py'
- opts = Options(cachefile)
- opts.AddOptions(
- ('PREFIX', 'root of the program installation'),
-
- ('QTDIR', ''),
- ('QTLIBPATH', 'path to the qt libraries'),
- ('QTINCLUDEPATH', 'path to the qt includes'),
- ('QT_UIC', 'uic command'),
- ('QT_MOC', 'moc command'),
- ('QTPLUGINS', 'uic executable command'),
-
- ('TDEDIR', ''),
- ('KDELIBPATH', 'path to the installed kde libs'),
- ('KDEINCLUDEPATH', 'path to the installed kde includes'),
-
- ('KDEBIN', 'inst path of the kde binaries'),
- ('KDEINCLUDE', 'inst path of the kde include files'),
- ('KDELIB', 'inst path of the kde libraries'),
- ('KDEMODULE', 'inst path of the parts and libs'),
- ('KDEDATA', 'inst path of the application data'),
- ('KDELOCALE', ''), ('KDEDOC', ''), ('KDEKCFG', ''),
- ('KDEXDG', ''), ('KDEXDGDIR', ''), ('KDEMENU', ''),
- ('KDEMIME', ''), ('KDEICONS', ''), ('KDESERV', ''),
- ('KDESERVTYPES', ''), ('KDEAPPS', ''), ('HAVE_UDS_HIDDEN', ''),
- )
- opts.Update(env)
-
- def getInstDirForResType(lenv,restype):
- if len(restype) == 0 or not lenv.has_key(restype):
- lenv.pprint('RED',"unknown resource type "+restype)
- lenv.Exit(1)
- else: instdir = lenv[restype]
-
- if env['ARGS'] and env['ARGS'].has_key('prefix'):
- instdir = instdir.replace(lenv['PREFIX'], env['ARGS']['prefix'])
- return instdir
-
- # reconfigure when things are missing
- if not env['HELP'] and (env['_CONFIGURE'] or not env.has_key('QTDIR') or not env.has_key('TDEDIR')):
- detect_kde(env)
- opts.Save(cachefile, env)
-
- ## set default variables, one can override them in sconscript files
- env.Append(CXXFLAGS = ['-I'+env['KDEINCLUDEPATH'], '-I'+env['QTINCLUDEPATH'], '-I/usr/include/tqt' ],
- LIBPATH = [env['KDELIBPATH'], env['QTLIBPATH'] ])
-
- env['QT_AUTOSCAN'] = 1
- env['QT_DEBUG'] = 0
-
- env['MEINPROC'] = 'meinproc'
- env['MSGFMT'] = 'msgfmt'
-
- ## ui file processing
- def uic_processing(target, source, env):
- inc_kde ='#include <tdelocale.h>\n#include <kdialog.h>\n'
- inc_moc ='#include "%s"\n' % target[2].name
- comp_h ='$QT_UIC -L $QTPLUGINS -nounload -o %s %s' % (target[0].path, source[0].path)
- comp_c ='$QT_UIC -L $QTPLUGINS -nounload -tr tr2i18n -impl %s %s' % (target[0].path, source[0].path)
- comp_moc ='$QT_MOC -o %s %s' % (target[2].path, target[0].path)
- if env.Execute(comp_h): return ret
- dest = open( target[1].path, "w" )
- dest.write(inc_kde)
- dest.close()
- if env.Execute( comp_c+" >> "+target[1].path ): return ret
- dest = open( target[1].path, "a" )
- dest.write(inc_moc)
- dest.close()
- ret = env.Execute( comp_moc )
- return ret
- def uicEmitter(target, source, env):
- adjustixes = SCons.Util.adjustixes
- bs = SCons.Util.splitext(str(source[0].name))[0]
- bs = env.join(str(target[0].get_dir()),bs)
- target.append(bs+'.cpp')
- target.append(bs+'.moc')
- return target, source
- env['BUILDERS']['Uic']=Builder(action=uic_processing,emitter=uicEmitter,suffix='.h',src_suffix='.ui')
-
- def kcfg_buildit(target, source, env):
- comp='tdeconfig_compiler -d%s %s %s' % (str(source[0].get_dir()), source[1].path, source[0].path)
- return env.Execute(comp)
- def kcfg_stringit(target, source, env):
- print "processing %s to get %s and %s" % (source[0].name, target[0].name, target[1].name)
- def kcfgEmitter(target, source, env):
- adjustixes = SCons.Util.adjustixes
- file=str(source[0].srcnode().name)
- bs = SCons.Util.splitext(str(source[0].name))[0]
- bs = env.join(str(target[0].get_dir()),bs)
- # .h file is already there
- target.append( bs+'.cpp' )
-
- content=source[0].srcnode().get_contents()
- #print content
-
- kcfgfilename=""
- kcfgFileDeclRx = re.compile("[fF]ile\s*=\s*(.+)\s*")
- match = kcfgFileDeclRx.search(content)
- if match: kcfgfilename = match.group(1)
-
- if not kcfgfilename:
- env.pprint('RED','invalid kcfgc file '+source[0].srcnode().abspath)
- env.Exit(1)
- source.append( env.join( str(source[0].get_dir()), kcfgfilename) )
- return target, source
-
- env['BUILDERS']['Kcfg']=Builder(action=env.Action(kcfg_buildit, kcfg_stringit),
- emitter=kcfgEmitter, suffix='.h', src_suffix='.kcfgc')
-
- ## MOC processing
- env['BUILDERS']['Moc']=Builder(action='$QT_MOC -o $TARGET $SOURCE',suffix='.moc',src_suffix='.h')
- env['BUILDERS']['Moccpp']=Builder(action='$QT_MOC -o $TARGET $SOURCE',suffix='_moc.cpp',src_suffix='.h')
-
- ## KIDL file
- env['BUILDERS']['Kidl']=Builder(action= 'dcopidl $SOURCE > $TARGET || (rm -f $TARGET ; false)',
- suffix='.kidl', src_suffix='.h')
- ## DCOP
- env['BUILDERS']['Dcop']=Builder(action='dcopidl2cpp --c++-suffix cpp --no-signals --no-stub $SOURCE',
- suffix='_skel.cpp', src_suffix='.kidl')
- ## STUB
- env['BUILDERS']['Stub']=Builder(action= 'dcopidl2cpp --c++-suffix cpp --no-signals --no-skel $SOURCE',
- suffix='_stub.cpp', src_suffix='.kidl')
- ## DOCUMENTATION
- env['BUILDERS']['Meinproc']=Builder(action='cd $TARGET.dir && $MEINPROC --check --cache $TARGET.name $SOURCE.name',suffix='.cache.bz2')
- ## TRANSLATIONS
- env['BUILDERS']['Transfiles']=Builder(action='$MSGFMT $SOURCE -o $TARGET',suffix='.gmo',src_suffix='.po')
-
- ## Handy helpers for building kde programs
- ## You should not have to modify them ..
-
- ui_ext = [".ui"]
- kcfg_ext = ['.kcfgc']
- header_ext = [".h", ".hxx", ".hpp", ".hh"]
- cpp_ext = [".cpp", ".cxx", ".cc"]
- skel_ext = [".skel", ".SKEL"]
- stub_ext = [".stub", ".STUB"]
-
- def KDEfiles(lenv, target, source):
- """ Returns a list of files for scons (handles kde tricks like .skel)
- It also makes custom checks against double includes like : ['file.ui', 'file.cpp']
- (file.cpp is already included because of file.ui) """
-
- q_object_search = re.compile(r'[^A-Za-z0-9]Q_OBJECT[^A-Za-z0-9]')
- def scan_moc(cppfile):
- addfile=None
-
- # try to find the header
- orifile=cppfile.srcnode().name
- bs=SCons.Util.splitext(orifile)[0]
-
- h_file=''
- dir=cppfile.dir
- for n_h_ext in header_ext:
- afile=dir.File(bs+n_h_ext)
- if afile.rexists():
- #h_ext=n_h_ext
- h_file=afile
- break
- # We have the header corresponding to the cpp file
- if h_file:
- h_contents = h_file.get_contents()
- if q_object_search.search(h_contents):
- # we know now there is Q_OBJECT macro
- reg = '\n\s*#include\s*("|<)'+str(bs)+'.moc("|>)'
- meta_object_search = re.compile(reg)
- #cpp_contents = open(file_cpp, 'rb').read()
- cpp_contents=cppfile.get_contents()
- if meta_object_search.search(cpp_contents):
- lenv.Moc(h_file)
- else:
- lenv.Moccpp(h_file)
- addfile=bs+'_moc.cpp'
- print "WARNING: moc.cpp for "+h_file.name+" consider using #include <file.moc> instead"
- return addfile
-
- src=[]
- ui_files=[]
- kcfg_files=[]
- other_files=[]
- kidl=[]
-
- source_=lenv.make_list(source)
-
- # For each file, check wether it is a dcop file or not, and create the complete list of sources
- for file in source_:
- sfile=SCons.Node.FS.default_fs.File(str(file)) # why str(file) ? because ordinal not in range issues
- bs = SCons.Util.splitext(file)[0]
- ext = SCons.Util.splitext(file)[1]
- if ext in skel_ext:
- if not bs in kidl:
- kidl.append(bs)
- lenv.Dcop(bs+'.kidl')
- src.append(bs+'_skel.cpp')
- elif ext in stub_ext:
- if not bs in kidl:
- kidl.append(bs)
- lenv.Stub(bs+'.kidl')
- src.append(bs+'_stub.cpp')
- elif ext == ".moch":
- lenv.Moccpp(bs+'.h')
- src.append(bs+'_moc.cpp')
- elif ext in cpp_ext:
- src.append(file)
- if not env.has_key('NOMOCFILE'):
- ret = scan_moc(sfile)
- if ret: src.append( ret )
- elif ext in ui_ext:
- lenv.Uic(file)
- src.append(bs+'.cpp')
- elif ext in kcfg_ext:
- name=SCons.Util.splitext(sfile.name)[0]
- hfile=lenv.Kcfg(file)
- cppkcfgfile=sfile.dir.File(bs+'.cpp')
- src.append(bs+'.cpp')
- else:
- src.append(file)
-
- for base in kidl: lenv.Kidl(base+'.h')
-
- # Now check against typical newbie errors
- for file in ui_files:
- for ofile in other_files:
- if ofile == file:
- env.pprint('RED',"WARNING: You have included %s.ui and another file of the same prefix"%file)
- print "Files generated by uic (file.h, file.cpp must not be included"
- for file in kcfg_files:
- for ofile in other_files:
- if ofile == file:
- env.pprint('RED',"WARNING: You have included %s.kcfg and another file of the same prefix"%file)
- print "Files generated by tdeconfig_compiler (settings.h, settings.cpp) must not be included"
- return src
-
-
- """ In the future, these functions will contain the code that will dump the
- configuration for re-use from an IDE """
- def KDEinstall(lenv, restype, subdir, files, perms=None):
- if env.has_key('DUMPCONFIG'):
- print "<install type=\"%s\" subdir=\"%s\">" % (restype, subdir)
- for i in lenv.make_list(files): print " <file name=\"%s\"/>" % (lenv.join(lenv.getreldir(),i))
- print "</install>"
- return
-
- if not env['_INSTALL']: return None
- dir = getInstDirForResType(lenv, restype)
-
- p=None
- if not perms:
- if restype=='KDEBIN': p=0755
- else: p=perms
- install_list = lenv.bksys_install(lenv.join(dir, subdir), files, perms=p)
- return install_list
-
- def KDEinstallas(lenv, restype, destfile, file):
- if not env['_INSTALL']: return
- dir = getInstDirForResType(lenv, restype)
- install_list = lenv.InstallAs(lenv.join(dir, destfile), file)
- env.Alias('install', install_list)
- return install_list
-
- def KDEprogram(lenv, target, source,
- includes='', localshlibs='', globallibs='', globalcxxflags=''):
- """ Makes a kde program
- The program is installed except if one sets env['NOAUTOINSTALL'] """
- src = KDEfiles(lenv, target, source)
- program_list = lenv.Program(target, src)
-
- # we link the program against a shared library done locally, add the dependency
- if not lenv.has_key('nosmart_includes'):
- lenv.AppendUnique(CPPPATH=['./'])
- if len(localshlibs)>0:
- lst=lenv.make_list(localshlibs)
- lenv.link_local_shlib(lst)
- lenv.Depends( program_list, lst )
-
- if len(includes)>0: lenv.KDEaddpaths_includes(includes)
- if len(globallibs)>0: lenv.KDEaddlibs(globallibs)
- if len(globalcxxflags)>0: lenv.KDEaddflags_cxx(globalcxxflags)
-
- if not lenv.has_key('NOAUTOINSTALL'):
- KDEinstall(lenv, 'KDEBIN', '', target)
- return program_list
-
- def KDEshlib(lenv, target, source, kdelib=0, libprefix='lib',
- includes='', localshlibs='', globallibs='', globalcxxflags='', vnum=''):
- """ Makes a shared library for kde (.la file for klibloader)
- The library is installed except if one sets env['NOAUTOINSTALL'] """
- src = KDEfiles(lenv, target, source)
-
- if not lenv.has_key('nosmart_includes'):
- lenv.AppendUnique(CPPPATH=['./'])
- # we link the program against a shared library done locally, add the dependency
- lst=[]
- if len(localshlibs)>0:
- lst=lenv.make_list(localshlibs)
- lenv.link_local_shlib(lst)
- if len(includes)>0: lenv.KDEaddpaths_includes(includes)
- if len(globallibs)>0: lenv.KDEaddlibs(globallibs)
- if len(globalcxxflags)>0: lenv.KDEaddflags_cxx(globalcxxflags)
-
- restype='KDEMODULE'
- if kdelib==1: restype='KDELIB'
-
- library_list = lenv.bksys_shlib(target, src, getInstDirForResType(lenv, restype), libprefix, vnum)
- if len(lst)>0: lenv.Depends( library_list, lst )
-
- return library_list
-
- def KDEstaticlib(lenv, target, source):
- """ Makes a static library for kde - in practice you should not use static libraries
- 1. they take more memory than shared ones
- 2. makefile.am needed it because of limitations
- (cannot handle sources in separate folders - takes extra processing) """
- if not lenv.has_key('nosmart_includes'): lenv.AppendUnique(CPPPATH=['./'])
- src=KDEfiles(lenv, target, source)
- return lenv.StaticLibrary(target, src)
- # do not install static libraries by default
-
- def KDEaddflags_cxx(lenv, fl):
- """ Compilation flags for C++ programs """
- lenv.AppendUnique(CXXFLAGS = lenv.make_list(fl))
-
- def KDEaddflags_c(lenv, fl):
- """ Compilation flags for C programs """
- lenv.AppendUnique(CFLAGS = lenv.make_list(fl))
-
- def KDEaddflags_link(lenv, fl):
- """ Add link flags - Use this if KDEaddlibs below is not enough """
- lenv.PrependUnique(LINKFLAGS = lenv.make_list(fl))
-
- def KDEaddlibs(lenv, libs):
- """ Helper function """
- lenv.AppendUnique(LIBS = lenv.make_list(libs))
-
- def KDEaddpaths_includes(lenv, paths):
- """ Add new include paths """
- lenv.AppendUnique(CPPPATH = lenv.make_list(paths))
-
- def KDEaddpaths_libs(lenv, paths):
- """ Add paths to libraries """
- lenv.PrependUnique(LIBPATH = lenv.make_list(paths))
-
- def KDElang(lenv, folder, appname):
- """ Process translations (.po files) in a po/ dir """
- import glob
- dir=SCons.Node.FS.default_fs.Dir(folder).srcnode()
- fld=dir.srcnode()
- tmptransfiles = glob.glob(str(fld)+'/*.po')
-
- transfiles=[]
- if lenv.has_key('_BUILDDIR_'):
- bdir=lenv['_BUILDDIR_']
- for dir in lenv.make_list(tmptransfiles):
- transfiles.append( lenv.join(bdir, dir) )
- else: tmptransfiles=transfiles
-
- languages=None
- if lenv['ARGS'] and lenv['ARGS'].has_key('languages'):
- languages=lenv.make_list(lenv['ARGS']['languages'])
- mydir=SCons.Node.FS.default_fs.Dir('.')
- for f in transfiles:
- fname=f.replace(mydir.abspath, '')
- file=SCons.Node.FS.default_fs.File(fname)
- country = SCons.Util.splitext(file.name)[0]
- if not languages or country in languages:
- result = lenv.Transfiles(file)
- dir=lenv.join( getInstDirForResType(lenv, 'KDELOCALE'), country)
- lenv.bksys_install(lenv.join(dir, 'LC_MESSAGES'), result, destfile=appname+'.mo')
-
- def KDEicon(lenv, icname='*', path='./', restype='KDEICONS', subdir=''):
- """Contributed by: "Andrey Golovizin" <grooz()gorodok()net>
- modified by "Martin Ellis" <m.a.ellis()ncl()ac()uk>
-
- Installs icons with filenames such as cr22-action-frame.png into
- KDE icon hierachy with names like icons/crystalsvg/22x22/actions/frame.png.
-
- Global KDE icons can be installed simply using env.KDEicon('name').
- The second parameter, path, is optional, and specifies the icons
- location in the source, relative to the SConscript file.
-
- To install icons that need to go under an applications directory (to
- avoid name conflicts, for example), use e.g.
- env.KDEicon('name', './', 'KDEDATA', 'appname/icons')"""
-
- if env.has_key('DUMPCONFIG'):
- print "<icondirent subdir=\"%s\" />" % (lenv.join(lenv.getreldir(),path,subdir))
- return
-
- type_dic = { 'action':'actions', 'app':'apps', 'device':'devices',
- 'filesys':'filesystems', 'mime':'mimetypes' }
- dir_dic = {
- 'los' :'locolor/16x16', 'lom' :'locolor/32x32',
- 'him' :'hicolor/32x32', 'hil' :'hicolor/48x48',
- 'lo16' :'locolor/16x16', 'lo22' :'locolor/22x22', 'lo32' :'locolor/32x32',
- 'hi16' :'hicolor/16x16', 'hi22' :'hicolor/22x22', 'hi32' :'hicolor/32x32',
- 'hi48' :'hicolor/48x48', 'hi64' :'hicolor/64x64', 'hi128':'hicolor/128x128',
- 'hisc' :'hicolor/scalable',
- 'cr16' :'crystalsvg/16x16', 'cr22' :'crystalsvg/22x22', 'cr32' :'crystalsvg/32x32',
- 'cr48' :'crystalsvg/48x48', 'cr64' :'crystalsvg/64x64', 'cr128':'crystalsvg/128x128',
- 'crsc' :'crystalsvg/scalable'
- }
-
- iconfiles = []
- dir=SCons.Node.FS.default_fs.Dir(path).srcnode()
- mydir=SCons.Node.FS.default_fs.Dir('.')
- import glob
- for ext in ['png', 'xpm', 'mng', 'svg', 'svgz']:
- files = glob.glob(str(dir)+'/'+'*-*-%s.%s' % (icname, ext))
- for file in files:
- iconfiles.append( file.replace(mydir.abspath, '') )
- for iconfile in iconfiles:
- lst = iconfile.split('/')
- filename = lst[ len(lst) - 1 ]
- tmp = filename.split('-')
- if len(tmp)!=3:
- env.pprint('RED','WARNING: icon filename has unknown format: '+iconfile)
- continue
- [icon_dir, icon_type, icon_filename]=tmp
- try:
- basedir=getInstDirForResType(lenv, restype)
- destdir = '%s/%s/%s/%s/' % (basedir, subdir, dir_dic[icon_dir], type_dic[icon_type])
- except KeyError:
- env.pprint('RED','WARNING: unknown icon type: '+iconfile)
- continue
- lenv.bksys_install(destdir, iconfile, icon_filename)
-
- ## This function uses env imported above - WARNING ugly code, i will have to rewrite (ITA)
- def docfolder(lenv, folder, lang, destination=""):
- # folder is the folder to process
- # lang is the language
- # destination is the subdirectory in KDEDOC
- import glob
- docfiles=[]
- dir=SCons.Node.FS.default_fs.Dir(folder).srcnode()
- mydir=SCons.Node.FS.default_fs.Dir('.')
- dirpath=mydir.srcnode().abspath
- docg = glob.glob(str(dir)+"/???*.*") # file files that are at least 4 chars wide :)
- for file in docg:
- f = file.replace(dirpath, '')
- docfiles.append(f)
-
- # warn about errors
- #if len(lang) != 2:
- # print "error, lang must be a two-letter string, like 'en'"
-
- # when the destination is not given, use the folder
- if len(destination) == 0: destination=folder
- docbook_list = []
-
- bdir='.'
- if lenv.has_key('_BUILDDIR_'): bdir = lenv['_BUILDDIR_']
- for file in docfiles:
- # do not process folders
- #if not os.path.isfile( lenv.join('.', file) ): continue
-
- # using nodefile forces to symlink in builddir
- nodefile=SCons.Node.FS.default_fs.File( lenv.join(mydir.abspath, file) )
-
- # do not process the cache file
- if file == 'index.cache.bz2': continue
- # ignore invalid files (TODO??)
- if len( SCons.Util.splitext( file ) ) <= 1: continue
- ext = SCons.Util.splitext( file )[1]
-
- # install picture files
- if ext in ['.jpeg', '.jpg', '.png']: lenv.KDEinstall('KDEDOC', lenv.join(lang,destination), nodefile.srcnode())
- # docbook files are processed by meinproc
- if ext != '.docbook': continue
-
- docbook_list.append( nodefile )
- lenv.KDEinstall('KDEDOC', lenv.join(lang,destination), nodefile.srcnode())
-
- # Now process the index.docbook files ..
- if len(docbook_list) == 0: return
- # TODO
- #if not os.path.isfile( folder+'/index.docbook' ):
- # print "Error, index.docbook was not found in "+folder+'/index.docbook'
- # return
- ## Define this to 1 if you are writing documentation else to 0 :)
- #if lenv.has_key('i_am_a_documentation_writer'):
- for file in docbook_list:
- lenv.Depends( folder+'index.cache.bz2', nodefile )
-
- if lenv.has_key('_BUILDDIR_'): folder=lenv.join(lenv['_BUILDDIR_'], folder)
-
- lenv.Meinproc( lenv.join(folder,'index.cache.bz2'), lenv.join(folder,'index.docbook') )
- lenv.KDEinstall( 'KDEDOC', lenv.join(lang,destination), lenv.join(folder,'index.cache.bz2') )
-
- if env['_INSTALL']:
- dir=lenv.join(env['DESTDIR'], lenv.getInstDirForResType('KDEDOC'), lang, destination)
- comp='mkdir -p %s && cd %s && rm -f common && ln -s ../common common' % (dir, dir)
- lenv.Execute(comp)
-
- #valid_targets = "program shlib tdeioslave staticlib".split()
- import generic
- class kobject(generic.genobj):
- def __init__(self, val, senv=None):
- if senv: generic.genobj.__init__(self, val, senv)
- else: generic.genobj.__init__(self, val, env)
- self.iskdelib=0
- def it_is_a_kdelib(self): self.iskdelib=1
- def execute(self):
- if self.executed: return
- self.lockchdir()
- if self.orenv.has_key('DUMPCONFIG'):
- print self.xml()
- self.unlockchdir()
- self.executed=1
- return
- if (self.type=='shlib' or self.type=='tdeioslave'):
- install_dir = 'KDEMODULE'
- if self.iskdelib==1: install_dir = 'KDELIB'
- self.instdir=getInstDirForResType(self.orenv, install_dir)
- elif self.type=='program':
- self.instdir=getInstDirForResType(self.orenv, 'KDEBIN')
- self.perms=0755
-
- self.p_localsource=KDEfiles(env, self.joinpath(self.target), self.joinpath(self.source))
- generic.genobj.execute(self)
- self.unlockchdir()
-
- def xml(self):
- chdirto=self.orenv.join(self.orenv.getreldir(),self.chdir)
- ret= '<compile type="%s" chdir="%s" target="%s" cxxflags="%s" cflags="%s" includes="%s" linkflags="%s" libpaths="%s" libs="%s" vnum="%s" iskdelib="%s" libprefix="%s">\n' % (self.type, chdirto, self.target, self.cxxflags, self.cflags, self.includes, self.linkflags, self.libpaths, self.libs, self.vnum, self.iskdelib, self.libprefix)
- if self.source:
- for i in self.orenv.make_list(self.source): ret+=' <source file="%s"/>\n' % i
- ret += "</compile>"
- return ret
-
- # Attach the functions to the environment so that SConscripts can use them
- SConsEnvironment.KDEprogram = KDEprogram
- SConsEnvironment.KDEshlib = KDEshlib
- SConsEnvironment.KDEstaticlib = KDEstaticlib
- SConsEnvironment.KDEinstall = KDEinstall
- SConsEnvironment.KDEinstallas = KDEinstallas
- SConsEnvironment.KDElang = KDElang
- SConsEnvironment.KDEicon = KDEicon
-
- SConsEnvironment.KDEaddflags_cxx = KDEaddflags_cxx
- SConsEnvironment.KDEaddflags_c = KDEaddflags_c
- SConsEnvironment.KDEaddflags_link = KDEaddflags_link
- SConsEnvironment.KDEaddlibs = KDEaddlibs
- SConsEnvironment.KDEaddpaths_includes = KDEaddpaths_includes
- SConsEnvironment.KDEaddpaths_libs = KDEaddpaths_libs
-
- SConsEnvironment.docfolder = docfolder
- SConsEnvironment.getInstDirForResType = getInstDirForResType
- SConsEnvironment.kobject = kobject
-
diff --git a/cmake b/cmake
deleted file mode 160000
-Subproject c51d14850ff2ed8051e840db9df1698f84af421
diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt
deleted file mode 100644
index df19cbd..0000000
--- a/doc/en/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-#################################################
-#
-# (C) 2011 Timothy Pearson
-# kb9vqf (AT) pearsoncomputing.net
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
-
-tde_create_handbook( DESTINATION tdeio-locate )
diff --git a/doc/en/index.docbook b/doc/en/tdeioslave/locate/index.docbook
index 723a557..723a557 100644
--- a/doc/en/index.docbook
+++ b/doc/en/tdeioslave/locate/index.docbook
diff --git a/doc/en/screenshot.png b/doc/en/tdeioslave/locate/screenshot.png
index 330565c..330565c 100644
--- a/doc/en/screenshot.png
+++ b/doc/en/tdeioslave/locate/screenshot.png
Binary files differ
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
deleted file mode 100644
index 7d2e422..0000000
--- a/po/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-#################################################
-#
-# (C) 2011 Timothy Pearson
-# kb9vqf (AT) pearsoncomputing.net
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
-
-file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} tdeio-locate.po )
-
-foreach( _po ${po_files} )
- get_filename_component( _lang ${_po} PATH )
- tde_create_translation( FILES ${_po} LANG ${_lang} )
-endforeach( )
diff --git a/po/messages.sh b/po/messages.sh
deleted file mode 100755
index dfddc84..0000000
--- a/po/messages.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-
-# Modified by Tobi Vollebregt for use with tdeio-locate.
-
-# Inspired by Makefile.common from coolo
-# this script is used to update the .po files
-
-# To update the translations, you will need a specific gettext
-# patched for kde and a lot of patience, tenacity, luck, time ..
-
-
-# I guess one should only update the .po files when all .cpp files
-# are generated (after a make or scons)
-
-# If you have a better way to do this, do not keep that info
-# for yourself and help me to improve this script, thanks
-# (tnagyemail-mail tat yahoo d0tt fr)
-#
-
-SRCDIR=../src
-TIPSDIR=$SRCDIR/appdata
-
-TDEDIR=`tde-config --prefix`
-EXTRACTRC=extractrc
-KDEPOT=`tde-config --prefix`/include/tde/kde.pot
-XGETTEXT="xgettext -C -ki18n -ktr2i18n -kI18N_NOOP -ktranslate -kaliasLocale -x $KDEPOT "
-
-## check that kde.pot is available
-if ! test -e $KDEPOT; then
- echo "$KDEPOT does not exist, there may be something wrong with your installation!"
- XGETTEXT="xgettext -C -ki18n -ktr2i18n -kI18N_NOOP -ktranslate -kaliasLocale "
-fi
-
-## extract the strings
-echo "extracting the strings"
-
-echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > $SRCDIR/_translatorinfo.cpp
-
-## bad hack to get strings from *.ui files
-# Armin Straub <linux@arminstraub.de>
-UIC="uic -tr i18n"
-TMPHACK="$SRCDIR/tmphack"
-mkdir $TMPHACK || exit 1
-for F in "$SRCDIR/"*.ui; do
- echo ".. preparing $F"
- FN=$TMPHACK/$(basename "$F")
- $UIC "$F" > "$FN.h" && $UIC -impl "$FN.h" "$F" > "$FN.cpp"
-done
-tdeconfig_compiler -d $TMPHACK $SRCDIR/*.kcfg $SRCDIR/*.kcfgc
-## bad hack to get strings from *.ui files
-
-$XGETTEXT `find $SRCDIR -name "*.cpp"` -o tdeio_locate.pot
-
-## bad hack to get strings from *.ui files
-rm -rf "$TMPHACK"
-## bad hack to get strings from *.ui files
-
-# remove the intermediate files
-rm -f $SRCDIR/_translatorinfo.cpp
-
-## now merge the .po files ..
-echo "merging the .po files"
-
-for i in `ls *.po`; do
- msgmerge $i tdeio_locate.pot -o $i || exit 1
-done
-
-## finished
-echo "Done"
diff --git a/src/CMakeL10n.txt b/src/CMakeL10n.txt
index b95d5c5..ab9a2bc 100644
--- a/src/CMakeL10n.txt
+++ b/src/CMakeL10n.txt
@@ -1,3 +1,10 @@
##### create translation templates ##############
-tde_l10n_create_template( "tdeio-locate" )
+tde_l10n_create_template( "messages/tdeio-locate" )
+
+tde_l10n_create_template(
+ CATALOG "desktop_files/tdeio-locate-desktops"
+ SOURCES
+ *.desktop
+ *.protocol
+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0e58011..7943241 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -25,10 +25,17 @@ link_directories(
##### other data ################################
-install( FILES locate.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
-install( FILES locater.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
-install( FILES rlocate.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
-install( FILES locate.desktop DESTINATION ${SERVICES_INSTALL_DIR}/searchproviders )
+tde_create_translated_desktop(
+ SOURCE
+ locate.protocol
+ locater.protocol
+ rlocate.protocol
+ DESTINATION ${SERVICES_INSTALL_DIR}
+)
+tde_create_translated_desktop(
+ SOURCE locate.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR}/searchproviders
+)
##### tdeio_locate ##############################
diff --git a/src/locate.desktop b/src/locate.desktop
index a218ffa..000c7ed 100644
--- a/src/locate.desktop
+++ b/src/locate.desktop
@@ -1,7 +1,8 @@
[Desktop Entry]
+Name=locate - Search for local files
+
Encoding=UTF-8
Type=Service
-Name=locate - Search for local files
X-TDE-ServiceTypes=SearchProvider
Keys=locate
Query=locate:\\{@}
diff --git a/src/locate.protocol b/src/locate.protocol
index c9d6057..c69bcc1 100644
--- a/src/locate.protocol
+++ b/src/locate.protocol
@@ -1,12 +1,13 @@
[Protocol]
-exec=tdeio_locate
+Description=TDE I/O Slave for the locate command
+
protocol=locate
+Icon=edit-find
+exec=tdeio_locate
input=none
output=filesystem
listing=Name,Type,Size,Date,AccessDate,Access,Owner,Group,Link
reading=true
-Icon=edit-find
-Description=TDE I/O Slave for the locate command
# Using this will e.g. display previews etc.
Class=:local
@@ -15,4 +16,4 @@ Class=:local
URIMode=rawuri
# Our very sophisticated documentation
-X-DocPath=tdeio-locate/index.html
+X-DocPath=tdeioslave/locate/index.html
diff --git a/src/locater.cpp b/src/locater.cpp
index 68c1d75..b74dfd8 100644
--- a/src/locater.cpp
+++ b/src/locater.cpp
@@ -34,7 +34,7 @@
Locater::Locater(TQObject *parent, const char *name)
: TQObject(parent, name), m_process(TQTextCodec::codecForLocale())
{
- DEBUGSTR << "Locater::Locater" << endl;
+ kdDebug(7134) << "Locater::Locater" << endl;
connect(&m_process, TQT_SIGNAL(processExited(TDEProcess*)),
this, TQT_SLOT(finished(TDEProcess*)));
@@ -47,13 +47,13 @@ Locater::Locater(TQObject *parent, const char *name)
Locater::~Locater()
{
- DEBUGSTR << "Locater::~Locater" << endl;
+ kdDebug(7134) << "Locater::~Locater" << endl;
}
void Locater::setupLocate(const TQString& binary, const TQString& additionalArguments)
{
- DEBUGSTR << "Locater::setupLocate(" << binary << ", " << additionalArguments << ")" << endl;
+ kdDebug(7134) << "Locater::setupLocate(" << binary << ", " << additionalArguments << ")" << endl;
// Automatically choose the correct binary if not specified.
if (binary.isEmpty()) {
@@ -64,7 +64,7 @@ void Locater::setupLocate(const TQString& binary, const TQString& additionalArgu
} else {
m_binary = "locate";
}
- DEBUGSTR << "Using binary:" << m_binary << endl;
+ kdDebug(7134) << "Using binary:" << m_binary << endl;
} else {
m_binary = binary;
}
@@ -75,7 +75,7 @@ void Locater::setupLocate(const TQString& binary, const TQString& additionalArgu
bool Locater::locate(const TQString& pattern, bool ignoreCase, bool regExp)
{
- DEBUGSTR << "Locater::locate(" << pattern << "," << ignoreCase << "," << regExp << ")" << endl;
+ kdDebug(7134) << "Locater::locate(" << pattern << "," << ignoreCase << "," << regExp << ")" << endl;
m_process.resetAll();
m_process << m_binary;
@@ -96,7 +96,7 @@ bool Locater::locate(const TQString& pattern, bool ignoreCase, bool regExp)
void Locater::stop()
{
- DEBUGSTR << "Locater::stop()" << endl;
+ kdDebug(7134) << "Locater::stop()" << endl;
m_process.kill();
emit finished();
@@ -105,13 +105,13 @@ void Locater::stop()
void Locater::gotOutput(KProcIO* /*proc*/)
{
- //DEBUGSTR << "Locater::gotOutput" << endl;
+ //kdDebug(7134) << "Locater::gotOutput" << endl;
TQStringList items;
TQString line;
while (m_process.readln(line) != -1) {
- //DEBUGSTR << "OUTPUT>> '" << line << "'" << endl;
+ //kdDebug(7134) << "OUTPUT>> '" << line << "'" << endl;
items << line;
}
@@ -122,7 +122,7 @@ void Locater::gotOutput(KProcIO* /*proc*/)
void Locater::finished(TDEProcess* /*proc*/)
{
- DEBUGSTR << "Locater::finished" << endl;
+ kdDebug(7134) << "Locater::finished" << endl;
emit finished();
}
diff --git a/src/locater.h b/src/locater.h
index 229f3f2..cde2c5d 100644
--- a/src/locater.h
+++ b/src/locater.h
@@ -32,9 +32,6 @@
#include <kprocio.h>
-#define DEBUGSTR kdDebug(7199)
-
-
/**
* Interface to the locate command.
*
diff --git a/src/locater.protocol b/src/locater.protocol
index e7f8bf2..ac40189 100644
--- a/src/locater.protocol
+++ b/src/locater.protocol
@@ -1,15 +1,16 @@
[Protocol]
-exec=tdeio_locate
+Description=TDE I/O Slave for the locate command
+
protocol=locater
+Icon=edit-find
+exec=tdeio_locate
input=none
output=filesystem
listing=Name,Type,Size,Date,AccessDate,Access,Owner,Group,Link
reading=true
-Icon=edit-find
-Description=TDE I/O Slave for the locate command
# Using this will e.g. display previews etc.
Class=:local
# Our very sophisticated documentation
-X-DocPath=tdeio-locate/index.html
+X-DocPath=tdeioslave/locate/index.html
diff --git a/src/rlocate.protocol b/src/rlocate.protocol
index aefcc5d..1cbfa88 100644
--- a/src/rlocate.protocol
+++ b/src/rlocate.protocol
@@ -1,12 +1,13 @@
[Protocol]
-exec=tdeio_locate
+Description=TDE I/O Slave for the locate command
+
protocol=rlocate
+Icon=edit-find
+exec=tdeio_locate
input=none
output=filesystem
listing=Name,Type,Size,Date,AccessDate,Access,Owner,Group,Link
reading=true
-Icon=edit-find
-Description=TDE I/O Slave for the locate command
# Using this will e.g. display previews etc.
Class=:local
@@ -15,4 +16,4 @@ Class=:local
URIMode=rawuri
# Our very sophisticated documentation
-X-DocPath=tdeio-locate/index.html
+X-DocPath=tdeioslave/locate/index.html
diff --git a/src/tdeio_locate.cpp b/src/tdeio_locate.cpp
index ff4d7b2..09f2395 100644
--- a/src/tdeio_locate.cpp
+++ b/src/tdeio_locate.cpp
@@ -98,7 +98,7 @@ static TQString convertWildcardsToRegExp(TQString s)
// Walk through the string, converting \wildcard to regexp and
// \\\wildcard back to \wildcard.
for (unsigned i = 1; i < s.length(); ++i) {
- //DEBUGSTR << s.left(i+1) << endl;
+ //kdDebug(7134) << s.left(i+1) << endl;
if (i < 3 || s[i-3] != '\\' || s[i-2] != '\\') {
// If it was an unescaped character (now possibly escaped once)
if (s[i-1] == '\\') {
@@ -266,7 +266,7 @@ static const UDSEntry pathToUDSEntry(const TQString& path, const TQString& displ
LocateProtocol::LocateProtocol(const TQCString &pool_socket, const TQCString &app_socket)
: SlaveBase("tdeio_locate", pool_socket, app_socket)
{
- DEBUGSTR << "LocateProtocol::LocateProtocol()" << endl;
+ kdDebug(7134) << "LocateProtocol::LocateProtocol()" << endl;
connect(&m_locater, TQT_SIGNAL(found(const TQStringList&)),
this, TQT_SLOT(processLocateOutput(const TQStringList&)));
@@ -280,7 +280,7 @@ LocateProtocol::LocateProtocol(const TQCString &pool_socket, const TQCString &ap
LocateProtocol::~LocateProtocol()
{
- DEBUGSTR << "LocateProtocol::~LocateProtocol()" << endl;
+ kdDebug(7134) << "LocateProtocol::~LocateProtocol()" << endl;
delete m_baseDir;
}
@@ -330,7 +330,7 @@ void LocateProtocol::setUrl(const KURL& url)
}
m_url = newUrl;
- DEBUGSTR << "Redirect: " << m_url << endl;
+ kdDebug(7134) << "Redirect: " << m_url << endl;
} else {
m_url = url;
}
@@ -340,7 +340,7 @@ void LocateProtocol::setUrl(const KURL& url)
void LocateProtocol::get(const KURL& url)
{
- DEBUGSTR << "LocateProtocol::get(" << url << ")" << endl;
+ kdDebug(7134) << "LocateProtocol::get(" << url << ")" << endl;
setUrl(url);
@@ -364,7 +364,7 @@ void LocateProtocol::get(const KURL& url)
void LocateProtocol::stat(const KURL& url)
{
- DEBUGSTR << "LocateProtocol::stat(" << url << ")" << endl ;
+ kdDebug(7134) << "LocateProtocol::stat(" << url << ")" << endl ;
setUrl(url);
@@ -388,7 +388,7 @@ void LocateProtocol::stat(const KURL& url)
void LocateProtocol::listDir(const KURL& url)
{
- DEBUGSTR << "LocateProtocol::listDir(" << url << ")" << endl ;
+ kdDebug(7134) << "LocateProtocol::listDir(" << url << ")" << endl ;
setUrl(url);
@@ -405,7 +405,7 @@ void LocateProtocol::listDir(const KURL& url)
void LocateProtocol::mimetype(const KURL& url)
{
- DEBUGSTR << "LocateProtocol::mimetype(" << url << ")" << endl ;
+ kdDebug(7134) << "LocateProtocol::mimetype(" << url << ")" << endl ;
setUrl(url);
@@ -505,8 +505,8 @@ void LocateProtocol::searchRequest()
}
}
- DEBUGSTR << "Pattern: " << m_locatePattern << endl;
- DEBUGSTR << "Directory: " << m_locateDirectory << endl;
+ kdDebug(7134) << "Pattern: " << m_locatePattern << endl;
+ kdDebug(7134) << "Directory: " << m_locateDirectory << endl;
// We set up the regexp used to see whether the match was in the
// directory part or the filename part of a path.
@@ -518,7 +518,7 @@ void LocateProtocol::searchRequest()
bool started = m_locater.locate(m_locatePattern, !isCaseSensitive(m_locatePattern), regexp);
if (!started) {
- DEBUGSTR << "Locate could not be found." << endl;
+ kdDebug(7134) << "Locate could not be found." << endl;
finished();
}
}
@@ -542,7 +542,7 @@ bool LocateProtocol::isCaseSensitive(const TQString& text)
void LocateProtocol::addHit(const TQString& path, int subItems)
{
- // DEBUGSTR << "LocateProtocol::addHit( " << path << ", " << subItems << " )" << endl;
+ // kdDebug(7134) << "LocateProtocol::addHit( " << path << ", " << subItems << " )" << endl;
if (TQFile::exists(path)) {
if (subItems > 0) {
m_entries += pathToUDSEntry(path, pathToDisplay(path, subItems), makeLocaterUrl(path), iconToStringTable[m_config.m_collapsedIcon]);
@@ -632,7 +632,7 @@ void LocateProtocol::locateFinished()
}
addPreviousLocateOutput();
- DEBUGSTR << "LocateProtocol::locateFinished" << endl;
+ kdDebug(7134) << "LocateProtocol::locateFinished" << endl;
infoMessage(i18n("Finished."));
finished();
}
@@ -640,7 +640,7 @@ void LocateProtocol::locateFinished()
TQString LocateProtocol::partToPattern(const TQString& part, bool forLocate)
{
- DEBUGSTR << "BEG part: " << part << endl;
+ kdDebug(7134) << "BEG part: " << part << endl;
TQString pattern = part;
// Unescape whitespace.
pattern.replace("\\ ", " ");
@@ -690,7 +690,7 @@ TQString LocateProtocol::partToPattern(const TQString& part, bool forLocate)
}
pattern.replace("\\~", "~");
}
- DEBUGSTR << "END part: " << pattern << endl;
+ kdDebug(7134) << "END part: " << pattern << endl;
return pattern;
}
@@ -790,7 +790,7 @@ void LocateProtocol::configRequest()
void LocateProtocol::configFinished()
{
- DEBUGSTR << "LocateProtocol::configFinished" << endl;
+ kdDebug(7134) << "LocateProtocol::configFinished" << endl;
tqApp->exit_loop();
@@ -807,7 +807,7 @@ void LocateProtocol::configFinished()
void LocateProtocol::updateConfig()
{
// It's not needed to update the config if it's still up to date.
- DEBUGSTR << "LocateProtocol::updateConfig" << endl;
+ kdDebug(7134) << "LocateProtocol::updateConfig" << endl;
KLocateConfig::self()->readConfig();
m_config.m_caseSensitivity = (LocateCaseSensitivity) KLocateConfig::caseSensitivity();
@@ -836,7 +836,7 @@ bool LocateProtocol::isHelpRequest()
void LocateProtocol::helpRequest()
{
// Redirect the user to our help documents.
- redirection("help:/tdeio-locate/");
+ redirection("help:/tdeioslave/locate/");
finished();
}
@@ -982,10 +982,10 @@ void LocateDirectory::debugTrace(int level)
{
TQString ws;
ws.fill(' ', level);
- DEBUGSTR << ws << m_path << endl;
+ kdDebug(7134) << ws << m_path << endl;
LocateItems::ConstIterator item = m_items.begin();
for (; item != m_items.end(); ++item) {
- DEBUGSTR << ws << "+ " << (*item).m_path << endl;
+ kdDebug(7134) << ws << "+ " << (*item).m_path << endl;
}
LocateDirectoriesIterator child(m_childs);
for (; child.current(); ++child) {
@@ -1020,17 +1020,17 @@ extern "C"
TDEApplication::disableAutoDcopRegistration();
TDEApplication app(argc, argv, "tdeio_locate", false, true, false);
- DEBUGSTR << "*** Starting tdeio_locate " << endl;
+ kdDebug(7134) << "*** Starting tdeio_locate " << endl;
if (argc != 4) {
- DEBUGSTR << "Usage: tdeio_locate protocol domain-socket1 domain-socket2" << endl;
+ kdDebug(7134) << "Usage: tdeio_locate protocol domain-socket1 domain-socket2" << endl;
exit(-1);
}
LocateProtocol slave(argv[2], argv[3]);
slave.dispatchLoop();
- DEBUGSTR << "*** tdeio_locate Done" << endl;
+ kdDebug(7134) << "*** tdeio_locate Done" << endl;
return 0;
}
}
diff --git a/templates/cpp b/templates/cpp
deleted file mode 100644
index e81a459..0000000
--- a/templates/cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/***************************************************************************
- * tdeio-locate: KDE I/O Slave for the locate command *
- * *
- * Copyright (C) 2005 by Tobi Vollebregt *
- * tobivollebregt@gmail.com *
- * *
- * Copyright (C) 2004 by Armin Straub *
- * linux@arminstraub.de *
- * *
- * This program was initially written by Michael Schuerig. *
- * Although I have completely rewritten it, most ideas are adopted *
- * from his original work. *
- * *
- * Copyright (C) 2002 by Michael Schuerig *
- * michael@schuerig.de *
- * *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- ***************************************************************************/
diff --git a/templates/h b/templates/h
deleted file mode 100644
index e81a459..0000000
--- a/templates/h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***************************************************************************
- * tdeio-locate: KDE I/O Slave for the locate command *
- * *
- * Copyright (C) 2005 by Tobi Vollebregt *
- * tobivollebregt@gmail.com *
- * *
- * Copyright (C) 2004 by Armin Straub *
- * linux@arminstraub.de *
- * *
- * This program was initially written by Michael Schuerig. *
- * Although I have completely rewritten it, most ideas are adopted *
- * from his original work. *
- * *
- * Copyright (C) 2002 by Michael Schuerig *
- * michael@schuerig.de *
- * *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- ***************************************************************************/
diff --git a/translations/desktop_files/tdeio-locate-desktops.pot b/translations/desktop_files/tdeio-locate-desktops.pot
new file mode 100644
index 0000000..e0188cf
--- /dev/null
+++ b/translations/desktop_files/tdeio-locate-desktops.pot
@@ -0,0 +1,27 @@
+# SOME DESCRIPTIVE TITLE.
+# This file is put in the public domain.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-08-27 14:58+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Name
+#: locate.desktop:2
+msgid "locate - Search for local files"
+msgstr ""
+
+#. Description
+#: locate.protocol:2 locater.protocol:2 rlocate.protocol:2
+msgid "TDE I/O Slave for the locate command"
+msgstr ""
diff --git a/po/de/tdeio-locate.po b/translations/messages/de.po
index 95b1ffb..aec623d 100644
--- a/po/de/tdeio-locate.po
+++ b/translations/messages/de.po
@@ -8,28 +8,29 @@ msgid ""
msgstr ""
"Project-Id-Version: tdeio-locate\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-12-26 02:14+0100\n"
-"PO-Revision-Date: 2004-09-29 12:59+0200\n"
-"Last-Translator: Armin Straub <linux@arminstraub.de>\n"
-"Language-Team: German <de@li.org>\n"
+"POT-Creation-Date: 2021-07-07 18:33+0000\n"
+"PO-Revision-Date: 2019-12-23 23:40+0000\n"
+"Last-Translator: Chris <xchrisx@uber.space>\n"
+"Language-Team: German <https://mirror.git.trinitydesktop.org/weblate/"
+"projects/applications/tdeio-locate/de/>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.3.1\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 3.9.1\n"
-#: _translatorinfo:1
+#. Instead of a literal translation, add your name to the end of the list (separated by a comma).
msgid ""
"_: NAME OF TRANSLATORS\n"
"Your names"
-msgstr ""
+msgstr "Chris (TDE)"
-#: _translatorinfo:2
+#. Instead of a literal translation, add your email to the end of the list (separated by a comma).
msgid ""
"_: EMAIL OF TRANSLATORS\n"
"Your emails"
-msgstr ""
+msgstr "(Keine Email)"
#: tdeio_locate.cpp:351
msgid ""
@@ -42,6 +43,15 @@ msgid ""
"that uses the same syntax. In particular, it was reported to work with "
"<i>slocate</i> and <i>rlocate</i>."
msgstr ""
+"<h1>\"%1\" konnte nicht gestartet werden.</h1><p>Beachten Sie, dass tdeio-"
+"locate nicht alleine verwendet werden kann. Sie benötigen ein zusätzliches "
+"Programm für die Suche. In der Regel ist dies das Befehlszeilenprogramm "
+"<i>locate</i>, das standardmäßig in vielen Distributionen enthalten ist. Sie "
+"können überprüfen, ob das richtige Programm verwendet wird, indem Sie die <a "
+"href=\"locater:config\">Einstellung</a> \"Locate ausführbare Datei\" "
+"überprüfen.<p>Neben dem erwähnten Programm <i>locate</i>, kann tdeio-locate "
+"jedes Programm verwenden, das dieselbe Syntax verwendet. Insbesondere wurde "
+"berichtet, dass es mit <i>slocate</i> und <i>rlocate</i> funktioniert."
#: tdeio_locate.cpp:516
msgid "Locating %1 ..."
@@ -78,7 +88,7 @@ msgstr "Einstellungen unverändert."
#: klocateconfigfilterwidget.ui:16
#, no-c-format
msgid "KLocateConfigFilterWidget"
-msgstr ""
+msgstr "KLocateConfigFilterWidget"
#: klocateconfigfilterwidget.ui:27
#, no-c-format
@@ -140,7 +150,7 @@ msgstr ""
#: klocateconfiglocatewidget.ui:16
#, no-c-format
msgid "KLocateConfigLocateWidget"
-msgstr ""
+msgstr "KLocateConfigLocateWidget"
#: klocateconfiglocatewidget.ui:27
#, no-c-format
@@ -190,6 +200,9 @@ msgid ""
"<i>Hint:</i> If you don't specify a value here (which is the default), tdeio-"
"locate will automatically pick slocate, rlocate or locate (in that order)."
msgstr ""
+"<i>Tipp:</i> Wenn Sie hier keinen Wert angeben (dies ist die "
+"Voreinstellung), wählt tdeio-locate automatisch slocate, rlocate oder locate "
+"(in dieser Reihenfolge) aus."
#: klocateconfiglocatewidget.ui:150
#, no-c-format
@@ -209,7 +222,7 @@ msgstr ""
#: klocateconfigwidget.ui:16
#, no-c-format
msgid "KLocateConfigWidget"
-msgstr ""
+msgstr "KLocateConfigWidget"
#: klocateconfigwidget.ui:27
#, no-c-format
@@ -219,7 +232,7 @@ msgstr "Allgemeine Einstellungen"
#: klocateconfigwidget.ui:46
#, no-c-format
msgid "Case se&nsitivity:"
-msgstr "&Groß- und Kleinschreibung"
+msgstr "&Groß- und Kleinschreibung:"
#: klocateconfigwidget.ui:72
#, no-c-format
@@ -255,7 +268,7 @@ msgstr "Verzeichnisse zusammenfassen"
#: klocateconfigwidget.ui:142
#, no-c-format
msgid "&Collapse a directory with more hits:"
-msgstr "Verzeichnisse mit mehr Treffern &zusammenfassen."
+msgstr "Verzeichnisse mit mehr Treffern &zusammenfassen:"
#: klocateconfigwidget.ui:173 tdeio_locate.kcfg:18
#, no-c-format
@@ -265,7 +278,7 @@ msgstr "Verzeichnisse mit mehr Treffern zusammenfassen."
#: klocateconfigwidget.ui:199
#, no-c-format
msgid "Text of a collapsed &directory:"
-msgstr "Anzeige einer &Verzeichnissuche:"
+msgstr "Text einer &Verzeichnissuche:"
#: klocateconfigwidget.ui:251
#, no-c-format
@@ -279,7 +292,7 @@ msgstr ""
#: klocateconfigwidget.ui:267
#, no-c-format
msgid "&Icon of a collapsed directory:"
-msgstr "&Icon für Verzeichnissuchen:"
+msgstr "&Symbol einer Verzeichnissuche:"
#: klocateconfigwidget.ui:293
#, no-c-format
@@ -317,9 +330,9 @@ msgid "Yellow"
msgstr "Gelb"
#: tdeio_locate.kcfg:11
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Case sensitivity"
-msgstr "&Groß- und Kleinschreibung"
+msgstr "Groß- und Kleinschreibung"
#: tdeio_locate.kcfg:12
#, no-c-format
@@ -328,19 +341,23 @@ msgid ""
"insensitive, upper- or mixedcase pattern -> case sensitive), 1 for case "
"sensitive and 2 for case insensitive."
msgstr ""
+"0 für die automatische Ermittlung der Groß-/Kleinschreibung (Muster in "
+"Kleinbuchstaben -> keine Groß-/Kleinschreibung, Muster in Groß- oder "
+"Gemischtschreibung -> Groß-/Kleinschreibung), 1 für Groß-/Kleinschreibung "
+"und 2 für keine Groß-/Kleinschreibung."
#: tdeio_locate.kcfg:17
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Collapse directory"
-msgstr "&Icon für Verzeichnissuchen:"
+msgstr "Verzeichnissuche"
#: tdeio_locate.kcfg:23
-#, fuzzy, no-c-format
+#, no-c-format
msgid "How to display a collapsed directory entry"
-msgstr "&Icon für Verzeichnissuchen:"
+msgstr "Wie eine Verzeichnissuche angezeigt werden soll"
#: tdeio_locate.kcfg:24
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Hint: %1 is substituted by the number of hits, %2 by the name of the "
"directory."
@@ -349,32 +366,32 @@ msgstr ""
"Verzeichnisnamen ersetzt."
#: tdeio_locate.kcfg:29
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Icon to use for a collapsed directory entry"
-msgstr "&Icon für Verzeichnissuchen:"
+msgstr "Symbol welches für eine Verzeichnissuche verwendet werden soll"
#: tdeio_locate.kcfg:30
#, no-c-format
msgid "0-Blue, 1-Green, 2-Grey, 3-Orange, 4-Red, 5-Violet, 6-Yellow"
-msgstr ""
+msgstr "0-Blau, 1-Grün, 2-Grau, 3-Orange, 4-Rot, 5-Violett, 6-Gelb"
#: tdeio_locate.kcfg:37
-#, fuzzy, no-c-format
+#, no-c-format
msgid "White list"
-msgstr "&White List"
+msgstr "Weiße Liste"
#: tdeio_locate.kcfg:43
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Black list"
-msgstr "&Black List"
+msgstr "Schwarze Liste"
#: tdeio_locate.kcfg:56
-#, fuzzy, no-c-format
+#, no-c-format
msgid "Additional Arguments for locate"
-msgstr "Zusätzliche &Argumente:"
+msgstr "Zusätzliche Argumente für locate"
#: tdeio_locate.kcfg:57
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"Do not use -r or -i here. The first will confuse tdeio-locate, while the "
"latter can be changed through the caseSensitivity option."
diff --git a/po/fr/tdeio-locate.po b/translations/messages/fr.po
index 155114e..1b920ef 100644
--- a/po/fr/tdeio-locate.po
+++ b/translations/messages/fr.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tdeio_locate\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-12-26 02:14+0100\n"
+"POT-Creation-Date: 2021-07-07 18:33+0000\n"
"PO-Revision-Date: 2004-10-21 16:52+0200\n"
"Last-Translator: Laurent Rathle <lrathle@kde-france.org>\n"
"Language-Team: French <kde-francophone@kde.org>\n"
@@ -20,13 +20,13 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.9\n"
-#: _translatorinfo:1
+#. Instead of a literal translation, add your name to the end of the list (separated by a comma).
msgid ""
"_: NAME OF TRANSLATORS\n"
"Your names"
msgstr ""
-#: _translatorinfo:2
+#. Instead of a literal translation, add your email to the end of the list (separated by a comma).
msgid ""
"_: EMAIL OF TRANSLATORS\n"
"Your emails"
diff --git a/translations/messages/pt.po b/translations/messages/pt.po
new file mode 100644
index 0000000..f4e3040
--- /dev/null
+++ b/translations/messages/pt.po
@@ -0,0 +1,348 @@
+# SOME DESCRIPTIVE TITLE.
+# Hugo Carvalho <hugokarvalho@hotmail.com>, 2020, 2021.
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2021-07-07 18:33+0000\n"
+"PO-Revision-Date: 2021-12-12 18:00+0000\n"
+"Last-Translator: Hugo Carvalho <hugokarvalho@hotmail.com>\n"
+"Language-Team: Portuguese <https://mirror.git.trinitydesktop.org/weblate/"
+"projects/applications/tdeio-locate/pt/>\n"
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n > 1;\n"
+"X-Generator: Weblate 4.9.1\n"
+
+#. Instead of a literal translation, add your name to the end of the list (separated by a comma).
+msgid ""
+"_: NAME OF TRANSLATORS\n"
+"Your names"
+msgstr "Hugo Carvalho"
+
+#. Instead of a literal translation, add your email to the end of the list (separated by a comma).
+msgid ""
+"_: EMAIL OF TRANSLATORS\n"
+"Your emails"
+msgstr "hugokarvalho@hotmail.com"
+
+#: tdeio_locate.cpp:351
+msgid ""
+"<h1>\"%1\" could not be started.</h1><p>Please note that tdeio-locate can't "
+"be used on its own. You need an additional program for doing searches. "
+"Typically this is the command line tool <i>locate</i> that can be found in "
+"many distributions by default. You can check if the correct tool is used by "
+"looking at the <a href=\"locater:config\">setting</a> \"Locate Binary\"."
+"<p>Besides the mentioned tool <i>locate</i>, tdeio-locate can use any tool "
+"that uses the same syntax. In particular, it was reported to work with "
+"<i>slocate</i> and <i>rlocate</i>."
+msgstr ""
+
+#: tdeio_locate.cpp:516
+msgid "Locating %1 ..."
+msgstr ""
+
+#: tdeio_locate.cpp:636
+msgid "Finished."
+msgstr ""
+
+#: tdeio_locate.cpp:774
+msgid "Configure - tdeio-locate"
+msgstr ""
+
+#: tdeio_locate.cpp:777
+msgid "General"
+msgstr "Geral"
+
+#: tdeio_locate.cpp:778
+msgid "Filters"
+msgstr "Filtros"
+
+#: tdeio_locate.cpp:779
+msgid "Locate"
+msgstr "Localizar"
+
+#: tdeio_locate.cpp:799
+msgid "Configuration succesfully updated."
+msgstr ""
+
+#: tdeio_locate.cpp:801
+msgid "Configuration unchanged."
+msgstr ""
+
+#: klocateconfigfilterwidget.ui:16
+#, no-c-format
+msgid "KLocateConfigFilterWidget"
+msgstr ""
+
+#: klocateconfigfilterwidget.ui:27
+#, no-c-format
+msgid "Filter Settings"
+msgstr ""
+
+#: klocateconfigfilterwidget.ui:38
+#, no-c-format
+msgid ""
+"A path must match at least one of the regular expressions in the White List "
+"and it must not match any of the expressions in the Black List for being "
+"displayed as a hit."
+msgstr ""
+
+#: klocateconfigfilterwidget.ui:49
+#, no-c-format
+msgid "&White List"
+msgstr ""
+
+#: klocateconfigfilterwidget.ui:55 tdeio_locate.kcfg:38
+#, no-c-format
+msgid "A path must match at least one of these regular expressions."
+msgstr ""
+
+#: klocateconfigfilterwidget.ui:63
+#, no-c-format
+msgid "&Black List"
+msgstr ""
+
+#: klocateconfigfilterwidget.ui:69 tdeio_locate.kcfg:44
+#, no-c-format
+msgid "A path may not match any of these regular expressions."
+msgstr ""
+
+#: klocateconfigfilterwidget.ui:77
+#, no-c-format
+msgid ""
+"<i>Hint:</i> E.g. replacing the default '.' entry by '^/home/user/' will "
+"only allow hits in the home directory of user."
+msgstr ""
+
+#: klocateconfigfilterwidget.ui:88
+#, no-c-format
+msgid ""
+"<i>Hint:</i> Adding e.g. '/\\.' will no longer display hidden files (this "
+"will be unnecessary in some next version of kde though)."
+msgstr ""
+
+#: klocateconfiglocatewidget.ui:16
+#, no-c-format
+msgid "KLocateConfigLocateWidget"
+msgstr ""
+
+#: klocateconfiglocatewidget.ui:27
+#, no-c-format
+msgid "Locate Settings"
+msgstr ""
+
+#: klocateconfiglocatewidget.ui:38
+#, no-c-format
+msgid ""
+"<p>tdeio-locate does not handle the settings of locate, because this setup "
+"varies among different distributions. There are even distributions that use "
+"replacements like slocate.</p>\n"
+"<p>To configure locate you should take a look at the manpage of locate. "
+"Since most distributions use cron for updating locate's database, it may "
+"also be useful to take a look at the manpage of crontab.</p>"
+msgstr ""
+
+#: klocateconfiglocatewidget.ui:52 tdeio_locate.kcfg:51
+#, no-c-format
+msgid "Locate Binary"
+msgstr ""
+
+#: klocateconfiglocatewidget.ui:66
+#, no-c-format
+msgid ""
+"Use these settings only if you really know what you do. Otherwise the "
+"default should be ok."
+msgstr ""
+
+#: klocateconfiglocatewidget.ui:82
+#, no-c-format
+msgid "Locate &binary:"
+msgstr ""
+
+#: klocateconfiglocatewidget.ui:134
+#, no-c-format
+msgid ""
+"<i>Hint:</i> If you don't specify a value here (which is the default), tdeio-"
+"locate will automatically pick slocate, rlocate or locate (in that order)."
+msgstr ""
+
+#: klocateconfiglocatewidget.ui:150
+#, no-c-format
+msgid "Additional &arguments:"
+msgstr ""
+
+#: klocateconfiglocatewidget.ui:199
+#, no-c-format
+msgid ""
+"<i>Hint:</i> Do not use -r or -i here. The first will confuse tdeio-locate, "
+"and the latter can be changed through the \"Case sensitivity\" option."
+msgstr ""
+
+#: klocateconfigwidget.ui:16
+#, no-c-format
+msgid "KLocateConfigWidget"
+msgstr ""
+
+#: klocateconfigwidget.ui:27
+#, no-c-format
+msgid "General Settings"
+msgstr ""
+
+#: klocateconfigwidget.ui:46
+#, no-c-format
+msgid "Case se&nsitivity:"
+msgstr ""
+
+#: klocateconfigwidget.ui:72
+#, no-c-format
+msgid "Auto"
+msgstr ""
+
+#: klocateconfigwidget.ui:77
+#, no-c-format
+msgid "Sensitive"
+msgstr ""
+
+#: klocateconfigwidget.ui:82
+#, no-c-format
+msgid "Insensitive"
+msgstr ""
+
+#: klocateconfigwidget.ui:102
+#, no-c-format
+msgid ""
+"<i>Hint:</i> With \"Auto\" case sensitivity a pattern will be case "
+"insensitive if it is lowercase and case sensitive if it is mixed- or "
+"uppercase."
+msgstr ""
+
+#: klocateconfigwidget.ui:112
+#, no-c-format
+msgid "Collapsing Search Results"
+msgstr ""
+
+#: klocateconfigwidget.ui:142
+#, no-c-format
+msgid "&Collapse a directory with more hits:"
+msgstr ""
+
+#: klocateconfigwidget.ui:173 tdeio_locate.kcfg:18
+#, no-c-format
+msgid "Collapse a directory with more hits."
+msgstr ""
+
+#: klocateconfigwidget.ui:199
+#, no-c-format
+msgid "Text of a collapsed &directory:"
+msgstr ""
+
+#: klocateconfigwidget.ui:251
+#, no-c-format
+msgid ""
+"<i>Hint:</i> %1 is substituted by the number of hits and %2 by the name of "
+"the directory."
+msgstr ""
+
+#: klocateconfigwidget.ui:267
+#, no-c-format
+msgid "&Icon of a collapsed directory:"
+msgstr ""
+
+#: klocateconfigwidget.ui:293
+#, no-c-format
+msgid "Blue"
+msgstr ""
+
+#: klocateconfigwidget.ui:301
+#, no-c-format
+msgid "Green"
+msgstr ""
+
+#: klocateconfigwidget.ui:309
+#, no-c-format
+msgid "Grey"
+msgstr ""
+
+#: klocateconfigwidget.ui:317
+#, no-c-format
+msgid "Orange"
+msgstr ""
+
+#: klocateconfigwidget.ui:325
+#, no-c-format
+msgid "Red"
+msgstr ""
+
+#: klocateconfigwidget.ui:333
+#, no-c-format
+msgid "Violet"
+msgstr ""
+
+#: klocateconfigwidget.ui:341
+#, no-c-format
+msgid "Yellow"
+msgstr ""
+
+#: tdeio_locate.kcfg:11
+#, no-c-format
+msgid "Case sensitivity"
+msgstr ""
+
+#: tdeio_locate.kcfg:12
+#, no-c-format
+msgid ""
+"0 for automatic case sensitivity determination (lowercase pattern -> case "
+"insensitive, upper- or mixedcase pattern -> case sensitive), 1 for case "
+"sensitive and 2 for case insensitive."
+msgstr ""
+
+#: tdeio_locate.kcfg:17
+#, no-c-format
+msgid "Collapse directory"
+msgstr ""
+
+#: tdeio_locate.kcfg:23
+#, no-c-format
+msgid "How to display a collapsed directory entry"
+msgstr ""
+
+#: tdeio_locate.kcfg:24
+#, no-c-format
+msgid ""
+"Hint: %1 is substituted by the number of hits, %2 by the name of the "
+"directory."
+msgstr ""
+
+#: tdeio_locate.kcfg:29
+#, no-c-format
+msgid "Icon to use for a collapsed directory entry"
+msgstr ""
+
+#: tdeio_locate.kcfg:30
+#, no-c-format
+msgid "0-Blue, 1-Green, 2-Grey, 3-Orange, 4-Red, 5-Violet, 6-Yellow"
+msgstr ""
+
+#: tdeio_locate.kcfg:37
+#, no-c-format
+msgid "White list"
+msgstr ""
+
+#: tdeio_locate.kcfg:43
+#, no-c-format
+msgid "Black list"
+msgstr ""
+
+#: tdeio_locate.kcfg:56
+#, no-c-format
+msgid "Additional Arguments for locate"
+msgstr ""
+
+#: tdeio_locate.kcfg:57
+#, no-c-format
+msgid ""
+"Do not use -r or -i here. The first will confuse tdeio-locate, while the "
+"latter can be changed through the caseSensitivity option."
+msgstr ""
diff --git a/po/tdeio-locate.pot b/translations/messages/tdeio-locate.pot
index 4555170..c80cb9a 100644
--- a/po/tdeio-locate.pot
+++ b/translations/messages/tdeio-locate.pot
@@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2018-12-26 02:14+0100\n"
+"POT-Creation-Date: 2021-07-07 18:33+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -13,13 +13,15 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: _translatorinfo:1
+#. Instead of a literal translation, add your name to the end of the list (separated by a comma).
+#, ignore-inconsistent
msgid ""
"_: NAME OF TRANSLATORS\n"
"Your names"
msgstr ""
-#: _translatorinfo:2
+#. Instead of a literal translation, add your email to the end of the list (separated by a comma).
+#, ignore-inconsistent
msgid ""
"_: EMAIL OF TRANSLATORS\n"
"Your emails"
@@ -31,10 +33,10 @@ msgid ""
"be used on its own. You need an additional program for doing searches. "
"Typically this is the command line tool <i>locate</i> that can be found in "
"many distributions by default. You can check if the correct tool is used by "
-"looking at the <a href=\"locater:config\">setting</a> \"Locate "
-"Binary\".<p>Besides the mentioned tool <i>locate</i>, tdeio-locate can use "
-"any tool that uses the same syntax. In particular, it was reported to work "
-"with <i>slocate</i> and <i>rlocate</i>."
+"looking at the <a href=\"locater:config\">setting</a> \"Locate Binary\"."
+"<p>Besides the mentioned tool <i>locate</i>, tdeio-locate can use any tool "
+"that uses the same syntax. In particular, it was reported to work with "
+"<i>slocate</i> and <i>rlocate</i>."
msgstr ""
#: tdeio_locate.cpp:516
@@ -162,9 +164,8 @@ msgstr ""
#: klocateconfiglocatewidget.ui:134
#, no-c-format
msgid ""
-"<i>Hint:</i> If you don't specify a value here (which is the default), "
-"tdeio-locate will automatically pick slocate, rlocate or locate (in that "
-"order)."
+"<i>Hint:</i> If you don't specify a value here (which is the default), tdeio-"
+"locate will automatically pick slocate, rlocate or locate (in that order)."
msgstr ""
#: klocateconfiglocatewidget.ui:150