From a92a4d8ae0373b7e45cba62c8f84c2196030a269 Mon Sep 17 00:00:00 2001 From: Juan Prieto Date: Tue, 15 Sep 2009 11:32:40 +0000 Subject: [PATCH 01/16] *** empty log message *** --- src/creaSystem.cxx | 12 ++++++++++++ src/creaSystem.h | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/creaSystem.cxx b/src/creaSystem.cxx index 65311af..460bb7f 100644 --- a/src/creaSystem.cxx +++ b/src/creaSystem.cxx @@ -171,6 +171,18 @@ int System::GetAppPath(char *pname, size_t pathsize) return -1; /* Path Lookup Failed */ } +std::string System::GetDllAppPath(std::string nomdll){ + std::string path = "."; +#ifdef WIN32 + char currentPath[_MAX_PATH]; + HMODULE hand = GetModuleHandle(nomdll.c_str()); + GetModuleFileName(hand, currentPath, _MAX_PATH); + + path = currentPath; + path = path.substr(0,path.find_last_of("\\")); +#endif + return path; +} } // namespace crea diff --git a/src/creaSystem.h b/src/creaSystem.h index 9ca8c93..a64dc7c 100644 --- a/src/creaSystem.h +++ b/src/creaSystem.h @@ -3,8 +3,8 @@ Program: crea Module: $RCSfile: creaSystem.h,v $ Language: C++ - Date: $Date: 2009/08/18 01:45:04 $ - Version: $Revision: 1.4 $ + Date: $Date: 2009/09/15 11:32:40 $ + Version: $Revision: 1.5 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -227,7 +227,7 @@ namespace crea /// returns true iff the program has a tty static int HasTTY(); CREA_EXPORT static int GetAppPath(char *pname, size_t pathsize); - CREA_EXPORT static std::string GetDllAppPath(std::string nom); + CREA_EXPORT static std::string GetDllAppPath(std::string nomdll); }; } // namespace crea -- 2.45.1 From 3048dcadbc42fcf6679edc959484ecd4b948eb9c Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Wed, 16 Sep 2009 12:28:57 +0000 Subject: [PATCH 02/16] *** empty log message *** --- src/creaMessageManager.h | 952 +++++++++++++++++++++++---------------- src/creaSystem.cxx | 10 +- src/creaVtk.h | 2 +- src/creaVtk.txx | 2 +- 4 files changed, 582 insertions(+), 384 deletions(-) diff --git a/src/creaMessageManager.h b/src/creaMessageManager.h index 37fe5bf..87fb5f8 100644 --- a/src/creaMessageManager.h +++ b/src/creaMessageManager.h @@ -1,376 +1,576 @@ - -/*! \file - - \brief Class creaMessageManager and Macros for outputing messages in crea - - There are 4 kinds of messages : - - Messages (normal messages) - - Debug messages (not compiled in release) - - Warnings - - Errors - There are also "types" of messages which are strings which identify the nature of the message - (for example : "Kernel" messages are generated by the core classes of the library, there can be a type of - message for each type of Node, and so on...) - A type of message must be declared by registering it into the MessageManager. This is done by a line like : - crea::MessageManager::RegisterMessageType("Kernel","Messages generated by the core classes of the library",5); - where : - -The first string is the type of the message (the category which will be used to generate a message of this type) - -The second string is help string - -The integer is the initial level for the messages of this type (see below). - - To generate a message of a known type then use one of the macros : - creaMessage, creaDebugMessage, creaWarning, creaError or their variants. - - example : - - creaMessage("Kernel",4,"problem with "< -#include - -#include -#include -#include -#include - -// Comment out these symbols to prevent compilation -//#define CREA_COMPILE_MESSAGES -//#define CREA_COMPILE_DEBUG_MESSAGES -//#define CREA_COMPILE_WARNING_MESSAGES -//#define CREA_COMPILE_ERROR_MESSAGES - - -#define creaOnMessageLevel(key,value) \ - int __creaOnMessageLevelVariable = \ - crea::MessageManager::GetMessageLevel(key); \ - if ( __creaOnMessageLevelVariable<0) \ - { \ - creaWarning("message type '"<0) \ - { \ - std::cerr << "!! WARNING !! " << MESSAGE << std::endl; \ - if (lev >1) \ - { \ - std::cerr << "!! WARNING !! In file '"<<__FILE__ \ - <<"' ; Line "<<__LINE__< MessageSignalType; - typedef MessageSignalType::slot_function_type MessageCallbackType; - //============================================= - /// - MessageManager(); - /// - ~MessageManager(); - /// - static MessageManager* GetInstance(); - /// - static void RegisterMessageType(const std::string& key, - const std::string& help, - unsigned char default_level = 9); - /// - static void SetMessageLevel(const std::string& key, unsigned char level); - /// - static int GetMessageLevel(const std::string& key); - /// - static void SendMessage(const std::string& key, const std::string& mess); - /// - static void AddMessageObserver(const std::string& key, MessageCallbackType callback ); - /// - static void SendMessagesToCout(bool v = true); - /// - static std::string& GetTab() { static std::string s; return s; } - /// - static std::string GetSpace(int n) { - std::string s; s.insert(0," ",n); return s; } - /// - static void IncTab() { GetTab() += std::string(" "); } - /// - static void DecTab() { GetTab() = GetTab().substr(0,GetTab().length()-1); } - /// - static void ResetTab() { GetTab() = std::string(""); } - /// - static void PrintInfo(); - /// - - private: - struct MessageType - { - MessageType(int l, const std::string& h) : Level(l), Help(h) {} - int Level; - std::string Help; - MessageSignalType Signal; - }; - typedef std::map MessageMapType; - MessageMapType mMessageMap; - unsigned int mMaxMessageLength; - bool mSendToCout; - }; - //=========================================================== - -} - -#include "creaException.h" - -#endif + + +/*! \file + + + + \brief Class creaMessageManager and Macros for outputing messages in crea + + + + There are 4 kinds of messages : + + - Messages (normal messages) + + - Debug messages (not compiled in release) + + - Warnings + + - Errors + + There are also "types" of messages which are strings which identify the nature of the message + + (for example : "Kernel" messages are generated by the core classes of the library, there can be a type of + + message for each type of Node, and so on...) + + A type of message must be declared by registering it into the MessageManager. This is done by a line like : + + crea::MessageManager::RegisterMessageType("Kernel","Messages generated by the core classes of the library",5); + + where : + + -The first string is the type of the message (the category which will be used to generate a message of this type) + + -The second string is help string + + -The integer is the initial level for the messages of this type (see below). + + + + To generate a message of a known type then use one of the macros : + + creaMessage, creaDebugMessage, creaWarning, creaError or their variants. + + + + example : + + + + creaMessage("Kernel",4,"problem with "< + +#include + + + +#include + +#include + +#include + +#include + + + +// Comment out these symbols to prevent compilation + +//#define CREA_COMPILE_MESSAGES + +//#define CREA_COMPILE_DEBUG_MESSAGES + +//#define CREA_COMPILE_WARNING_MESSAGES + +//#define CREA_COMPILE_ERROR_MESSAGES + + + + + +#define creaOnMessageLevel(key,value) \ + int __creaOnMessageLevelVariable = \ + crea::MessageManager::GetMessageLevel(key); \ + if ( __creaOnMessageLevelVariable<0) \ + { \ + creaWarning("message type '"<0) \ + { \ + std::cerr << "!! WARNING !! " << MESSAGE << std::endl; \ + if (lev >1) \ + { \ + std::cerr << "!! WARNING !! In file '"<<__FILE__ \ + <<"' ; Line "<<__LINE__< MessageSignalType; + + typedef MessageSignalType::slot_function_type MessageCallbackType; + + //============================================= + + /// + + MessageManager(); + + /// + + ~MessageManager(); + + /// + + static MessageManager* GetInstance(); + + /// + + static void RegisterMessageType(const std::string& key, + + const std::string& help, + + unsigned char default_level = 9); + + /// + + static void SetMessageLevel(const std::string& key, unsigned char level); + + /// + + static int GetMessageLevel(const std::string& key); + + /// + + static void SendMessage(const std::string& key, const std::string& mess); + + /// + + static void AddMessageObserver(const std::string& key, MessageCallbackType callback ); + + /// + + static void SendMessagesToCout(bool v = true); + + /// + + static std::string& GetTab() { static std::string s; return s; } + + /// + + static std::string GetSpace(int n) { + + std::string s; s.insert(0," ",n); return s; } + + /// + + static void IncTab() { GetTab() += std::string(" "); } + + /// + + static void DecTab() { GetTab() = GetTab().substr(0,GetTab().length()-1); } + + /// + + static void ResetTab() { GetTab() = std::string(""); } + + /// + + static void PrintInfo(); + + /// + + + + private: + + struct MessageType + + { + + MessageType(int l, const std::string& h) : Level(l), Help(h) {} + + int Level; + + std::string Help; + + MessageSignalType Signal; + + }; + + typedef std::map MessageMapType; + + MessageMapType mMessageMap; + + unsigned int mMaxMessageLength; + + bool mSendToCout; + + }; + + //=========================================================== + + + +} + + + +#include "creaException.h" + + + +#endif + diff --git a/src/creaSystem.cxx b/src/creaSystem.cxx index 460bb7f..7225884 100644 --- a/src/creaSystem.cxx +++ b/src/creaSystem.cxx @@ -43,12 +43,9 @@ namespace crea return isatty(fileno(stdin)); } #endif -std::string System::GetDllAppPath(std::string nom){ - std::string path = "."; -#ifdef WIN32 -#endif - return path; -} + + + int System::GetAppPath(char *pname, size_t pathsize) { #ifdef LINUX @@ -171,6 +168,7 @@ int System::GetAppPath(char *pname, size_t pathsize) return -1; /* Path Lookup Failed */ } + std::string System::GetDllAppPath(std::string nomdll){ std::string path = "."; #ifdef WIN32 diff --git a/src/creaVtk.h b/src/creaVtk.h index 417438e..7302e98 100644 --- a/src/creaVtk.h +++ b/src/creaVtk.h @@ -10,7 +10,7 @@ namespace crea { template - vtkImageData* CREA_EXPORT NewVtkImageDataFromRaw( T* data, + vtkImageData* /*CREA_EXPORT*/ NewVtkImageDataFromRaw( T* data, int nx, int ny, int nz, diff --git a/src/creaVtk.txx b/src/creaVtk.txx index f0ea5be..7fd3539 100644 --- a/src/creaVtk.txx +++ b/src/creaVtk.txx @@ -19,7 +19,7 @@ namespace crea { template - vtkImageData* CREA_EXPORT NewVtkImageDataFromRaw( T* data, + vtkImageData* /*CREA_EXPORT*/ NewVtkImageDataFromRaw( T* data, int nx, int ny, int nz, -- 2.45.1 From 994b3c9cc2ec1db0ca1f7d045232b1991dcb51a3 Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Wed, 16 Sep 2009 15:34:26 +0000 Subject: [PATCH 03/16] *** empty log message *** --- AdditionalcreaConfig.cmake.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AdditionalcreaConfig.cmake.in b/AdditionalcreaConfig.cmake.in index 56d9c88..9eca138 100644 --- a/AdditionalcreaConfig.cmake.in +++ b/AdditionalcreaConfig.cmake.in @@ -1,4 +1,6 @@ #----------------------------------------------------------------------------- +ADD_DEFINITIONS(-DCREA_BUILD_SHARED) +SET(CREA_BUILT_WITH_WX @CREA_BUILT_WITH_WX@) SET(CREA_BUILT_WITH_WX @CREA_BUILT_WITH_WX@) SET(CREA_BUILT_WITH_VTK @CREA_BUILT_WITH_VTK@) SET(CREA_CMAKE_REL_PATH @CREA_CMAKE_REL_PATH@) -- 2.45.1 From a8ddadca1c8b505d243c6077d25f4cb547675259 Mon Sep 17 00:00:00 2001 From: Juan Prieto Date: Thu, 17 Sep 2009 11:47:44 +0000 Subject: [PATCH 04/16] *** empty log message *** --- appli/creaNewProject/CMakeLists.txt | 2 +- cmake/CREAMacro_FindAndUseLibraries.cmake | 54 +++++++++++++---------- cmake/CREAMacro_FindAndUseWxWidgets.cmake | 2 +- src/CMakeLists.txt | 4 +- src/creaSystem.h | 8 ++-- src/creaVtk.h | 3 +- src/creaVtk.txx | 2 +- 7 files changed, 41 insertions(+), 34 deletions(-) diff --git a/appli/creaNewProject/CMakeLists.txt b/appli/creaNewProject/CMakeLists.txt index 153ba4b..892756f 100644 --- a/appli/creaNewProject/CMakeLists.txt +++ b/appli/creaNewProject/CMakeLists.txt @@ -6,7 +6,7 @@ SET(EXE_NAME creaNewProject) SET(${EXE_NAME}_SOURCES creaNewProject.cpp) SET(${EXE_NAME}_HAS_GUI TRUE) SET(${EXE_NAME}_CONSOLE FALSE) -SET(${EXE_NAME}_LINK_LIBRARIES crea ) +SET(${EXE_NAME}_LINK_LIBRARIES crea) CREA_ADD_EXECUTABLE( ${EXE_NAME} ) #============================================================================ diff --git a/cmake/CREAMacro_FindAndUseLibraries.cmake b/cmake/CREAMacro_FindAndUseLibraries.cmake index bd7cfb4..546f37b 100644 --- a/cmake/CREAMacro_FindAndUseLibraries.cmake +++ b/cmake/CREAMacro_FindAndUseLibraries.cmake @@ -20,14 +20,17 @@ ENDIF(USE_CREA) #----------------------------------------------------------------------------- IF(USE_QT4) - IF(NOT QT_FOUND) - FIND_PACKAGE(Qt4 REQUIRED) + IF(NOT QT_FOUND) + + INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseQt.cmake) + IF(QT_FOUND) MESSAGE ( STATUS "=======================================") MESSAGE ( STATUS "Looking for QT4... found") MESSAGE ( STATUS "* Inc Dir = ${QT_INCLUDE_DIR}") MESSAGE ( STATUS "* Version = ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}") INCLUDE(${QT_USE_FILE}) + CREA_DEFINE( USE_QT ) # SET(QT_LIBRARIES # ${QT_LIBRARIES} @@ -245,7 +248,7 @@ ENDIF(USE_LATEX) #----------------------------------------------------------------------------- IF(USE_TTH) IF (NOT TTH_EXECUTABLE) - FIND_FILE( TTH_EXECUTABLE NAME tth tth.exe PATHS . $ENV{CREATIS}/tth_exe/ ~/Creatis/tth ~/Creatis/tth_linux) + FIND_FILE( TTH_EXECUTABLE NAME tth tth.exe PATHS . $ENV{CREATIS}/tth_exe/ ~/Creatis/tth ~/Creatis/tth_linux $ENV{CREATIS}/tth/) IF (NOT TTH_EXECUTABLE) MESSAGE(FATAL_ERROR "TTH not found (LATEX_tth_CONVERTER). Required to build the HTML documentation from tex source") ELSE (NOT TTH_EXECUTABLE) @@ -269,36 +272,39 @@ IF(USE_BOOST) CREA_DEFINE( USE_BOOST ) IF(WIN32) - LINK_DIRECTORIES( ${Boost_INCLUDE_DIRS}/lib) + LINK_DIRECTORIES( ${Boost_INCLUDE_DIRS}/stage/lib) #MESSAGE ("EED " ${Boost_LIBRARY_DIRS}) + #libboost_signals-vc71-mt-1_37 + #libboost_filesystem-vc71-mt-1_37 + #boost_date_time-vc71-mt-1_37 SET(BOOST_LIBRARIES - libboost_signals-vc71-mt-1_37 - libboost_filesystem-vc71-mt-1_37 - boost_date_time-vc71-mt-1_37 + boost_signals-vc90-mt + boost_filesystem-vc90-mt + boost_date_time-vc90-mt #what about boost_thread? JPR ) ENDIF(WIN32) IF(NOT WIN32) IF(NOT APPLE) - SET(BOOST_LIBRARIES - boost_signals - boost_filesystem - boost_date_time - boost_program_options - boost_regex - boost_thread - ) + SET(BOOST_LIBRARIES + boost_signals + boost_filesystem + boost_date_time + boost_program_options + boost_regex + boost_thread + ) ELSE(NOT APPLE) - SET(BOOST_LIBRARIES - boost_signals-mt - boost_filesystem-mt - boost_date_time-mt - boost_system-mt - boost_program_options-mt - boost_regex-mt - boost_thread-mt - ) + SET(BOOST_LIBRARIES + boost_signals-mt + boost_filesystem-mt + boost_date_time-mt + boost_system-mt + boost_program_options-mt + boost_regex-mt + boost_thread-mt + ) ENDIF(NOT APPLE) ENDIF(NOT WIN32) diff --git a/cmake/CREAMacro_FindAndUseWxWidgets.cmake b/cmake/CREAMacro_FindAndUseWxWidgets.cmake index 61dff38..9124fc6 100644 --- a/cmake/CREAMacro_FindAndUseWxWidgets.cmake +++ b/cmake/CREAMacro_FindAndUseWxWidgets.cmake @@ -12,7 +12,7 @@ MACRO(CREA_FIND_WXWIDGETS) #wxWidgets build related stuff # DO NOT FORCE DEBUG LIBS !! - #SET(WXW_USE_DEBUG ON) + SET(WXW_USE_DEBUG ON) SET(WXW_USE_UNICODE OFF) SET(WXW_USE_SHARED ON) SET(WXW_USE_UNIV OFF) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e4862f2..b02dbc9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -46,12 +46,12 @@ CREA_DEFINE(CREA_EXPORT_SYMBOLS) ADD_LIBRARY(crea ${CREA_BUILD_SHARED} ${SRCS}) - TARGET_LINK_LIBRARIES(crea ${WXWIDGETS_LIBRARIES} ${VTK_LIBRARIES} - ${BOOST_LIBRARIES} + ${BOOST_LIBRARIES} ) +# # ${GDCM_LIBRARIES} # ${SQLITE_LIBRARIES}) diff --git a/src/creaSystem.h b/src/creaSystem.h index a64dc7c..997050f 100644 --- a/src/creaSystem.h +++ b/src/creaSystem.h @@ -3,8 +3,8 @@ Program: crea Module: $RCSfile: creaSystem.h,v $ Language: C++ - Date: $Date: 2009/09/15 11:32:40 $ - Version: $Revision: 1.5 $ + Date: $Date: 2009/09/17 11:47:46 $ + Version: $Revision: 1.6 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -98,9 +98,9 @@ #if defined(_WIN32) && defined(CREA_BUILD_SHARED) //#include "WWW.h" #ifdef CREA_EXPORT_SYMBOLS - #define CREA_EXPORT __declspec( dllexport ) + #define CREA_EXPORT __declspec( dllexport ) #else - #define CREA_EXPORT __declspec( dllimport ) + #define CREA_EXPORT __declspec( dllimport ) #endif #define CREA_CDECL __cdecl #else diff --git a/src/creaVtk.h b/src/creaVtk.h index 7302e98..fea59cf 100644 --- a/src/creaVtk.h +++ b/src/creaVtk.h @@ -10,7 +10,8 @@ namespace crea { template - vtkImageData* /*CREA_EXPORT*/ NewVtkImageDataFromRaw( T* data, + + CREA_EXPORT vtkImageData* NewVtkImageDataFromRaw( T* data, int nx, int ny, int nz, diff --git a/src/creaVtk.txx b/src/creaVtk.txx index 7fd3539..5cc68e3 100644 --- a/src/creaVtk.txx +++ b/src/creaVtk.txx @@ -19,7 +19,7 @@ namespace crea { template - vtkImageData* /*CREA_EXPORT*/ NewVtkImageDataFromRaw( T* data, + CREA_EXPORT vtkImageData* NewVtkImageDataFromRaw( T* data, int nx, int ny, int nz, -- 2.45.1 From 7d1be46f5e0f987f125785da9c0dd1ce53fb5fca Mon Sep 17 00:00:00 2001 From: trillos Date: Mon, 28 Sep 2009 16:44:56 +0000 Subject: [PATCH 05/16] Fixed "Search and find libraries" for boost v90-1_37 --- cmake/CREAMacro_FindAndUseLibraries.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/CREAMacro_FindAndUseLibraries.cmake b/cmake/CREAMacro_FindAndUseLibraries.cmake index 546f37b..21947e3 100644 --- a/cmake/CREAMacro_FindAndUseLibraries.cmake +++ b/cmake/CREAMacro_FindAndUseLibraries.cmake @@ -278,9 +278,9 @@ IF(USE_BOOST) #libboost_filesystem-vc71-mt-1_37 #boost_date_time-vc71-mt-1_37 SET(BOOST_LIBRARIES - boost_signals-vc90-mt - boost_filesystem-vc90-mt - boost_date_time-vc90-mt + boost_signals-vc90-mt-1_37 + boost_filesystem-vc90-mt-1_37 + boost_date_time-vc90-mt-1_37 #what about boost_thread? JPR ) -- 2.45.1 From 1105ecb7bc1fab95fd553ab104275df6506fea22 Mon Sep 17 00:00:00 2001 From: Juan Prieto Date: Wed, 30 Sep 2009 15:53:08 +0000 Subject: [PATCH 06/16] *** empty log message *** --- appli/creaNewProject/CMakeLists.txt | 4 +- .../NewProject/CMakeLists.txt.in | 16 +- .../cmake/UserBuildDoxygenDoc.cmake | 11 +- .../cmake/UserBuildHtmlDocFromLatex.cmake | 10 +- .../NewProject/cmake/UserBuildLatexDoc.cmake | 11 +- .../NewProject/cmake/UserConfig.cmake | 5 +- .../UserDocumentation/UserDocumentation.tex | 79 ++- .../creaNewProject/NewProject/doc/config.tex | 73 +-- .../NewProject/doc/help_contents.html.in | 18 +- .../NewProject/doc/index-no-frame.html.in | 2 +- .../doc/template_WebSite/CMakeLists.txt | 53 +- .../doc/template_WebSite/install.html | 5 +- .../NewProject/doc/template_WebSite/menu.html | 56 +- appli/creaNewProject/creaNewProject.bat.in | 16 +- appli/creaNewProject/creaNewProject.cpp | 9 +- appli/creaSed/creaSed.cpp | 7 +- cmake/CREAMacro_FindAndUseLibraries.cmake | 4 +- cmake/CREAMacro_FindAndUseQt.cmake | 576 ++++++++++++++++++ src/creaSystem.h | 5 +- src/creaVtk.txx | 2 +- 20 files changed, 731 insertions(+), 231 deletions(-) create mode 100644 cmake/CREAMacro_FindAndUseQt.cmake diff --git a/appli/creaNewProject/CMakeLists.txt b/appli/creaNewProject/CMakeLists.txt index 892756f..3f138d5 100644 --- a/appli/creaNewProject/CMakeLists.txt +++ b/appli/creaNewProject/CMakeLists.txt @@ -24,7 +24,7 @@ IF(WIN32) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/xcopy.exe ${EXECUTABLE_OUTPUT_PATH}/Debug/xcopy.exe - @ONLY IMMEDIATE + COPYONLY ) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/creaNewProject.bat.in @@ -45,7 +45,7 @@ IF(WIN32) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/xcopy.exe ${EXECUTABLE_OUTPUT_PATH}/Release/xcopy.exe - @ONLY IMMEDIATE + COPYONLY ) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/creaNewProject.bat.in diff --git a/appli/creaNewProject/NewProject/CMakeLists.txt.in b/appli/creaNewProject/NewProject/CMakeLists.txt.in index c31d327..5a90c41 100644 --- a/appli/creaNewProject/NewProject/CMakeLists.txt.in +++ b/appli/creaNewProject/NewProject/CMakeLists.txt.in @@ -8,16 +8,22 @@ # --------------------------------- CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - ################################### -PROJECT(PROJECT_NAME) +SET(PROJECT_NAME "NameOfTheProject") ################################### +PROJECT(${PROJECT_NAME}) #================================== # The project version SET(PROJECT_MAJOR_VERSION 1) SET(PROJECT_MINOR_VERSION 0) SET(PROJECT_BUILD_VERSION 0) + +SET(PROJECT_VERSION "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_BUILD_VERSION}") +SET(PROJECT_VERSION_DATE "30/09/2009") +#ADD_DEFINITIONS( -DPROJECT_VERSION=${PROJECT_VERSION} ) +#ADD_DEFINITIONS( -DPROJECT_VERSION_DATE=${PROJECT_VERSION_DATE} ) + #================================== #================================== @@ -54,13 +60,13 @@ SET(USE_BOOST OFF) # Note : Set USE_DOXYGEN to ON # if you think you will ask, some day, # for Doxygen generation -SET(USE_DOXYGEN OFF) +#SET(USE_DOXYGEN OFF) # Note : Set USE_LATEX to ON, USE_TTH to ON # if you think you will ask, some day, # for doc generation using your own latex documents -SET(USE_LATEX OFF) -SET(USE_TTH OFF) +#SET(USE_LATEX OFF) +#SET(USE_TTH OFF) CREA_FIND_AND_USE_LIBRARIES() #================================== diff --git a/appli/creaNewProject/NewProject/cmake/UserBuildDoxygenDoc.cmake b/appli/creaNewProject/NewProject/cmake/UserBuildDoxygenDoc.cmake index 38f4733..2446671 100644 --- a/appli/creaNewProject/NewProject/cmake/UserBuildDoxygenDoc.cmake +++ b/appli/creaNewProject/NewProject/cmake/UserBuildDoxygenDoc.cmake @@ -9,11 +9,14 @@ MACRO(USER_BUILD_DOXYGEN_DOC NAME INPUT DOC_RELATIVE_INSTALL_PATH PREDEFINED) SET(DOXYGEN_PROJECT_NAME "${NAME}") # Inputs - STRING(REGEX REPLACE ";" " " DOXYGEN_INPUT "${INPUT}") + #STRING(REGEX REPLACE ";" " " DOXYGEN_INPUT "${INPUT}") # Output dirs SET(DOXYGEN_HTML_OUTPUT ".") - SET(DOXYGEN_OUTPUT ${${PROJECT_NAME}_DOXYGEN_BUILD_PATH}/${DOC_RELATIVE_INSTALL_PATH}) + SET(DOXYGEN_OUTPUT "${${PROJECT_NAME}_DOXYGEN_BUILD_PATH}/${DOC_RELATIVE_INSTALL_PATH}") + STRING(REGEX REPLACE " " "~" DOXYGEN_OUTPUT "${DOXYGEN_OUTPUT}") + + IF(NOT IS_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}) FILE(MAKE_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}) ENDIF(NOT IS_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}) @@ -64,8 +67,8 @@ MACRO(USER_BUILD_DOXYGEN_DOC NAME INPUT DOC_RELATIVE_INSTALL_PATH PREDEFINED) DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT} DESTINATION - ${BBTK_DOXYGEN_INSTALL_PATH}/${DOC_RELATIVE_INSTALL_PATH} + ${${PROJECT_NAME}_DOXYGEN_INSTALL_PATH}/${DOC_RELATIVE_INSTALL_PATH} ) #-------------------------------------------------------------------------- - +#message("user build doxygen , doxygen output = ${DOXYGEN_OUTPUT}") ENDMACRO(USER_BUILD_DOXYGEN_DOC) diff --git a/appli/creaNewProject/NewProject/cmake/UserBuildHtmlDocFromLatex.cmake b/appli/creaNewProject/NewProject/cmake/UserBuildHtmlDocFromLatex.cmake index 5e79304..1cba436 100644 --- a/appli/creaNewProject/NewProject/cmake/UserBuildHtmlDocFromLatex.cmake +++ b/appli/creaNewProject/NewProject/cmake/UserBuildHtmlDocFromLatex.cmake @@ -5,8 +5,12 @@ MACRO(USER_BUILD_HTML_DOC_FROM_LATEX TEX_FILE OUTPUT_REL_PATH) SET(USE_TTH ON CACHE BOOL "" FORCE) # Construct absolute build path SET(BUILD_PATH ${${PROJECT_NAME}_DOC_BUILD_PATH}/${OUTPUT_REL_PATH}) - #------------------------------------------------------------------------- - + #------------------------------------------------------------------------- + IF(WIN32) + SET(TTH_EXECUTABLE "${TTH_EXECUTABLE}/tth.exe") + ENDIF(WIN32) + + #message("MACRO(USER_BUILD_HTML_DOC_FROM_LATEX TEX_FILE OUTPUT_REL_PATH) TTH_EXECUTABLE ${TTH_EXECUTABLE}") ADD_CUSTOM_COMMAND( OUTPUT ${BUILD_PATH}/${TEX_FILE}.html COMMAND @@ -22,7 +26,7 @@ MACRO(USER_BUILD_HTML_DOC_FROM_LATEX TEX_FILE OUTPUT_REL_PATH) # Install INSTALL( FILES ${BUILD_PATH}/${TEX_FILE}.html - DESTINATION ${BBTK_DOC_INSTALL_PATH}/${OUTPUT_REL_PATH} + DESTINATION ${${PROJECT_NAME}_DOC_INSTALL_PATH}/${OUTPUT_REL_PATH} ) #------------------------------------------------------------------------- diff --git a/appli/creaNewProject/NewProject/cmake/UserBuildLatexDoc.cmake b/appli/creaNewProject/NewProject/cmake/UserBuildLatexDoc.cmake index b70ac84..1f5ad69 100644 --- a/appli/creaNewProject/NewProject/cmake/UserBuildLatexDoc.cmake +++ b/appli/creaNewProject/NewProject/cmake/UserBuildLatexDoc.cmake @@ -26,7 +26,9 @@ MACRO(USER_BUILD_LATEX_DOC TEX_FILE OUTPUT_REL_PATH) FILE(TO_NATIVE_PATH ${BUILD_PATH} THE_BUILD_PATH) # Have to run latex twice to get references, toc, etc. - ADD_CUSTOM_COMMAND( + #message("ADD_CUSTOM_COMMAND(OUTPUT ${BUILD_PATH}/${TEX_FILE}.aux MACRO(USER_BUILD_LATEX_DOC") + +ADD_CUSTOM_COMMAND( OUTPUT ${BUILD_PATH}/${TEX_FILE}.aux COMMAND # latex @@ -38,7 +40,9 @@ MACRO(USER_BUILD_LATEX_DOC TEX_FILE OUTPUT_REL_PATH) ${CMAKE_CURRENT_SOURCE_DIR}/${TEX_FILE}.tex ${CMAKE_CURRENT_SOURCE_DIR}/../config.tex ) - ADD_CUSTOM_COMMAND( + +#message("LATEX_COMPILER = ${LATEX_COMPILER}") +ADD_CUSTOM_COMMAND( OUTPUT ${BUILD_PATH}/${TEX_FILE}.pdf COMMAND # latex @@ -57,7 +61,6 @@ MACRO(USER_BUILD_LATEX_DOC TEX_FILE OUTPUT_REL_PATH) INSTALL( FILES ${BUILD_PATH}/${TEX_FILE}.pdf DESTINATION ${${PROJECT_NAME}_DOC_INSTALL_PATH}/${OUTPUT_REL_PATH} - ) - + ) ENDMACRO(USER_BUILD_LATEX_DOC) diff --git a/appli/creaNewProject/NewProject/cmake/UserConfig.cmake b/appli/creaNewProject/NewProject/cmake/UserConfig.cmake index 4245d10..58dfc68 100644 --- a/appli/creaNewProject/NewProject/cmake/UserConfig.cmake +++ b/appli/creaNewProject/NewProject/cmake/UserConfig.cmake @@ -1,7 +1,6 @@ #----------------------------------------------------------------------------- -# The vars BBTK_DOC_REL_PATH and BBTK_BBS_REL_PATH # store documentation and scripts **RELATIVE** paths # from build tree root or install tree root # (different on win/lin) @@ -10,8 +9,8 @@ IF(WIN32) SET(${PROJECT_NAME}_SHARE_REL_PATH "bin/..") SET(${PROJECT_NAME}_DOC_REL_PATH doc) ELSE(WIN32) - SET(${PROJECT_NAME}_SHARE_REL_PATH share/bbtk) - SET(${PROJECT_NAME}_DOC_REL_PATH share/bbtk/doc) + SET(${PROJECT_NAME}_SHARE_REL_PATH share/${PROJECT_NAME}) + SET(${PROJECT_NAME}_DOC_REL_PATH share/${PROJECT_NAME}/doc) ENDIF(WIN32) MESSAGE(STATUS "* SHARE_REL_PATH =${${PROJECT_NAME}_SHARE_REL_PATH}") diff --git a/appli/creaNewProject/NewProject/doc/UserDocumentation/UserDocumentation.tex b/appli/creaNewProject/NewProject/doc/UserDocumentation/UserDocumentation.tex index 9510553..f49e631 100644 --- a/appli/creaNewProject/NewProject/doc/UserDocumentation/UserDocumentation.tex +++ b/appli/creaNewProject/NewProject/doc/UserDocumentation/UserDocumentation.tex @@ -3,47 +3,68 @@ \documentclass[11pt,final,a4paper]{article} \input{config.tex} \begin{document} -\bbtkGuide[Package Developers' Guide] +\UserDocumentGuide[User Documentation Guide] \newpage % ========================================== - - - % ========================================== \section{Introduction} % ========================================== - -Introduction - -\begin{enumerate} -\item \textbf{Subject 1 } -This is described in section \ref{Section1}. - -\item \textbf{Describe your new box.} -You can do it either : +Introductory paragraph to the content of the document +% ========================================== +% ========================================== +\section{Objectives} +% ========================================== +\subsection{General Objective} +% ========================================== \begin{itemize} -\item In \CPP code. You will have to write the class for -your box, mostly using \bbtk macros. -\item In \xml code. -When configuring your project with \cmake, -the utility \bbfy will then generate the corresponding \CPP code. +\item{\bf Objective 1} General description of the +objectives \end{itemize} - -This is described in section \ref{CreateBlackBox}. - -\end{enumerate} - % ========================================== -\section{Subject 1} -\label{Section1} % ========================================== - +\subsection{Specific Objectives} % ========================================== -\subsection{SubSection 1} +\begin{itemize} +\item{\bf Objective 1} Detail description of the +objective +\item{\bf Objective n} Detail description of the +objective +\end{itemize} +% ========================================== +\section{Scope and Vision} +% ========================================== +Scope and vision of the system to analyze +What is the reaching point of the system? +% ========================================== +\section{General Description} +% ========================================== +General description of the whole module +% ========================================== +\section{Requirements List} +% ========================================== +\begin{itemize} +\item{\bf Req1} Description of the +requirement +\item{\bf Reqn} Description of the +requirement +\end{itemize} +% ========================================== +\section{Analysis and design of the requirements} +% ========================================== +% ========================================== +\subsection{Req1} +% ========================================== +Detailed description of each req +% ========================================== +\subsection{Reqn} +% ========================================== +% ========================================== +\section{Glosary} +% ========================================== +% ========================================== +\section{Anexes} % ========================================== -Description of the SubSection - \end{document} diff --git a/appli/creaNewProject/NewProject/doc/config.tex b/appli/creaNewProject/NewProject/doc/config.tex index 6bbd5bf..e94eb1f 100644 --- a/appli/creaNewProject/NewProject/doc/config.tex +++ b/appli/creaNewProject/NewProject/doc/config.tex @@ -90,7 +90,7 @@ plainpages=false, pdfpagemode=None} -\hyperbaseurl{http://www.creatis.insa-lyon.fr/creatools/bbtk} +\hyperbaseurl{http://www.creatis.insa-lyon.fr/creatools/} \definecolor{myblue}{rgb}{0,0,0.7} \definecolor{myred}{rgb}{0.7,0,0} @@ -98,24 +98,11 @@ \definecolor{mydarkblue}{rgb}{0,0,0.5} % ========================================== -\def\bbtkVersion{@BBTK_VERSION@} -\def\bbtkVersionDate{@BBTK_VERSION_DATE@} +\def\UserProyectVersion{@PROJECT_VERSION@} +\def\UserProyectVersionDate{@PROJECT_VERSION_DATE@} \def\todo{\scriptsize\fbox{\bf TODO !!}\normalsize} \def\x{\bm{x}} -\def\BBTK{{\xspace}The {\bf Black Box Toolkit} } -\def\bbtk{{\xspace}$\texttt{bbtk}$ } -\def\bbi{{\xspace}$\texttt{bbi}$ } -\def\bbStudio{{\xspace}$\texttt{bbStudio}$ } -\def\bbfy{{\xspace}$\texttt{bbfy}$ } -\def\bbdoc{{\xspace}$\texttt{bbdoc}$ } -\def\bbCreatePackage{{\xspace}$\texttt{bbCreatePackage}$ } -\def\bbPackageBrowser{{\xspace}$\texttt{bbPackageBrowser}$ } -\def\bbCreateBlackBox{{\xspace}$\texttt{bbCreateBlackBox}$ } -\def\bbs{{\xspace}$\texttt{bbs}$ } -\def\bbc{{\xspace}$\texttt{bbc}$ } -\def\bbRegeneratePackageDoc{{\xspace}$\texttt{bbRegeneratePackageDoc}$ } -\def\bbRegenerateBoxesLists{{\xspace}$\texttt{bbRegenerateBoxesLists}$ } -\def\bbPlugPackage{{\xspace}$\texttt{bbPlugPackage}$ } +\def\UserProyect{{\xspace}$\texttt{@PROYECT_NAME@}$ } \def\bb{{\xspace}$\texttt{bb}$ } %\def\bbp{{\xspace}$\texttt{bbp}$\xspace} @@ -127,73 +114,31 @@ \def\xml{{\xspace}$\texttt{xml}$ } -\def\itk{{\xspace}$\texttt{itk}$ } -\def\vtk{{\xspace}$\texttt{vtk}$ } -\def\gdcm{{\xspace}$\texttt{gdcm}$ } -\def\gsmis{{\xspace}$\texttt{gsmis}$ } -\def\wx{{\xspace}$\texttt{wxWidgets}$ } \def\lin{{\xspace}\textit{Linux} } \def\win{{\xspace}\textit{Windows} } -% the same macros with no space at the end - -\def\BBTKns{{\xspace}The {\bf Black Box Toolkit}} -\def\bbtkns{{\xspace}$\texttt{bbtk}$} -\def\bbins{{\xspace}$\texttt{bbi}$} -\def\bbfyns{{\xspace}$\texttt{bbfy}$} -\def\bbdocns{{\xspace}$\texttt{bbdoc}$} -\def\bbStudions{{\xspace}$\texttt{bbStudio}$} -\def\bbCreatePackagens{{\xspace}$\texttt{bbCreatePackage}$} -\def\bbPackageBrowserns{{\xspace}$\texttt{bbPackageBrowser}$} -\def\bbCreateBlackBoxns{{\xspace}$\texttt{bbCreateBlackBox}$} -\def\bbsns{{\xspace}$\texttt{bbs}$} -\def\bbns{{\xspace}$\texttt{bb}$} -\def\bbcns{{\xspace}$\texttt{bbc}$} -%\def\bbp{{\xspace}$\texttt{bbp}$\xspace} -\def\bbRegeneratePackageDocns{{\xspace}$\texttt{bbRegeneratePackageDoc}$} -\def\bbRegenerateBoxesListsns{{\xspace}$\texttt{bbRegenerateBoxesLists}$} -\def\bbPlugPackagens{{\xspace}$\texttt{bbPlugPackage}$} - - -\def\cmakens{{\xspace}$\texttt{cmake}$} - -\def\Cns{{\xspace}$\texttt{C}$} -\def\CPPns{{\xspace}$\texttt{C++}$} - -\def\xmlns{{\xspace}$\texttt{xml}$} - -\def\itkns{{\xspace}$\texttt{itk}$} -\def\vtkns{{\xspace}$\texttt{vtk}$} -\def\gdcmns{{\xspace}$\texttt{gdcm}$} -\def\gsmisns{{\xspace}$\texttt{gsmis}$} -\def\wxns{{\xspace}$\texttt{wxWidgets}$} - -\def\linns{{\xspace}\textit{Linux}} -\def\winns{{\xspace}\textit{Windows}} - -\def\bbtkGuide [#1]{ +\def\UserDocumentGuide [#1]{ \begin{center} -{\Large \BBTK} +{\Large \UserProyect} \vspace{1cm} {\Huge #1} \vspace{1cm} -\bbtk version \bbtkVersion \hspace{2mm}(\bbtkVersionDate) +\UserProyect version \UserProyectVersion \hspace{2mm}(\UserProyectVersionDate) \vspace{0.5cm} Generated on : \today \vspace{0.5cm} -Eduardo D\'avila, Laurent Guigues, Jean-Pierre Roux +Eduardo D\'avila, Jean-Pierre Roux, Juan Carlos Prieto \vspace{0.3cm} CREATIS-LRMN, Centre de Recherche en Imagerie M\'edicale \\ CNRS UMR 5220, INSERM U620, INSA Lyon, Universit\'e Claude-Bernard Lyon 1 -http://www.creatis.insa-lyon.fr/creatools/bbtk \end{center} \tableofcontents \listoftables @@ -202,7 +147,7 @@ http://www.creatis.insa-lyon.fr/creatools/bbtk % ========================================== %%% mode: latex -%%% TeX-master: "bbtkUsersGuide" +%%% TeX-master: "UserProyectUsersGuide" %%% End: \newcounter{Ctrfile} diff --git a/appli/creaNewProject/NewProject/doc/help_contents.html.in b/appli/creaNewProject/NewProject/doc/help_contents.html.in index 0fe9af0..54410f7 100644 --- a/appli/creaNewProject/NewProject/doc/help_contents.html.in +++ b/appli/creaNewProject/NewProject/doc/help_contents.html.in @@ -1,27 +1,13 @@ - Help Contents - bbtk @BBTK_VERSION@ + Help Contents - User Proyect @BBTK_VERSION@

Help Contents

-Demos
-Examples - -

Guides

- -User's Guide
-Package Developer's Guide
-bbtk library doxygen doc
- -

Boxes

- -Alphabetical list
-List by package
-List by category
-List of adaptors
+BBTK Doc
diff --git a/appli/creaNewProject/NewProject/doc/index-no-frame.html.in b/appli/creaNewProject/NewProject/doc/index-no-frame.html.in index f8b5a7d..d1c4acd 100644 --- a/appli/creaNewProject/NewProject/doc/index-no-frame.html.in +++ b/appli/creaNewProject/NewProject/doc/index-no-frame.html.in @@ -9,6 +9,6 @@ -

Redirection

+

Redirection

diff --git a/appli/creaNewProject/NewProject/doc/template_WebSite/CMakeLists.txt b/appli/creaNewProject/NewProject/doc/template_WebSite/CMakeLists.txt index 942d018..09ed25d 100644 --- a/appli/creaNewProject/NewProject/doc/template_WebSite/CMakeLists.txt +++ b/appli/creaNewProject/NewProject/doc/template_WebSite/CMakeLists.txt @@ -11,62 +11,15 @@ FOREACH(page ${HTML_PAGES}) GET_FILENAME_COMPONENT(filename "${page}" NAME) CONFIGURE_FILE( ${page} - ${BBTK_DOC_BUILD_PATH}/template_WebSite/${filename} + ${${PROJECT_NAME}_DOC_BUILD_PATH}/template_WebSite/${filename} @ONLY ) # Install INSTALL( - FILES ${BBTK_DOC_BUILD_PATH}/template_WebSite/${filename} - DESTINATION ${BBTK_DOC_INSTALL_PATH}/template_WebSite + FILES ${${PROJECT_NAME}_DOC_BUILD_PATH}/template_WebSite/${filename} + DESTINATION ${${PROJECT_NAME}_DOC_INSTALL_PATH}/template_WebSite ) ENDFOREACH(page) - -#=================================================================== -# Regenerate package doc / boxes lists -# Must be made manually as: -# 1) Is useless for installers (it is to be run after install) -# 2) Can be done manually for a build tree (e.g. in bbStudio) -IF(FALSE) - -SET(INDEX_OUTPUT index-alpha.html) - -IF (WIN32) - - SET(USE_DOT TRUE) - MAKE_DLL_PATH() - - ADD_CUSTOM_COMMAND( - OUTPUT ${INDEX_OUTPUT} - COMMAND - set Path=${DLL_PATH} && cd ${BBTK_BIN_PATH} && bbRegeneratePackageDoc -a -q && bbRegenerateBoxesLists -q - - DEPENDS ${BBTK_PACKAGES_DEPS} - ) - -ELSE (WIN32) - - # MESSAGE(STATUS "PACKAGE_DEPS=${BBTK_PACKAGES_DEPS}") - - SET(LD_LIBRARY_PATH "$ENV{LD_LIBRARY_PATH}:${LIBRARY_OUTPUT_PATH}") - # MESSAGE(LD_LIBRARY_PATH=${LD_LIBRARY_PATH}) - - ADD_CUSTOM_COMMAND( - OUTPUT ${INDEX_OUTPUT} - COMMAND - - cd ${BBTK_BIN_PATH} && export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} && ./bbRegeneratePackageDoc -a -q && ./bbRegenerateBoxesLists -q - - DEPENDS ${BBTK_PACKAGES_DEPS} bbRegeneratePackageDoc bbRegenerateBoxesLists - ) - -ENDIF (WIN32) - -ADD_CUSTOM_TARGET( - bbdoc ALL - DEPENDS ${INDEX_OUTPUT} - ) - -ENDIF(FALSE) MESSAGE(STATUS "=======================================") diff --git a/appli/creaNewProject/NewProject/doc/template_WebSite/install.html b/appli/creaNewProject/NewProject/doc/template_WebSite/install.html index 9b5f41b..483722c 100644 --- a/appli/creaNewProject/NewProject/doc/template_WebSite/install.html +++ b/appli/creaNewProject/NewProject/doc/template_WebSite/install.html @@ -3,11 +3,10 @@ - BBTK @BBTK_VERSION@ Install + User Project Documentation -
BBTK @BBTK_VERSION@ -(@BBTK_VERSION_DATE@) build instructions
+
build instructions
    diff --git a/appli/creaNewProject/NewProject/doc/template_WebSite/menu.html b/appli/creaNewProject/NewProject/doc/template_WebSite/menu.html index cc2028e..2d6181e 100644 --- a/appli/creaNewProject/NewProject/doc/template_WebSite/menu.html +++ b/appli/creaNewProject/NewProject/doc/template_WebSite/menu.html @@ -1,42 +1,30 @@ - + - USER DOCUMENTATION - + + Home - - -Home
    -Build instructions

    -
    Guides and documentation + +
    + +User Project documentation
    +

    + +
    Follow this link User Install Instructions
    +
    +Read the users' guide To find out more about this application.

    - User's -Guide (pdf) -
    - Package Developer's Guide -
    +Or read read the pdf file with the documentation (pdf)
    +
    +The futures developers in this project might be also interested in the doxygen documentation of the +source code of bbtk library.
    -
      -
    -
    Boxes
    -
    -Alphabetical -list
    -List by -package
    -List by -category
    -List of -adaptors

    -
    -
    -
    -  +
    +
    diff --git a/appli/creaNewProject/creaNewProject.bat.in b/appli/creaNewProject/creaNewProject.bat.in index c36352f..9c0bba8 100755 --- a/appli/creaNewProject/creaNewProject.bat.in +++ b/appli/creaNewProject/creaNewProject.bat.in @@ -15,21 +15,27 @@ set OUTPUT=%1 set PROJECT=%2 -rem echo output = %OUTPUT% +echo output = %OUTPUT% rem echo bin = %BINPATH% rem echo input = %INPUT% -rem echo project= %PROJECT% +echo project= %PROJECT% IF EXIST %OUTPUT%\%PROJECT% GOTO ERROR02 echo "** Creating new project '%PROJECT%' in folder '%OUTPUT%'" mkdir %OUTPUT%\%PROJECT% + +echo %INPUT% %OUTPUT%\%PROJECT% + xcopy %INPUT% %OUTPUT%\%PROJECT% /S -"%BINPATH%\creaSed" %OUTPUT%\%PROJECT%\CMakeLists.txt.in PROJECT_NAME "%PROJECT%" > %OUTPUT%\%PROJECT%\CMakeLists.txt -del "%OUTPUT%\%PROJECT%\CMakeLists.txt.in" -echo "Done !" +echo %ERRORLEVEL% + +rem %BINPATH%\creaSed "\"%OUTPUT%\\%PROJECT%\CMakeLists.txt.in"\"" "PROJECT_NAME" "%PROJECT%" > %OUTPUT%\%PROJECT%\CMakeLists.txt +rem del "%OUTPUT%\%PROJECT%\CMakeLists.txt.in" + +echo "Done!!!!!!" echo "Edit the file '%OUTPUT%\%PROJECT%\CMakeLists.txt' to customize your project" diff --git a/appli/creaNewProject/creaNewProject.cpp b/appli/creaNewProject/creaNewProject.cpp index 0c13a27..695b00d 100644 --- a/appli/creaNewProject/creaNewProject.cpp +++ b/appli/creaNewProject/creaNewProject.cpp @@ -30,13 +30,20 @@ bool myApp::OnInit( ) #if(_WIN32) std::string command("creaNewProject.bat "); + std::string command1("creaSed.exe "); + std::string command2("del "); #else std::string command("creaNewProject.sh "); #endif - command += crea::wx2std(dir) + " " + crea::wx2std(name); + command += "\"" + crea::wx2std(dir) + "\" \"" + crea::wx2std(name) + "\""; + command1 += "\"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt.in\" " + "PROJECT_NAME " + crea::wx2std(name) + "> \"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt\""; + command2 += "\"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt.in\""; if ( ! system ( command.c_str() ) ) { + + system ( command1.c_str() ); + system ( command2.c_str() ); wxMessageBox(_T("Done !"),_T("creaNewProject"), wxOK | wxICON_INFORMATION); } diff --git a/appli/creaSed/creaSed.cpp b/appli/creaSed/creaSed.cpp index 288c10d..96ad6b8 100644 --- a/appli/creaSed/creaSed.cpp +++ b/appli/creaSed/creaSed.cpp @@ -24,10 +24,13 @@ void replace(std::string& str, //========================================================================== int main(int argc, char **argv) { - + if (argc!=4) { - std::cerr << "usage : "<< argv[0] <<" fileIn \"FindString\" \"ReplaceString\"" << std::endl; + for(int i = 1; i < argc; i++){ + std::cerr << "|||| "<]*>" "" _RC_FILE "${_RC_FILE}") + STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}") + IF(NOT _ABS_PATH_INDICATOR) + SET(_RC_FILE "${rc_path}/${_RC_FILE}") + ENDIF(NOT _ABS_PATH_INDICATOR) + SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}") + ENDFOREACH(_RC_FILE) + ADD_CUSTOM_COMMAND(OUTPUT ${outfile} + COMMAND ${QT_RCC_EXECUTABLE} + ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile} + MAIN_DEPENDENCY ${infile} + DEPENDS ${_RC_DEPENDS}) + SET(${outfiles} ${${outfiles}} ${outfile}) + ENDFOREACH (it) + + ENDMACRO (QT4_ADD_RESOURCES) + + MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename) + GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE) + SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) + SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) + SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) + + ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} + COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -p ${_basename} ${_infile} + DEPENDS ${_infile}) + + SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) + + QT4_GENERATE_MOC(${_header} ${_moc}) + + SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc}) + MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) + + ENDMACRO(QT4_ADD_DBUS_INTERFACE) + + + MACRO(QT4_ADD_DBUS_INTERFACES _sources) + FOREACH (_current_FILE ${ARGN}) + GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE) + # get the part before the ".xml" suffix + STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2" _basename ${_current_FILE}) + STRING(TOLOWER ${_basename} _basename) + QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface) + ENDFOREACH (_current_FILE) + ENDMACRO(QT4_ADD_DBUS_INTERFACES) + + + MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName ) + SET(_customName "${ARGV1}") + GET_FILENAME_COMPONENT(_in_file ${_header} ABSOLUTE) + GET_FILENAME_COMPONENT(_basename ${_header} NAME_WE) + + IF (_customName) + SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName}) + ELSE (_customName) + SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.xml) + ENDIF (_customName) + + ADD_CUSTOM_COMMAND(OUTPUT ${_target} + COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_in_file} > ${_target} + DEPENDS ${_in_file} + ) + ENDMACRO(QT4_GENERATE_DBUS_INTERFACE) + + + MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optionalBasename ) + GET_FILENAME_COMPONENT(_infile ${_xml_file} ABSOLUTE) + + SET(_optionalBasename "${ARGV4}") + IF (_optionalBasename) + SET(_basename ${_optionalBasename} ) + ELSE (_optionalBasename) + STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2adaptor" _basename ${_infile}) + STRING(TOLOWER ${_basename} _basename) + ENDIF (_optionalBasename) + + SET(_optionalClassName "${ARGV5}") + SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) + SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) + SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) + + IF(_optionalClassName) + ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} + COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile} + DEPENDS ${_infile} + ) + ELSE(_optionalClassName) + ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} + COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile} + DEPENDS ${_infile} + ) + ENDIF(_optionalClassName) + + QT4_GENERATE_MOC(${_header} ${_moc}) + SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) + MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) + + SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc}) + ENDMACRO(QT4_ADD_DBUS_ADAPTOR) + + MACRO(QT4_AUTOMOC) + QT4_GET_MOC_FLAGS(_moc_INCS) + + SET(_matching_FILES ) + FOREACH (_current_FILE ${ARGN}) + + GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE) + # if "SKIP_AUTOMOC" is set to true, we will not handle this file here. + # This is required to make uic work correctly: + # we need to add generated .cpp files to the sources (to compile them), + # but we cannot let automoc handle them, as the .cpp files don't exist yet when + # cmake is run for the very first time on them -> however the .cpp files might + # exist at a later run. at that time we need to skip them, so that we don't add two + # different rules for the same moc file + GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC) + + IF ( NOT _skip AND EXISTS ${_abs_FILE} ) + + FILE(READ ${_abs_FILE} _contents) + + GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH) + + STRING(REGEX MATCHALL "#include +[^ ]+\\.moc[\">]" _match "${_contents}") + IF(_match) + FOREACH (_current_MOC_INC ${_match}) + STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}") + GET_FILENAME_COMPONENT(_basename ${_current_MOC} NAME_WE) + SET(_header ${_abs_PATH}/${_basename}.h) + SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC}) + QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "") + MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc}) + ENDFOREACH (_current_MOC_INC) + ENDIF(_match) + ENDIF ( NOT _skip AND EXISTS ${_abs_FILE} ) + ENDFOREACH (_current_FILE) + ENDMACRO(QT4_AUTOMOC) + + MACRO(QT4_CREATE_TRANSLATION _qm_files) + QT4_EXTRACT_OPTIONS(_lupdate_files _lupdate_options ${ARGN}) + MESSAGE("lupdate_files ${_lupdate_files}") + MESSAGE("lupdate_options ${_lupdate_options}") + SET(_my_sources) + SET(_my_tsfiles) + FOREACH (_file ${_lupdate_files}) + GET_FILENAME_COMPONENT(_ext ${_file} EXT) + GET_FILENAME_COMPONENT(_abs_FILE ${_file} ABSOLUTE) + IF(_ext MATCHES "ts") + LIST(APPEND _my_tsfiles ${_abs_FILE}) + ELSE(_ext MATCHES "ts") + LIST(APPEND _my_sources ${_abs_FILE}) + ENDIF(_ext MATCHES "ts") + ENDFOREACH(_file) + FOREACH(_ts_file ${_my_tsfiles}) + ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file} + COMMAND ${QT_LUPDATE_EXECUTABLE} + ARGS ${_lupdate_options} ${_my_sources} -ts ${_ts_file} + DEPENDS ${_my_sources}) + ENDFOREACH(_ts_file) + QT4_ADD_TRANSLATION(${_qm_files} ${_my_tsfiles}) + ENDMACRO(QT4_CREATE_TRANSLATION) + + MACRO(QT4_ADD_TRANSLATION _qm_files) + FOREACH (_current_FILE ${ARGN}) + GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE) + GET_FILENAME_COMPONENT(qm ${_abs_FILE} NAME_WE) + SET(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm") + + ADD_CUSTOM_COMMAND(OUTPUT ${qm} + COMMAND ${QT_LRELEASE_EXECUTABLE} + ARGS ${_abs_FILE} -qm ${qm} + DEPENDS ${_abs_FILE} + ) + SET(${_qm_files} ${${_qm_files}} ${qm}) + ENDFOREACH (_current_FILE) + ENDMACRO(QT4_ADD_TRANSLATION) + + + # Set QT_QTCORE_LIBRARY by searching for a lib with "QtCore." as part of the filename + FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE NAMES QtCore QtCore4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH ) + FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG NAMES QtCore_debug QtCored QtCored4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QT3SUPPORT_LIBRARY + FIND_LIBRARY(QT_QT3SUPPORT_LIBRARY_RELEASE NAMES Qt3Support Qt3Support4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QT3SUPPORT_LIBRARY_DEBUG NAMES Qt3Support_debug Qt3Supportd Qt3Supportd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTGUI_LIBRARY + FIND_LIBRARY(QT_QTGUI_LIBRARY_RELEASE NAMES QtGui QtGui4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTGUI_LIBRARY_DEBUG NAMES QtGui_debug QtGuid QtGuid4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTMOTIF_LIBRARY + IF(Q_WS_X11) + FIND_LIBRARY(QT_QTMOTIF_LIBRARY_RELEASE NAMES QtMotif PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTMOTIF_LIBRARY_DEBUG NAMES QtMotif_debug PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + ENDIF(Q_WS_X11) + + # Set QT_QTNETWORK_LIBRARY + FIND_LIBRARY(QT_QTNETWORK_LIBRARY_RELEASE NAMES QtNetwork QtNetwork4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTNETWORK_LIBRARY_DEBUG NAMES QtNetwork_debug QtNetworkd QtNetworkd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTNSPLUGIN_LIBRARY + FIND_LIBRARY(QT_QTNSPLUGIN_LIBRARY_RELEASE NAMES QtNsPlugin PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTNSPLUGIN_LIBRARY_DEBUG NAMES QtNsPlugin_debug PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTOPENGL_LIBRARY + FIND_LIBRARY(QT_QTOPENGL_LIBRARY_RELEASE NAMES QtOpenGL QtOpenGL4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTOPENGL_LIBRARY_DEBUG NAMES QtOpenGL_debug QtOpenGLd QtOpenGLd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTSQL_LIBRARY + FIND_LIBRARY(QT_QTSQL_LIBRARY_RELEASE NAMES QtSql QtSql4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTSQL_LIBRARY_DEBUG NAMES QtSql_debug QtSqld QtSqld4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTXML_LIBRARY + FIND_LIBRARY(QT_QTXML_LIBRARY_RELEASE NAMES QtXml QtXml4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTXML_LIBRARY_DEBUG NAMES QtXml_debug QtXmld QtXmld4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTSVG_LIBRARY + FIND_LIBRARY(QT_QTSVG_LIBRARY_RELEASE NAMES QtSvg QtSvg4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTSVG_LIBRARY_DEBUG NAMES QtSvg_debug QtSvgd QtSvgd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTUITOOLS_LIBRARY + FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools QtUiTools4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_DEBUG NAMES QtUiTools_debug QtUiToolsd QtUiToolsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTTEST_LIBRARY + FIND_LIBRARY(QT_QTTEST_LIBRARY_RELEASE NAMES QtTest QtTest4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTTEST_LIBRARY_DEBUG NAMES QtTest_debug QtTestd QtTestd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTDBUS_LIBRARY + # This was introduced with Qt 4.2, where also the naming scheme for debug libs was changed + # So does any of the debug lib names listed here actually exist ? + FIND_LIBRARY(QT_QTDBUS_LIBRARY_RELEASE NAMES QtDBus QtDBus4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTDBUS_LIBRARY_DEBUG NAMES QtDBus_debug QtDBusd QtDBusd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTSCRIPT_LIBRARY + FIND_LIBRARY(QT_QTSCRIPT_LIBRARY_RELEASE NAMES QtScript QtScript4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTSCRIPT_LIBRARY_DEBUG NAMES QtScript_debug QtScriptd QtScriptd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTASSISTANTCLIENT_LIBRARY + FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient QtAssistantClient4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient_debug QtAssistantClientd QtAssistantClientd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTHELP_LIBRARY + FIND_LIBRARY(QT_QTHELP_LIBRARY_RELEASE NAMES QtHelp QtHelp4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTHELP_LIBRARY_DEBUG NAMES QtHelp_debug QtHelpd QtHelpd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene QtCLucene4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene_debug QtCLucened QtCLucened4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTWEBKIT_LIBRARY + FIND_LIBRARY(QT_QTWEBKIT_LIBRARY_RELEASE NAMES QtWebKit QtWebKit4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTWEBKIT_LIBRARY_DEBUG NAMES QtWebKit_debug QtWebKitd QtWebKitd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTXMLPATTERNS_LIBRARY + FIND_LIBRARY(QT_QTXMLPATTERNS_LIBRARY_RELEASE NAMES QtXmlPatterns QtXmlPatterns4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTXMLPATTERNS_LIBRARY_DEBUG NAMES QtXmlPatterns_debug QtXmlPatternsd QtXmlPatternsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_PHONON_LIBRARY + FIND_LIBRARY(QT_PHONON_LIBRARY_RELEASE NAMES phonon phonon4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_PHONON_LIBRARY_DEBUG NAMES phonon_debug phonond phonond4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + MACRO (_QT4_ADJUST_LIB_VARS basename) + IF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG) + + # if only the release version was found, set the debug variable also to the release version + IF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG) + SET(QT_${basename}_LIBRARY_DEBUG ${QT_${basename}_LIBRARY_RELEASE}) + SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE}) + SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_RELEASE}) + ENDIF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG) + + # if only the debug version was found, set the release variable also to the debug version + IF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE) + SET(QT_${basename}_LIBRARY_RELEASE ${QT_${basename}_LIBRARY_DEBUG}) + SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_DEBUG}) + SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_DEBUG}) + ENDIF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE) + + IF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE) + # if the generator supports configuration types then set + # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value + IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(QT_${basename}_LIBRARY optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG}) + ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + # if there are no configuration types and CMAKE_BUILD_TYPE has no value + # then just use the release libraries + SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE} ) + ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(QT_${basename}_LIBRARIES optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG}) + ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE) + + SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE FILEPATH "The Qt ${basename} library") + + IF (QT_${basename}_LIBRARY) + SET(QT_${basename}_FOUND 1) + ENDIF (QT_${basename}_LIBRARY) + + ENDIF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG) + + IF (QT_${basename}_INCLUDE_DIR) + #add the include directory to QT_INCLUDES + SET(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES}) + ENDIF (QT_${basename}_INCLUDE_DIR) + + # Make variables changeble to the advanced user + MARK_AS_ADVANCED(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR) + ENDMACRO (_QT4_ADJUST_LIB_VARS) + # Set QT_xyz_LIBRARY variable and add + # library include path to QT_INCLUDES + _QT4_ADJUST_LIB_VARS(QTCORE) + _QT4_ADJUST_LIB_VARS(QTGUI) + _QT4_ADJUST_LIB_VARS(QT3SUPPORT) + _QT4_ADJUST_LIB_VARS(QTASSISTANT) + _QT4_ADJUST_LIB_VARS(QTDESIGNER) + _QT4_ADJUST_LIB_VARS(QTDESIGNERCOMPONENTS) + _QT4_ADJUST_LIB_VARS(QTNETWORK) + _QT4_ADJUST_LIB_VARS(QTNSPLUGIN) + _QT4_ADJUST_LIB_VARS(QTOPENGL) + _QT4_ADJUST_LIB_VARS(QTSQL) + _QT4_ADJUST_LIB_VARS(QTXML) + _QT4_ADJUST_LIB_VARS(QTSVG) + _QT4_ADJUST_LIB_VARS(QTSCRIPT) + _QT4_ADJUST_LIB_VARS(QTUITOOLS) + _QT4_ADJUST_LIB_VARS(QTTEST) + _QT4_ADJUST_LIB_VARS(QTDBUS) + _QT4_ADJUST_LIB_VARS(QTASSISTANTCLIENT) + _QT4_ADJUST_LIB_VARS(QTHELP) + _QT4_ADJUST_LIB_VARS(QTWEBKIT) + _QT4_ADJUST_LIB_VARS(QTXMLPATTERNS) + _QT4_ADJUST_LIB_VARS(PHONON) + _QT4_ADJUST_LIB_VARS(QTCLUCENE) +ELSEIF(WIN32) + FIND_PACKAGE(Qt4 REQUIRED) +ENDIF(WIN32) \ No newline at end of file diff --git a/src/creaSystem.h b/src/creaSystem.h index 997050f..56e62a4 100644 --- a/src/creaSystem.h +++ b/src/creaSystem.h @@ -3,8 +3,8 @@ Program: crea Module: $RCSfile: creaSystem.h,v $ Language: C++ - Date: $Date: 2009/09/17 11:47:46 $ - Version: $Revision: 1.6 $ + Date: $Date: 2009/09/30 15:53:19 $ + Version: $Revision: 1.7 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -94,7 +94,6 @@ //#define TEST toto - #if defined(_WIN32) && defined(CREA_BUILD_SHARED) //#include "WWW.h" #ifdef CREA_EXPORT_SYMBOLS diff --git a/src/creaVtk.txx b/src/creaVtk.txx index 5cc68e3..ce64d91 100644 --- a/src/creaVtk.txx +++ b/src/creaVtk.txx @@ -19,7 +19,7 @@ namespace crea { template - CREA_EXPORT vtkImageData* NewVtkImageDataFromRaw( T* data, + vtkImageData* NewVtkImageDataFromRaw( T* data, int nx, int ny, int nz, -- 2.45.1 From a19dd400a71fc95b4f264aa9f1d6f976717a22d5 Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Fri, 2 Oct 2009 16:34:45 +0000 Subject: [PATCH 07/16] no message --- appli/creaNewProject/creaNewProject.cpp | 4 ++++ appli/creaNewProject/creaNewProject.sh.in | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/appli/creaNewProject/creaNewProject.cpp b/appli/creaNewProject/creaNewProject.cpp index 695b00d..f66f2a5 100644 --- a/appli/creaNewProject/creaNewProject.cpp +++ b/appli/creaNewProject/creaNewProject.cpp @@ -35,9 +35,13 @@ bool myApp::OnInit( ) #else std::string command("creaNewProject.sh "); #endif +<<<<<<< creaNewProject.cpp + command += "\"" + crea::wx2std(dir) + "\"" +" " + crea::wx2std(name); +======= command += "\"" + crea::wx2std(dir) + "\" \"" + crea::wx2std(name) + "\""; command1 += "\"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt.in\" " + "PROJECT_NAME " + crea::wx2std(name) + "> \"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt\""; command2 += "\"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt.in\""; +>>>>>>> 1.3 if ( ! system ( command.c_str() ) ) { diff --git a/appli/creaNewProject/creaNewProject.sh.in b/appli/creaNewProject/creaNewProject.sh.in index c74f844..235558e 100755 --- a/appli/creaNewProject/creaNewProject.sh.in +++ b/appli/creaNewProject/creaNewProject.sh.in @@ -16,10 +16,10 @@ INPUT=${BINPATH}/creaNewProject_data OUTPUT=$1 PROJECT=$2 -#echo "output = " $OUTPUT -#echo "bin = " $BINPATH -#echo "input = " $INPUT -#echo "project= " $PROJECT +echo "output = " $OUTPUT +echo "bin = " $BINPATH +echo "input = " $INPUT +echo "project= " $PROJECT if [ -d $OUTPUT/${PROJECT} ] then -- 2.45.1 From 861b6804685e78436e5863f041b3063eadca62cc Mon Sep 17 00:00:00 2001 From: Juan Prieto Date: Mon, 5 Oct 2009 19:41:55 +0000 Subject: [PATCH 08/16] *** empty log message *** --- cmake/CREAMacro_FindAndUseLibraries.cmake | 12 ++++++++---- src/creaVtkBasicSlicer.h | 2 +- src/creawxVTKRenderWindowInteractor.cxx | 6 +++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/cmake/CREAMacro_FindAndUseLibraries.cmake b/cmake/CREAMacro_FindAndUseLibraries.cmake index a2ce726..9e18125 100644 --- a/cmake/CREAMacro_FindAndUseLibraries.cmake +++ b/cmake/CREAMacro_FindAndUseLibraries.cmake @@ -274,15 +274,19 @@ IF(USE_BOOST) CREA_DEFINE( USE_BOOST ) IF(WIN32) - LINK_DIRECTORIES( ${Boost_INCLUDE_DIRS}/stage/lib) + + LINK_DIRECTORIES( ${Boost_INCLUDE_DIRS}/stage/lib) #JCP 01/10/2009 + #LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS}) #MESSAGE ("EED " ${Boost_LIBRARY_DIRS}) #libboost_signals-vc71-mt-1_37 #libboost_filesystem-vc71-mt-1_37 #boost_date_time-vc71-mt-1_37 + + #message("creamacro find and use lib = ${Boost_SIGNALS_LIBRARY}") SET(BOOST_LIBRARIES - boost_signals-vc90-mt-1_37 - boost_filesystem-vc90-mt-1_37 - boost_date_time-vc90-mt-1_37 + boost_signals-vc90-mt + boost_filesystem-vc90-mt + boost_date_time-vc90-mt #what about boost_thread? JPR ) diff --git a/src/creaVtkBasicSlicer.h b/src/creaVtkBasicSlicer.h index 4c110f2..b0eca92 100644 --- a/src/creaVtkBasicSlicer.h +++ b/src/creaVtkBasicSlicer.h @@ -9,7 +9,7 @@ namespace crea { - void CREA_EXPORT VtkBasicSlicer( vtkImageData* I ); + CREA_EXPORT void VtkBasicSlicer( vtkImageData* I ); } diff --git a/src/creawxVTKRenderWindowInteractor.cxx b/src/creawxVTKRenderWindowInteractor.cxx index 107c0e3..4f6a0bb 100644 --- a/src/creawxVTKRenderWindowInteractor.cxx +++ b/src/creawxVTKRenderWindowInteractor.cxx @@ -3,8 +3,8 @@ Program: Visualization Toolkit Module: $RCSfile: creawxVTKRenderWindowInteractor.cxx,v $ Language: C++ - Date: $Date: 2009/01/07 12:55:23 $ - Version: $Revision: 1.4 $ + Date: $Date: 2009/10/05 19:41:56 $ + Version: $Revision: 1.5 $ Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. @@ -160,7 +160,7 @@ creawxVTKRenderWindowInteractor::creawxVTKRenderWindowInteractor(wxWindow *paren #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) : vtkRenderWindowInteractor(), wxGLCanvas(parent, id, pos, size, style, name) #else - : vtkRenderWindowInteractor(), wxWindow(parent, id, pos, size, style, name) + : wxWindow(parent, id, pos, size, style, name), vtkRenderWindowInteractor() #endif //__WXGTK__ , timer(this, ID_creawxVTKRenderWindowInteractor_TIMER) , ActiveButton(wxEVT_NULL) -- 2.45.1 From be5b9515b36c54483baf3c8c52e364eb0d4cae6c Mon Sep 17 00:00:00 2001 From: Frederic Cervenansky Date: Tue, 6 Oct 2009 12:46:45 +0000 Subject: [PATCH 09/16] resolve a conflit --- appli/creaNewProject/creaNewProject.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/appli/creaNewProject/creaNewProject.cpp b/appli/creaNewProject/creaNewProject.cpp index f66f2a5..889faad 100644 --- a/appli/creaNewProject/creaNewProject.cpp +++ b/appli/creaNewProject/creaNewProject.cpp @@ -35,14 +35,9 @@ bool myApp::OnInit( ) #else std::string command("creaNewProject.sh "); #endif -<<<<<<< creaNewProject.cpp - command += "\"" + crea::wx2std(dir) + "\"" +" " + crea::wx2std(name); -======= command += "\"" + crea::wx2std(dir) + "\" \"" + crea::wx2std(name) + "\""; command1 += "\"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt.in\" " + "PROJECT_NAME " + crea::wx2std(name) + "> \"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt\""; command2 += "\"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt.in\""; ->>>>>>> 1.3 - if ( ! system ( command.c_str() ) ) { -- 2.45.1 From 44a55a712963dcfbf88508ca3ceb8d608c5b74e9 Mon Sep 17 00:00:00 2001 From: trillos Date: Thu, 8 Oct 2009 12:30:45 +0000 Subject: [PATCH 10/16] Fixed mistake in the "find and use libraries" cmake macro --- cmake/CREAMacro_FindAndUseLibraries.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/CREAMacro_FindAndUseLibraries.cmake b/cmake/CREAMacro_FindAndUseLibraries.cmake index 9e18125..d3f02bc 100644 --- a/cmake/CREAMacro_FindAndUseLibraries.cmake +++ b/cmake/CREAMacro_FindAndUseLibraries.cmake @@ -284,9 +284,9 @@ IF(USE_BOOST) #message("creamacro find and use lib = ${Boost_SIGNALS_LIBRARY}") SET(BOOST_LIBRARIES - boost_signals-vc90-mt - boost_filesystem-vc90-mt - boost_date_time-vc90-mt + boost_signals-vc90-mt-1_37 + boost_filesystem-vc90-mt-1_37 + boost_date_time-vc90-mt-1_37 #what about boost_thread? JPR ) -- 2.45.1 From f85d688193588c7429d0ec2ccc0777a4596f1d47 Mon Sep 17 00:00:00 2001 From: Juan Prieto Date: Fri, 9 Oct 2009 13:13:49 +0000 Subject: [PATCH 11/16] *** empty log message *** --- Version.cmake | 2 +- cmake/CREAMacro_FindAndUseWxWidgets.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Version.cmake b/Version.cmake index ba510e4..61df5b9 100644 --- a/Version.cmake +++ b/Version.cmake @@ -1,3 +1,3 @@ SET(crea_MAJOR_VERSION 0) SET(crea_MINOR_VERSION 3) -SET(crea_BUILD_VERSION 0) +SET(crea_BUILD_VERSION 1) diff --git a/cmake/CREAMacro_FindAndUseWxWidgets.cmake b/cmake/CREAMacro_FindAndUseWxWidgets.cmake index 9124fc6..6876d4b 100644 --- a/cmake/CREAMacro_FindAndUseWxWidgets.cmake +++ b/cmake/CREAMacro_FindAndUseWxWidgets.cmake @@ -12,7 +12,7 @@ MACRO(CREA_FIND_WXWIDGETS) #wxWidgets build related stuff # DO NOT FORCE DEBUG LIBS !! - SET(WXW_USE_DEBUG ON) + SET(WXW_USE_DEBUG OFF) SET(WXW_USE_UNICODE OFF) SET(WXW_USE_SHARED ON) SET(WXW_USE_UNIV OFF) -- 2.45.1 From 7afa3ebd8c9f99468d8de5683978bf602ffac4cb Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Fri, 9 Oct 2009 14:09:18 +0000 Subject: [PATCH 12/16] *** empty log message *** --- cmake/CREAMacro_FindAndUseLibraries.cmake | 6 +- src/creaMessageManager.h | 97 ----------------------- src/creaSystem.h | 5 +- src/creaVtk.h | 4 +- src/creaVtk.txx | 2 +- 5 files changed, 8 insertions(+), 106 deletions(-) diff --git a/cmake/CREAMacro_FindAndUseLibraries.cmake b/cmake/CREAMacro_FindAndUseLibraries.cmake index d3f02bc..d5d4aca 100644 --- a/cmake/CREAMacro_FindAndUseLibraries.cmake +++ b/cmake/CREAMacro_FindAndUseLibraries.cmake @@ -284,9 +284,9 @@ IF(USE_BOOST) #message("creamacro find and use lib = ${Boost_SIGNALS_LIBRARY}") SET(BOOST_LIBRARIES - boost_signals-vc90-mt-1_37 - boost_filesystem-vc90-mt-1_37 - boost_date_time-vc90-mt-1_37 + boost_signals-vc90-mt-1_40 + boost_filesystem-vc90-mt-1_40 + boost_date_time-vc90-mt-1_40 #what about boost_thread? JPR ) diff --git a/src/creaMessageManager.h b/src/creaMessageManager.h index 87fb5f8..9fbaae5 100644 --- a/src/creaMessageManager.h +++ b/src/creaMessageManager.h @@ -1,149 +1,58 @@ - - /*! \file - - - \brief Class creaMessageManager and Macros for outputing messages in crea - - - There are 4 kinds of messages : - - Messages (normal messages) - - Debug messages (not compiled in release) - - Warnings - - Errors - There are also "types" of messages which are strings which identify the nature of the message - (for example : "Kernel" messages are generated by the core classes of the library, there can be a type of - message for each type of Node, and so on...) - A type of message must be declared by registering it into the MessageManager. This is done by a line like : - crea::MessageManager::RegisterMessageType("Kernel","Messages generated by the core classes of the library",5); - where : - -The first string is the type of the message (the category which will be used to generate a message of this type) - -The second string is help string - -The integer is the initial level for the messages of this type (see below). - - - To generate a message of a known type then use one of the macros : - creaMessage, creaDebugMessage, creaWarning, creaError or their variants. - - - example : - - - creaMessage("Kernel",4,"problem with "< - #include - - - #include - #include - #include - #include - - - // Comment out these symbols to prevent compilation - //#define CREA_COMPILE_MESSAGES - //#define CREA_COMPILE_DEBUG_MESSAGES - //#define CREA_COMPILE_WARNING_MESSAGES - //#define CREA_COMPILE_ERROR_MESSAGES - - - - - #define creaOnMessageLevel(key,value) \ int __creaOnMessageLevelVariable = \ crea::MessageManager::GetMessageLevel(key); \ @@ -153,8 +62,6 @@ } \ else if (value<= __creaOnMessageLevelVariable) - - #ifdef CREA_PREPEND_MESSAGE_WITH_CODE #define creaMessageCode \ key[0] << key[1] << key[2] << value << " " @@ -162,8 +69,6 @@ #define creaMessageCode "" #endif - - #ifdef CREA_PREPEND_MESSAGE_WITH_TAB #define creaMessageTab \ crea::MessageManager::GetTab() @@ -171,8 +76,6 @@ #define creaMessageTab "" #endif - - //#define CREA_PREPEND_MESSAGE_WITH_SPACE #ifdef CREA_PREPEND_MESSAGE_WITH_SPACE #define creaMessageSpace(value) \ diff --git a/src/creaSystem.h b/src/creaSystem.h index 56e62a4..c9011c3 100644 --- a/src/creaSystem.h +++ b/src/creaSystem.h @@ -3,8 +3,8 @@ Program: crea Module: $RCSfile: creaSystem.h,v $ Language: C++ - Date: $Date: 2009/09/30 15:53:19 $ - Version: $Revision: 1.7 $ + Date: $Date: 2009/10/09 14:09:20 $ + Version: $Revision: 1.8 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -95,7 +95,6 @@ #if defined(_WIN32) && defined(CREA_BUILD_SHARED) -//#include "WWW.h" #ifdef CREA_EXPORT_SYMBOLS #define CREA_EXPORT __declspec( dllexport ) #else diff --git a/src/creaVtk.h b/src/creaVtk.h index fea59cf..84510c7 100644 --- a/src/creaVtk.h +++ b/src/creaVtk.h @@ -3,7 +3,7 @@ #ifdef USE_VTK -#include +#include "creaSystem.h" #include namespace crea @@ -41,7 +41,7 @@ namespace crea */ } -#include +#include "creaVtk.txx" #endif // USE_VTK diff --git a/src/creaVtk.txx b/src/creaVtk.txx index ce64d91..b0fe8b0 100644 --- a/src/creaVtk.txx +++ b/src/creaVtk.txx @@ -19,7 +19,7 @@ namespace crea { template - vtkImageData* NewVtkImageDataFromRaw( T* data, + /*CREA_EXPORT*/ vtkImageData* NewVtkImageDataFromRaw( T* data, int nx, int ny, int nz, -- 2.45.1 From ba590c90164ed4849030febe99143476a4a4abe6 Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Mon, 12 Oct 2009 18:33:45 +0000 Subject: [PATCH 13/16] *** empty log message *** --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 525c87e..5b110e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ INCLUDE(Version.cmake) SET(CREA_VERBOSE_CMAKE TRUE) SET(CREA_CMAKE_REL_PATH cmake) SET(CREA_CMAKE_DIR ${PROJECT_SOURCE_DIR}/${CREA_CMAKE_REL_PATH}) -INCLUDE(${CREA_CMAKE_DIR}/CREACMakeSettings.cmake) +INCLUDE(${CREA_CMAKE_DIR}/CREACMakeSettings.cmake NO_POLICY_SCOPE) INCLUDE(${CREA_CMAKE_DIR}/CREAMacros.cmake) CREA_PREVENT_IN_SOURCE_BUILD() -- 2.45.1 From a4c2936e3929dae6b233aaaac5f8e3d8fc59747f Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Tue, 13 Oct 2009 14:18:53 +0000 Subject: [PATCH 14/16] *** empty log message *** --- appli/creaNewProject/NewProject/README.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 appli/creaNewProject/NewProject/README.txt diff --git a/appli/creaNewProject/NewProject/README.txt b/appli/creaNewProject/NewProject/README.txt new file mode 100644 index 0000000..eaf8cf9 --- /dev/null +++ b/appli/creaNewProject/NewProject/README.txt @@ -0,0 +1,2 @@ +creaMaracasVisu +(c) CREATIS-LRMN 2008 \ No newline at end of file -- 2.45.1 From 63b5d6bd9014e934fade51396aebddd95d8d514f Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Tue, 13 Oct 2009 14:18:53 +0000 Subject: [PATCH 15/16] *** empty log message *** --- .../NewProject/CMakeLists.txt.in | 1 + appli/creaNewProject/NewProject/LICENSE.txt | 514 ++++++++++++++++++ appli/creaNewProject/NewProject/README.txt | 4 +- .../NewProject/install/CMakeLists.txt | 112 ++++ 4 files changed, 629 insertions(+), 2 deletions(-) create mode 100644 appli/creaNewProject/NewProject/LICENSE.txt create mode 100644 appli/creaNewProject/NewProject/install/CMakeLists.txt diff --git a/appli/creaNewProject/NewProject/CMakeLists.txt.in b/appli/creaNewProject/NewProject/CMakeLists.txt.in index 5a90c41..8b41dac 100644 --- a/appli/creaNewProject/NewProject/CMakeLists.txt.in +++ b/appli/creaNewProject/NewProject/CMakeLists.txt.in @@ -112,4 +112,5 @@ SET(BBTK_DOC_BUILD_PATH SUBDIRS(lib) SUBDIRS(appli) SUBDIRS(doc) +SUBDIRS(install) #================================== diff --git a/appli/creaNewProject/NewProject/LICENSE.txt b/appli/creaNewProject/NewProject/LICENSE.txt new file mode 100644 index 0000000..fe87c25 --- /dev/null +++ b/appli/creaNewProject/NewProject/LICENSE.txt @@ -0,0 +1,514 @@ +CeCILL-B FREE SOFTWARE LICENSE AGREEMENT + + + Notice + +This Agreement is a Free Software license agreement that is the result +of discussions between its authors in order to ensure compliance with +the two main principles guiding its drafting: + + * firstly, compliance with the principles governing the distribution + of Free Software: access to source code, broad rights granted to + users, + * secondly, the election of a governing law, French law, with which + it is conformant, both as regards the law of torts and + intellectual property law, and the protection that it offers to + both authors and holders of the economic rights over software. + +The authors of the CeCILL-B (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre]) +license are: + +Commissariat à l'Energie Atomique - CEA, a public scientific, technical +and industrial research establishment, having its principal place of +business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. + +Centre National de la Recherche Scientifique - CNRS, a public scientific +and technological establishment, having its principal place of business +at 3 rue Michel-Ange, 75794 Paris cedex 16, France. + +Institut National de Recherche en Informatique et en Automatique - +INRIA, a public scientific and technological establishment, having its +principal place of business at Domaine de Voluceau, Rocquencourt, BP +105, 78153 Le Chesnay cedex, France. + + + Preamble + +This Agreement is an open source software license intended to give users +significant freedom to modify and redistribute the software licensed +hereunder. + +The exercising of this freedom is conditional upon a strong obligation +of giving credits for everybody that distributes a software +incorporating a software ruled by the current license so as all +contributions to be properly identified and acknowledged. + +In consideration of access to the source code and the rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors only have limited liability. + +In this respect, the risks associated with loading, using, modifying +and/or developing or reproducing the software by the user are brought to +the user's attention, given its Free Software status, which may make it +complicated to use, with the result that its use is reserved for +developers and experienced professionals having in-depth computer +knowledge. Users are therefore encouraged to load and test the +suitability of the software as regards their requirements in conditions +enabling the security of their systems and/or data to be ensured and, +more generally, to use and operate it in the same conditions of +security. This Agreement may be freely reproduced and published, +provided it is not altered, and that no provisions are either added or +removed herefrom. + +This Agreement may apply to any or all software for which the holder of +the economic rights decides to submit the use thereof to its provisions. + + + Article 1 - DEFINITIONS + +For the purpose of this Agreement, when the following expressions +commence with a capital letter, they shall have the following meaning: + +Agreement: means this license agreement, and its possible subsequent +versions and annexes. + +Software: means the software in its Object Code and/or Source Code form +and, where applicable, its documentation, "as is" when the Licensee +accepts the Agreement. + +Initial Software: means the Software in its Source Code and possibly its +Object Code form and, where applicable, its documentation, "as is" when +it is first distributed under the terms and conditions of the Agreement. + +Modified Software: means the Software modified by at least one +Contribution. + +Source Code: means all the Software's instructions and program lines to +which access is required so as to modify the Software. + +Object Code: means the binary files originating from the compilation of +the Source Code. + +Holder: means the holder(s) of the economic rights over the Initial +Software. + +Licensee: means the Software user(s) having accepted the Agreement. + +Contributor: means a Licensee having made at least one Contribution. + +Licensor: means the Holder, or any other individual or legal entity, who +distributes the Software under the Agreement. + +Contribution: means any or all modifications, corrections, translations, +adaptations and/or new functions integrated into the Software by any or +all Contributors, as well as any or all Internal Modules. + +Module: means a set of sources files including their documentation that +enables supplementary functions or services in addition to those offered +by the Software. + +External Module: means any or all Modules, not derived from the +Software, so that this Module and the Software run in separate address +spaces, with one calling the other when they are run. + +Internal Module: means any or all Module, connected to the Software so +that they both execute in the same address space. + +Parties: mean both the Licensee and the Licensor. + +These expressions may be used both in singular and plural form. + + + Article 2 - PURPOSE + +The purpose of the Agreement is the grant by the Licensor to the +Licensee of a non-exclusive, transferable and worldwide license for the +Software as set forth in Article 5 hereinafter for the whole term of the +protection granted by the rights over said Software. + + + Article 3 - ACCEPTANCE + +3.1 The Licensee shall be deemed as having accepted the terms and +conditions of this Agreement upon the occurrence of the first of the +following events: + + * (i) loading the Software by any or all means, notably, by + downloading from a remote server, or by loading from a physical + medium; + * (ii) the first time the Licensee exercises any of the rights + granted hereunder. + +3.2 One copy of the Agreement, containing a notice relating to the +characteristics of the Software, to the limited warranty, and to the +fact that its use is restricted to experienced users has been provided +to the Licensee prior to its acceptance as set forth in Article 3.1 +hereinabove, and the Licensee hereby acknowledges that it has read and +understood it. + + + Article 4 - EFFECTIVE DATE AND TERM + + + 4.1 EFFECTIVE DATE + +The Agreement shall become effective on the date when it is accepted by +the Licensee as set forth in Article 3.1. + + + 4.2 TERM + +The Agreement shall remain in force for the entire legal term of +protection of the economic rights over the Software. + + + Article 5 - SCOPE OF RIGHTS GRANTED + +The Licensor hereby grants to the Licensee, who accepts, the following +rights over the Software for any or all use, and for the term of the +Agreement, on the basis of the terms and conditions set forth hereinafter. + +Besides, if the Licensor owns or comes to own one or more patents +protecting all or part of the functions of the Software or of its +components, the Licensor undertakes not to enforce the rights granted by +these patents against successive Licensees using, exploiting or +modifying the Software. If these patents are transferred, the Licensor +undertakes to have the transferees subscribe to the obligations set +forth in this paragraph. + + + 5.1 RIGHT OF USE + +The Licensee is authorized to use the Software, without any limitation +as to its fields of application, with it being hereinafter specified +that this comprises: + + 1. permanent or temporary reproduction of all or part of the Software + by any or all means and in any or all form. + + 2. loading, displaying, running, or storing the Software on any or + all medium. + + 3. entitlement to observe, study or test its operation so as to + determine the ideas and principles behind any or all constituent + elements of said Software. This shall apply when the Licensee + carries out any or all loading, displaying, running, transmission + or storage operation as regards the Software, that it is entitled + to carry out hereunder. + + + 5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS + +The right to make Contributions includes the right to translate, adapt, +arrange, or make any or all modifications to the Software, and the right +to reproduce the resulting software. + +The Licensee is authorized to make any or all Contributions to the +Software provided that it includes an explicit notice that it is the +author of said Contribution and indicates the date of the creation thereof. + + + 5.3 RIGHT OF DISTRIBUTION + +In particular, the right of distribution includes the right to publish, +transmit and communicate the Software to the general public on any or +all medium, and by any or all means, and the right to market, either in +consideration of a fee, or free of charge, one or more copies of the +Software by any means. + +The Licensee is further authorized to distribute copies of the modified +or unmodified Software to third parties according to the terms and +conditions set forth hereinafter. + + + 5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION + +The Licensee is authorized to distribute true copies of the Software in +Source Code or Object Code form, provided that said distribution +complies with all the provisions of the Agreement and is accompanied by: + + 1. a copy of the Agreement, + + 2. a notice relating to the limitation of both the Licensor's + warranty and liability as set forth in Articles 8 and 9, + +and that, in the event that only the Object Code of the Software is +redistributed, the Licensee allows effective access to the full Source +Code of the Software at a minimum during the entire period of its +distribution of the Software, it being understood that the additional +cost of acquiring the Source Code shall not exceed the cost of +transferring the data. + + + 5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE + +If the Licensee makes any Contribution to the Software, the resulting +Modified Software may be distributed under a license agreement other +than this Agreement subject to compliance with the provisions of Article +5.3.4. + + + 5.3.3 DISTRIBUTION OF EXTERNAL MODULES + +When the Licensee has developed an External Module, the terms and +conditions of this Agreement do not apply to said External Module, that +may be distributed under a separate license agreement. + + + 5.3.4 CREDITS + +Any Licensee who may distribute a Modified Software hereby expressly +agrees to: + + 1. indicate in the related documentation that it is based on the + Software licensed hereunder, and reproduce the intellectual + property notice for the Software, + + 2. ensure that written indications of the Software intended use, + intellectual property notice and license hereunder are included in + easily accessible format from the Modified Software interface, + + 3. mention, on a freely accessible website describing the Modified + Software, at least throughout the distribution term thereof, that + it is based on the Software licensed hereunder, and reproduce the + Software intellectual property notice, + + 4. where it is distributed to a third party that may distribute a + Modified Software without having to make its source code + available, make its best efforts to ensure that said third party + agrees to comply with the obligations set forth in this Article . + +If the Software, whether or not modified, is distributed with an +External Module designed for use in connection with the Software, the +Licensee shall submit said External Module to the foregoing obligations. + + + 5.3.5 COMPATIBILITY WITH THE CeCILL AND CeCILL-C LICENSES + +Where a Modified Software contains a Contribution subject to the CeCILL +license, the provisions set forth in Article 5.3.4 shall be optional. + +A Modified Software may be distributed under the CeCILL-C license. In +such a case the provisions set forth in Article 5.3.4 shall be optional. + + + Article 6 - INTELLECTUAL PROPERTY + + + 6.1 OVER THE INITIAL SOFTWARE + +The Holder owns the economic rights over the Initial Software. Any or +all use of the Initial Software is subject to compliance with the terms +and conditions under which the Holder has elected to distribute its work +and no one shall be entitled to modify the terms and conditions for the +distribution of said Initial Software. + +The Holder undertakes that the Initial Software will remain ruled at +least by this Agreement, for the duration set forth in Article 4.2. + + + 6.2 OVER THE CONTRIBUTIONS + +The Licensee who develops a Contribution is the owner of the +intellectual property rights over this Contribution as defined by +applicable law. + + + 6.3 OVER THE EXTERNAL MODULES + +The Licensee who develops an External Module is the owner of the +intellectual property rights over this External Module as defined by +applicable law and is free to choose the type of agreement that shall +govern its distribution. + + + 6.4 JOINT PROVISIONS + +The Licensee expressly undertakes: + + 1. not to remove, or modify, in any manner, the intellectual property + notices attached to the Software; + + 2. to reproduce said notices, in an identical manner, in the copies + of the Software modified or not. + +The Licensee undertakes not to directly or indirectly infringe the +intellectual property rights of the Holder and/or Contributors on the +Software and to take, where applicable, vis-à-vis its staff, any and all +measures required to ensure respect of said intellectual property rights +of the Holder and/or Contributors. + + + Article 7 - RELATED SERVICES + +7.1 Under no circumstances shall the Agreement oblige the Licensor to +provide technical assistance or maintenance services for the Software. + +However, the Licensor is entitled to offer this type of services. The +terms and conditions of such technical assistance, and/or such +maintenance, shall be set forth in a separate instrument. Only the +Licensor offering said maintenance and/or technical assistance services +shall incur liability therefor. + +7.2 Similarly, any Licensor is entitled to offer to its licensees, under +its sole responsibility, a warranty, that shall only be binding upon +itself, for the redistribution of the Software and/or the Modified +Software, under terms and conditions that it is free to decide. Said +warranty, and the financial terms and conditions of its application, +shall be subject of a separate instrument executed between the Licensor +and the Licensee. + + + Article 8 - LIABILITY + +8.1 Subject to the provisions of Article 8.2, the Licensee shall be +entitled to claim compensation for any direct loss it may have suffered +from the Software as a result of a fault on the part of the relevant +Licensor, subject to providing evidence thereof. + +8.2 The Licensor's liability is limited to the commitments made under +this Agreement and shall not be incurred as a result of in particular: +(i) loss due the Licensee's total or partial failure to fulfill its +obligations, (ii) direct or consequential loss that is suffered by the +Licensee due to the use or performance of the Software, and (iii) more +generally, any consequential loss. In particular the Parties expressly +agree that any or all pecuniary or business loss (i.e. loss of data, +loss of profits, operating loss, loss of customers or orders, +opportunity cost, any disturbance to business activities) or any or all +legal proceedings instituted against the Licensee by a third party, +shall constitute consequential loss and shall not provide entitlement to +any or all compensation from the Licensor. + + + Article 9 - WARRANTY + +9.1 The Licensee acknowledges that the scientific and technical +state-of-the-art when the Software was distributed did not enable all +possible uses to be tested and verified, nor for the presence of +possible defects to be detected. In this respect, the Licensee's +attention has been drawn to the risks associated with loading, using, +modifying and/or developing and reproducing the Software which are +reserved for experienced users. + +The Licensee shall be responsible for verifying, by any or all means, +the suitability of the product for its requirements, its good working +order, and for ensuring that it shall not cause damage to either persons +or properties. + +9.2 The Licensor hereby represents, in good faith, that it is entitled +to grant all the rights over the Software (including in particular the +rights set forth in Article 5). + +9.3 The Licensee acknowledges that the Software is supplied "as is" by +the Licensor without any other express or tacit warranty, other than +that provided for in Article 9.2 and, in particular, without any warranty +as to its commercial value, its secured, safe, innovative or relevant +nature. + +Specifically, the Licensor does not warrant that the Software is free +from any error, that it will operate without interruption, that it will +be compatible with the Licensee's own equipment and software +configuration, nor that it will meet the Licensee's requirements. + +9.4 The Licensor does not either expressly or tacitly warrant that the +Software does not infringe any third party intellectual property right +relating to a patent, software or any other property right. Therefore, +the Licensor disclaims any and all liability towards the Licensee +arising out of any or all proceedings for infringement that may be +instituted in respect of the use, modification and redistribution of the +Software. Nevertheless, should such proceedings be instituted against +the Licensee, the Licensor shall provide it with technical and legal +assistance for its defense. Such technical and legal assistance shall be +decided on a case-by-case basis between the relevant Licensor and the +Licensee pursuant to a memorandum of understanding. The Licensor +disclaims any and all liability as regards the Licensee's use of the +name of the Software. No warranty is given as regards the existence of +prior rights over the name of the Software or as regards the existence +of a trademark. + + + Article 10 - TERMINATION + +10.1 In the event of a breach by the Licensee of its obligations +hereunder, the Licensor may automatically terminate this Agreement +thirty (30) days after notice has been sent to the Licensee and has +remained ineffective. + +10.2 A Licensee whose Agreement is terminated shall no longer be +authorized to use, modify or distribute the Software. However, any +licenses that it may have granted prior to termination of the Agreement +shall remain valid subject to their having been granted in compliance +with the terms and conditions hereof. + + + Article 11 - MISCELLANEOUS + + + 11.1 EXCUSABLE EVENTS + +Neither Party shall be liable for any or all delay, or failure to +perform the Agreement, that may be attributable to an event of force +majeure, an act of God or an outside cause, such as defective +functioning or interruptions of the electricity or telecommunications +networks, network paralysis following a virus attack, intervention by +government authorities, natural disasters, water damage, earthquakes, +fire, explosions, strikes and labor unrest, war, etc. + +11.2 Any failure by either Party, on one or more occasions, to invoke +one or more of the provisions hereof, shall under no circumstances be +interpreted as being a waiver by the interested Party of its right to +invoke said provision(s) subsequently. + +11.3 The Agreement cancels and replaces any or all previous agreements, +whether written or oral, between the Parties and having the same +purpose, and constitutes the entirety of the agreement between said +Parties concerning said purpose. No supplement or modification to the +terms and conditions hereof shall be effective as between the Parties +unless it is made in writing and signed by their duly authorized +representatives. + +11.4 In the event that one or more of the provisions hereof were to +conflict with a current or future applicable act or legislative text, +said act or legislative text shall prevail, and the Parties shall make +the necessary amendments so as to comply with said act or legislative +text. All other provisions shall remain effective. Similarly, invalidity +of a provision of the Agreement, for any reason whatsoever, shall not +cause the Agreement as a whole to be invalid. + + + 11.5 LANGUAGE + +The Agreement is drafted in both French and English and both versions +are deemed authentic. + + + Article 12 - NEW VERSIONS OF THE AGREEMENT + +12.1 Any person is authorized to duplicate and distribute copies of this +Agreement. + +12.2 So as to ensure coherence, the wording of this Agreement is +protected and may only be modified by the authors of the License, who +reserve the right to periodically publish updates or new versions of the +Agreement, each with a separate number. These subsequent versions may +address new issues encountered by Free Software. + +12.3 Any Software distributed under a given version of the Agreement may +only be subsequently distributed under the same version of the Agreement +or a subsequent version. + + + Article 13 - GOVERNING LAW AND JURISDICTION + +13.1 The Agreement is governed by French law. The Parties agree to +endeavor to seek an amicable solution to any disagreements or disputes +that may arise during the performance of the Agreement. + +13.2 Failing an amicable solution within two (2) months as from their +occurrence, and unless emergency proceedings are necessary, the +disagreements or disputes shall be referred to the Paris Courts having +jurisdiction, by the more diligent Party. + + +Version 1.0 dated 2006-09-05. diff --git a/appli/creaNewProject/NewProject/README.txt b/appli/creaNewProject/NewProject/README.txt index eaf8cf9..9e67de7 100644 --- a/appli/creaNewProject/NewProject/README.txt +++ b/appli/creaNewProject/NewProject/README.txt @@ -1,2 +1,2 @@ -creaMaracasVisu -(c) CREATIS-LRMN 2008 \ No newline at end of file + +(c) CREATIS 2009 \ No newline at end of file diff --git a/appli/creaNewProject/NewProject/install/CMakeLists.txt b/appli/creaNewProject/NewProject/install/CMakeLists.txt new file mode 100644 index 0000000..d5c9e3e --- /dev/null +++ b/appli/creaNewProject/NewProject/install/CMakeLists.txt @@ -0,0 +1,112 @@ +#----------------------------------------------------------------------------- +# CPACK+NSIS PACKAGING +#----------------------------------------------------------------------------- + +#---Documentation------------- +#http://www.cmake.org/Wiki/CMake:Packaging_With_CPack +#http://www.cmake.org/Wiki/CMake:CPackConfiguration +#http://www.cmake.org/Wiki/CMake:Install_Commands + + +INCLUDE(InstallRequiredSystemLibraries) + +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME} - CREATIS-LRMN") +SET(CPACK_PACKAGE_VENDOR "CREATIS") +SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.txt") +SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt") +SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_MAJOR_VERSION}) +SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_MINOR_VERSION}) +SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_BUILD_VERSION}) + + +#SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\${PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") + + + +IF(WIN32) + SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools\\\\${PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") +ELSE(WIN32) + SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CreaTools/${PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") +ENDIF(WIN32) + + + +IF(WIN32 AND NOT UNIX) + # There is a bug in NSI that does not handle full unix paths properly. Make + # sure there is at least one set of four (4) backlasshes. +#EED SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/kernel/install/gnome/bbi-icon2.bmp") +# SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin/BBI_EXE.exe") + SET(CPACK_NSIS_DISPLAY_NAME ${PROJECT_NAME}) + SET(CPACK_NSIS_HELP_LINK "http://www.creatis.insa-lyon.fr/creatools/${PROJECT_NAME}") + SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.creatis.insa-lyon.fr/creatools/${PROJECT_NAME}") + SET(CPACK_NSIS_CONTACT "info-dev@creatis.insa-lyon.fr") + SET(CPACK_NSIS_MODIFY_PATH ON) + + SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " + # NSIS code .. + ") + + SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " + # NSIS code ... + ") + + + +ELSE(WIN32 AND NOT UNIX) +# SET(CPACK_STRIP_FILES "bin/bbi") + SET(CPACK_SOURCE_STRIP_FILES "") +ENDIF(WIN32 AND NOT UNIX) +#SET(CPACK_PACKAGE_EXECUTABLES "TestWxGimmickDialog" "Gimmick!") + + +INCLUDE(CPack) + + + + +IF(EXWIN32) + +OPTION(STANDALONE_INSTALLER_${PROJECT_NAME} "Install and add to installer all dlls needed, including from external toolkits (wx,itk,vtk)?" OFF) + +IF(BBTK_STANDALONE_INSTALLER) + STRING(REGEX REPLACE "\\\\" "/" WINDIR "$ENV{WINDIR}") +# INSTALL( FILES ${WINDIR}/system32/msvcp71d.dll DESTINATION bin/ ) +# INSTALL( FILES ${WINDIR}/system32/msvcr71d.dll DESTINATION bin/ ) + + IF(USE_VTK) + SET(VTK_BIN_DIR ${VTK_DIR}/../../bin ) + + FILE(GLOB LST_FILE_VTKDLL "${VTK_BIN_DIR}/*.dll") + FOREACH( iLST ${LST_FILE_VTKDLL} ) + INSTALL( + FILES ${iLST} + DESTINATION bin/ + ) + ENDFOREACH(iLST) + ENDIF(USE_VTK) + + IF(USE_ITK) + INSTALL( FILES ${ITK_DIR}/bin/ITKCommon.dll DESTINATION bin/ ) + ENDIF(USE_ITK) + + IF(USE_WXWIDGETS) + INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_xrc_vc_custom.dll DESTINATION bin/ ) + INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_richtext_vc_custom.dll DESTINATION bin/ ) + INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_qa_vc_custom.dll DESTINATION bin/ ) + INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_media_vc_custom.dll DESTINATION bin/ ) + INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_html_vc_custom.dll DESTINATION bin/ ) + INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_gl_vc_custom.dll DESTINATION bin/ ) + INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_core_vc_custom.dll DESTINATION bin/ ) + INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_aui_vc_custom.dll DESTINATION bin/ ) + INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_adv_vc_custom.dll DESTINATION bin/ ) + INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_xml_vc_custom.dll DESTINATION bin/ ) + INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_vc_custom.dll DESTINATION bin/ ) + INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_odbc_vc_custom.dll DESTINATION bin/ ) + INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_net_vc_custom.dll DESTINATION bin/ ) + ENDIF(USE_WXWIDGETS) +ENDIF(BBTK_STANDALONE_INSTALLER) + +## Use ... + + +ENDIF(EXWIN32) -- 2.45.1 From c71406c4f316b505b659df7e78ace9bf470ed158 Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Thu, 15 Oct 2009 15:24:32 +0000 Subject: [PATCH 16/16] no message --- appli/creaNewProject/creaNewProject.cpp | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/appli/creaNewProject/creaNewProject.cpp b/appli/creaNewProject/creaNewProject.cpp index 889faad..9fb5c39 100644 --- a/appli/creaNewProject/creaNewProject.cpp +++ b/appli/creaNewProject/creaNewProject.cpp @@ -32,8 +32,39 @@ bool myApp::OnInit( ) std::string command("creaNewProject.bat "); std::string command1("creaSed.exe "); std::string command2("del "); + + command += "\"" + crea::wx2std(dir) + "\" \"" + crea::wx2std(name) + "\""; + command1 += "\"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt.in\" " + "PROJECT_NAME " + crea::wx2std(name) + "> \"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt\""; + command2 += "\"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt.in\""; + if ( ! system ( command.c_str() ) ) + { + + system ( command1.c_str() ); + system ( command2.c_str() ); + wxMessageBox(_T("Done !"),_T("creaNewProject"), + wxOK | wxICON_INFORMATION); + } + else + { + wxString err(_T("An error occured while running '")); + err += crea::std2wx(command) + _T("'"); + wxMessageBox(err,_T("creaNewProject"),wxOK | wxICON_ERROR); + } #else std::string command("creaNewProject.sh "); + command += "\"" + crea::wx2std(dir) + "\"" +" " + crea::wx2std(name); + if ( ! system ( command.c_str() ) ) + { + wxMessageBox(_T("Done !"),_T("creaNewProject"), + wxOK | wxICON_INFORMATION); + } + else + { + wxString err(_T("An error occured while running '")); + err += crea::std2wx(command) + _T("'"); + wxMessageBox(err,_T("creaNewProject"),wxOK | wxICON_ERROR); + } + #endif command += "\"" + crea::wx2std(dir) + "\" \"" + crea::wx2std(name) + "\""; command1 += "\"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt.in\" " + "PROJECT_NAME " + crea::wx2std(name) + "> \"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt\""; -- 2.45.1