From 9bfff6ddb784e2f2998a1dd7216c06fb1ab6c171 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 13 Apr 2012 13:10:35 +0200 Subject: [PATCH] Restructured components. --- base/application.h | 8 ++-- base/base.vcxproj | 1 + cJSON/cJSON.vcxproj | 1 + components/Makefile.am | 5 +++ components/configfile/Makefile.am | 17 ++++++++ .../configfile/configfile.vcxproj | 3 +- .../configfile}/configfilecomponent.cpp | 0 .../configfile}/configfilecomponent.h | 0 .../configfile/i2-configfile.h | 0 .../configrpc}/Makefile.am | 12 +++--- .../configrpc/configrpc.vcxproj | 3 +- .../configrpc}/configrpccomponent.cpp | 0 .../configrpc}/configrpccomponent.h | 0 .../configrpc/i2-configrpc.h | 6 +-- configfilecomponent/Makefile.am | 17 -------- icinga-app/icinga-app.vcxproj | 1 + icinga-app/icinga.cpp | 4 +- icinga.sln | 39 ++++++++++--------- icinga/icinga.vcxproj | 1 + jsonrpc/jsonrpc.vcxproj | 1 + 20 files changed, 67 insertions(+), 52 deletions(-) create mode 100644 components/Makefile.am create mode 100644 components/configfile/Makefile.am rename configfilecomponent/configfilecomponent.vcxproj => components/configfile/configfile.vcxproj (97%) rename {configfilecomponent => components/configfile}/configfilecomponent.cpp (100%) rename {configfilecomponent => components/configfile}/configfilecomponent.h (100%) rename configfilecomponent/i2-configfilecomponent.h => components/configfile/i2-configfile.h (100%) rename {configrpccomponent => components/configrpc}/Makefile.am (53%) rename configrpccomponent/configrpccomponent.vcxproj => components/configrpc/configrpc.vcxproj (97%) rename {configrpccomponent => components/configrpc}/configrpccomponent.cpp (100%) rename {configrpccomponent => components/configrpc}/configrpccomponent.h (100%) rename configrpccomponent/i2-configrpccomponent.h => components/configrpc/i2-configrpc.h (53%) delete mode 100644 configfilecomponent/Makefile.am diff --git a/base/application.h b/base/application.h index 8b330b270..04d388c97 100644 --- a/base/application.h +++ b/base/application.h @@ -52,10 +52,10 @@ public: int I2_EXPORT application_main(int argc, char **argv, icinga::Application *instance); -#define SET_START_CLASS(klass) \ - int main(int argc, char **argv) { \ - klass *instance = new klass(); \ - return application_main(argc, argv, instance); \ +#define IMPLEMENT_ENTRY_POINT(klass) \ + int main(int argc, char **argv) { \ + klass *instance = new klass(); \ + return application_main(argc, argv, instance); \ } #endif /* APPLICATION_H */ diff --git a/base/base.vcxproj b/base/base.vcxproj index 6ad5a6c67..ffc05ae7f 100644 --- a/base/base.vcxproj +++ b/base/base.vcxproj @@ -112,6 +112,7 @@ true true _WINDLL;I2_BASE_BUILD;%(PreprocessorDefinitions) + Speed Windows diff --git a/cJSON/cJSON.vcxproj b/cJSON/cJSON.vcxproj index a14805982..e759aa63a 100644 --- a/cJSON/cJSON.vcxproj +++ b/cJSON/cJSON.vcxproj @@ -66,6 +66,7 @@ true true WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + Speed Windows diff --git a/components/Makefile.am b/components/Makefile.am new file mode 100644 index 000000000..846d3a48d --- /dev/null +++ b/components/Makefile.am @@ -0,0 +1,5 @@ +## Process this file with automake to produce Makefile.in +## Created by Anjuta + +SUBDIRS = configfile \ + configrpc \ No newline at end of file diff --git a/components/configfile/Makefile.am b/components/configfile/Makefile.am new file mode 100644 index 000000000..2fb90b239 --- /dev/null +++ b/components/configfile/Makefile.am @@ -0,0 +1,17 @@ +## Process this file with automake to produce Makefile.in + +pkglib_LTLIBRARIES = \ + configfile.la + +configfile_la_SOURCES = \ + configfile.cpp \ + configfile.h \ + i2-configfile.h + +configfile_la_CXXFLAGS = -I${top_srcdir}/base \ + -I${top_srcdir}/jsonrpc \ + -I${top_srcdir}/cJSON + +configfile_la_LDFLAGS = -module -version-info 0:0:0 -no-undefined +configfile_la_LIBADD = ${top_builddir}/base/libbase.la \ + ${top_builddir}/cJSON/libcJSON.la diff --git a/configfilecomponent/configfilecomponent.vcxproj b/components/configfile/configfile.vcxproj similarity index 97% rename from configfilecomponent/configfilecomponent.vcxproj rename to components/configfile/configfile.vcxproj index bf7d0199c..ea027953d 100644 --- a/configfilecomponent/configfilecomponent.vcxproj +++ b/components/configfile/configfile.vcxproj @@ -15,7 +15,7 @@ - + {E58F1DA7-B723-412B-B2B7-7FF58E2A944E} @@ -79,6 +79,7 @@ true true WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + Speed Windows diff --git a/configfilecomponent/configfilecomponent.cpp b/components/configfile/configfilecomponent.cpp similarity index 100% rename from configfilecomponent/configfilecomponent.cpp rename to components/configfile/configfilecomponent.cpp diff --git a/configfilecomponent/configfilecomponent.h b/components/configfile/configfilecomponent.h similarity index 100% rename from configfilecomponent/configfilecomponent.h rename to components/configfile/configfilecomponent.h diff --git a/configfilecomponent/i2-configfilecomponent.h b/components/configfile/i2-configfile.h similarity index 100% rename from configfilecomponent/i2-configfilecomponent.h rename to components/configfile/i2-configfile.h diff --git a/configrpccomponent/Makefile.am b/components/configrpc/Makefile.am similarity index 53% rename from configrpccomponent/Makefile.am rename to components/configrpc/Makefile.am index 712ea778f..07cf53aef 100644 --- a/configrpccomponent/Makefile.am +++ b/components/configrpc/Makefile.am @@ -1,20 +1,20 @@ ## Process this file with automake to produce Makefile.in pkglib_LTLIBRARIES = \ - configrpccomponent.la + configrpc.la -configrpccomponent_la_SOURCES = \ +configrpc_la_SOURCES = \ configrpccomponent.cpp \ configrpccomponent.h \ - i2-configrpccomponent.h + i2-configrpc.h -configrpccomponent_la_CXXFLAGS = -I${top_srcdir}/base \ +configrpc_la_CXXFLAGS = -I${top_srcdir}/base \ -I${top_srcdir}/jsonrpc \ -I${top_srcdir}/cJSON \ -I${top_srcdir}/icinga -configrpccomponent_la_LDFLAGS = -module -version-info 0:0:0 -no-undefined -pthread -configrpccomponent_la_LIBADD = ${top_builddir}/base/libbase.la \ +configrpc_la_LDFLAGS = -module -version-info 0:0:0 -no-undefined -pthread +configrpc_la_LIBADD = ${top_builddir}/base/libbase.la \ ${top_builddir}/jsonrpc/libjsonrpc.la \ ${top_builddir}/cJSON/libcJSON.la \ ${top_builddir}/icinga/libicinga.la diff --git a/configrpccomponent/configrpccomponent.vcxproj b/components/configrpc/configrpc.vcxproj similarity index 97% rename from configrpccomponent/configrpccomponent.vcxproj rename to components/configrpc/configrpc.vcxproj index 66fc0443b..11c0c2779 100644 --- a/configrpccomponent/configrpccomponent.vcxproj +++ b/components/configrpc/configrpc.vcxproj @@ -15,7 +15,7 @@ - + {697C6D7E-3109-484C-A7AF-384D28711610} @@ -77,6 +77,7 @@ true true WIN32;NDEBUG;_WINDOWS;_USRDLL;CONFIGCOMPONENT_EXPORTS;%(PreprocessorDefinitions) + Speed Windows diff --git a/configrpccomponent/configrpccomponent.cpp b/components/configrpc/configrpccomponent.cpp similarity index 100% rename from configrpccomponent/configrpccomponent.cpp rename to components/configrpc/configrpccomponent.cpp diff --git a/configrpccomponent/configrpccomponent.h b/components/configrpc/configrpccomponent.h similarity index 100% rename from configrpccomponent/configrpccomponent.h rename to components/configrpc/configrpccomponent.h diff --git a/configrpccomponent/i2-configrpccomponent.h b/components/configrpc/i2-configrpc.h similarity index 53% rename from configrpccomponent/i2-configrpccomponent.h rename to components/configrpc/i2-configrpc.h index dd3d9c983..188288bf3 100644 --- a/configrpccomponent/i2-configrpccomponent.h +++ b/components/configrpc/i2-configrpc.h @@ -1,5 +1,5 @@ -#ifndef I2CONFIGCOMPONENT_H -#define I2CONFIGCOMPONENT_H +#ifndef I2CONFIGRPC_H +#define I2CONFIGRPC_H #include #include @@ -7,4 +7,4 @@ #include "configrpccomponent.h" -#endif /* I2CONFIGCOMPONENT_H */ +#endif /* I2CONFIGRPC_H */ diff --git a/configfilecomponent/Makefile.am b/configfilecomponent/Makefile.am deleted file mode 100644 index a61f35bf5..000000000 --- a/configfilecomponent/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -## Process this file with automake to produce Makefile.in - -pkglib_LTLIBRARIES = \ - configfilecomponent.la - -configfilecomponent_la_SOURCES = \ - configfilecomponent.cpp \ - configfilecomponent.h \ - i2-configfilecomponent.h - -configfilecomponent_la_CXXFLAGS = -I${top_srcdir}/base \ - -I${top_srcdir}/jsonrpc \ - -I${top_srcdir}/cJSON - -configfilecomponent_la_LDFLAGS = -module -version-info 0:0:0 -no-undefined -configfilecomponent_la_LIBADD = ${top_builddir}/base/libbase.la \ - ${top_builddir}/cJSON/libcJSON.la diff --git a/icinga-app/icinga-app.vcxproj b/icinga-app/icinga-app.vcxproj index 4d972431c..1091d7d86 100644 --- a/icinga-app/icinga-app.vcxproj +++ b/icinga-app/icinga-app.vcxproj @@ -74,6 +74,7 @@ true true WIN32;I2_ICINGALAUNCHER_BUILD;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + Speed Console diff --git a/icinga-app/icinga.cpp b/icinga-app/icinga.cpp index 81c83740a..17d4aff7c 100644 --- a/icinga-app/icinga.cpp +++ b/icinga-app/icinga.cpp @@ -1,3 +1,5 @@ #include -SET_START_CLASS(icinga::IcingaApplication); +using namespace icinga; + +IMPLEMENT_ENTRY_POINT(IcingaApplication); diff --git a/icinga.sln b/icinga.sln index 08e26fc4d..b165bd7f1 100644 --- a/icinga.sln +++ b/icinga.sln @@ -9,27 +9,28 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jsonrpc", "jsonrpc\jsonrpc. {9C92DA90-FD53-43A9-A244-90F2E8AF9677} = {9C92DA90-FD53-43A9-A244-90F2E8AF9677} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "configfilecomponent", "configfilecomponent\configfilecomponent.vcxproj", "{E58F1DA7-B723-412B-B2B7-7FF58E2A944E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cJSON", "cJSON\cJSON.vcxproj", "{66BED474-C33F-48F9-90BA-BBCFEDC006B8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icinga", "icinga\icinga.vcxproj", "{C1FC77E1-04A4-481B-A78B-2F7AF489C2F8}" ProjectSection(ProjectDependencies) = postProject - {66BED474-C33F-48F9-90BA-BBCFEDC006B8} = {66BED474-C33F-48F9-90BA-BBCFEDC006B8} {9C92DA90-FD53-43A9-A244-90F2E8AF9677} = {9C92DA90-FD53-43A9-A244-90F2E8AF9677} {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8} = {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8} - {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} = {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "configrpccomponent", "configrpccomponent\configrpccomponent.vcxproj", "{697C6D7E-3109-484C-A7AF-384D28711610}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icinga-app", "icinga-app\icinga-app.vcxproj", "{BE412865-FEBA-4259-AD41-58950D1F5432}" ProjectSection(ProjectDependencies) = postProject - {66BED474-C33F-48F9-90BA-BBCFEDC006B8} = {66BED474-C33F-48F9-90BA-BBCFEDC006B8} - {9C92DA90-FD53-43A9-A244-90F2E8AF9677} = {9C92DA90-FD53-43A9-A244-90F2E8AF9677} - {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8} = {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8} {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} = {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cJSON", "cJSON\cJSON.vcxproj", "{66BED474-C33F-48F9-90BA-BBCFEDC006B8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icinga", "icinga\icinga.vcxproj", "{C1FC77E1-04A4-481B-A78B-2F7AF489C2F8}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "configfile", "components\configfile\configfile.vcxproj", "{E58F1DA7-B723-412B-B2B7-7FF58E2A944E}" + ProjectSection(ProjectDependencies) = postProject + {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} = {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} + EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icinga-app", "icinga-app\icinga-app.vcxproj", "{BE412865-FEBA-4259-AD41-58950D1F5432}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "configrpc", "components\configrpc\configrpc.vcxproj", "{697C6D7E-3109-484C-A7AF-384D28711610}" + ProjectSection(ProjectDependencies) = postProject + {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} = {C1FC77E1-04A4-481B-A78B-2F7AF489C2F8} + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -45,14 +46,6 @@ Global {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8}.Debug|Win32.Build.0 = Debug|Win32 {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8}.Release|Win32.ActiveCfg = Release|Win32 {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8}.Release|Win32.Build.0 = Release|Win32 - {E58F1DA7-B723-412B-B2B7-7FF58E2A944E}.Debug|Win32.ActiveCfg = Debug|Win32 - {E58F1DA7-B723-412B-B2B7-7FF58E2A944E}.Debug|Win32.Build.0 = Debug|Win32 - {E58F1DA7-B723-412B-B2B7-7FF58E2A944E}.Release|Win32.ActiveCfg = Release|Win32 - {E58F1DA7-B723-412B-B2B7-7FF58E2A944E}.Release|Win32.Build.0 = Release|Win32 - {697C6D7E-3109-484C-A7AF-384D28711610}.Debug|Win32.ActiveCfg = Debug|Win32 - {697C6D7E-3109-484C-A7AF-384D28711610}.Debug|Win32.Build.0 = Debug|Win32 - {697C6D7E-3109-484C-A7AF-384D28711610}.Release|Win32.ActiveCfg = Release|Win32 - {697C6D7E-3109-484C-A7AF-384D28711610}.Release|Win32.Build.0 = Release|Win32 {66BED474-C33F-48F9-90BA-BBCFEDC006B8}.Debug|Win32.ActiveCfg = Debug|Win32 {66BED474-C33F-48F9-90BA-BBCFEDC006B8}.Debug|Win32.Build.0 = Debug|Win32 {66BED474-C33F-48F9-90BA-BBCFEDC006B8}.Release|Win32.ActiveCfg = Release|Win32 @@ -65,6 +58,14 @@ Global {BE412865-FEBA-4259-AD41-58950D1F5432}.Debug|Win32.Build.0 = Debug|Win32 {BE412865-FEBA-4259-AD41-58950D1F5432}.Release|Win32.ActiveCfg = Release|Win32 {BE412865-FEBA-4259-AD41-58950D1F5432}.Release|Win32.Build.0 = Release|Win32 + {E58F1DA7-B723-412B-B2B7-7FF58E2A944E}.Debug|Win32.ActiveCfg = Debug|Win32 + {E58F1DA7-B723-412B-B2B7-7FF58E2A944E}.Debug|Win32.Build.0 = Debug|Win32 + {E58F1DA7-B723-412B-B2B7-7FF58E2A944E}.Release|Win32.ActiveCfg = Release|Win32 + {E58F1DA7-B723-412B-B2B7-7FF58E2A944E}.Release|Win32.Build.0 = Release|Win32 + {697C6D7E-3109-484C-A7AF-384D28711610}.Debug|Win32.ActiveCfg = Debug|Win32 + {697C6D7E-3109-484C-A7AF-384D28711610}.Debug|Win32.Build.0 = Debug|Win32 + {697C6D7E-3109-484C-A7AF-384D28711610}.Release|Win32.ActiveCfg = Release|Win32 + {697C6D7E-3109-484C-A7AF-384D28711610}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/icinga/icinga.vcxproj b/icinga/icinga.vcxproj index 5e075a9bd..7f131b0ed 100644 --- a/icinga/icinga.vcxproj +++ b/icinga/icinga.vcxproj @@ -86,6 +86,7 @@ true true WIN32;I2_ICINGA_BUILD;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + Speed Console diff --git a/jsonrpc/jsonrpc.vcxproj b/jsonrpc/jsonrpc.vcxproj index 87cbda58b..d009f244a 100644 --- a/jsonrpc/jsonrpc.vcxproj +++ b/jsonrpc/jsonrpc.vcxproj @@ -85,6 +85,7 @@ true true WIN32;I2_JSONRPC_BUILD;NDEBUG;_LIB;%(PreprocessorDefinitions) + Speed Windows -- 2.40.0