Commit e076d374 authored by Victor Yacovlev's avatar Victor Yacovlev

Completely removed pluginspec files

parent 57cf3082
......@@ -220,14 +220,7 @@ function(kumir2_add_plugin)
set_property(TARGET ${PARSED_ARGS_NAME} APPEND PROPERTY LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${KUMIR2_PLUGINS_DIR}")
set_property(TARGET ${PARSED_ARGS_NAME} APPEND PROPERTY RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${KUMIR2_PLUGINS_DIR}")
kumir2_handle_translation(${PARSED_ARGS_NAME} "ru")
kumir2_copy_resources(${PARSED_ARGS_NAME})
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PARSED_ARGS_NAME}.pluginspec")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/${PARSED_ARGS_NAME}.pluginspec" DESTINATION "${CMAKE_BINARY_DIR}/${KUMIR2_PLUGINS_DIR}")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${PARSED_ARGS_NAME}.pluginspec" DESTINATION ${KUMIR2_PLUGINS_DIR})
elseif(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/${PARSED_ARGS_NAME}.pluginspec")
file(COPY "${CMAKE_CURRENT_BINARY_DIR}/${PARSED_ARGS_NAME}.pluginspec" DESTINATION "${CMAKE_BINARY_DIR}/${KUMIR2_PLUGINS_DIR}")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PARSED_ARGS_NAME}.pluginspec" DESTINATION ${KUMIR2_PLUGINS_DIR})
endif()
kumir2_copy_resources(${PARSED_ARGS_NAME})
install(TARGETS ${PARSED_ARGS_NAME} DESTINATION ${KUMIR2_PLUGINS_DIR})
endfunction(kumir2_add_plugin)
......@@ -236,7 +229,6 @@ function(kumir2_add_actor)
string(TOLOWER "${PARSED_ARGS_NAME}.json" JSON_FILE_NAME)
string(TOLOWER "${PARSED_ARGS_NAME}modulebase" MODULEBASE)
string(TOLOWER "${PARSED_ARGS_NAME}plugin" PLUGIN)
set(PLUGIN_SPEC "Actor${PARSED_ARGS_NAME}.pluginspec")
set(PLUGIN_NAME "Actor${PARSED_ARGS_NAME}")
if(EXISTS "${CMAKE_SOURCE_DIR}/scripts/gen_actor_source.py")
set(GEN_ACTOR_SOURCE_SCRIPT "${CMAKE_SOURCE_DIR}/scripts/gen_actor_source.py")
......@@ -255,7 +247,6 @@ function(kumir2_add_actor)
OUTPUT
${SOURCES_GENERATED}
${HEADERS_GENERATED}
${PLUGIN_SPEC}
COMMAND ${PYTHON_EXECUTABLE}
${GEN_ACTOR_SOURCE_SCRIPT}
"--update"
......
......@@ -18,7 +18,6 @@ Example (create new actor skeleton):
../../../scripts/gen_actor_source.py --project mygreatactor.json
This will create the following files:
MyGreatActor.pluginspec -- actor plugin spec
CMakeLists.txt -- CMake project file
mygreatactormodule.h -- header skeleton
mygreatactormodule.cpp -- source skeleton
......@@ -1512,6 +1511,17 @@ private:
}
""" % (self.class_name, self.class_name)
# noinspection PyPep8Naming
def createPluginSpecCppImplementation(self):
actor_name = self._module.name.get_camel_case_cpp_value()
return """
/* protected */ void %s::createPluginSpec()
{
_pluginSpec.name = "Actor%s";
_pluginSpec.gui = isGuiRequired();
}
""" % (self.class_name, actor_name)
# noinspection PyPep8Naming
def isGuiRequiredCppImplementation(self):
"""
......@@ -2351,10 +2361,10 @@ private:
return """
/* public */ QList<Shared::ActorInterface*> %s::usesList() const
{
static const QStringList usesNames = QStringList()
static const QList<QByteArray> usesNames = QList<QByteArray>()
<< %s ;
QList<Shared::ActorInterface*> result;
Q_FOREACH (const QString & name, usesNames) {
Q_FOREACH (const QByteArray & name, usesNames) {
ExtensionSystem::KPlugin * plugin = myDependency(name);
Shared::ActorInterface * actor =
qobject_cast<Shared::ActorInterface*>(plugin);
......
......@@ -10,6 +10,6 @@ endforeach(PACKAGE)
add_subdirectory(kumir2-libs)
add_subdirectory(plugins)
#add_subdirectory(actors)
add_subdirectory(actors)
add_subdirectory(app)
add_subdirectory(tools)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment