From kde-commits Tue Sep 30 22:30:35 2008 From: Artur Duque de Souza Date: Tue, 30 Sep 2008 22:30:35 +0000 To: kde-commits Subject: KDE/kdebase/workspace Message-Id: <1222813835.672783.8267.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=122281385602819 SVN commit 866456 by asouza: QEdje Script Engine arrives to kdebase Working version. Still needs improvements on package install to avoid install of invalid files. M +6 -0 CMakeLists.txt A cmake/modules/FindQEdje.cmake M +3 -0 plasma/scriptengines/CMakeLists.txt A plasma/scriptengines/qedjescript (directory) trunk/kdereview/plasma/scriptengines/qedjescript#866066 M +3 -10 plasma/scriptengines/qedjescript/CMakeLists.txt M +7 -2 plasma/scriptengines/qedjescript/qedje_package.cpp --- trunk/KDE/kdebase/workspace/CMakeLists.txt #866455:866456 @@ -21,6 +21,12 @@ macro_log_feature(GOOGLEGADGETS_FOUND "GoogleGadgets" "Google Gadgets library" "http://code.google.com/p/google-gadgets-for-linux/" FALSE "" "Needed to build plasma scriptengine for google gadgets") + +macro_optional_find_package(QEdje) +macro_log_feature(QEdje_FOUND "QEdje" "QEdje library" + "http://dev.openbossa.org/trac/qedje/" FALSE "" + "Needed to build plasma scriptengine for edje files") + macro_optional_find_package(OpenGL) include (MacroLibrary) --- trunk/KDE/kdebase/workspace/plasma/scriptengines/CMakeLists.txt #866455:866456 @@ -6,3 +6,6 @@ macro_optional_add_subdirectory(google_gadgets) endif(GOOGLEGADGETS_FOUND) +if(QEdje_FOUND) + macro_optional_add_subdirectory(qedjescript) +endif(QEdje_FOUND) \ No newline at end of file --- trunk/KDE/kdebase/workspace/plasma/scriptengines/qedjescript/CMakeLists.txt #866066:866456 @@ -1,12 +1,8 @@ # Project's name project(plasma-qedje-script) -# QEdje dependencies -find_package(PkgConfig) -pkg_check_modules(QZION qzion>=0.3.0) -pkg_check_modules(QEDJE qedje>=0.3.0) +add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) -IF (QZION_FOUND AND QEDJE_FOUND) # We add our source code here set(package_SRCS qedje_package.cpp) set(qedjescript_SRCS qedje_applet.cpp) @@ -15,14 +11,12 @@ # Now make sure all files get to the right place kde4_add_plugin(plasma_appletscript_qedje ${qedjescript_SRCS}) target_link_libraries(plasma_appletscript_qedje - ${PLASMA_LIBS} ${KDE4_KDEUI_LIBS} - ${QZION_LIBRARIES} - ${QEDJE_LIBRARIES}) + plasma ${KDE4_KDEUI_LIBS} ${QEdje_LIBRARIES}) kde4_add_plugin(plasma_package_qedje ${package_SRCS}) target_link_libraries(plasma_package_qedje - ${PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS}) + plasma ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS}) install(TARGETS plasma_appletscript_qedje @@ -36,5 +30,4 @@ install(FILES plasma-package-qedje.desktop DESTINATION ${SERVICES_INSTALL_DIR}) -ENDIF (QZION_FOUND AND QEDJE_FOUND) --- trunk/KDE/kdebase/workspace/plasma/scriptengines/qedjescript/qedje_package.cpp #866066:866456 @@ -38,12 +38,16 @@ // Create the directory so we can copy the edje file inside it QDir contents(dest_dir); - if (!contents.exists() && !contents.mkpath(dest_dir)) + if (!contents.exists() && !contents.mkpath(dest_dir)) { + kDebug() << "-------> RETURNED FALSE 1 <-------------"; return false; + } // Copy the edje file to the package's directory - if (!QFile::copy(archive_path, QString(dest_dir + "file.edj"))) + if (!QFile::copy(archive_path, QString(dest_dir + "file.edj"))) { + kDebug() << "-------> RETURNED FALSE 2 <-------------"; return false; + } setPath(dest_dir); @@ -56,5 +60,6 @@ data.setDescription("An Edje Object to be loaded using QEdje"); Plasma::Package::registerPackage(data, QString("")); + kDebug() << "-------> RETURNED TRUE <-------------"; return true; }