summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-04-11 02:24:57 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-04-11 02:24:57 -0400
commit6dfd707af38b780a76e98b098223e899d57a1026 (patch)
treed9286dbe06f7c7e7e85980067b3cbfd579d95ecc /plugins
parentd10f7cd01877ff3e4eecb5f5948a533a80163adb (diff)
downloadsigen-6dfd707af38b780a76e98b098223e899d57a1026.tar.gz
sigen-6dfd707af38b780a76e98b098223e899d57a1026.tar.xz
sigen-6dfd707af38b780a76e98b098223e899d57a1026.zip
Add package structure for Arena scripts
Diffstat (limited to 'plugins')
-rw-r--r--plugins/arena/kross/CMakeLists.txt9
-rw-r--r--plugins/arena/kross/KrossArenaPackage.cpp32
-rw-r--r--plugins/arena/kross/KrossArenaPackage.h32
3 files changed, 73 insertions, 0 deletions
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 <MathStuf@gmail.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+// 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 <MathStuf@gmail.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef ARENAPLUGIN_SIGENARENAPACKAGE
+#define ARENAPLUGIN_SIGENARENAPACKAGE
+
+// KDE includes
+#include <Plasma/PackageStructure>
+
+class KrossArenaPackage : public Plasma::PackageStructure
+{
+ Q_OBJECT
+
+ public:
+ KrossArenaPackage(QObject *parent, const QVariantList &args);
+};
+
+#endif