summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/IcePack/ComponentDeployer.cpp14
-rw-r--r--cpp/src/IcePack/ComponentDeployer.h1
-rw-r--r--cpp/src/IcePack/ServerDeployer.cpp7
-rw-r--r--cpp/src/IcePack/ServiceDeployer.cpp6
4 files changed, 27 insertions, 1 deletions
diff --git a/cpp/src/IcePack/ComponentDeployer.cpp b/cpp/src/IcePack/ComponentDeployer.cpp
index a19221e899d..e3dfefaa288 100644
--- a/cpp/src/IcePack/ComponentDeployer.cpp
+++ b/cpp/src/IcePack/ComponentDeployer.cpp
@@ -550,6 +550,20 @@ IcePack::ComponentDeployer::addOffer(const string& offer, const string& adapter,
_tasks.push_back(new RegisterOffer(yellowAdmin, offer, object));
}
+void
+IcePack::ComponentDeployer::overrideBaseDir(const string& basedir)
+{
+ if(basedir[0] == '/')
+ {
+ _variables["basedir"] = basedir;
+ }
+ else
+ {
+ _variables["basedir"] += "/" + basedir;
+ }
+}
+
+
//
// Substitute variables with their values.
//
diff --git a/cpp/src/IcePack/ComponentDeployer.h b/cpp/src/IcePack/ComponentDeployer.h
index 9f45391e07f..8ced5524fd8 100644
--- a/cpp/src/IcePack/ComponentDeployer.h
+++ b/cpp/src/IcePack/ComponentDeployer.h
@@ -102,6 +102,7 @@ public:
void createConfigFile(const std::string&);
void addProperty(const std::string&, const std::string&);
void addOffer(const std::string&, const std::string&, const std::string&);
+ void overrideBaseDir(const std::string&);
protected:
diff --git a/cpp/src/IcePack/ServerDeployer.cpp b/cpp/src/IcePack/ServerDeployer.cpp
index 1d6d7fa149b..2f79d26c572 100644
--- a/cpp/src/IcePack/ServerDeployer.cpp
+++ b/cpp/src/IcePack/ServerDeployer.cpp
@@ -103,6 +103,12 @@ IcePack::ServerDeployHandler::startElement(const XMLCh *const name, AttributeLis
if(str == "server")
{
+ string basedir = getAttributeValueWithDefault(attrs, "basedir", "");
+ if(!basedir.empty())
+ {
+ _deployer.overrideBaseDir(basedir);
+ }
+
string kind = getAttributeValue(attrs, "kind");
if(kind == "cpp")
{
@@ -126,7 +132,6 @@ IcePack::ServerDeployHandler::startElement(const XMLCh *const name, AttributeLis
_deployer.addProperty("IceBox.ServiceManager.Endpoints", getAttributeValue(attrs, "endpoints"));
_deployer.createConfigFile("/config/config_icebox");
}
-
}
else if(str == "service")
{
diff --git a/cpp/src/IcePack/ServiceDeployer.cpp b/cpp/src/IcePack/ServiceDeployer.cpp
index 0204f89aa03..523e4f1324b 100644
--- a/cpp/src/IcePack/ServiceDeployer.cpp
+++ b/cpp/src/IcePack/ServiceDeployer.cpp
@@ -55,6 +55,12 @@ IcePack::ServiceDeployHandler::startElement(const XMLCh *const name, AttributeLi
if(str == "service")
{
+ string basedir = getAttributeValueWithDefault(attrs, "basedir", "");
+ if(!basedir.empty())
+ {
+ _deployer.overrideBaseDir(basedir);
+ }
+
string kind = getAttributeValue(attrs, "kind");
if(kind == "standard")
{