Development/Tools/Using kde-config: Difference between revisions

From KDE TechBase
(ported page)
 
m (code formatting)
Line 3: Line 3:
== Introduction ==
== Introduction ==


kde-config is a small utility for determining how KDE is installed. It can be used for debugging purposes, or in Makefiles for simple projects that don't want to use the full autoconf/automake framework.
''kde-config'' is a small utility for determining how KDE is installed. It can be used for debugging purposes, or in Makefiles for simple projects that don't want to use the full autoconf/automake framework.


== Usage ==
== Usage ==
Line 41: Line 41:
--install gives the paths kdelibs was compiled for, while --path gives the whole set of paths as they are searched in the current environment.
--install gives the paths kdelibs was compiled for, while --path gives the whole set of paths as they are searched in the current environment.


So while '''--path config''' can return /home/coolo/.kde/share/config:/etc/kde2:/opt/kde2/share/config
So while '''--path config''' can return <code>/home/coolo/.kde/share/config:/etc/kde2:/opt/kde2/share/config</code>
'''--install config''' will return ${prefix}/share/config
'''--install config''' will return <code>${prefix}/share/config</code>
you can ask for '''--prefix''' too, and '''--expandvars''' expands this right for you and gives: /home/coolo/KDE/share/config
you can ask for '''--prefix''' too, and '''--expandvars''' expands this right for you and gives: <code>/home/coolo/KDE/share/config</code>

Revision as of 15:09, 16 January 2007

Finding about KDE's installation : kde-config

Introduction

kde-config is a small utility for determining how KDE is installed. It can be used for debugging purposes, or in Makefiles for simple projects that don't want to use the full autoconf/automake framework.

Usage

kde-config --help gives:

   Options:
     --expandvars              expand ${prefix} and ${exec_prefix} in output
     --prefix                  Compiled in prefix for KDE libraries
     --exec-prefix             Compiled in exec_prefix for KDE libraries
     --localprefix             Prefix in $HOME used to write files
     --version                 Compiled in version string for KDE libraries
     --types                   Available KDE resource types
     --path type               Search path for resource type
     --install type            Prefix to install resource files to    

kde-config --types gives:

   apps - Applications menu (.desktop files)
   config - Configuration files
   data - Where applications store data
   exe - Executables in $prefix/bin
   html - HTML documentation
   icon - Icons
   lib - Libraries
   locale - Translation files for KLocale
   mime - Mime types
   pixmap - unknown type
   services - Services
   servicetypes - Service types
   sound - Application sounds
   templates - Templates
   wallpaper - Wallpapers  

These are valid inputs of --path and --install. --install gives the paths kdelibs was compiled for, while --path gives the whole set of paths as they are searched in the current environment.

So while --path config can return /home/coolo/.kde/share/config:/etc/kde2:/opt/kde2/share/config --install config will return ${prefix}/share/config you can ask for --prefix too, and --expandvars expands this right for you and gives: /home/coolo/KDE/share/config