From 6dfd707af38b780a76e98b098223e899d57a1026 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 11 Apr 2009 02:24:57 -0400 Subject: Add package structure for Arena scripts --- plugins/arena/kross/CMakeLists.txt | 9 +++++++++ plugins/arena/kross/KrossArenaPackage.cpp | 32 +++++++++++++++++++++++++++++++ plugins/arena/kross/KrossArenaPackage.h | 32 +++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 plugins/arena/kross/KrossArenaPackage.cpp create mode 100644 plugins/arena/kross/KrossArenaPackage.h (limited to 'plugins') diff --git a/plugins/arena/kross/CMakeLists.txt b/plugins/arena/kross/CMakeLists.txt index af47e230..5532c67f 100644 --- a/plugins/arena/kross/CMakeLists.txt +++ b/plugins/arena/kross/CMakeLists.txt @@ -3,6 +3,9 @@ project(sigen_arena_kross) set(sigen_arena_kross_SRCS SigenArenaKross.cpp ) +set(sigen_arena_kross_PACKAGE + KrossArenaPackage.cpp +) set(sigen_arena_kross_SERVICES sigen_arena_kross.desktop ) @@ -19,6 +22,12 @@ target_link_libraries(sigen_arena_kross ${KDE4_KROSSCORE_LIBRARY} sigencoreplugins ) +kde4_add_plugin(sigen_arena_kross_packagestructure + ${sigen_arena_kross_PACKAGE} +) +target_link_libraries(sigen_arena_kross_packagestructure + ${KDE4_PLASMA_LIBRARY} +) install( TARGETS diff --git a/plugins/arena/kross/KrossArenaPackage.cpp b/plugins/arena/kross/KrossArenaPackage.cpp new file mode 100644 index 00000000..27c8dc5e --- /dev/null +++ b/plugins/arena/kross/KrossArenaPackage.cpp @@ -0,0 +1,32 @@ +/* + * Copyright 2009 Ben Boeckel + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +// Header include +#include "KrossArenaPackage.h" + +K_EXPORT_PLASMA_PACKAGESTRUCTURE(arenascript, KrossArenaPackage) + +KrossArenaPackage::KrossArenaPackage(QObject* parent, const QVariantList& args) : + Plasma::PackageStructure(parent, "Sigen Kross Arena") +{ + Q_UNUSED(args) + setServicePrefix("sigen-arena-kross-"); + setDefaultPackageRoot("sigen/kross/arena/"); + addDirectoryDefinition("data", "data/", "Data files for the script"); + addFileDefinition("script", "arena.kross", "Script file for the arena"); + setRequired("script", true); +} diff --git a/plugins/arena/kross/KrossArenaPackage.h b/plugins/arena/kross/KrossArenaPackage.h new file mode 100644 index 00000000..044b022e --- /dev/null +++ b/plugins/arena/kross/KrossArenaPackage.h @@ -0,0 +1,32 @@ +/* + * Copyright 2009 Ben Boeckel + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef ARENAPLUGIN_SIGENARENAPACKAGE +#define ARENAPLUGIN_SIGENARENAPACKAGE + +// KDE includes +#include + +class KrossArenaPackage : public Plasma::PackageStructure +{ + Q_OBJECT + + public: + KrossArenaPackage(QObject *parent, const QVariantList &args); +}; + +#endif -- cgit