Install all plasma files in a prefix/share/plasma directory

At the moment, we could say that plasma is co-installable by chance,
it's only working because KF5 dropped the apps relative directory.
This change introduces a PLASMA_RELATIVE_DATA_INSTALL_DIR that will
be available to know where in share the components are and
PLASMA_DATA_INSTALL_DIR to know where data has to be installed to.

Reviewed by David Edmundson

CCMAIL: plasma-devel@kde.org
This commit is contained in:
Aleix Pol 2014-04-27 17:14:22 +02:00
parent d149d719a9
commit e6f1fec0c7
23 changed files with 109 additions and 92 deletions

View File

@ -2,6 +2,8 @@
find_package(ECM 0.0.9 CONFIG REQUIRED) find_package(ECM 0.0.9 CONFIG REQUIRED)
include(KDEInstallDirs) include(KDEInstallDirs)
set(PLASMA_RELATIVE_DATA_INSTALL_DIR "plasma")
set(PLASMA_DATA_INSTALL_DIR "${DATA_INSTALL_DIR}/${PLASMA_RELATIVE_DATA_INSTALL_DIR}")
# plasma_install_package(path componentname [root] [type]) # plasma_install_package(path componentname [root] [type])
# #
@ -9,26 +11,25 @@ include(KDEInstallDirs)
# @arg path The source path to install from, location of metadata.desktop # @arg path The source path to install from, location of metadata.desktop
# @arg componentname The plugin name of the component, corresponding to the # @arg componentname The plugin name of the component, corresponding to the
# X-KDE-PluginInfo-Name key in metadata.desktop # X-KDE-PluginInfo-Name key in metadata.desktop
# @arg root The subdirectory to install to, default: plasma/plasmoids # @arg root The subdirectory to install to, default: plasmoids
# @arg root The subdirectory to install to, default: plasma/plasmoids
# @arg type The type, default to applet, or applet, package, containment, # @arg type The type, default to applet, or applet, package, containment,
# wallpaper, shell, lookandfeel, etc. # wallpaper, shell, lookandfeel, etc.
# @see Types column in plasmapkg --list-types # @see Types column in plasmapkg --list-types
# #
# Examples: # Examples:
# plasma_install_package(mywidget org.kde.plasma.mywidget) # installs an applet # plasma_install_package(mywidget org.kde.plasma.mywidget) # installs an applet
# plasma_install_package(declarativetoolbox org.kde.toolbox plasma/packages package) # installs a generic package # plasma_install_package(declarativetoolbox org.kde.toolbox packages package) # installs a generic package
# #
macro(plasma_install_package dir component) macro(plasma_install_package dir component)
set(root ${ARGV2}) set(root ${ARGV2})
set(type ${ARGV3}) set(type ${ARGV3})
if(NOT root) if(NOT root)
set(root plasma/plasmoids) set(root plasmoids)
endif() endif()
if(NOT type) if(NOT type)
set(type applet) set(type applet)
endif() endif()
install(DIRECTORY ${dir}/ DESTINATION ${DATA_INSTALL_DIR}/${root}/${component} PATTERN .svn EXCLUDE PATTERN CMakeLists.txt EXCLUDE PATTERN Messages.sh EXCLUDE) install(DIRECTORY ${dir}/ DESTINATION ${PLASMA_DATA_INSTALL_DIR}/${root}/${component} PATTERN .svn EXCLUDE PATTERN CMakeLists.txt EXCLUDE PATTERN Messages.sh EXCLUDE)
install(FILES ${dir}/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME plasma-${type}-${component}.desktop) install(FILES ${dir}/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME plasma-${type}-${component}.desktop)
endmacro() endmacro()

View File

@ -1,2 +1,2 @@
plasma_install_package(testcontainment org.kde.example.testcontainment plasma/plasmoids containment) plasma_install_package(testcontainment org.kde.example.testcontainment plasmoids containment)

View File

@ -12,6 +12,6 @@ target_link_libraries(plasma-example-kpart-shell KF5::Plasma KF5::Parts)
########### install files ############### ########### install files ###############
install(TARGETS plasma-example-kpart-shell ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ) install(TARGETS plasma-example-kpart-shell ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} )
install( PROGRAMS plasma-example-kpart-shell.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) install( PROGRAMS plasma-example-kpart-shell.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install(FILES plasma-default-layoutrc DESTINATION ${DATA_INSTALL_DIR}/plasma-example-kpart-shell/) install(FILES plasma-default-layoutrc DESTINATION ${DATA_INSTALL_DIR}/plasma-example-kpart-shell/)
install( FILES plasma-kpart-shellui.rc DESTINATION ${DATA_INSTALL_DIR}/plasma-example-kpart-shell/ ) install( FILES plasma-kpart-shellui.rc DESTINATION ${DATA_INSTALL_DIR}/plasma-example-kpart-shell/ )

View File

@ -1,2 +1,2 @@
plasma_install_package(autumn org.kde.autumn plasma/wallpapers wallpaper) plasma_install_package(autumn org.kde.autumn wallpapers wallpaper)

View File

@ -41,8 +41,6 @@ QImage AppBackgroundProvider::requestImage(const QString &id, QSize *size, const
{ {
Q_UNUSED(size) Q_UNUSED(size)
Q_UNUSED(requestedSize) Q_UNUSED(requestedSize)
QString search = QLatin1Literal("desktoptheme/") % m_theme->themeName() % QLatin1Literal("/appbackgrounds/") % id % ".png"; return QImage(m_theme->backgroundPath(id % ".png"));
search = QStandardPaths::locate(QStandardPaths::GenericDataLocation, search);
return QImage(search);
} }

View File

@ -1,24 +1,24 @@
install(FILES colors metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/air/) install(FILES colors metadata.desktop DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/air/)
FILE(GLOB widgets widgets/*.svgz) FILE(GLOB widgets widgets/*.svgz)
install( FILES ${widgets} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/air/widgets/ ) install( FILES ${widgets} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/air/widgets/ )
FILE(GLOB dialogs dialogs/*.svgz) FILE(GLOB dialogs dialogs/*.svgz)
install( FILES ${dialogs} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/air/dialogs/ ) install( FILES ${dialogs} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/air/dialogs/ )
FILE(GLOB opaque_dialogs opaque/dialogs/*.svgz) FILE(GLOB opaque_dialogs opaque/dialogs/*.svgz)
install( FILES ${opaque_dialogs} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/air/opaque/dialogs/ ) install( FILES ${opaque_dialogs} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/air/opaque/dialogs/ )
FILE(GLOB opaque_widgets opaque/widgets/*.svgz) FILE(GLOB opaque_widgets opaque/widgets/*.svgz)
install( FILES ${opaque_widgets} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/air/opaque/widgets/ ) install( FILES ${opaque_widgets} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/air/opaque/widgets/ )
FILE(GLOB translucent_widgets translucent/widgets/*.svgz) FILE(GLOB translucent_widgets translucent/widgets/*.svgz)
install( FILES ${translucent_widgets} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/air/translucent/widgets/ ) install( FILES ${translucent_widgets} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/air/translucent/widgets/ )
FILE(GLOB translucent_dialogs translucent/dialogs/*.svgz) FILE(GLOB translucent_dialogs translucent/dialogs/*.svgz)
install( FILES ${translucent_dialogs} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/air/translucent/dialogs/ ) install( FILES ${translucent_dialogs} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/air/translucent/dialogs/ )
FILE(GLOB icons icons/*.svgz) FILE(GLOB icons icons/*.svgz)
install( FILES ${icons} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/air/icons/ ) install( FILES ${icons} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/air/icons/ )

View File

@ -1,2 +1,2 @@
install(FILES colors metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/breeze-dark/) install(FILES colors metadata.desktop DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/breeze-dark/)

View File

@ -1,24 +1,24 @@
install(FILES colors metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/default/) install(FILES colors metadata.desktop DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/default/)
FILE(GLOB widgets widgets/*.svgz) FILE(GLOB widgets widgets/*.svgz)
install( FILES ${widgets} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/default/widgets/ ) install( FILES ${widgets} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/default/widgets/ )
FILE(GLOB dialogs dialogs/*.svgz) FILE(GLOB dialogs dialogs/*.svgz)
install( FILES ${dialogs} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/default/dialogs/ ) install( FILES ${dialogs} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/default/dialogs/ )
FILE(GLOB opaque_dialogs opaque/dialogs/*.svgz) FILE(GLOB opaque_dialogs opaque/dialogs/*.svgz)
install( FILES ${opaque_dialogs} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/default/opaque/dialogs/ ) install( FILES ${opaque_dialogs} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/default/opaque/dialogs/ )
FILE(GLOB opaque_widgets opaque/widgets/*.svgz) FILE(GLOB opaque_widgets opaque/widgets/*.svgz)
install( FILES ${opaque_widgets} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/default/opaque/widgets/ ) install( FILES ${opaque_widgets} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/default/opaque/widgets/ )
FILE(GLOB translucent_widgets translucent/widgets/*.svgz) FILE(GLOB translucent_widgets translucent/widgets/*.svgz)
install( FILES ${translucent_widgets} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/default/translucent/widgets/ ) install( FILES ${translucent_widgets} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/default/translucent/widgets/ )
FILE(GLOB translucent_dialogs translucent/dialogs/*.svgz) FILE(GLOB translucent_dialogs translucent/dialogs/*.svgz)
install( FILES ${translucent_dialogs} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/default/translucent/dialogs/ ) install( FILES ${translucent_dialogs} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/default/translucent/dialogs/ )
FILE(GLOB icons icons/*.svgz) FILE(GLOB icons icons/*.svgz)
install( FILES ${icons} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/default/icons/ ) install( FILES ${icons} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/default/icons/ )

View File

@ -1,18 +1,18 @@
install(FILES colors metadata.desktop DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/oxygen/) install(FILES colors metadata.desktop DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/oxygen/)
FILE(GLOB widgets widgets/*.svgz) FILE(GLOB widgets widgets/*.svgz)
install( FILES ${widgets} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/oxygen/widgets/ ) install( FILES ${widgets} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/oxygen/widgets/ )
FILE(GLOB dialogs dialogs/*.svgz) FILE(GLOB dialogs dialogs/*.svgz)
install( FILES ${dialogs} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/oxygen/dialogs/ ) install( FILES ${dialogs} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/oxygen/dialogs/ )
FILE(GLOB opaque opaque/widgets/*.svgz) FILE(GLOB opaque opaque/widgets/*.svgz)
install( FILES ${opaque} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/oxygen/opaque/widgets/ ) install( FILES ${opaque} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/oxygen/opaque/widgets/ )
FILE(GLOB opaque opaque/dialogs/*.svgz) FILE(GLOB opaque opaque/dialogs/*.svgz)
install( FILES ${opaque} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/oxygen/opaque/dialogs/ ) install( FILES ${opaque} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/oxygen/opaque/dialogs/ )
FILE(GLOB icons ../air/icons/*.svgz) FILE(GLOB icons ../air/icons/*.svgz)
install( FILES ${icons} DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/oxygen/icons/ ) install( FILES ${icons} DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/oxygen/icons/ )

View File

@ -200,9 +200,9 @@ install(FILES
data/servicetypes/plasma-lookandfeel.desktop data/servicetypes/plasma-lookandfeel.desktop
DESTINATION ${SERVICETYPES_INSTALL_DIR}) DESTINATION ${SERVICETYPES_INSTALL_DIR})
install(FILES data/operations/dataengineservice.operations DESTINATION ${DATA_INSTALL_DIR}/plasma/services) install(FILES data/operations/dataengineservice.operations DESTINATION ${PLASMA_DATA_INSTALL_DIR}/services)
install(FILES data/operations/plasmoidservice.operations DESTINATION ${DATA_INSTALL_DIR}/plasma/services) install(FILES data/operations/plasmoidservice.operations DESTINATION ${PLASMA_DATA_INSTALL_DIR}/services)
install(FILES data/operations/storage.operations DESTINATION ${DATA_INSTALL_DIR}/plasma/services) install(FILES data/operations/storage.operations DESTINATION ${PLASMA_DATA_INSTALL_DIR}/services)
install(TARGETS KF5Plasma EXPORT KF5PlasmaTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS KF5Plasma EXPORT KF5PlasmaTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})

View File

@ -4,3 +4,5 @@
#cmakedefine01 HAVE_X11 #cmakedefine01 HAVE_X11
#cmakedefine01 HAVE_GLX #cmakedefine01 HAVE_GLX
#cmakedefine01 HAVE_EGL #cmakedefine01 HAVE_EGL
#define PLASMA_RELATIVE_DATA_INSTALL_DIR "@PLASMA_RELATIVE_DATA_INSTALL_DIR@"

View File

@ -45,6 +45,7 @@
#include "private/datacontainer_p.h" #include "private/datacontainer_p.h"
#include "private/service_p.h" #include "private/service_p.h"
#include "private/storage_p.h" #include "private/storage_p.h"
#include "config-plasma.h"
namespace Plasma namespace Plasma
{ {
@ -430,7 +431,7 @@ DataEnginePrivate::DataEnginePrivate(DataEngine *e, const KPluginInfo &info)
if (!api.isEmpty()) { if (!api.isEmpty()) {
const QString path = const QString path =
QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStandardPaths::locate(QStandardPaths::GenericDataLocation,
"plasma/dataengines/" + dataEngineDescription.pluginName() + '/', PLASMA_RELATIVE_DATA_INSTALL_DIR "/dataengines/" + dataEngineDescription.pluginName() + '/',
QStandardPaths::LocateDirectory); QStandardPaths::LocateDirectory);
package = new Package(PluginLoader::self()->loadPackage("Plasma/DataEngine", api)); package = new Package(PluginLoader::self()->loadPackage("Plasma/DataEngine", api));
package->setPath(path); package->setPath(path);

View File

@ -79,7 +79,7 @@ void GenericPackage::initPackage(Package *package)
package->setContentsPrefixPaths(platform); package->setContentsPrefixPaths(platform);
} }
package->setDefaultPackageRoot("plasma/packages/"); package->setDefaultPackageRoot(PLASMA_RELATIVE_DATA_INSTALL_DIR "/packages/");
package->addDirectoryDefinition("images", "images", i18n("Images")); package->addDirectoryDefinition("images", "images", i18n("Images"));
package->addDirectoryDefinition("theme", "theme", i18n("Themed Images")); package->addDirectoryDefinition("theme", "theme", i18n("Themed Images"));
@ -109,7 +109,7 @@ void PlasmoidPackage::initPackage(Package *package)
{ {
GenericPackage::initPackage(package); GenericPackage::initPackage(package);
package->setServicePrefix("plasma-applet-"); package->setServicePrefix("plasma-applet-");
package->setDefaultPackageRoot("plasma/plasmoids/"); package->setDefaultPackageRoot(PLASMA_RELATIVE_DATA_INSTALL_DIR "/plasmoids/");
package->addFileDefinition("configmodel", "config/config.qml", i18n("Configuration UI pages model")); package->addFileDefinition("configmodel", "config/config.qml", i18n("Configuration UI pages model"));
package->addFileDefinition("mainconfigxml", "config/main.xml", i18n("Configuration XML file")); package->addFileDefinition("mainconfigxml", "config/main.xml", i18n("Configuration XML file"));
@ -124,7 +124,7 @@ void DataEnginePackage::initPackage(Package *package)
{ {
ChangeableMainScriptPackage::initPackage(package); ChangeableMainScriptPackage::initPackage(package);
package->setServicePrefix("plasma-dataengine-"); package->setServicePrefix("plasma-dataengine-");
package->setDefaultPackageRoot("plasma/dataengines/"); package->setDefaultPackageRoot(PLASMA_RELATIVE_DATA_INSTALL_DIR "/dataengines/");
package->addDirectoryDefinition("data", "data", i18n("Data Files")); package->addDirectoryDefinition("data", "data", i18n("Data Files"));
@ -238,12 +238,12 @@ void ThemePackage::initPackage(Package *package)
void ContainmentActionsPackage::initPackage(Package *package) void ContainmentActionsPackage::initPackage(Package *package)
{ {
ChangeableMainScriptPackage::initPackage(package); ChangeableMainScriptPackage::initPackage(package);
package->setDefaultPackageRoot("plasma/containmentactions/"); package->setDefaultPackageRoot(PLASMA_RELATIVE_DATA_INSTALL_DIR "/containmentactions/");
} }
void ShellPackage::initPackage(Plasma::Package *package) void ShellPackage::initPackage(Plasma::Package *package)
{ {
package->setDefaultPackageRoot("plasma/shells/"); package->setDefaultPackageRoot(PLASMA_RELATIVE_DATA_INSTALL_DIR "/shells/");
//Directories //Directories
package->addDirectoryDefinition("applet", "applet", i18n("Applets furniture")); package->addDirectoryDefinition("applet", "applet", i18n("Applets furniture"));

View File

@ -146,9 +146,10 @@ bool ThemePrivate::useCache()
if (!themeMetadataPath.isEmpty()) { if (!themeMetadataPath.isEmpty()) {
KDirWatch::self()->removeFile(themeMetadataPath); KDirWatch::self()->removeFile(themeMetadataPath);
} }
themeMetadataPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal("desktoptheme/") % themeName % QLatin1Literal("/metadata.desktop"));
if (isRegularTheme) { if (isRegularTheme) {
themeMetadataPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal(PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/") % themeName % QLatin1Literal("/metadata.desktop"));
Q_ASSERT(!themeMetadataPath.isEmpty() || themeName.isEmpty());
const QString cacheFileBase = cacheFile + QStringLiteral("*.kcache"); const QString cacheFileBase = cacheFile + QStringLiteral("*.kcache");
QString currentCacheFileName; QString currentCacheFileName;
@ -236,6 +237,12 @@ void ThemePrivate::onAppExitCleanup()
cacheTheme = false; cacheTheme = false;
} }
QString ThemePrivate::imagePath(const QString& theme, const QString& type, const QString& image)
{
QString subdir = QLatin1Literal(PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/") % theme % type % image;
return QStandardPaths::locate(QStandardPaths::GenericDataLocation, subdir);
}
QString ThemePrivate::findInTheme(const QString &image, const QString &theme, bool cache) QString ThemePrivate::findInTheme(const QString &image, const QString &theme, bool cache)
{ {
if (cache) { if (cache) {
@ -245,23 +252,20 @@ QString ThemePrivate::findInTheme(const QString &image, const QString &theme, bo
} }
} }
QString search; QString type;
if (locolor) { if (locolor) {
search = QLatin1Literal("desktoptheme/") % theme % QLatin1Literal("/locolor/") % image; type = QStringLiteral("/locolor/");
search = QStandardPaths::locate(QStandardPaths::GenericDataLocation, search);
} else if (!compositingActive) { } else if (!compositingActive) {
search = QLatin1Literal("desktoptheme/") % theme % QLatin1Literal("/opaque/") % image; type = QStringLiteral("/opaque/");
search = QStandardPaths::locate(QStandardPaths::GenericDataLocation, search);
} else if (KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind)) { } else if (KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind)) {
search = QLatin1Literal("desktoptheme/") % theme % QLatin1Literal("/translucent/") % image; type = QStringLiteral("/translucent/");
search = QStandardPaths::locate(QStandardPaths::GenericDataLocation, search);
} }
QString search = imagePath(theme, type, image);
//not found or compositing enabled //not found or compositing enabled
if (search.isEmpty()) { if (search.isEmpty()) {
search = QLatin1Literal("desktoptheme/") % theme % QLatin1Char('/') % image; search = imagePath(theme, QStringLiteral("/"), image);
search = QStandardPaths::locate(QStandardPaths::GenericDataLocation, search);
} }
if (cache && !search.isEmpty()) { if (cache && !search.isEmpty()) {
@ -567,15 +571,14 @@ void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings
return; return;
} }
} }
qDebug() << tempThemeName;
// we have one special theme: essentially a dummy theme used to cache things with // we have one special theme: essentially a dummy theme used to cache things with
// the system colors. // the system colors.
bool realTheme = theme != systemColorsTheme; bool realTheme = theme != systemColorsTheme;
if (realTheme) { if (realTheme) {
QString themePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal("desktoptheme/") % theme % QLatin1Char('/')); QString themePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal(PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/") % theme % QLatin1Char('/'));
if (themePath.isEmpty() && themeName.isEmpty()) { if (themePath.isEmpty() && themeName.isEmpty()) {
themePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("desktoptheme/default"), QStandardPaths::LocateDirectory); themePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/default"), QStandardPaths::LocateDirectory);
if (themePath.isEmpty()) { if (themePath.isEmpty()) {
return; return;
@ -593,7 +596,7 @@ void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings
themeName = theme; themeName = theme;
// load the color scheme config // load the color scheme config
const QString colorsFile = realTheme ? QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal("desktoptheme/") % theme % QLatin1Literal("/colors")) const QString colorsFile = realTheme ? QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal(PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/") % theme % QLatin1Literal("/colors"))
: QString(); : QString();
//qDebug() << "we're going for..." << colorsFile << "*******************"; //qDebug() << "we're going for..." << colorsFile << "*******************";
@ -613,12 +616,12 @@ void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings
colorScheme = KColorScheme(QPalette::Active, KColorScheme::Window, colors); colorScheme = KColorScheme(QPalette::Active, KColorScheme::Window, colors);
buttonColorScheme = KColorScheme(QPalette::Active, KColorScheme::Button, colors); buttonColorScheme = KColorScheme(QPalette::Active, KColorScheme::Button, colors);
viewColorScheme = KColorScheme(QPalette::Active, KColorScheme::View, colors); viewColorScheme = KColorScheme(QPalette::Active, KColorScheme::View, colors);
const QString wallpaperPath = QLatin1Literal("desktoptheme/") % theme % QLatin1Literal("/wallpapers/"); const QString wallpaperPath = QLatin1Literal(PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/") % theme % QLatin1Literal("/wallpapers/");
hasWallpapers = !QStandardPaths::locate(QStandardPaths::GenericDataLocation, wallpaperPath, QStandardPaths::LocateDirectory).isEmpty(); hasWallpapers = !QStandardPaths::locate(QStandardPaths::GenericDataLocation, wallpaperPath, QStandardPaths::LocateDirectory).isEmpty();
// load the wallpaper settings, if any // load the wallpaper settings, if any
if (realTheme) { if (realTheme) {
const QString metadataPath(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal("desktoptheme/") % theme % QLatin1Literal("/metadata.desktop"))); const QString metadataPath(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal(PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/") % theme % QLatin1Literal("/metadata.desktop")));
KConfig metadata(metadataPath); KConfig metadata(metadataPath);
pluginInfo = KPluginInfo(metadataPath); pluginInfo = KPluginInfo(metadataPath);
@ -633,7 +636,7 @@ void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings
while (!fallback.isEmpty() && !fallbackThemes.contains(fallback)) { while (!fallback.isEmpty() && !fallbackThemes.contains(fallback)) {
fallbackThemes.append(fallback); fallbackThemes.append(fallback);
QString metadataPath(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal("desktoptheme/") % theme % QLatin1Literal("/metadata.desktop"))); QString metadataPath(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal(PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/") % theme % QLatin1Literal("/metadata.desktop")));
KConfig metadata(metadataPath); KConfig metadata(metadataPath);
KConfigGroup cg(&metadata, "Settings"); KConfigGroup cg(&metadata, "Settings");
fallback = cg.readEntry("FallbackTheme", QString()); fallback = cg.readEntry("FallbackTheme", QString());
@ -644,7 +647,7 @@ void ThemePrivate::setThemeName(const QString &tempThemeName, bool writeSettings
} }
foreach (const QString &theme, fallbackThemes) { foreach (const QString &theme, fallbackThemes) {
QString metadataPath(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal("desktoptheme/") % theme % QLatin1Literal("/metadata.desktop"))); QString metadataPath(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1Literal(PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/") % theme % QLatin1Literal("/metadata.desktop")));
KConfig metadata(metadataPath); KConfig metadata(metadataPath);
processWallpaperSettings(&metadata); processWallpaperSettings(&metadata);
} }

View File

@ -72,6 +72,7 @@ public:
KConfigGroup &config(); KConfigGroup &config();
QString imagePath(const QString &theme, const QString &type, const QString &image);
QString findInTheme(const QString &image, const QString &theme, bool cache = true); QString findInTheme(const QString &image, const QString &theme, bool cache = true);
void discardCache(CacheTypes caches); void discardCache(CacheTypes caches);
void scheduleThemeChangeNotification(CacheTypes caches); void scheduleThemeChangeNotification(CacheTypes caches);

View File

@ -199,7 +199,7 @@ void Service::registerOperationsScheme()
return; return;
} }
const QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "plasma/services/" + d->name + ".operations"); const QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, PLASMA_RELATIVE_DATA_INSTALL_DIR "/services/" + d->name + ".operations");
if (path.isEmpty()) { if (path.isEmpty()) {
#ifndef NDEBUG #ifndef NDEBUG

View File

@ -199,6 +199,11 @@ QString Theme::imagePath(const QString &name) const
return path; return path;
} }
QString Theme::backgroundPath(const QString& image) const
{
return d->imagePath(themeName(), QLatin1Literal("/appbackgrounds/"), image);
}
QString Theme::styleSheet(const QString &css) const QString Theme::styleSheet(const QString &css) const
{ {
return d->processStyleSheet(css); return d->processStyleSheet(css);

View File

@ -487,6 +487,8 @@ public:
*/ */
Q_INVOKABLE QSizeF mSize(const QFont &font = QApplication::font()) const; Q_INVOKABLE QSizeF mSize(const QFont &font = QApplication::font()) const;
QString backgroundPath(const QString &image) const;
Q_SIGNALS: Q_SIGNALS:
/** /**
* Emitted when the user changes the theme. Stylesheet usage, colors, etc. should * Emitted when the user changes the theme. Stylesheet usage, colors, etc. should

View File

@ -45,6 +45,8 @@
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
#include "config-plasma.h"
static QTextStream cout(stdout); static QTextStream cout(stdout);
namespace Plasma namespace Plasma
@ -189,18 +191,18 @@ void PlasmaPkg::runMain()
if (type.compare(i18nc("package type", "plasmoid"), Qt::CaseInsensitive) == 0 || if (type.compare(i18nc("package type", "plasmoid"), Qt::CaseInsensitive) == 0 ||
type.compare("plasmoid", Qt::CaseInsensitive) == 0) { type.compare("plasmoid", Qt::CaseInsensitive) == 0) {
d->packageRoot = "plasma/plasmoids/"; d->packageRoot = PLASMA_RELATIVE_DATA_INSTALL_DIR "/plasmoids/";
d->servicePrefix = "plasma-applet-"; d->servicePrefix = "plasma-applet-";
d->pluginTypes << "Plasma/Applet"; d->pluginTypes << "Plasma/Applet";
d->pluginTypes << "Plasma/Containment"; d->pluginTypes << "Plasma/Containment";
} else if (type.compare(i18nc("package type", "package"), Qt::CaseInsensitive) == 0 /*|| } else if (type.compare(i18nc("package type", "package"), Qt::CaseInsensitive) == 0 /*||
type.compare("theme", Qt::CaseInsensitive) == 0*/) { type.compare("theme", Qt::CaseInsensitive) == 0*/) {
d->packageRoot = "plasma/packages/"; d->packageRoot = PLASMA_RELATIVE_DATA_INSTALL_DIR "/packages/";
d->servicePrefix = "plasma-package-"; d->servicePrefix = "plasma-package-";
d->pluginTypes << "Plasma/Generic"; d->pluginTypes << "Plasma/Generic";
} else if (type.compare(i18nc("package type", "theme"), Qt::CaseInsensitive) == 0 || } else if (type.compare(i18nc("package type", "theme"), Qt::CaseInsensitive) == 0 ||
type.compare("theme", Qt::CaseInsensitive) == 0) { type.compare("theme", Qt::CaseInsensitive) == 0) {
d->packageRoot = "desktoptheme/"; d->packageRoot = PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/";
d->pluginTypes << "Plasma/Theme"; d->pluginTypes << "Plasma/Theme";
} else if (type.compare(i18nc("package type", "wallpaper"), Qt::CaseInsensitive) == 0 || } else if (type.compare(i18nc("package type", "wallpaper"), Qt::CaseInsensitive) == 0 ||
type.compare("wallpaper", Qt::CaseInsensitive) == 0) { type.compare("wallpaper", Qt::CaseInsensitive) == 0) {
@ -209,32 +211,32 @@ void PlasmaPkg::runMain()
d->servicePrefix = "plasma-wallpaper-"; d->servicePrefix = "plasma-wallpaper-";
} else if (type.compare(i18nc("package type", "dataengine"), Qt::CaseInsensitive) == 0 || } else if (type.compare(i18nc("package type", "dataengine"), Qt::CaseInsensitive) == 0 ||
type.compare("dataengine", Qt::CaseInsensitive) == 0) { type.compare("dataengine", Qt::CaseInsensitive) == 0) {
d->packageRoot = "plasma/dataengines/"; d->packageRoot = PLASMA_RELATIVE_DATA_INSTALL_DIR "/dataengines/";
d->servicePrefix = "plasma-dataengine-"; d->servicePrefix = "plasma-dataengine-";
d->pluginTypes << "Plasma/DataEngine"; d->pluginTypes << "Plasma/DataEngine";
} else if (type.compare(i18nc("package type", "runner"), Qt::CaseInsensitive) == 0 || } else if (type.compare(i18nc("package type", "runner"), Qt::CaseInsensitive) == 0 ||
type.compare("runner", Qt::CaseInsensitive) == 0) { type.compare("runner", Qt::CaseInsensitive) == 0) {
d->packageRoot = "plasma/runners/"; d->packageRoot = PLASMA_RELATIVE_DATA_INSTALL_DIR "/runners/";
d->servicePrefix = "plasma-runner-"; d->servicePrefix = "plasma-runner-";
d->pluginTypes << "Plasma/Runner"; d->pluginTypes << "Plasma/Runner";
} else if (type.compare(i18nc("package type", "wallpaperplugin"), Qt::CaseInsensitive) == 0 || } else if (type.compare(i18nc("package type", "wallpaperplugin"), Qt::CaseInsensitive) == 0 ||
type.compare("wallpaperplugin", Qt::CaseInsensitive) == 0) { type.compare("wallpaperplugin", Qt::CaseInsensitive) == 0) {
d->packageRoot = "plasma/wallpapers/"; d->packageRoot = PLASMA_RELATIVE_DATA_INSTALL_DIR "/wallpapers/";
d->servicePrefix = "plasma-wallpaper-"; d->servicePrefix = "plasma-wallpaper-";
d->pluginTypes << "Plasma/Wallpaper"; d->pluginTypes << "Plasma/Wallpaper";
} else if (type.compare(i18nc("package type", "lookandfeel"), Qt::CaseInsensitive) == 0 || } else if (type.compare(i18nc("package type", "lookandfeel"), Qt::CaseInsensitive) == 0 ||
type.compare("lookandfeel", Qt::CaseInsensitive) == 0) { type.compare("lookandfeel", Qt::CaseInsensitive) == 0) {
d->packageRoot = "plasma/look-and-feel/"; d->packageRoot = PLASMA_RELATIVE_DATA_INSTALL_DIR "/look-and-feel/";
d->servicePrefix = "plasma-lookandfeel-"; d->servicePrefix = "plasma-lookandfeel-";
d->pluginTypes << "Plasma/LookAndFeel"; d->pluginTypes << "Plasma/LookAndFeel";
} else if (type.compare(i18nc("package type", "shell"), Qt::CaseInsensitive) == 0 || } else if (type.compare(i18nc("package type", "shell"), Qt::CaseInsensitive) == 0 ||
type.compare("shell", Qt::CaseInsensitive) == 0) { type.compare("shell", Qt::CaseInsensitive) == 0) {
d->packageRoot = "plasma/shells/"; d->packageRoot = PLASMA_RELATIVE_DATA_INSTALL_DIR "/shells/";
d->servicePrefix = "plasma-shell-"; d->servicePrefix = "plasma-shell-";
d->pluginTypes << "Plasma/Shell"; d->pluginTypes << "Plasma/Shell";
} else if (type.compare(i18nc("package type", "layout-template"), Qt::CaseInsensitive) == 0 || } else if (type.compare(i18nc("package type", "layout-template"), Qt::CaseInsensitive) == 0 ||
type.compare("layout-template", Qt::CaseInsensitive) == 0) { type.compare("layout-template", Qt::CaseInsensitive) == 0) {
d->packageRoot = "plasma/layout-templates/"; d->packageRoot = PLASMA_RELATIVE_DATA_INSTALL_DIR "/layout-templates/";
d->servicePrefix = "plasma-layout-"; d->servicePrefix = "plasma-layout-";
d->pluginTypes << "Plasma/LayoutTemplate"; d->pluginTypes << "Plasma/LayoutTemplate";
} else if (type.compare(i18nc("package type", "kwineffect"), Qt::CaseInsensitive) == 0 || } else if (type.compare(i18nc("package type", "kwineffect"), Qt::CaseInsensitive) == 0 ||
@ -396,7 +398,7 @@ QStringList PlasmaPkgPrivate::packages(const QStringList &types)
foreach (const QString &type, types) { foreach (const QString &type, types) {
if (type.compare("Plasma/Generic", Qt::CaseInsensitive) == 0) { if (type.compare("Plasma/Generic", Qt::CaseInsensitive) == 0) {
const QStringList &packs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "plasma/packages/", QStandardPaths::LocateDirectory); const QStringList &packs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, PLASMA_RELATIVE_DATA_INSTALL_DIR "/packages/", QStandardPaths::LocateDirectory);
foreach (const QString &ppath, packs) { foreach (const QString &ppath, packs) {
const QDir cd(ppath); const QDir cd(ppath);
const QStringList &entries = cd.entryList(QDir::Dirs); const QStringList &entries = cd.entryList(QDir::Dirs);
@ -426,7 +428,7 @@ QStringList PlasmaPkgPrivate::packages(const QStringList &types)
} }
if (type.compare("Plasma/Theme", Qt::CaseInsensitive) == 0) { if (type.compare("Plasma/Theme", Qt::CaseInsensitive) == 0) {
const QStringList &packs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "desktoptheme/", QStandardPaths::LocateDirectory); const QStringList &packs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/", QStandardPaths::LocateDirectory);
foreach (const QString &ppath, packs) { foreach (const QString &ppath, packs) {
const QDir cd(ppath); const QDir cd(ppath);
const QStringList &entries = cd.entryList(QDir::Dirs); const QStringList &entries = cd.entryList(QDir::Dirs);
@ -567,16 +569,16 @@ void PlasmaPkgPrivate::listTypes()
coutput(i18n("Built in:")); coutput(i18n("Built in:"));
QMap<QString, QStringList> builtIns; QMap<QString, QStringList> builtIns;
builtIns.insert(i18n("DataEngine"), QStringList() << "Plasma/DataEngine" << "plasma/dataengines/" << "dataengine"); builtIns.insert(i18n("DataEngine"), QStringList() << "Plasma/DataEngine" << PLASMA_RELATIVE_DATA_INSTALL_DIR "/dataengines/" << "dataengine");
builtIns.insert(i18n("Layout Template"), QStringList() << "Plasma/LayoutTemplate" << "plasma/layout-templates/" << "layout-template"); builtIns.insert(i18n("Layout Template"), QStringList() << "Plasma/LayoutTemplate" << PLASMA_RELATIVE_DATA_INSTALL_DIR "/layout-templates/" << "layout-template");
builtIns.insert(i18n("Look and Feel"), QStringList() << "Plasma/LookAndFeel" << "plasma/look-and-feel/" << "lookandfeel"); builtIns.insert(i18n("Look and Feel"), QStringList() << "Plasma/LookAndFeel" << PLASMA_RELATIVE_DATA_INSTALL_DIR "/look-and-feel/" << "lookandfeel");
builtIns.insert(i18n("Package"), QStringList() << "Plasma/Generic" << "plasma/packages/" << "package"); builtIns.insert(i18n("Package"), QStringList() << "Plasma/Generic" << PLASMA_RELATIVE_DATA_INSTALL_DIR "/packages/" << "package");
builtIns.insert(i18n("Plasmoid"), QStringList() << "Plasma/Applet" << "plasma/plasmoids/" << "plasmoid"); builtIns.insert(i18n("Plasmoid"), QStringList() << "Plasma/Applet" << PLASMA_RELATIVE_DATA_INSTALL_DIR "/plasmoids/" << "plasmoid");
builtIns.insert(i18n("Runner"), QStringList() << "Plasma/Runner" << "plasma/runners/" << "runner"); builtIns.insert(i18n("Runner"), QStringList() << "Plasma/Runner" << PLASMA_RELATIVE_DATA_INSTALL_DIR "/runners/" << "runner");
builtIns.insert(i18n("Shell"), QStringList() << "Plasma/Shell" << "plasma/shells/" << "shell"); builtIns.insert(i18n("Shell"), QStringList() << "Plasma/Shell" << PLASMA_RELATIVE_DATA_INSTALL_DIR "/shells/" << "shell");
builtIns.insert(i18n("Theme"), QStringList() << "" << "desktoptheme/" << "theme"); builtIns.insert(i18n("Theme"), QStringList() << "" << PLASMA_RELATIVE_DATA_INSTALL_DIR "/desktoptheme/" << "theme");
builtIns.insert(i18n("Wallpaper Images"), QStringList() << "" << "wallpapers/" << "wallpaper"); builtIns.insert(i18n("Wallpaper Images"), QStringList() << "" << "wallpapers/" << "wallpaper");
builtIns.insert(i18n("Animated Wallpaper"), QStringList() << "Plasma/Wallpaper" << "plasma/wallpapers/" << "wallpaperplugin"); builtIns.insert(i18n("Animated Wallpaper"), QStringList() << "Plasma/Wallpaper" << PLASMA_RELATIVE_DATA_INSTALL_DIR "/wallpapers/" << "wallpaperplugin");
builtIns.insert(i18n("KWin Effect"), QStringList() << "KWin/Effect" << "kwin/effects/" << "kwineffect"); builtIns.insert(i18n("KWin Effect"), QStringList() << "KWin/Effect" << "kwin/effects/" << "kwineffect");
builtIns.insert(i18n("KWin Window Switcher"), QStringList() << "KWin/WindowSwitcher" << "kwin/tabbox/" << "windowswitcher"); builtIns.insert(i18n("KWin Window Switcher"), QStringList() << "KWin/WindowSwitcher" << "kwin/tabbox/" << "windowswitcher");
builtIns.insert(i18n("KWin Script"), QStringList() << "KWin/Script" << "kwin/scripts/" << "kwinscript"); builtIns.insert(i18n("KWin Script"), QStringList() << "KWin/Script" << "kwin/scripts/" << "kwinscript");
@ -607,7 +609,7 @@ void PlasmaPkgPrivate::listTypes()
renderTypeTable(plugins); renderTypeTable(plugins);
} }
QStringList desktopFiles = QStandardPaths::locateAll(QStandardPaths::DataLocation, "plasma/packageformats/*rc", QStandardPaths::LocateFile); QStringList desktopFiles = QStandardPaths::locateAll(QStandardPaths::DataLocation, PLASMA_RELATIVE_DATA_INSTALL_DIR "/packageformats/*rc", QStandardPaths::LocateFile);
if (!desktopFiles.isEmpty()) { if (!desktopFiles.isEmpty()) {
coutput(i18n("Provided by .desktop files:")); coutput(i18n("Provided by .desktop files:"));

View File

@ -26,12 +26,13 @@
#include <kdeclarative/kdeclarative.h> #include <kdeclarative/kdeclarative.h>
#include <Plasma/Package> #include <Plasma/Package>
#include "../plasma/config-plasma.h"
void LookAndFeelPackage::initPackage(Plasma::Package *package) void LookAndFeelPackage::initPackage(Plasma::Package *package)
{ {
// http://community.kde.org/Plasma/lookAndFeelPackage# // http://community.kde.org/Plasma/lookAndFeelPackage#
package->setDefaultPackageRoot("plasma/look-and-feel/"); package->setDefaultPackageRoot(PLASMA_RELATIVE_DATA_INSTALL_DIR "/look-and-feel/");
//Defaults //Defaults
package->addFileDefinition("defaults", "defaults", i18n("Default settings for theme, etc.")); package->addFileDefinition("defaults", "defaults", i18n("Default settings for theme, etc."));
@ -97,7 +98,7 @@ void QmlWallpaperPackage::initPackage(Plasma::Package *package)
package->setContentsPrefixPaths(platform); package->setContentsPrefixPaths(platform);
} }
package->setDefaultPackageRoot("plasma/wallpapers/"); package->setDefaultPackageRoot(PLASMA_RELATIVE_DATA_INSTALL_DIR "/wallpapers/");
package->addDirectoryDefinition("images", "images", i18n("Images")); package->addDirectoryDefinition("images", "images", i18n("Images"));
package->addDirectoryDefinition("theme", "theme", i18n("Themed Images")); package->addDirectoryDefinition("theme", "theme", i18n("Themed Images"));
@ -126,7 +127,7 @@ void QmlWallpaperPackage::initPackage(Plasma::Package *package)
void LayoutTemplatePackage::initPackage(Plasma::Package *package) void LayoutTemplatePackage::initPackage(Plasma::Package *package)
{ {
package->setServicePrefix("plasma-layout-template"); package->setServicePrefix("plasma-layout-template");
package->setDefaultPackageRoot("plasma/layout-templates"); package->setDefaultPackageRoot(PLASMA_RELATIVE_DATA_INSTALL_DIR "/layout-templates");
package->addFileDefinition("mainscript", "layout.js", i18n("Main Script File")); package->addFileDefinition("mainscript", "layout.js", i18n("Main Script File"));
package->setRequired("mainscript", true); package->setRequired("mainscript", true);
} }

View File

@ -11,6 +11,7 @@
#include <qstandardpaths.h> #include <qstandardpaths.h>
#include "platformstatusadaptor.h" #include "platformstatusadaptor.h"
#include "../plasma/config-plasma.h"
const char *defaultPackage = "org.kde.desktop"; const char *defaultPackage = "org.kde.desktop";
@ -35,7 +36,7 @@ void PlatformStatus::findShellPackage(bool sendSignal)
const QString package = group.readEntry("shellPackage", defaultPackage); const QString package = group.readEntry("shellPackage", defaultPackage);
const QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, const QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
"plasma/shells/" + package + '/', PLASMA_RELATIVE_DATA_INSTALL_DIR "/shells/" + package + '/',
QStandardPaths::LocateDirectory); QStandardPaths::LocateDirectory);
if (path.isEmpty()) { if (path.isEmpty()) {
if (package != defaultPackage) { if (package != defaultPackage) {

View File

@ -3,8 +3,8 @@ project(plasma-python)
include(PythonMacros) include(PythonMacros)
# install the library, .desktop, and plasma.py # install the library, .desktop, and plasma.py
python_install(plasma_importer.py ${DATA_INSTALL_DIR}/plasma_scriptengine_python) python_install(plasma_importer.py ${PLASMA_DATA_INSTALL_DIR}/plasma_scriptengine_python)
python_install(pydataengine.py ${DATA_INSTALL_DIR}/plasma_scriptengine_python) python_install(pydataengine.py ${PLASMA_DATA_INSTALL_DIR}/plasma_scriptengine_python)
# remove the following three lines once we branch 4.5, they are only necessary as long # remove the following three lines once we branch 4.5, they are only necessary as long
# as people update kdebase but not yet kdelibs (PYTHON_SITE_PACKAGES_INSTALL_DIR has just # as people update kdebase but not yet kdelibs (PYTHON_SITE_PACKAGES_INSTALL_DIR has just

View File

@ -1,4 +1,4 @@
install(FILES data_engine.rb DESTINATION ${DATA_INSTALL_DIR}/plasma_scriptengine_ruby) install(FILES data_engine.rb DESTINATION ${PLASMA_DATA_INSTALL_DIR}/plasma_scriptengine_ruby)
install(FILES plasma-scriptengine-ruby-dataengine.desktop DESTINATION ${SERVICES_INSTALL_DIR}) install(FILES plasma-scriptengine-ruby-dataengine.desktop DESTINATION ${SERVICES_INSTALL_DIR})