[med-svn] [fw4spl] 02/03: Imported Upstream version 0.9.2
Corentin Desfarges
corentin-guest at moszumanska.debian.org
Mon Nov 17 11:24:40 UTC 2014
This is an automated email from the git hooks/post-receive script.
corentin-guest pushed a commit to branch master
in repository fw4spl.
commit 6ab62ba03adab408d398cafbf424b31de301e20f
Author: Corentin Desfarges <corentin.desfarges.dev at gmail.com>
Date: Mon Nov 17 12:18:44 2014 +0100
Imported Upstream version 0.9.2
---
.../src/tuto02DataServiceBasicCtrl/Plugin.cpp | 2 +-
.../{media => LeafUI/monitorQt}/rc/icon-dump.svg | 0
.../src/uiGenericQt/action/SShowAbout.cpp | 2 +-
.../src/uiGenericQt/action/ShowAcknowledgments.cpp | 2 +-
.../{media => LeafUI/uiImageQt}/rc/nowindowing.svg | 0
Bundles/{media => LeafUI/uiImageQt}/rc/ramp.png | Bin
.../{media => LeafUI/uiImageQt}/rc/sliceHide.png | Bin
.../{media => LeafUI/uiImageQt}/rc/sliceShow.png | Bin
Bundles/{media => LeafUI/uiImageQt}/rc/square.png | Bin
.../{media => LeafUI/uiImageQt}/rc/windowing.svg | 0
.../uiImageQt/src/uiImageQt/ShowScanEditor.cpp | 4 +-
.../LeafUI/uiImageQt/src/uiImageQt/WindowLevel.cpp | 8 +-
.../uiMeasurementQt}/rc/distance.png | Bin
.../src/uiMeasurementQt/editor/Distance.cpp | 2 +-
.../src/uiMedDataQt/widget/SelectorModel.cpp | 4 +-
Bundles/{media => LeafUI/uiTF}/rc/delete.png | Bin
Bundles/{media => LeafUI/uiTF}/rc/export.png | Bin
Bundles/{media => LeafUI/uiTF}/rc/import.png | Bin
Bundles/{media => LeafUI/uiTF}/rc/new.png | Bin
Bundles/{media => LeafUI/uiTF}/rc/reinitialize.png | Bin
Bundles/{media => LeafUI/uiTF}/rc/rename.png | Bin
.../uiTF/src/uiTF/TransferFunctionEditor.cpp | 14 +--
.../{media => LeafUI/uiVisuQt}/rc/camera-photo.png | Bin
.../uiVisuQt/src/uiVisuQt/SnapshotEditor.cpp | 2 +-
.../visuVTKAdaptor/src/visuVTKAdaptor/Video.cpp | 2 +-
Bundles/media/CMakeLists.txt | 3 +-
Bundles/media/Properties.cmake | 2 +-
Bundles/media/src/media/media.cpp | 1 -
CMake/cppunit/cppunit_main.cpp | 2 +-
CMakeLists.txt | 105 ++++++---------------
.../fwGui/layoutManager/IFrameLayoutManager.cpp | 4 +-
.../src/fwGui/layoutManager/IMenuLayoutManager.cpp | 2 +-
.../fwGui/layoutManager/IToolBarLayoutManager.cpp | 3 +-
SrcLib/core/fwGuiQt/CMakeLists.txt | 6 +-
SrcLib/core/fwRuntime/src/dl/Native.cpp | 11 ++-
35 files changed, 68 insertions(+), 113 deletions(-)
diff --git a/Apps/Tuto02DataServiceBasicCtrl/src/tuto02DataServiceBasicCtrl/Plugin.cpp b/Apps/Tuto02DataServiceBasicCtrl/src/tuto02DataServiceBasicCtrl/Plugin.cpp
index 2904a0e..277a238 100644
--- a/Apps/Tuto02DataServiceBasicCtrl/src/tuto02DataServiceBasicCtrl/Plugin.cpp
+++ b/Apps/Tuto02DataServiceBasicCtrl/src/tuto02DataServiceBasicCtrl/Plugin.cpp
@@ -60,7 +60,7 @@ void Plugin::initialize() throw( ::fwRuntime::RuntimeException )
::fwServices::IService::ConfigType frameConfig;
frameConfig.put("service.gui.frame.name", "tutoDataServiceBasic");
- frameConfig.put("service.gui.frame.icon", LIBSFW4SPL+"Bundles/Tuto02DataServiceBasicCtrl_0-1/tuto.ico");
+ frameConfig.put("service.gui.frame.icon", SHAREPATH+"Bundles/Tuto02DataServiceBasicCtrl_0-1/tuto.ico");
frameConfig.put("service.gui.frame.minSize.<xmlattr>.width" , "800");
frameConfig.put("service.gui.frame.minSize.<xmlattr>.height", "600");
diff --git a/Bundles/media/rc/icon-dump.svg b/Bundles/LeafUI/monitorQt/rc/icon-dump.svg
similarity index 100%
rename from Bundles/media/rc/icon-dump.svg
rename to Bundles/LeafUI/monitorQt/rc/icon-dump.svg
diff --git a/Bundles/LeafUI/uiGenericQt/src/uiGenericQt/action/SShowAbout.cpp b/Bundles/LeafUI/uiGenericQt/src/uiGenericQt/action/SShowAbout.cpp
index eb29709..2466823 100644
--- a/Bundles/LeafUI/uiGenericQt/src/uiGenericQt/action/SShowAbout.cpp
+++ b/Bundles/LeafUI/uiGenericQt/src/uiGenericQt/action/SShowAbout.cpp
@@ -69,7 +69,7 @@ void SShowAbout::configuring() throw(::fwTools::Failed)
{
const std::string& filename = cfgFilename->getExistingAttributeValue("id");
- m_fsAboutPath = ::boost::filesystem::path( std::string(SHAREPATH) + filename.substr(8) );
+ m_fsAboutPath = ::boost::filesystem::path(std::string(SHAREPATH) + filename);
m_bServiceIsConfigured = ::boost::filesystem::exists(m_fsAboutPath);
SLM_WARN_IF("About file " + filename + " doesn't exist", !m_bServiceIsConfigured);
SLM_TRACE("Filename found '" + filename + "'");
diff --git a/Bundles/LeafUI/uiGenericQt/src/uiGenericQt/action/ShowAcknowledgments.cpp b/Bundles/LeafUI/uiGenericQt/src/uiGenericQt/action/ShowAcknowledgments.cpp
index 75c0104..9901905 100644
--- a/Bundles/LeafUI/uiGenericQt/src/uiGenericQt/action/ShowAcknowledgments.cpp
+++ b/Bundles/LeafUI/uiGenericQt/src/uiGenericQt/action/ShowAcknowledgments.cpp
@@ -59,7 +59,7 @@ void ShowAcknowledgments::configuring() throw(::fwTools::Failed)
if( m_configuration->findConfigurationElement("filename") )
{
std::string filename = m_configuration->findConfigurationElement("filename")->getExistingAttributeValue("id") ;
- m_fsAckPath = ::boost::filesystem::path( std::string(SHAREPATH) + filename.substr(8) ) ;
+ m_fsAckPath = ::boost::filesystem::path(std::string(SHAREPATH) + filename);
m_bServiceIsConfigured = ::boost::filesystem::exists(m_fsAckPath);
OSLM_WARN_IF("Acknowledgments file " <<filename<< " doesn't exist", !m_bServiceIsConfigured);
OSLM_TRACE("Filename found " << filename ) ;
diff --git a/Bundles/media/rc/nowindowing.svg b/Bundles/LeafUI/uiImageQt/rc/nowindowing.svg
similarity index 100%
rename from Bundles/media/rc/nowindowing.svg
rename to Bundles/LeafUI/uiImageQt/rc/nowindowing.svg
diff --git a/Bundles/media/rc/ramp.png b/Bundles/LeafUI/uiImageQt/rc/ramp.png
similarity index 100%
rename from Bundles/media/rc/ramp.png
rename to Bundles/LeafUI/uiImageQt/rc/ramp.png
diff --git a/Bundles/media/rc/sliceHide.png b/Bundles/LeafUI/uiImageQt/rc/sliceHide.png
similarity index 100%
rename from Bundles/media/rc/sliceHide.png
rename to Bundles/LeafUI/uiImageQt/rc/sliceHide.png
diff --git a/Bundles/media/rc/sliceShow.png b/Bundles/LeafUI/uiImageQt/rc/sliceShow.png
similarity index 100%
rename from Bundles/media/rc/sliceShow.png
rename to Bundles/LeafUI/uiImageQt/rc/sliceShow.png
diff --git a/Bundles/media/rc/square.png b/Bundles/LeafUI/uiImageQt/rc/square.png
similarity index 100%
rename from Bundles/media/rc/square.png
rename to Bundles/LeafUI/uiImageQt/rc/square.png
diff --git a/Bundles/media/rc/windowing.svg b/Bundles/LeafUI/uiImageQt/rc/windowing.svg
similarity index 100%
rename from Bundles/media/rc/windowing.svg
rename to Bundles/LeafUI/uiImageQt/rc/windowing.svg
diff --git a/Bundles/LeafUI/uiImageQt/src/uiImageQt/ShowScanEditor.cpp b/Bundles/LeafUI/uiImageQt/src/uiImageQt/ShowScanEditor.cpp
index 65ecea3..4735f51 100644
--- a/Bundles/LeafUI/uiImageQt/src/uiImageQt/ShowScanEditor.cpp
+++ b/Bundles/LeafUI/uiImageQt/src/uiImageQt/ShowScanEditor.cpp
@@ -63,11 +63,11 @@ void ShowScanEditor::starting() throw(::fwTools::Failed)
QWidget* const container = qtContainer->getQtContainer();
SLM_ASSERT("container not instanced", container);
- ::boost::filesystem::path pathImageScan (std::string(SHAREPATH)+"media_0-1/sliceShow.png");
+ ::boost::filesystem::path pathImageScan (std::string(SHAREPATH) + "Bundles/uiImageQt_" + std::string(UIIMAGEQT_VER) + "/sliceShow.png");
OSLM_ASSERT("Image "<< pathImageScan << "is missing", ::boost::filesystem::exists(pathImageScan));
m_imageShowScan = QIcon(QString::fromStdString(pathImageScan.string()));
- pathImageScan = std::string(SHAREPATH)+"media_0-1/sliceHide.png";
+ pathImageScan = std::string(SHAREPATH) + "Bundles/uiImageQt_" + std::string(UIIMAGEQT_VER) + "/sliceHide.png";
OSLM_ASSERT("Image "<< pathImageScan << "is missing", ::boost::filesystem::exists(pathImageScan));
m_imageHideScan = QIcon(QString::fromStdString(pathImageScan.string()));
diff --git a/Bundles/LeafUI/uiImageQt/src/uiImageQt/WindowLevel.cpp b/Bundles/LeafUI/uiImageQt/src/uiImageQt/WindowLevel.cpp
index a5e5e3d..c402880 100644
--- a/Bundles/LeafUI/uiImageQt/src/uiImageQt/WindowLevel.cpp
+++ b/Bundles/LeafUI/uiImageQt/src/uiImageQt/WindowLevel.cpp
@@ -94,8 +94,8 @@ void WindowLevel::starting() throw(::fwTools::Failed)
m_toggleTFButton = new QToolButton(container);
QIcon ico;
- QString squareIcon(SHAREPATH "media_0-1/square.png");
- QString rampIcon(SHAREPATH "media_0-1/ramp.png");
+ QString squareIcon(SHAREPATH "Bundles/uiImageQt_" UIIMAGEQT_VER "/square.png");
+ QString rampIcon(SHAREPATH "Bundles/uiImageQt_" UIIMAGEQT_VER "/ramp.png");
ico.addPixmap(QPixmap(squareIcon), QIcon::Normal,QIcon::On);
ico.addPixmap(QPixmap(rampIcon), QIcon::Normal,QIcon::Off);
m_toggleTFButton->setIcon(ico);
@@ -103,9 +103,9 @@ void WindowLevel::starting() throw(::fwTools::Failed)
m_toggleAutoButton = new QToolButton(container);
QIcon icon;
- QString windo(SHAREPATH "media_0-1/windowing.svg");
+ QString windo(SHAREPATH "Bundles/uiImageQt_" UIIMAGEQT_VER "/windowing.svg");
icon.addFile(windo, QSize(), QIcon::Normal,QIcon::On);
- QString nowindo(SHAREPATH "media_0-1/nowindowing.svg");
+ QString nowindo(SHAREPATH "Bundles/uiImageQt_" UIIMAGEQT_VER "/nowindowing.svg");
icon.addFile(nowindo, QSize(), QIcon::Normal,QIcon::Off);
m_toggleAutoButton->setIcon(icon);
m_toggleAutoButton->setToolTip("Automatic Windowing");
diff --git a/Bundles/media/rc/distance.png b/Bundles/LeafUI/uiMeasurementQt/rc/distance.png
similarity index 100%
rename from Bundles/media/rc/distance.png
rename to Bundles/LeafUI/uiMeasurementQt/rc/distance.png
diff --git a/Bundles/LeafUI/uiMeasurementQt/src/uiMeasurementQt/editor/Distance.cpp b/Bundles/LeafUI/uiMeasurementQt/src/uiMeasurementQt/editor/Distance.cpp
index e8d4be3..2af67cc 100644
--- a/Bundles/LeafUI/uiMeasurementQt/src/uiMeasurementQt/editor/Distance.cpp
+++ b/Bundles/LeafUI/uiMeasurementQt/src/uiMeasurementQt/editor/Distance.cpp
@@ -63,7 +63,7 @@ void Distance::starting() throw(::fwTools::Failed)
SLM_ASSERT("container not instanced", container);
namespace fs = ::boost::filesystem;
- fs::path pathImageDist (std::string(SHAREPATH)+"media_0-1/distance.png");
+ fs::path pathImageDist (std::string(SHAREPATH) + "Bundles/uiMeasurementQt_0-1/distance.png");
OSLM_ASSERT("Image "<< pathImageDist << "is missing", fs::exists(pathImageDist));
QIcon imageDist(QString::fromStdString(pathImageDist.string()));
diff --git a/Bundles/LeafUI/uiMedDataQt/src/uiMedDataQt/widget/SelectorModel.cpp b/Bundles/LeafUI/uiMedDataQt/src/uiMedDataQt/widget/SelectorModel.cpp
index 2a55393..00570c5 100644
--- a/Bundles/LeafUI/uiMedDataQt/src/uiMedDataQt/widget/SelectorModel.cpp
+++ b/Bundles/LeafUI/uiMedDataQt/src/uiMedDataQt/widget/SelectorModel.cpp
@@ -298,11 +298,11 @@ void SelectorModel::addSeriesIcon(::fwMedData::Series::sptr series, QStandardIte
::fwMedData::ActivitySeries::sptr activitySeries = ::fwMedData::ActivitySeries::dynamicCast(series);
if(imageSeries)
{
- item->setIcon(QIcon(QString((std::string(SHAREPATH) + "media_0-1/icons/ImageSeries.svg").c_str())));
+ item->setIcon(QIcon(QString((std::string(SHAREPATH) + "Bundles/media_0-1/icons/ImageSeries.svg").c_str())));
}
else if (modelSeries)
{
- item->setIcon(QIcon(QString((std::string(SHAREPATH) + "media_0-1/icons/ModelSeries.svg").c_str())));
+ item->setIcon(QIcon(QString((std::string(SHAREPATH) + "Bundles/media_0-1/icons/ModelSeries.svg").c_str())));
}
else if (activitySeries)
{
diff --git a/Bundles/media/rc/delete.png b/Bundles/LeafUI/uiTF/rc/delete.png
similarity index 100%
rename from Bundles/media/rc/delete.png
rename to Bundles/LeafUI/uiTF/rc/delete.png
diff --git a/Bundles/media/rc/export.png b/Bundles/LeafUI/uiTF/rc/export.png
similarity index 100%
rename from Bundles/media/rc/export.png
rename to Bundles/LeafUI/uiTF/rc/export.png
diff --git a/Bundles/media/rc/import.png b/Bundles/LeafUI/uiTF/rc/import.png
similarity index 100%
rename from Bundles/media/rc/import.png
rename to Bundles/LeafUI/uiTF/rc/import.png
diff --git a/Bundles/media/rc/new.png b/Bundles/LeafUI/uiTF/rc/new.png
similarity index 100%
rename from Bundles/media/rc/new.png
rename to Bundles/LeafUI/uiTF/rc/new.png
diff --git a/Bundles/media/rc/reinitialize.png b/Bundles/LeafUI/uiTF/rc/reinitialize.png
similarity index 100%
rename from Bundles/media/rc/reinitialize.png
rename to Bundles/LeafUI/uiTF/rc/reinitialize.png
diff --git a/Bundles/media/rc/rename.png b/Bundles/LeafUI/uiTF/rc/rename.png
similarity index 100%
rename from Bundles/media/rc/rename.png
rename to Bundles/LeafUI/uiTF/rc/rename.png
diff --git a/Bundles/LeafUI/uiTF/src/uiTF/TransferFunctionEditor.cpp b/Bundles/LeafUI/uiTF/src/uiTF/TransferFunctionEditor.cpp
index 5618e34..0f3f362 100644
--- a/Bundles/LeafUI/uiTF/src/uiTF/TransferFunctionEditor.cpp
+++ b/Bundles/LeafUI/uiTF/src/uiTF/TransferFunctionEditor.cpp
@@ -96,27 +96,27 @@ void TransferFunctionEditor::starting() throw( ::fwTools::Failed )
// Buttons creation
m_pTransferFunctionPreset = new QComboBox(m_container);
- ::boost::filesystem::path deletePath (std::string(SHAREPATH)+"media_0-1/delete.png");
+ ::boost::filesystem::path deletePath (std::string(SHAREPATH) + "Bundles/uiTF_" + std::string(UITF_VER) + "/delete.png");
m_deleteButton = new QPushButton(QIcon(deletePath.string().c_str()), "", m_container);
m_deleteButton->setToolTip(QString("Delete"));
- ::boost::filesystem::path newPath (std::string(SHAREPATH)+"media_0-1/new.png");
+ ::boost::filesystem::path newPath (std::string(SHAREPATH) + "Bundles/uiTF_" + std::string(UITF_VER) + "/new.png");
m_newButton = new QPushButton(QIcon(newPath.string().c_str()), "", m_container);
m_newButton->setToolTip(QString("New"));
- ::boost::filesystem::path reinitializePath (std::string(SHAREPATH)+"media_0-1/reinitialize.png");
+ ::boost::filesystem::path reinitializePath (std::string(SHAREPATH) + "Bundles/uiTF_" + std::string(UITF_VER) + "/reinitialize.png");
m_reinitializeButton = new QPushButton(QIcon(reinitializePath.string().c_str()), "", m_container);
m_reinitializeButton->setToolTip(QString("Reinitialize"));
- ::boost::filesystem::path renamePath (std::string(SHAREPATH)+"media_0-1/rename.png");
+ ::boost::filesystem::path renamePath (std::string(SHAREPATH) + "Bundles/uiTF_" + std::string(UITF_VER) + "/rename.png");
m_renameButton = new QPushButton(QIcon(renamePath.string().c_str()), "", m_container);
m_renameButton->setToolTip(QString("Rename"));
- ::boost::filesystem::path importPath (std::string(SHAREPATH)+"media_0-1/import.png");
+ ::boost::filesystem::path importPath (std::string(SHAREPATH) + "Bundles/uiTF_" + std::string(UITF_VER) + "/import.png");
m_importButton = new QPushButton(QIcon(importPath.string().c_str()), "", m_container);
m_importButton->setToolTip(QString("Import"));
- ::boost::filesystem::path exportPath (std::string(SHAREPATH)+"media_0-1/export.png");
+ ::boost::filesystem::path exportPath (std::string(SHAREPATH) + "Bundles/uiTF_" + std::string(UITF_VER) + "/export.png");
m_exportButton = new QPushButton(QIcon(exportPath.string().c_str()), "", m_container);
m_exportButton->setToolTip(QString("Export"));
@@ -474,7 +474,7 @@ void TransferFunctionEditor::initTransferFunctions()
{
// Parse all TF contained in uiTF Bundle's resources
std::vector< ::boost::filesystem::path > paths;
- ::boost::filesystem::path pathRoot (std::string(LIBSFW4SPL)+"Bundles/uiTF_" + std::string(UITF_VER) + "/tf");
+ ::boost::filesystem::path pathRoot (std::string(SHAREPATH) + "Bundles/uiTF_" + std::string(UITF_VER) + "/tf");
for(::boost::filesystem::directory_iterator it(pathRoot);
it != ::boost::filesystem::directory_iterator();
++it )
diff --git a/Bundles/media/rc/camera-photo.png b/Bundles/LeafUI/uiVisuQt/rc/camera-photo.png
similarity index 100%
rename from Bundles/media/rc/camera-photo.png
rename to Bundles/LeafUI/uiVisuQt/rc/camera-photo.png
diff --git a/Bundles/LeafUI/uiVisuQt/src/uiVisuQt/SnapshotEditor.cpp b/Bundles/LeafUI/uiVisuQt/src/uiVisuQt/SnapshotEditor.cpp
index d50d216..b701ec9 100644
--- a/Bundles/LeafUI/uiVisuQt/src/uiVisuQt/SnapshotEditor.cpp
+++ b/Bundles/LeafUI/uiVisuQt/src/uiVisuQt/SnapshotEditor.cpp
@@ -65,7 +65,7 @@ void SnapshotEditor::starting() throw(::fwTools::Failed)
::fwGuiQt::container::QtContainer::sptr qtContainer = ::fwGuiQt::container::QtContainer::dynamicCast( this->getContainer() );
QWidget *container = qtContainer->getQtContainer();
- ::boost::filesystem::path path(std::string(SHAREPATH)+"media_0-1/camera-photo.png");
+ ::boost::filesystem::path path(std::string(SHAREPATH) + "Bundles/uiVisuQt_" + std::string(UIVISUQT_VER) + "/camera-photo.png");
QIcon icon(QString::fromStdString(path.string()));
m_snapButton = new QPushButton(icon, "", container);
m_snapButton->setToolTip(QObject::tr("Snapshot"));
diff --git a/Bundles/LeafVisu/visuVTKAdaptor/src/visuVTKAdaptor/Video.cpp b/Bundles/LeafVisu/visuVTKAdaptor/src/visuVTKAdaptor/Video.cpp
index e8a58e7..b9e0e19 100644
--- a/Bundles/LeafVisu/visuVTKAdaptor/src/visuVTKAdaptor/Video.cpp
+++ b/Bundles/LeafVisu/visuVTKAdaptor/src/visuVTKAdaptor/Video.cpp
@@ -121,7 +121,7 @@ void Video::doUpdate() throw(fwTools::Failed)
bText_init = true;
vtkProperty *property = this->getActor()->GetProperty();
- ::boost::filesystem::path pathShader ( std::string(LIBSFW4SPL) + "Bundles/visuVTKAdaptor_" + std::string(VISUVTKADAPTOR_VER) + "/video.xml" );
+ ::boost::filesystem::path pathShader ( std::string(SHAREPATH) + "Bundles/visuVTKAdaptor_" + std::string(VISUVTKADAPTOR_VER) + "/video.xml" );
property->LoadMaterial(pathShader.string().c_str());
property->SetTexture("texture", m_texture);
property->ShadingOn();
diff --git a/Bundles/media/CMakeLists.txt b/Bundles/media/CMakeLists.txt
index 15cd4c1..092911b 100644
--- a/Bundles/media/CMakeLists.txt
+++ b/Bundles/media/CMakeLists.txt
@@ -1 +1,2 @@
-fwLoadProperties()
+fwBundle(media 0.1)
+
diff --git a/Bundles/media/Properties.cmake b/Bundles/media/Properties.cmake
index 91ca06c..6f13511 100644
--- a/Bundles/media/Properties.cmake
+++ b/Bundles/media/Properties.cmake
@@ -1,7 +1,7 @@
set( NAME media )
set( VERSION 0.1 )
-set( TYPE LIBRARY )
+set( TYPE BUNDLE )
set( DEPENDENCIES )
set( REQUIREMENTS )
diff --git a/Bundles/media/src/media/media.cpp b/Bundles/media/src/media/media.cpp
deleted file mode 100644
index e6a00e9..0000000
--- a/Bundles/media/src/media/media.cpp
+++ /dev/null
@@ -1 +0,0 @@
-namespace media{}
diff --git a/CMake/cppunit/cppunit_main.cpp b/CMake/cppunit/cppunit_main.cpp
index 94a1f45..1c3e225 100644
--- a/CMake/cppunit/cppunit_main.cpp
+++ b/CMake/cppunit/cppunit_main.cpp
@@ -32,7 +32,7 @@ public:
MiniLauncher( ::boost::filesystem::path profilePath )
{
#ifdef SPECIALINSTALL
- ::boost::filesystem::path cwd = LIBSFW4SPL;
+ ::boost::filesystem::path cwd = SHAREPATH;
#else
::boost::filesystem::path cwd = ::boost::filesystem::current_path();
#endif
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fe7145c..aa5cd73 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,27 +10,28 @@ include(CMakeParseArguments)
option(CLASSIC_INSTALL ON)
set(CLASSIC_INSTALL OFF)
+set( EXTERNAL_LIBRARIES ${CMAKE_CURRENT_SOURCE_DIR}/CMake/Modules/ )
if(CLASSIC_INSTALL)
set( LIBRARY_OUTPUT_DIR "lib" )
- set( RUNTIME_OUTPUT_DIR "bin" )
+ set( SHARE_OUTPUT_DIR "share" )
add_definitions( -DLIBSFW4SPL=\"\" )
add_definitions( -DBUNDLEPATH=\"\" )
add_definitions( -DSHAREPATH=\"\" )
else()
set( CMAKE_BUILD_TYPE Release)
- set( LIBRARY_OUTPUT_DIR "/usr/lib/fw4spl/" )
- set( RUNTIME_OUTPUT_DIR "/usr/bin/" )
- set( CMAKE_INSTALL_PREFIX /usr/local )
- set( EXTERNAL_LIBRARIES ${CMAKE_CURRENT_SOURCE_DIR}/CMake/Modules/ )
- set( BUNDLE_PATH "/usr/lib/fw4spl/Bundles/" )
- set( SHARE_PATH "/usr/share/fw4spl/" )
+ set( CMAKE_INSTALL_PREFIX /usr )
+ set( PROJECTS_TO_BUILD VRRender )
+ set( PROJECTS_TO_INSTALL VRRender )
+ set( SHARE_OUTPUT_DIR "share/fw4spl" )
+ set( LIBRARY_OUTPUT_DIR "lib/fw4spl" )
add_definitions( -DSPECIALINSTALL )
add_definitions( -DLIBSFW4SPL=\"/usr/lib/fw4spl/\" )
- add_definitions( -DBUNDLEPATH=\"/usr/lib/fw4spl/Bundles/\" )
+ add_definitions( -DBUNDLEPATH=\"/usr/share/fw4spl/Bundles/\" )
add_definitions( -DSHAREPATH=\"/usr/share/fw4spl/\" )
endif()
+set( RUNTIME_OUTPUT_DIR "bin" )
set(BUILD_SHARED_LIBS ON)
@@ -49,13 +50,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${RUNTIME_OUTPUT_DIR})
-if(CLASSIC_INSTALL)
- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${LIBRARY_OUTPUT_DIR})
- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${LIBRARY_OUTPUT_DIR})
-else()
- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_DIR})
- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_DIR})
-endif()
+
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${LIBRARY_OUTPUT_DIR})
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${LIBRARY_OUTPUT_DIR})
+
set(SPYLOG_LEVEL "error" CACHE STRING "Log level")
set(SPYLOG_LEVEL_VALUES "fatal;error;warning;info;debug;trace" CACHE INTERNAL
@@ -170,9 +168,6 @@ macro(createResourcesTarget TARGET RES_DIR TARGET_DIR)
-P ${FWCMAKE_RESOURCE_PATH}/build/configure_file.cmake
)
set(COPY_DEPENDS "${FWCMAKE_RESOURCE_PATH}/build/configure_file.cmake" )
- elseif("${TARGET_DIR}/${REL_PATH}" MATCHES "(.*)about(.*)" OR "${TARGET_DIR}/${REL_PATH}" MATCHES "(.*)documentations(.*)")
- set(COPY_COMMAND cmake -E copy "${RES_DIR}/${REL_PATH}" "${SHARE_PATH}VRRender_0-9/${REL_PATH}")
- set(COPY_DEPENDS )
else()
set(COPY_COMMAND cmake -E copy "${RES_DIR}/${REL_PATH}" "${TARGET_DIR}/${REL_PATH}")
set(COPY_DEPENDS )
@@ -196,11 +191,7 @@ macro(createResourcesInstallTarget RES_DIR CONFIGURED_FILES_DIR DESTINATION)
foreach(RESOURCE_FILE ${RESOURCES_FILES})
file(RELATIVE_PATH REL_PATH "${RES_DIR}" "${RESOURCE_FILE}")
get_filename_component(RC_REL_DIR "${REL_PATH}" DIRECTORY)
- if(RESOURCE_FILE MATCHES "(.*)Apps/VRRender/rc/about(.*)" OR RESOURCE_FILE MATCHES "(.*)Apps/VRRender/rc/documentations(.*)")
- install(FILES "${SHARE_PATH}VRRender_0-9/${REL_PATH}" DESTINATION "${SHARE_PATH}VRRender_0-9/${RC_REL_DIR}" )
- else()
- install(FILES "${CONFIGURED_FILES_DIR}/${REL_PATH}" DESTINATION "${DESTINATION}/${RC_REL_DIR}" )
- endif()
+ install(FILES "${CONFIGURED_FILES_DIR}/${REL_PATH}" DESTINATION "${SHARE_OUTPUT_DIR}/${DESTINATION}/${RC_REL_DIR}" )
unset(RC_REL_DIR)
endforeach()
endmacro()
@@ -229,21 +220,13 @@ macro(fwExec FWPROJECT_NAME PROJECT_VERSION)
configureProject( ${FWPROJECT_NAME} ${PROJECT_VERSION} )
if(EXISTS "${PRJ_SOURCE_DIR}/rc")
- if(CLASSIC_INSTALL)
- set(${FWPROJECT_NAME}_RC_BUILD_DIR "${CMAKE_BINARY_DIR}/share/${FWPROJECT_NAME}_${DASH_VERSION}")
- else()
- set(${FWPROJECT_NAME}_RC_BUILD_DIR "${SHARE_PATH}${FWPROJECT_NAME}_${DASH_VERSION}")
- endif()
+ set(${FWPROJECT_NAME}_RC_BUILD_DIR "${CMAKE_BINARY_DIR}/${SHARE_OUTPUT_DIR}/${FWPROJECT_NAME}_${DASH_VERSION}")
createResourcesTarget( ${FWPROJECT_NAME}_rc "${PRJ_SOURCE_DIR}/rc" "${${FWPROJECT_NAME}_RC_BUILD_DIR}" )
add_dependencies( ${FWPROJECT_NAME} ${FWPROJECT_NAME}_rc )
if(${FWPROJECT_NAME}_INSTALL)
- if(CLASSIC_INSTALL)
- createResourcesInstallTarget( "${PRJ_SOURCE_DIR}/rc" "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "share/${FWPROJECT_NAME}_${DASH_VERSION}" )
- else()
- createResourcesInstallTarget( "${PRJ_SOURCE_DIR}/rc" "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "${SHARE_PATH}${FWPROJECT_NAME}_${DASH_VERSION}" )
- endif()
+ createResourcesInstallTarget( "${PRJ_SOURCE_DIR}/rc" "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "${FWPROJECT_NAME}_${DASH_VERSION}" )
endif()
endif()
@@ -278,29 +261,21 @@ macro(fwCppunitTest FWPROJECT_NAME)
)
if(fwCppunitTest_BUNDLE)
- if(CLASSIC_INSTALL)
- add_definitions(-DBUNDLE_TEST_PROFILE=\"share/tu_exec_${fwCppunitTest_BUNDLE}_0-0/profile.xml\")
- else()
- add_definitions(-DBUNDLE_TEST_PROFILE=\"${SHARE_PATH}tu_exec_${fwCppunitTest_BUNDLE}_0-0/profile.xml\")
- endif()
+ add_definitions(-DBUNDLE_TEST_PROFILE=\"${SHARE_OUTPUT_DIR}/tu_exec_${fwCppunitTest_BUNDLE}_0-0/profile.xml\")
endif()
configureProject( ${FWPROJECT_NAME} 0.0 )
if(EXISTS "${PRJ_SOURCE_DIR}/tu/rc")
string(REGEX REPLACE "Test$" "" DIRNAME "${FWPROJECT_NAME}")
- if(CLASSIC_INSTALL)
- set(${FWPROJECT_NAME}_RC_BUILD_DIR "${CMAKE_BINARY_DIR}/share/tu_exec_${DIRNAME}_${DASH_VERSION}")
- else()
- set(${FWPROJECT_NAME}_RC_BUILD_DIR "${SHARE_PATH}tu_exec_${DIRNAME}_${DASH_VERSION}")
- endif()
+ set(${FWPROJECT_NAME}_RC_BUILD_DIR "${CMAKE_BINARY_DIR}/${SHARE_OUTPUT_DIR}/tu_exec_${DIRNAME}_${DASH_VERSION}")
createResourcesTarget( ${FWPROJECT_NAME}_rc "${PRJ_SOURCE_DIR}/tu/rc" "${${FWPROJECT_NAME}_RC_BUILD_DIR}" )
add_dependencies( ${FWPROJECT_NAME} ${FWPROJECT_NAME}_rc )
if(${FWPROJECT_NAME}_INSTALL)
createResourcesInstallTarget( "${PRJ_SOURCE_DIR}/tu/rc"
"${${FWPROJECT_NAME}_RC_BUILD_DIR}"
- "share/tu_exec_${DIRNAME}_${DASH_VERSION}" )
+ "unittest/tu_exec_${DIRNAME}_${DASH_VERSION}" )
endif()
endif()
@@ -325,20 +300,12 @@ macro(fwLib FWPROJECT_NAME PROJECT_VERSION)
configureProject( ${FWPROJECT_NAME} ${PROJECT_VERSION} )
if(EXISTS "${PRJ_SOURCE_DIR}/rc")
- if(CLASSIC_INSTALL)
- set(${FWPROJECT_NAME}_RC_BUILD_DIR "${CMAKE_BINARY_DIR}/share/${FWPROJECT_NAME}_${DASH_VERSION}")
- else()
- set(${FWPROJECT_NAME}_RC_BUILD_DIR "${SHARE_PATH}${FWPROJECT_NAME}_${DASH_VERSION}")
- endif()
+ set(${FWPROJECT_NAME}_RC_BUILD_DIR "${CMAKE_BINARY_DIR}/${SHARE_OUTPUT_DIR}/${FWPROJECT_NAME}_${DASH_VERSION}")
createResourcesTarget( ${FWPROJECT_NAME}_rc "${PRJ_SOURCE_DIR}/rc" "${${FWPROJECT_NAME}_RC_BUILD_DIR}" )
add_dependencies( ${FWPROJECT_NAME} ${FWPROJECT_NAME}_rc )
if(${FWPROJECT_NAME}_INSTALL)
- if(CLASSIC_INSTALL)
- createResourcesInstallTarget( "${PRJ_SOURCE_DIR}/rc" "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "share/${FWPROJECT_NAME}_${DASH_VERSION}" )
- else()
- createResourcesInstallTarget( "${PRJ_SOURCE_DIR}/rc" "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "${SHARE_PATH}${FWPROJECT_NAME}_${DASH_VERSION}" )
- endif()
+ createResourcesInstallTarget( "${PRJ_SOURCE_DIR}/rc" "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "${FWPROJECT_NAME}_${DASH_VERSION}" )
endif()
endif()
@@ -362,11 +329,7 @@ macro(fwBundle FWPROJECT_NAME PROJECT_VERSION)
set(${FWPROJECT_NAME}_TYPE ${${FWPROJECT_NAME}_TYPE} PARENT_SCOPE)
setVersion(${FWPROJECT_NAME} ${PROJECT_VERSION})
- if(CLASSIC_INSTALL)
- set(BUNDLE_DIR "${CMAKE_BINARY_DIR}/Bundles/${FWPROJECT_NAME}_${DASH_VERSION}")
- else()
- set(BUNDLE_DIR "${BUNDLE_PATH}${FWPROJECT_NAME}_${DASH_VERSION}")
- endif()
+ set(BUNDLE_DIR "${CMAKE_BINARY_DIR}/Bundles/${FWPROJECT_NAME}_${DASH_VERSION}")
if(EXISTS "${PRJ_SOURCE_DIR}/src")
add_library( ${FWPROJECT_NAME} SHARED ${ARGN} ${${FWPROJECT_NAME}_HEADERS} ${${FWPROJECT_NAME}_SOURCES})
@@ -380,19 +343,11 @@ macro(fwBundle FWPROJECT_NAME PROJECT_VERSION)
#install(DIRECTORY "${BUNDLE_DIR}" DESTINATION VRRender.app/Bundles COMPONENT Runtime)
if(${FWPROJECT_NAME}_INSTALL)
- if(CLASSIC_INSTALL)
- install(TARGETS ${FWPROJECT_NAME}
- RUNTIME DESTINATION Bundles/${FWPROJECT_NAME}_${DASH_VERSION}
- LIBRARY DESTINATION Bundles/${FWPROJECT_NAME}_${DASH_VERSION}
- OPTIONAL
- )
- else()
- install(TARGETS ${FWPROJECT_NAME}
- RUNTIME DESTINATION ${BUNDLE_PATH}${FWPROJECT_NAME}_${DASH_VERSION}
- LIBRARY DESTINATION ${BUNDLE_PATH}${FWPROJECT_NAME}_${DASH_VERSION}
- OPTIONAL
- )
- endif()
+ install(TARGETS ${FWPROJECT_NAME}
+ RUNTIME DESTINATION ${LIBRARY_OUTPUT_DIR}/Bundles/${FWPROJECT_NAME}_${DASH_VERSION}
+ LIBRARY DESTINATION ${LIBRARY_OUTPUT_DIR}/Bundles/${FWPROJECT_NAME}_${DASH_VERSION}
+ OPTIONAL
+ )
endif()
else()
@@ -404,11 +359,7 @@ macro(fwBundle FWPROJECT_NAME PROJECT_VERSION)
add_dependencies( ${FWPROJECT_NAME} ${FWPROJECT_NAME}_rc )
if(${FWPROJECT_NAME}_INSTALL)
- if(CLASSIC_INSTALL)
- createResourcesInstallTarget( "${PRJ_SOURCE_DIR}/rc" "${BUNDLE_DIR}" Bundles/${FWPROJECT_NAME}_${DASH_VERSION} )
- else()
- createResourcesInstallTarget( "${PRJ_SOURCE_DIR}/rc" "${BUNDLE_DIR}" ${BUNDLE_PATH}${FWPROJECT_NAME}_${DASH_VERSION} )
- endif()
+ createResourcesInstallTarget( "${PRJ_SOURCE_DIR}/rc" "${BUNDLE_DIR}" Bundles/${FWPROJECT_NAME}_${DASH_VERSION} )
endif()
endif()
diff --git a/SrcLib/core/fwGui/src/fwGui/layoutManager/IFrameLayoutManager.cpp b/SrcLib/core/fwGui/src/fwGui/layoutManager/IFrameLayoutManager.cpp
index 990a7d0..63d01ce 100644
--- a/SrcLib/core/fwGui/src/fwGui/layoutManager/IFrameLayoutManager.cpp
+++ b/SrcLib/core/fwGui/src/fwGui/layoutManager/IFrameLayoutManager.cpp
@@ -71,11 +71,9 @@ void IFrameLayoutManager::initialize( ConfigurationType configuration)
m_frameInfo.m_name = name.at(0)->getValue();
}
-
if(!icon.empty())
{
-
- m_frameInfo.m_iconPath = ::boost::filesystem::path(SHAREPATH+icon.at(0)->getValue().substr(8));
+ m_frameInfo.m_iconPath = ::boost::filesystem::path(SHAREPATH + icon.at(0)->getValue() ) ;
OSLM_ASSERT("Sorry, icon "<< m_frameInfo.m_iconPath << " doesn't exist", ::boost::filesystem::exists(m_frameInfo.m_iconPath));
}
diff --git a/SrcLib/core/fwGui/src/fwGui/layoutManager/IMenuLayoutManager.cpp b/SrcLib/core/fwGui/src/fwGui/layoutManager/IMenuLayoutManager.cpp
index 79de167..040b97b 100644
--- a/SrcLib/core/fwGui/src/fwGui/layoutManager/IMenuLayoutManager.cpp
+++ b/SrcLib/core/fwGui/src/fwGui/layoutManager/IMenuLayoutManager.cpp
@@ -65,7 +65,7 @@ void IMenuLayoutManager::initialize( ConfigurationType configuration)
if( menuItem->hasAttribute("icon") )
{
- info.m_icon = SHAREPATH+menuItem->getExistingAttributeValue("icon").substr(8) ;
+ info.m_icon = SHAREPATH + menuItem->getExistingAttributeValue("icon") ;
}
if( menuItem->hasAttribute("style") )
diff --git a/SrcLib/core/fwGui/src/fwGui/layoutManager/IToolBarLayoutManager.cpp b/SrcLib/core/fwGui/src/fwGui/layoutManager/IToolBarLayoutManager.cpp
index 7c1b3aa..0ea7f78 100644
--- a/SrcLib/core/fwGui/src/fwGui/layoutManager/IToolBarLayoutManager.cpp
+++ b/SrcLib/core/fwGui/src/fwGui/layoutManager/IToolBarLayoutManager.cpp
@@ -15,6 +15,7 @@
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
+
#include "fwGui/layoutManager/IToolBarLayoutManager.hpp"
namespace fwGui
@@ -60,7 +61,7 @@ void IToolBarLayoutManager::initialize( ConfigurationType configuration)
if( toolBarItem->hasAttribute("icon") )
{
- info.m_icon = SHAREPATH+toolBarItem->getExistingAttributeValue("icon").substr(8) ;
+ info.m_icon = SHAREPATH + toolBarItem->getExistingAttributeValue("icon") ;
}
if( toolBarItem->hasAttribute("style") )
diff --git a/SrcLib/core/fwGuiQt/CMakeLists.txt b/SrcLib/core/fwGuiQt/CMakeLists.txt
index 0b3246b..dc44b01 100644
--- a/SrcLib/core/fwGuiQt/CMakeLists.txt
+++ b/SrcLib/core/fwGuiQt/CMakeLists.txt
@@ -6,11 +6,7 @@ fwUseForwardInclude(
fwTools
)
-if(CLASSIC_INSTALL)
- configure_file("${CMAKE_CURRENT_LIST_DIR}/bin/qt.conf" "${CMAKE_BINARY_DIR}/bin/qt.conf")
-else()
- configure_file("${CMAKE_CURRENT_LIST_DIR}/bin/qt.conf" "${BINFW4SPL}/qt.conf")
-endif()
+configure_file("${CMAKE_CURRENT_LIST_DIR}/bin/qt.conf" "${CMAKE_BINARY_DIR}/bin/qt.conf")
if(${FWPROJECT_NAME}_INSTALL)
if(CLASSIC_INSTALL)
diff --git a/SrcLib/core/fwRuntime/src/dl/Native.cpp b/SrcLib/core/fwRuntime/src/dl/Native.cpp
index 511f7a5..6133be8 100644
--- a/SrcLib/core/fwRuntime/src/dl/Native.cpp
+++ b/SrcLib/core/fwRuntime/src/dl/Native.cpp
@@ -45,6 +45,11 @@ const ::boost::filesystem::path Native::getFullPath( const bool _bMustBeFile ) c
::boost::filesystem::path result = m_bundle->getLocation() / getPath();
+ //replace usr/share by usr/lib to find .so
+ std::string tmp_result = result.string();
+ tmp_result.replace(tmp_result.find("/usr/share"),tmp_result.find("/usr/share")+10,"/usr/lib");
+ result = tmp_result;
+
// Test that the result path exists.
if(result.empty())
{
@@ -77,8 +82,12 @@ const ::boost::filesystem::path Native::getPath() const throw(RuntimeException)
SLM_ASSERT("bundle not initialized", m_bundle != 0 );
::boost::filesystem::path result;
+
+ std::string sFullModulePath = (m_bundle->getLocation() / m_modulePath).string();
+ //replace usr/share by usr/lib to find .so
+ sFullModulePath.replace(sFullModulePath.find("/usr/share"),sFullModulePath.find("/usr/share")+10,"/usr/lib");
- const ::boost::filesystem::path fullModulePath( m_bundle->getLocation() / m_modulePath );
+ const ::boost::filesystem::path fullModulePath( sFullModulePath );
#if BOOST_FILESYSTEM_VERSION > 2
const ::boost::regex nativeFileRegex( m_nameDecorator->getNativeName(fullModulePath.filename().string()) );
#else
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/fw4spl.git
More information about the debian-med-commit
mailing list