diff --git a/CMakeLists.txt b/CMakeLists.txt index 35183c3167..2c02e04cd0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,9 @@ else(${KDE_PLATFORM_PROFILE} STREQUAL "Desktop") OPTION(KWIN_PLASMA_ACTIVE "Enable building KWin for Plasma Active." On) endif(${KDE_PLATFORM_PROFILE} STREQUAL "Desktop") +# Binary name of KWin +set(KWIN_NAME "kwin") + if(KWIN_PLASMA_ACTIVE) set(KWIN_BUILD_DECORATIONS OFF) set(KWIN_BUILD_KCMS OFF) @@ -24,6 +27,7 @@ if(KWIN_PLASMA_ACTIVE) set(KWIN_BUILD_XRENDER_COMPOSITING OFF) set(KWIN_MOBILE_EFFECTS ON) set(KWIN_BUILD_WITH_OPENGLES ON) + set(KWIN_NAME "kwinactive") endif(KWIN_PLASMA_ACTIVE) # KWIN_HAVE_XRENDER_COMPOSITING - whether XRender-based compositing support is available: may be disabled @@ -193,6 +197,8 @@ endif(KWIN_BUILD_ACTIVITIES) kde4_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS}) target_link_libraries(kdeinit_kwin ${kwinLibs}) +set_target_properties(kwin PROPERTIES OUTPUT_NAME ${KWIN_NAME}) +set_target_properties(kdeinit_kwin PROPERTIES OUTPUT_NAME kdeinit4_${KWIN_NAME}) if(OPENGL_FOUND) set_target_properties(kdeinit_kwin PROPERTIES COMPILE_FLAGS -DKWIN_HAVE_OPENGL) @@ -217,6 +223,8 @@ if(OPENGLES_FOUND) kde4_add_kdeinit_executable( kwin_gles ${kwin_KDEINIT_SRCS}) target_link_libraries(kdeinit_kwin_gles ${kwinLibs} kwinglesutils ${OPENGLES_LIBRARIES}) set_target_properties(kdeinit_kwin_gles PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES") + set_target_properties(kwin_gles PROPERTIES OUTPUT_NAME ${KWIN_NAME}_gles) + set_target_properties(kdeinit_kwin_gles PROPERTIES OUTPUT_NAME kdeinit4_${KWIN_NAME}_gles) install(TARGETS kdeinit_kwin_gles ${INSTALL_TARGETS_DEFAULT_ARGS} ) install(TARGETS kwin_gles ${INSTALL_TARGETS_DEFAULT_ARGS} ) endif(OPENGLES_FOUND) @@ -230,12 +238,13 @@ set( kwinnvidiahack_LIB_SRCS kde4_add_library(kwinnvidiahack SHARED ${kwinnvidiahack_LIB_SRCS}) set_target_properties(kwinnvidiahack PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} ) +set_target_properties(kwinnvidiahack PROPERTIES OUTPUT_NAME ${KWIN_NAME}nvidiahack) install(TARGETS kwinnvidiahack ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) ########### install files ############### -install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) -install( FILES kwin.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kwin ) +install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} RENAME ${KWIN_NAME}.kcfg ) +install( FILES kwin.notifyrc DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME} RENAME ${KWIN_NAME}.notifyrc) install( FILES org.kde.KWin.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} ) if( KWIN_BUILD_SCRIPTING ) diff --git a/config-kwin.h.cmake b/config-kwin.h.cmake index 49b643ac09..04c31f31de 100644 --- a/config-kwin.h.cmake +++ b/config-kwin.h.cmake @@ -5,3 +5,5 @@ #cmakedefine KWIN_BUILD_SCREENEDGES 1 #cmakedefine KWIN_BUILD_SCRIPTING 1 #cmakedefine KWIN_BUILD_ACTIVITIES 1 +#define KWIN_NAME "${KWIN_NAME}" +#define KWIN_CONFIG "${KWIN_NAME}rc" diff --git a/effects.cpp b/effects.cpp index 27198e99ef..9cbf387e32 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1103,6 +1103,7 @@ KLibrary* EffectsHandlerImpl::findEffectLibrary(KService* service) libname.replace("kwin4_effect_", "kwin4_effect_gles_"); } #endif + libname.replace("kwin", KWIN_NAME); KLibrary* library = new KLibrary(libname); if (!library) { kError(1212) << "couldn't open library for effect '" << @@ -1265,7 +1266,7 @@ bool EffectsHandlerImpl::loadScriptedEffect(const QString& name, KService *servi kDebug(1212) << "X-Plasma-MainScript not set"; return false; } - const QString scriptFile = KStandardDirs::locate("data", "kwin/effects/" + name + "/contents/" + scriptName); + const QString scriptFile = KStandardDirs::locate("data", QLatin1String(KWIN_NAME) + "/effects/" + name + "/contents/" + scriptName); if (scriptFile.isNull()) { kDebug(1212) << "Could not locate the effect script"; return false; diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt index 5ebe9970e4..29accb19e4 100644 --- a/effects/CMakeLists.txt +++ b/effects/CMakeLists.txt @@ -18,6 +18,7 @@ macro( KWIN4_ADD_EFFECT name ) target_link_libraries(kwin4_effect_${name} kwinglesutils) set_target_properties(kwin4_effect_${name} PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES") endif(OPENGL_FOUND) + set_target_properties(kwin4_effect_${name} PROPERTIES OUTPUT_NAME ${KWIN_NAME}4_effect_${name}) install( TARGETS kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR} ) endif(OPENGL_FOUND OR NOT(OPENGL_FOUND AND OPENGLES_FOUND)) @@ -27,6 +28,7 @@ macro( KWIN4_ADD_EFFECT name ) # OpenGL ES gets into a different library target_link_libraries(kwin4_effect_gles_${name} kwinglesutils) set_target_properties(kwin4_effect_gles_${name} PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGL -DKWIN_HAVE_OPENGLES") + set_target_properties(kwin4_effect_gles_${name} PROPERTIES OUTPUT_NAME ${KWIN_NAME}4_effect_gles_${name}) install( TARGETS kwin4_effect_gles_${name} DESTINATION ${PLUGIN_INSTALL_DIR} ) endif(OPENGLES_FOUND) endmacro( KWIN4_ADD_EFFECT ) diff --git a/effects/fade/CMakeLists.txt b/effects/fade/CMakeLists.txt index 17522782d0..35dc6c0e52 100644 --- a/effects/fade/CMakeLists.txt +++ b/effects/fade/CMakeLists.txt @@ -1,6 +1,6 @@ install(DIRECTORY package/ - DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/kwin4_effect_fade) + DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_fade) install(FILES package/metadata.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin + DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_effect_fade.desktop) diff --git a/effects/fadedesktop/CMakeLists.txt b/effects/fadedesktop/CMakeLists.txt index e68dfbc062..8926da46be 100644 --- a/effects/fadedesktop/CMakeLists.txt +++ b/effects/fadedesktop/CMakeLists.txt @@ -1,6 +1,6 @@ install(DIRECTORY package/ - DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/kwin4_effect_fadedesktop) + DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/effects/kwin4_effect_fadedesktop) install(FILES package/metadata.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kwin + DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_effect_fadedesktop.desktop) diff --git a/libkwineffects/CMakeLists.txt b/libkwineffects/CMakeLists.txt index 1394a4ff73..14a2747d6e 100644 --- a/libkwineffects/CMakeLists.txt +++ b/libkwineffects/CMakeLists.txt @@ -19,6 +19,7 @@ target_link_libraries(kwineffects ${KDE4_KDEUI_LIBS} ${QT_QTGUI_LIBRARY} ${X11_Xfixes_LIB} ) set_target_properties(kwineffects PROPERTIES VERSION 1.0.0 SOVERSION 1 ) +set_target_properties(kwineffects PROPERTIES OUTPUT_NAME ${KWIN_NAME}effects) install(TARGETS kwineffects EXPORT kdeworkspaceLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) @@ -44,9 +45,11 @@ endmacro( KWIN4_ADD_GLUTILS_BACKEND ) if(OPENGLES_FOUND) KWIN4_ADD_GLUTILS_BACKEND(kwinglesutils ${OPENGLES_INCLUDE_DIR} ${OPENGLES_LIBRARIES}) set_target_properties(kwinglesutils PROPERTIES COMPILE_FLAGS -DKWIN_HAVE_OPENGLES) + set_target_properties(kwinglesutils PROPERTIES OUTPUT_NAME ${KWIN_NAME}glesutils) endif(OPENGLES_FOUND) if(OPENGL_FOUND) KWIN4_ADD_GLUTILS_BACKEND(kwinglutils ${OPENGL_INCLUDE_DIR} ${OPENGL_gl_LIBRARY}) + set_target_properties(kwinglutils PROPERTIES OUTPUT_NAME ${KWIN_NAME}glutils) target_link_libraries(kwinglutils ${OPENGL_gl_LIBRARY}) target_link_libraries(kwinglutils LINK_INTERFACE_LIBRARIES ${OPENGL_gl_LIBRARY}) diff --git a/libkwineffects/kwineffects.cpp b/libkwineffects/kwineffects.cpp index b4228a9b77..863cf9e833 100644 --- a/libkwineffects/kwineffects.cpp +++ b/libkwineffects/kwineffects.cpp @@ -22,6 +22,7 @@ along with this program. If not, see . #include "kwineffects.h" #include "kwinxrenderutils.h" +#include "config-kwin.h" #include #include @@ -271,7 +272,7 @@ void EffectsHandler::sendReloadMessage(const QString& effectname) KConfigGroup EffectsHandler::effectConfig(const QString& effectname) { - KSharedConfig::Ptr kwinconfig = KSharedConfig::openConfig("kwinrc", KConfig::NoGlobals); + KSharedConfig::Ptr kwinconfig = KSharedConfig::openConfig(KWIN_CONFIG, KConfig::NoGlobals); return kwinconfig->group("Effect-" + effectname); } diff --git a/main.cpp b/main.cpp index 36e5786bfb..e1609973a9 100644 --- a/main.cpp +++ b/main.cpp @@ -223,7 +223,7 @@ public: addWM("metacity"); addWM("openbox"); addWM("fvwm2"); - addWM("kwin"); + addWM(KWIN_NAME); setMainWidget(mainWidget); @@ -278,7 +278,7 @@ Application::Application() if (crashes >= 4) { // Something has gone seriously wrong AlternativeWMDialog dialog; - QString cmd = "kwin"; + QString cmd = KWIN_NAME; if (dialog.exec() == QDialog::Accepted) cmd = dialog.selectedWM(); else @@ -435,7 +435,7 @@ KDE_EXPORT int kdemain(int argc, char * argv[]) // ""known to be stupid" ideas ;-P // The invalid system parameter "" will use the systems default graphicssystem // "!= XRender" is intended since eg. pot. SW backends likely would profit from raster as well - KConfigGroup config(KSharedConfig::openConfig("kwinrc"), "Compositing"); + KConfigGroup config(KSharedConfig::openConfig(KWIN_CONFIG), "Compositing"); QString preferredSystem("native"); if (config.readEntry("Enabled", true) && config.readEntry("Backend", "OpenGL") != "XRender") preferredSystem = ""; @@ -484,7 +484,7 @@ KDE_EXPORT int kdemain(int argc, char * argv[]) } KAboutData aboutData( - "kwin", // The program name used internally + KWIN_NAME, // The program name used internally 0, // The message catalog name. If null, program name is used instead ki18n("KWin"), // A displayable program name string version, // The program version string @@ -517,10 +517,10 @@ KDE_EXPORT int kdemain(int argc, char * argv[]) setenv("QT_NO_GLIB", "1", true); org::kde::KSMServerInterface ksmserver("org.kde.ksmserver", "/KSMServer", QDBusConnection::sessionBus()); - ksmserver.suspendStartup("kwin"); + ksmserver.suspendStartup(KWIN_NAME); KWin::Application a; - ksmserver.resumeStartup("kwin"); + ksmserver.resumeStartup(KWIN_NAME); KWin::SessionManager weAreIndeed; KWin::SessionSaveDoneHelper helper; KGlobal::locale()->insertCatalog("kwin_effects"); diff --git a/scripting/scripting.cpp b/scripting/scripting.cpp index bc0cac542a..b0c3a630e8 100644 --- a/scripting/scripting.cpp +++ b/scripting/scripting.cpp @@ -400,7 +400,7 @@ LoadScriptList KWin::Scripting::queryScriptsToLoad(KConfigGroup &conf) } const QString pluginName = service->property("X-KDE-PluginInfo-Name").toString(); const QString scriptName = service->property("X-Plasma-MainScript").toString(); - const QString file = KStandardDirs::locate("data", "kwin/scripts/" + pluginName + "/contents/" + scriptName); + const QString file = KStandardDirs::locate("data", QLatin1String(KWIN_NAME) + "/scripts/" + pluginName + "/contents/" + scriptName); if (file.isNull()) { kDebug(1212) << "Could not find script file for " << pluginName; continue; diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 2b1d360c70..feeb288250 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -1,7 +1,7 @@ # packages -install( DIRECTORY videowall DESTINATION ${DATA_INSTALL_DIR}/kwin/scripts ) -install( DIRECTORY synchronizeskipswitcher DESTINATION ${DATA_INSTALL_DIR}/kwin/scripts ) -install( DIRECTORY desktopchangeosd DESTINATION ${DATA_INSTALL_DIR}/kwin/scripts ) +install( DIRECTORY videowall DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/scripts ) +install( DIRECTORY synchronizeskipswitcher DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/scripts ) +install( DIRECTORY desktopchangeosd DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/scripts ) # service files install( FILES videowall/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME kwin-script-videowall.desktop ) diff --git a/tabbox/declarative.cpp b/tabbox/declarative.cpp index da67055ee5..3bdcfac80a 100644 --- a/tabbox/declarative.cpp +++ b/tabbox/declarative.cpp @@ -136,7 +136,7 @@ DeclarativeView::DeclarativeView(QAbstractItemModel *model, TabBoxConfig::TabBox } else if (m_mode == TabBoxConfig::DesktopTabBox) { rootContext()->setContextProperty("clientModel", model); } - setSource(QUrl(KStandardDirs::locate("data", "kwin/tabbox/tabbox.qml"))); + setSource(QUrl(KStandardDirs::locate("data", QLatin1String(KWIN_NAME) + QLatin1String("/tabbox/tabbox.qml")))); // FrameSvg m_frame->setImagePath("dialogs/background"); @@ -304,7 +304,7 @@ void DeclarativeView::updateQmlSource(bool force) } if (m_mode == TabBoxConfig::DesktopTabBox) { m_currentLayout = tabBox->config().layoutName(); - const QString file = KStandardDirs::locate("data", "kwin/tabbox/desktop.qml"); + const QString file = KStandardDirs::locate("data", QLatin1String(KWIN_NAME) + QLatin1String("/tabbox/desktop.qml")); rootObject()->setProperty("source", QUrl(file)); return; } @@ -327,7 +327,7 @@ void DeclarativeView::updateQmlSource(bool force) return; } const QString scriptName = service->property("X-Plasma-MainScript").toString(); - const QString file = KStandardDirs::locate("data", "kwin/tabbox/" + pluginName + "/contents/" + scriptName); + const QString file = KStandardDirs::locate("data", QLatin1String(KWIN_NAME) + "/tabbox/" + pluginName + "/contents/" + scriptName); if (file.isNull()) { kDebug(1212) << "Could not find QML file for window switcher"; return; diff --git a/tabbox/qml/CMakeLists.txt b/tabbox/qml/CMakeLists.txt index c616b863b3..d4bc863ecf 100644 --- a/tabbox/qml/CMakeLists.txt +++ b/tabbox/qml/CMakeLists.txt @@ -1,26 +1,26 @@ -install( FILES tabbox.qml DESTINATION ${DATA_INSTALL_DIR}/kwin/tabbox ) -install( FILES desktop.qml DESTINATION ${DATA_INSTALL_DIR}/kwin/tabbox ) +install( FILES tabbox.qml DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox ) +install( FILES desktop.qml DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox ) # packages -install( DIRECTORY clients/big_icons DESTINATION ${DATA_INSTALL_DIR}/kwin/tabbox ) -install( DIRECTORY clients/compact DESTINATION ${DATA_INSTALL_DIR}/kwin/tabbox ) -install( DIRECTORY clients/informative DESTINATION ${DATA_INSTALL_DIR}/kwin/tabbox ) -install( DIRECTORY clients/present_windows DESTINATION ${DATA_INSTALL_DIR}/kwin/tabbox ) -install( DIRECTORY clients/small_icons DESTINATION ${DATA_INSTALL_DIR}/kwin/tabbox ) -install( DIRECTORY clients/text DESTINATION ${DATA_INSTALL_DIR}/kwin/tabbox ) -install( DIRECTORY clients/thumbnails DESTINATION ${DATA_INSTALL_DIR}/kwin/tabbox ) -install( DIRECTORY clients/window_strip DESTINATION ${DATA_INSTALL_DIR}/kwin/tabbox ) +install( DIRECTORY clients/big_icons DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox ) +install( DIRECTORY clients/compact DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox ) +install( DIRECTORY clients/informative DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox ) +install( DIRECTORY clients/present_windows DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox ) +install( DIRECTORY clients/small_icons DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox ) +install( DIRECTORY clients/text DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox ) +install( DIRECTORY clients/thumbnails DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox ) +install( DIRECTORY clients/window_strip DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox ) # service files -install( FILES clients/big_icons/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin RENAME kwin4_window_switcher_big_icons.desktop ) -install( FILES clients/compact/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin RENAME kwin4_window_switcher_compact.desktop ) -install( FILES clients/informative/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin RENAME kwin4_window_switcher_informative.desktop ) -install( FILES clients/present_windows/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin RENAME kwin4_window_switcher_present_windows.desktop ) -install( FILES clients/small_icons/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin RENAME kwin4_window_switcher_small_icons.desktop ) -install( FILES clients/text/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin RENAME kwin4_window_switcher_text.desktop ) -install( FILES clients/thumbnails/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin RENAME kwin4_window_switcher_thumbnails.desktop ) -install( FILES clients/window_strip/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin RENAME kwin4_window_switcher_window_strip.desktop ) +install( FILES clients/big_icons/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_big_icons.desktop ) +install( FILES clients/compact/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_compact.desktop ) +install( FILES clients/informative/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_informative.desktop ) +install( FILES clients/present_windows/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_present_windows.desktop ) +install( FILES clients/small_icons/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_small_icons.desktop ) +install( FILES clients/text/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_text.desktop ) +install( FILES clients/thumbnails/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_thumbnails.desktop ) +install( FILES clients/window_strip/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR}/${KWIN_NAME} RENAME kwin4_window_switcher_window_strip.desktop ) # install additional icon tabbox into those that need it -install (FILES IconTabBox.qml DESTINATION ${DATA_INSTALL_DIR}/kwin/tabbox/big_icons/contents/ui) -install (FILES IconTabBox.qml DESTINATION ${DATA_INSTALL_DIR}/kwin/tabbox/small_icons/contents/ui) +install (FILES IconTabBox.qml DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox/big_icons/contents/ui) +install (FILES IconTabBox.qml DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME}/tabbox/small_icons/contents/ui)