/.config
+/androidtools.dlm
+/basetools.dlm
/builder
/builder.pc
/builder-stage1
-/basetools.dlm
/clangtools.dlm
+/datatools.dlm
/gnutools.dlm
/libbuilder.a
/libbuilder.so
-/libandroidtools.a
-/libdatatools.a
/msvctools.dlm
/temp
standard CXX "c++11";
};
- library "androidtools"
- {
- source "plugins/android";
- default false;
- };
-
- library "datatools"
- {
- source "plugins/datafile";
- default false;
- };
-
library "libbuilder"
{
source "source/lib";
- use "androidtools";
- use "datatools";
- build_info
- {
- incpath "plugins";
- };
if_arch "windows"
{
build_info
install true;
};
+ module "androidtools"
+ {
+ source "plugins/android";
+ install true;
+ };
+
module "basetools"
{
source "plugins/base";
install true;
};
+ module "datatools"
+ {
+ source "plugins/datafile";
+ install true;
+ };
+
module "gnutools"
{
source "plugins/gnu";
--- /dev/null
+#include <msp/builder/architecture.h>
+#include <msp/builder/builder.h>
+#include "androidapplicationcomponent.h"
+#include "androidplugin.h"
+#include "androidtools.h"
+
+AndroidPlugin::AndroidPlugin(Builder &b):
+ Plugin(b)
+{
+ builder.get_component_registry().register_type<AndroidApplicationComponent>("android_application");
+}
+
+void AndroidPlugin::add_tools(Toolchain &toolchain, const Architecture &arch) const
+{
+ if(arch.get_system()=="android")
+ toolchain.add_toolchain(new AndroidTools(builder, arch));
+}
+
+
+extern "C"
+Plugin *create_plugin(Builder &builder)
+{
+ return new AndroidPlugin(builder);
+}
--- /dev/null
+#ifndef ANDROIDPLUGIN_H_
+#define ANDROIDPLUGIN_H_
+
+#include <msp/builder/plugin.h>
+
+class AndroidPlugin: public Plugin
+{
+public:
+ AndroidPlugin(Builder &);
+
+ void add_tools(Toolchain &, const Architecture &) const override;
+};
+
+#endif
--- /dev/null
+#include <msp/builder/builder.h>
+#include "datafileplugin.h"
+#include "datapackcomponent.h"
+#include "datatool.h"
+
+DataFilePlugin::DataFilePlugin(Builder &b):
+ Plugin(b)
+{
+ builder.get_component_registry().register_type<DataPackComponent>("datapack");
+}
+
+void DataFilePlugin::add_tools(Toolchain &toolchain, const Architecture &) const
+{
+ toolchain.add_tool(new DataTool(builder));
+}
+
+
+extern "C"
+Plugin *create_plugin(Builder &builder)
+{
+ return new DataFilePlugin(builder);
+}
--- /dev/null
+#ifndef DATAFILEPLUGIN_H_
+#define DATAFILEPLUGIN_H_
+
+#include <msp/builder/plugin.h>
+
+class DataFilePlugin: public Plugin
+{
+public:
+ DataFilePlugin(Builder &);
+
+ void add_tools(Toolchain &, const Architecture &) const override;
+};
+
+#endif
#include <msp/strings/format.h>
#include <msp/time/timedelta.h>
#include <msp/time/utils.h>
-#include "android/androidtools.h"
#include "binarypackage.h"
#include "builder.h"
-#include "datafile/datatool.h"
#include "installedfile.h"
#include "package.h"
#include "plugin.h"
#include "sharedlibrary.h"
#include "task.h"
+#include "tool.h"
#include "virtualtarget.h"
using namespace std;
void Builder::add_default_tools()
{
- if(current_arch->get_system()=="android")
- toolchain.add_toolchain(new AndroidTools(*this, *current_arch));
- toolchain.add_tool(new DataTool(*this));
for(const LoadedPlugin &p: plugins)
p.plugin->add_tools(toolchain, *current_arch);
#include <msp/io/print.h>
#include <msp/strings/lexicalcast.h>
#include <msp/strings/utils.h>
-#include "android/androidapplicationcomponent.h"
#include "binarycomponent.h"
#include "binarypackage.h"
#include "builder.h"
-#include "datafile/datapackcomponent.h"
#include "file.h"
#include "installcomponent.h"
#include "plugin.h"
FeatureConditional(p, p.name),
options(o)
{
- add("android_application", &Loader::component<AndroidApplicationComponent>);
add("build_info", &Loader::build_info);
- add("datapack", &Loader::component<DataPackComponent>);
add("description", &SourcePackage::description);
add("feature", &Loader::feature);
add("generate", &Loader::generate);