diff options
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/CMakeLists.txt | 240 | ||||
-rw-r--r-- | wizards/overviewpage.cpp | 22 | ||||
-rw-r--r-- | wizards/wizards-config.h.cmake | 4 |
3 files changed, 264 insertions, 2 deletions
diff --git a/wizards/CMakeLists.txt b/wizards/CMakeLists.txt new file mode 100644 index 000000000..bde1512d4 --- /dev/null +++ b/wizards/CMakeLists.txt @@ -0,0 +1,240 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +# Possible options: +# - WITH_EGROUPWARE +# - WITH_SLOX +# - WITH_KOLAB +# - WITH_NEWEXCHANGE +# - WITH_GROUPWISE +# - WITH_SCALIX + +tde_import( libkmime ) +tde_import( ktnef ) +tde_import( libkcal ) +tde_import( libkdepim ) +tde_import( knotes ) +tde_import( kresources ) + +if( WITH_KOLAB OR WITH_GROUPWISE OR WITH_SCALIX ) + tde_import( libkdenetwork ) + tde_import( certmanager ) + tde_import( libkpimidentities ) +endif() + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/libkpimidentities + ${CMAKE_SOURCE_DIR}/libkdepim + ${CMAKE_SOURCE_DIR}/certmanager/lib + ${CMAKE_SOURCE_DIR}/knotes + ${CMAKE_SOURCE_DIR}/kresources/lib + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES + groupwarewizard.desktop + DESTINATION ${XDG_APPS_INSTALL_DIR} ) + + +##### helper #################################### + +macro( process_kcfg _who _out _path _kcfg _kcfgc ) + add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/${_path}/${_out} + COMMAND + mkdir -p ${CMAKE_BINARY_DIR}/${_path} + COMMAND ${KDE3_KCFGC_EXECUTABLE} + -d ${CMAKE_BINARY_DIR}/${_path} + ${CMAKE_SOURCE_DIR}/${_path}/${_kcfg} + ${CMAKE_SOURCE_DIR}/${_path}/${_kcfgc} + DEPENDS + ${CMAKE_SOURCE_DIR}/${_path}/${_kcfg} + ${CMAKE_SOURCE_DIR}/${_path}/${_kcfgc} ) + set_property( SOURCE ${_who} APPEND + PROPERTY OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/${_path}/${_out} ) +endmacro() + + +######## egroupwarewizard ####################### + +if( WITH_EGROUPWARE ) + + install( FILES egroupware.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) + + process_kcfg( egroupwarewizard.cpp kabc_egroupwareprefs.h kresources/egroupware + kresources_kabc_egroupware.kcfg kabc_egroupwareprefs.kcfgc ) + + process_kcfg( egroupwarewizard.cpp kcal_egroupwareprefs.h kresources/egroupware + kresources_kcal_egroupware.kcfg kcal_egroupwareprefs.kcfgc ) + + process_kcfg( egroupwarewizard.cpp knotes_egroupwareprefs.h kresources/egroupware + kresources_knotes_egroupware.kcfg knotes_egroupwareprefs.kcfgc ) + + tde_add_library( egroupwarewizard SHARED NO_EXPORT + SOURCES + egroupwarewizard.cpp egroupwareconfig.kcfgc + LINK kcal_xmlrpc-shared kabc_xmlrpc-shared knotes_xmlrpc-shared + DESTINATION ${PLUGIN_INSTALL_DIR} ) + + tde_add_executable( egroupwarewizard + SOURCES egroupwaremain.cpp + LINK egroupwarewizard-shared + DESTINATION ${BIN_INSTALL_DIR} ) + + set( EGROUPWAREWIZARD_LIBRARY egroupwarewizard-shared ) + +endif() + + +######## sloxwizard ############################# + +if( WITH_SLOX ) + + install( FILES slox.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) + + process_kcfg( sloxwizard.cpp kabcsloxprefs.h kresources/slox + kresources_kabc_slox.kcfg kabcsloxprefs.kcfgc ) + + process_kcfg( sloxwizard.cpp kcalsloxprefs.h kresources/slox + kresources_kcal_slox.kcfg kcalsloxprefs.kcfgc ) + + tde_add_library( sloxwizard SHARED NO_EXPORT + SOURCES + sloxwizard.cpp sloxconfig.kcfgc + LINK kcal_slox-shared kabc_slox-shared + DESTINATION ${PLUGIN_INSTALL_DIR} ) + + tde_add_executable( sloxwizard + SOURCES sloxmain.cpp + LINK sloxwizard-shared + DESTINATION ${BIN_INSTALL_DIR} ) + + set( SLOXWIZARD_LIBRARY sloxwizard-shared ) + +endif() + + +######## kolabwizard ############################ + +if( WITH_KOLAB ) + + install( FILES kolab.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) + + tde_add_library( kolabwizard SHARED NO_EXPORT + SOURCES + kolabwizard.cpp kmailchanges.cpp kolabconfig.kcfgc + kolabkmailchanges.cpp + LINK + kcalkolab-shared kabckolab-shared knoteskolab-shared + kpimidentities-shared + DESTINATION ${PLUGIN_INSTALL_DIR} ) + + tde_add_executable( kolabwizard + SOURCES kolabmain.cpp + LINK kolabwizard-shared + DESTINATION ${BIN_INSTALL_DIR} ) + + set( KOLABWIZARD_LIBRARY kolabwizard-shared ) + +endif( ) + + +######## exchangewizard ######################### + +if( WITH_NEWEXCHANGE ) + + tde_add_library( exchangewizard SHARED NO_EXPORT + SOURCES exchangewizard.cpp + LINK kcal_newexchange-shared + DESTINATION ${PLUGIN_INSTALL_DIR} ) + + tde_add_executable( exchangewizard + SOURCES exchangemain.cpp + LINK exchangewizard-shared + DESTINATION ${BIN_INSTALL_DIR} ) + + set( EXCHANGEWIZARD_LIBRARY exchangewizard-shared ) + +endif() + + +######## groupwisewizard ######################## + +if( WITH_GROUPWISE ) + + install( FILES groupwise.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) + + process_kcfg( groupwisewizard.cpp kcal_groupwiseprefsbase.h kresources/groupwise + kresources_kcal_groupwise.kcfg kcal_groupwiseprefsbase.kcfgc ) + + process_kcfg( groupwisewizard.cpp kabc_groupwiseprefs.h kresources/groupwise + kresources_kabc_groupwise.kcfg kabc_groupwiseprefs.kcfgc ) + + tde_add_library( groupwisewizard SHARED AUTOMOC NO_EXPORT + SOURCES + groupwisewizard.cpp groupwiseconfig.kcfgc kmailchanges.cpp + LINK kcal_groupwise-shared kabc_groupwise-shared kpimidentities-shared + DESTINATION ${PLUGIN_INSTALL_DIR} ) + + tde_add_executable( groupwisewizard + SOURCES groupwisemain.cpp + LINK groupwisewizard-shared + DESTINATION ${BIN_INSTALL_DIR} ) + +endif() + + +######## scalixwizard ########################### + +if( WITH_SCALIX ) + + install( FILES scalix.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) + + tde_add_library( scalixwizard SHARED NO_EXPORT + SOURCES + scalixwizard.cpp kmailchanges.cpp scalixconfig.kcfgc + scalixkmailchanges.cpp + LINK kcalscalix-shared kabcscalix-shared kpimidentities-shared + DESTINATION ${PLUGIN_INSTALL_DIR} ) + + tde_add_executable( scalixwizard + SOURCES scalixmain.cpp + LINK scalixwizard-shared + DESTINATION ${BIN_INSTALL_DIR} ) + +endif() + + +##### groupwarewizard (executable) ############## + +if( WITH_EGROUPWARE OR WITH_SLOX OR WITH_KOLAB OR WITH_NEWEXCHANGE ) + + configure_file( wizards-config.h.cmake wizards-config.h @ONLY ) + + tde_add_executable( groupwarewizard AUTOMOC + SOURCES + groupwarewizard.cpp main.cpp overviewpage.cpp + LINK + ${EGROUPWAREWIZARD_LIBRARY} ${SLOXWIZARD_LIBRARY} + ${KOLABWIZARD_LIBRARY} ${EXCHANGEWIZARD_LIBRARY} + DESTINATION ${BIN_INSTALL_DIR} ) + +endif() diff --git a/wizards/overviewpage.cpp b/wizards/overviewpage.cpp index e0a544ad9..a15b580eb 100644 --- a/wizards/overviewpage.cpp +++ b/wizards/overviewpage.cpp @@ -32,6 +32,7 @@ #include <kpushbutton.h> #include <kstdguiitem.h> +#include "wizards-config.h" #include "egroupwarewizard.h" #include "kolabwizard.h" #include "sloxwizard.h" @@ -60,25 +61,34 @@ OverViewPage::OverViewPage( TQWidget *parent, const char *name ) label = new TQLabel( i18n( "Select the type of server you want connect your KDE to:" ), this ); tqlayout->addMultiCellWidget( label, 2, 2, 0, 3 ); - TQPushButton *button = new TQPushButton( i18n("eGroupware"), this ); + TQPushButton *button; + +#ifdef WITH_EGROUPWARE + button = new TQPushButton( i18n("eGroupware"), this ); tqlayout->addMultiCellWidget( button, 3, 3, 0, 3 ); connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( showWizardEGroupware() ) ); +#endif // FIXME: Maybe hyperlinks would be better than buttons. +#ifdef WITH_KOLAB button = new TQPushButton( i18n("Kolab"), this ); tqlayout->addMultiCellWidget( button, 4, 4, 0, 3 ); connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( showWizardKolab() ) ); +#endif +#ifdef WITH_SLOX button = new TQPushButton( i18n("SUSE Linux Openexchange (SLOX)"), this ); tqlayout->addMultiCellWidget( button, 5, 5, 0, 3 ); connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( showWizardSlox() ) ); +#endif +#ifdef WITH_NEWEXCHANGE button = new TQPushButton( i18n("Microsoft Exchange"), this ); button->hide(); // not quite ready yet tqlayout->addMultiCellWidget( button, 6, 6, 0, 3 ); connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( showWizardExchange() ) ); - +#endif TQFrame *frame = new TQFrame( this ); frame->setFrameStyle( TQFrame::HLine | TQFrame::Sunken ); @@ -100,26 +110,34 @@ OverViewPage::~OverViewPage() void OverViewPage::showWizardEGroupware() { +#ifdef WITH_EGROUPWARE EGroupwareWizard wizard; wizard.exec(); +#endif } void OverViewPage::showWizardKolab() { +#ifdef WITH_KOLAB KolabWizard wizard; wizard.exec(); +#endif } void OverViewPage::showWizardSlox() { +#ifdef WITH_SLOX SloxWizard wizard; wizard.exec(); +#endif } void OverViewPage::showWizardExchange() { +#ifdef WITH_NEWEXCHANGE ExchangeWizard wizard; wizard.exec(); +#endif } #include "overviewpage.moc" diff --git a/wizards/wizards-config.h.cmake b/wizards/wizards-config.h.cmake new file mode 100644 index 000000000..2f4a92f2e --- /dev/null +++ b/wizards/wizards-config.h.cmake @@ -0,0 +1,4 @@ +#cmakedefine WITH_EGROUPWARE 1 +#cmakedefine WITH_SLOX 1 +#cmakedefine WITH_KOLAB 1 +#cmakedefine WITH_NEWEXCHANGE 1 |