From 3689d0c5e95d32e7d27d7321ab8afe7ce5264436 Mon Sep 17 00:00:00 2001 From: guigues Date: Wed, 13 Feb 2008 14:08:24 +0000 Subject: [PATCH] *** empty log message *** --- kernel/CMakeLists.txt | 4 ++ kernel/appli/CMakeLists.txt | 2 +- kernel/appli/bbCreatePackage/CMakeLists.txt | 34 ++++++----- .../bbCreatePackage/bbCreatePackage.sh.in | 45 +++++++++------ .../bbCreatePackage/void-bbtk-package.tgz | Bin 0 -> 12993 bytes kernel/cmake/BBTKAddDefinitions.cmake | 9 +-- kernel/cmake/BBTKSetBasePaths.cmake | 4 ++ kernel/cmake/BBTKSetDeducedPaths.cmake | 4 +- kernel/cmake/bbtk_config_build.xml.in | 9 ++- ...install-gnome.sh => bbtk-install-gnome.sh} | 0 kernel/src/bbtkConfigurationFile.cxx | 53 ++++++++++++++---- kernel/src/bbtkConfigurationFile.h | 39 +++++++++++-- 12 files changed, 146 insertions(+), 57 deletions(-) create mode 100644 kernel/appli/bbCreatePackage/void-bbtk-package.tgz rename kernel/install/gnome/{install-gnome.sh => bbtk-install-gnome.sh} (100%) diff --git a/kernel/CMakeLists.txt b/kernel/CMakeLists.txt index 47be68f..8f7eb32 100644 --- a/kernel/CMakeLists.txt +++ b/kernel/CMakeLists.txt @@ -22,3 +22,7 @@ SUBDIRS(cmake) #----------------------------------------------------------------------------- +#----------------------------------------------------------------------------- +# System-specific installation tools +SUBDIRS(install) +#----------------------------------------------------------------------------- diff --git a/kernel/appli/CMakeLists.txt b/kernel/appli/CMakeLists.txt index bbbb300..d25d04f 100644 --- a/kernel/appli/CMakeLists.txt +++ b/kernel/appli/CMakeLists.txt @@ -9,5 +9,5 @@ SUBDIRS(bbfy) # Utility that creates the file architecture for a new user package -#SUBDIRS(bbCreatePackage) +SUBDIRS(bbCreatePackage) diff --git a/kernel/appli/bbCreatePackage/CMakeLists.txt b/kernel/appli/bbCreatePackage/CMakeLists.txt index c005114..fb6c6ba 100644 --- a/kernel/appli/bbCreatePackage/CMakeLists.txt +++ b/kernel/appli/bbCreatePackage/CMakeLists.txt @@ -2,11 +2,10 @@ # used to creates the file architecture for a new user package # go to data which install the input data to the script -SUBDIRS(data) +#SUBDIRS(data) # Sets the data install path -SET(bbCreatePackage_DATA_PATH - ${CMAKE_INSTALL_PREFIX}/bin/Data_bbCreatePackage) +SET(bbCreatePackage_DATA_REL_PATH ../${BBTK_DATA_REL_PATH}/bbCreatePackage) IF(WIN32) CONFIGURE_FILE( @@ -25,22 +24,27 @@ IF(UNIX) ${CMAKE_CURRENT_BINARY_DIR}/bbCreatePackage @ONLY IMMEDIATE ) - CONFIGURE_FILE( - ${CMAKE_CURRENT_SOURCE_DIR}/bbCreatePackage.bbs - ${CMAKE_CURRENT_BINARY_DIR}/bbCreatePackage.bbs - @ONLY IMMEDIATE - ) INSTALL( - FILES ${CMAKE_CURRENT_BINARY_DIR}/bbCreatePackage + PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/bbCreatePackage DESTINATION bin - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) + # PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + ) INSTALL( - FILES ${CMAKE_CURRENT_BINARY_DIR}/bbCreatePackage.bbs - DESTINATION bin - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE - ) + FILES void-bbtk-package.tgz + DESTINATION ${BBTK_DATA_REL_PATH}/bbCreatePackage + ) + +# CONFIGURE_FILE( +# ${CMAKE_CURRENT_SOURCE_DIR}/bbCreatePackage.bbs +# ${CMAKE_CURRENT_BINARY_DIR}/bbCreatePackage.bbs +# @ONLY IMMEDIATE +# ) +# INSTALL( +# FILES ${CMAKE_CURRENT_BINARY_DIR}/bbCreatePackage.bbs +# DESTINATION bin +# PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +# ) ENDIF(UNIX) diff --git a/kernel/appli/bbCreatePackage/bbCreatePackage.sh.in b/kernel/appli/bbCreatePackage/bbCreatePackage.sh.in index 8a25868..8556533 100755 --- a/kernel/appli/bbCreatePackage/bbCreatePackage.sh.in +++ b/kernel/appli/bbCreatePackage/bbCreatePackage.sh.in @@ -1,32 +1,43 @@ #!/bin/bash # creates the file architecture for a new user package -if [ $# -ne 1 ] +if [ $# -lt 2 ] then - echo "usage : bbCreatePackage " + echo "usage : bbCreatePackage [author] [description]" exit fi -INPUT=@bbCreatePackage_DATA_PATH@ +# bbCreatePackage path +TMP=$(which bbCreatePackage|rev) +BBCP=$(echo ${TMP#*/}|rev) +INPUT=${BBCP}/@bbCreatePackage_DATA_REL_PATH@/void-bbtk-package.tgz OUTPUT=$1 +PACK=$2 +AUTHOR=$3 +DESCRIPTION=$4 -echo "----- Creating new black box package '$1' in repository '$OUTPUT' -----" - -if [ -e $OUTPUT ] +if [ -d $OUTPUT/${PACK} ] then - echo "ERROR : Directory '$OUTPUT' already exists !" + echo "ERROR : Directory '$OUTPUT/${PACK}' already exists !" exit fi +echo "**ls Creating new black box package '$PACK' in folder '$OUTPUT'" + +if [ ! -d $OUTPUT ] + then + echo "ERROR : Directory '$OUTPUT' does not exist !" + exit +fi -echo "-> Creating directory '$OUTPUT'" -mkdir $OUTPUT -echo "-> Creating file '$OUTPUT/CMakeLists.txt'" -cp ${INPUT}/PackageCMakeLists.txt ${OUTPUT}/CMakeLists.txt -echo "-> Creating directory '$OUTPUT/cmake'" -mkdir ${OUTPUT}/cmake -echo "-> Copying files in '$OUTPUT/cmake'" -cp ${INPUT}/cmake/*.cmake ${OUTPUT}/cmake/ -cp ${INPUT}/cmake/*.in ${OUTPUT}/cmake/ +echo "-> Uncompressing package files" +cd $OUTPUT +tar zxvf ${INPUT} +mv void ${PACK}/ +cd ${PACK} +sed s,WITHOUT_NAME,${PACK}, CMakeLists.txt > CMakeLists2.txt +sed s,WITHOUT_AUTHOR,"${AUTHOR}", CMakeLists2.txt > CMakeLists3.txt +sed s,WITHOUT_DESCRIPTION,"${DESCRIPTION}", CMakeLists3.txt > CMakeLists.txt +rm -f CMakeLists2.txt CMakeLists3.txt echo "Done !" -echo "Edit the file '$OUTPUT/CMakeLists.txt' to customize your package" +echo "Edit the file '$OUTPUT/${PACK}/CMakeLists.txt' to customize your package" diff --git a/kernel/appli/bbCreatePackage/void-bbtk-package.tgz b/kernel/appli/bbCreatePackage/void-bbtk-package.tgz new file mode 100644 index 0000000000000000000000000000000000000000..7f0091f9cddafc08a5d6e2942c0406328ea12e3d GIT binary patch literal 12993 zcmbW&Q+6bZq5#mKW813Owr$($=)@h{wr$(CZQHh;y6a8heeMx#q9|w(_xDCg5b$e$ zYo|@A){p7Bb4NRMIf~Iyj#mvDX>rJn)!;BJF+w+sDB67HO{0i};06n~->+QBws;}` zBqPOtW0e&HDs2jRPM_Ufx*e}Ozqd(WJ+J#b0t^Fpzrq*q;dgO}7n=HtkzQjZLyHf_ z4b5+V>$Lb7F!I6|`H#fc$fC1_!YR|x-u?lGN`6*bfcb0evwm%OyJhg(F28RwC5sOO zpwmEKE1=^q(Q)KipPrMzR3)B-F-d0x2M?seJ<7~m;s?~m{F9$^^rzvbAdfrXl_PQ_ z@rqFZ$X#Vn+e&--3jF>$9`;?MUW;}!FEe2Wu8({*-XZwk3K?+q%*~cu`%=7?lP)<>(f5x zdoCc76q3LFlub9>AkMG4e80x{mswfo9n=j14?i>+=s$p zD!-$%2;(U_2z{$q<0*dB95V;ae2jV^cu#3Slna6*HfU9(UuT5no{TuPN#Er3pZbho zdyCoTcWB^Fg$^aXu)IjQW}>`ban`=_lBJHhY(N#xj2l7G3Ny`JjORu*lMOUj!$!3x z=KU72JT)@5G1meK1}(Y%A*| zWYw<`c*Df6HSoe=Wx9IeCoc6m|4ZagOLe3C>!!rx*$hN-pf!?T^}~1~S5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gn+eNzG%tV)Q^xSl4P%Tap+c*##ebX zsAd2B*UvzvrRQyu>zHp~EWdo4ZLEM1`Ug&wYrRptMECT{V~Ih3Ue>P0zo_2e8G0qg zEzq^}7R}D=$aPac$6+L_BiuPhbw&U$&M1eOJ%o&)jTww~eK!#^Z);8z*~Q%<{?DEE zkN;jEnc(A@0?wm@x)#-x&61(0#Jpm5DBfl%=>*xTp^hvz>ob}Q=(=?fHOTw>eF;7S zmdwb#xofpms?mRswju;C_#>r9M%)1;s31km<0xDH$YLZDj_D_GJYfY-y z*SB<>9~}ki-O~f(8lfcUL=kWB{3CS+MaNJ^+PZzuuc14@-L`U4VvfuhwgWCM-?;f3 z#QOb$%PxpFYPATx#h{@msA3AR<4)aA1;zAoKjtAlG}1RS&t8Y@0y-< zk{KTlj!QQeOp&AmAlFMUB9UqSIb4K5eLCxeVT;4ISR2_+uSDQ>!SIa@-UDP8Od6=r@ z{?<~#6+6UN3Da#y(9>r;%rfC~{ja?M)t3{9nD*C4&507eIeQbF zt^1!RX;}Ar7IS{SA8w%u9bCr%aX-#3_FeQj~?=@JM2{N&u& ru5(iZ_nW*&wd%T;mfqF1PaVT6YoD6`2Yx*2fZ(#=m~0@}pdkMPr}rL~ literal 0 HcmV?d00001 diff --git a/kernel/cmake/BBTKAddDefinitions.cmake b/kernel/cmake/BBTKAddDefinitions.cmake index e537dda..9831d47 100644 --- a/kernel/cmake/BBTKAddDefinitions.cmake +++ b/kernel/cmake/BBTKAddDefinitions.cmake @@ -1,8 +1,9 @@ # Set C preprocessor definitions -ADD_DEF_WITH_VAL(BBTK_SHARE_REL_PATH ${BBTK_SHARE_REL_PATH}) -ADD_DEF_WITH_VAL(BBTK_DOC_REL_PATH ${BBTK_DOC_REL_PATH}) -ADD_DEF_WITH_VAL(BBTK_BBS_REL_PATH ${BBTK_BBS_REL_PATH}) - +ADD_DEF_WITH_VAL(BBTK_SHARE_REL_PATH "\"${BBTK_SHARE_REL_PATH}\"") +ADD_DEF_WITH_VAL(BBTK_DOC_REL_PATH "\"${BBTK_DOC_REL_PATH}\"") +ADD_DEF_WITH_VAL(BBTK_BBS_REL_PATH "\"${BBTK_BBS_REL_PATH}\"") +#ADD_DEF_WITH_VAL(BBTK_RSC_REL_PATH "\"${BBTK_RSC_REL_PATH}\"") +ADD_DEF_WITH_VAL(BBTK_DATA_REL_PATH "\"${BBTK_DATA_REL_PATH}\"") #----------------------------------------------------------------------------- # messages compilation options IF (BBTK_COMPILE_MESSAGES) diff --git a/kernel/cmake/BBTKSetBasePaths.cmake b/kernel/cmake/BBTKSetBasePaths.cmake index c0d27b4..65d0a34 100644 --- a/kernel/cmake/BBTKSetBasePaths.cmake +++ b/kernel/cmake/BBTKSetBasePaths.cmake @@ -46,9 +46,13 @@ IF(WIN32) SET(BBTK_SHARE_REL_PATH) SET(BBTK_DOC_REL_PATH doc) SET(BBTK_BBS_REL_PATH bbs) + # SET(BBTK_RSC_REL_PATH rsc) + SET(BBTK_DATA_REL_PATH data) ELSE(WIN32) SET(BBTK_SHARE_REL_PATH share/bbtk) SET(BBTK_DOC_REL_PATH share/bbtk/doc) SET(BBTK_BBS_REL_PATH share/bbtk/bbs) + # SET(BBTK_RSC_REL_PATH share/bbtk/rsc) + SET(BBTK_DATA_REL_PATH share/bbtk/data) ENDIF(WIN32) #----------------------------------------------------------------------------- diff --git a/kernel/cmake/BBTKSetDeducedPaths.cmake b/kernel/cmake/BBTKSetDeducedPaths.cmake index 56d5e08..ca2ceae 100644 --- a/kernel/cmake/BBTKSetDeducedPaths.cmake +++ b/kernel/cmake/BBTKSetDeducedPaths.cmake @@ -8,18 +8,20 @@ SET(BBTK_DOC_BUILD_PATH ${PROJECT_BINARY_DIR}/${BBTK_DOC_REL_PATH}) SET(BBTK_BBDOC_BUILD_PATH ${PROJECT_BINARY_DIR}/${BBTK_BBDOC_REL_PATH}) SET(BBTK_DOXYGEN_BUILD_PATH ${PROJECT_BINARY_DIR}/${BBTK_DOXYGEN_REL_PATH}) SET(BBTK_BBS_BUILD_PATH ${PROJECT_BINARY_DIR}/${BBTK_BBS_REL_PATH}) +SET(BBTK_DATA_BUILD_PATH ${PROJECT_BINARY_DIR}/${BBTK_DATA_REL_PATH}) SET(BBTK_DOC_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${BBTK_DOC_REL_PATH}) SET(BBTK_BBDOC_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${BBTK_BBDOC_REL_PATH}) SET(BBTK_DOXYGEN_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${BBTK_DOXYGEN_REL_PATH}) SET(BBTK_BBS_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${BBTK_BBS_REL_PATH}) +SET(BBTK_DATA_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${BBTK_DATA_REL_PATH}) # Create build directories if necessary MKDIR(${BBTK_DOC_BUILD_PATH}) MKDIR(${BBTK_BBDOC_BUILD_PATH}) MKDIR(${BBTK_DOXYGEN_BUILD_PATH}) -MKDIR(${BBTK_DOXYGEN_BUILD_PATH}) MKDIR(${BBTK_BBS_BUILD_PATH}) +MKDIR(${BBTK_DATA_BUILD_PATH}) #----------------------------------------------------------------------------- SET (EXECUTABLE_OUTPUT_PATH diff --git a/kernel/cmake/bbtk_config_build.xml.in b/kernel/cmake/bbtk_config_build.xml.in index 8a148b7..38bdd44 100644 --- a/kernel/cmake/bbtk_config_build.xml.in +++ b/kernel/cmake/bbtk_config_build.xml.in @@ -2,15 +2,18 @@ Sets the search directories in the build tree - @BBTK_DOC_BUILD_PATH@ + +#@BBTK_DOC_BUILD_PATH@ - @BBTK_BBS_BUILD_PATH@ + +#@BBTK_BBS_BUILD_PATH@ @EXECUTABLE_OUTPUT_PATH@ # For windows @EXECUTABLE_OUTPUT_PATH@\Debug @EXECUTABLE_OUTPUT_PATH@\Release # - @BBTK_DATA_ROOT@ + +#@BBTK_DATA_ROOT@ @PROJECT_BINARY_DIR@ diff --git a/kernel/install/gnome/install-gnome.sh b/kernel/install/gnome/bbtk-install-gnome.sh similarity index 100% rename from kernel/install/gnome/install-gnome.sh rename to kernel/install/gnome/bbtk-install-gnome.sh diff --git a/kernel/src/bbtkConfigurationFile.cxx b/kernel/src/bbtkConfigurationFile.cxx index 167579f..e398286 100644 --- a/kernel/src/bbtkConfigurationFile.cxx +++ b/kernel/src/bbtkConfigurationFile.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkConfigurationFile.cxx,v $ Language: C++ - Date: $Date: 2008/02/06 10:53:02 $ - Version: $Revision: 1.2 $ + Date: $Date: 2008/02/13 14:08:25 $ + Version: $Revision: 1.3 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See doc/license.txt or @@ -42,16 +42,43 @@ ConfigurationFile::ConfigurationFile() std::string slash("/"); #endif -// ==> First we look for bbtk_config.xml in "." - + // ==> Set system paths + mBin_path = execPath; + mInstall_path = mBin_path + slash + ".."; + // The relative path to the doc folder (=BBTK_DOC_REL_PATH) + mDoc_rel_path = BBTK_STRINGIFY_SYMBOL(BBTK_DOC_REL_PATH); + // The path to the doc folder (=mInstall_path+"/"+mDoc_rel_path) + mDoc_path = mInstall_path + slash + mDoc_rel_path; + // The relative path to the doc folder (=BBTK_BBS_REL_PATH) + mBbs_rel_path = BBTK_STRINGIFY_SYMBOL(BBTK_BBS_REL_PATH); + // The path to the bbs folder (=mInstall_path+"/"+mBbs_rel_path) + mBbs_path = mInstall_path + slash + mBbs_rel_path; + // The relative path to the rsc folder (=BBTK_RSC_REL_PATH) + // mRsc_rel_path = BBTK_STRINGIFY_SYMBOL(BBTK_RSC_REL_PATH); + // The path to the rsc folder (=mInstall_path+"/"+mRsc_rel_path) + // mRsc_path = mInstall_path + slash + mRsc_rel_path; + // The path to the bbtk data folder + // Initialized to mInstall_path+"/"+BBTK_DATA_REL_PATH + // But can be overriden by value read from bbtk_config.xml + mData_path = mInstall_path + slash + BBTK_STRINGIFY_SYMBOL(BBTK_DATA_REL_PATH); + // MessageManager::SetMessageLevel("Config",1); + bbtkMessage("Config",1," ==> bin : '"< prefix : '"< doc : '"< bbs : '"< rsc : '"< data : '"< First we look for bbtk_config.xml in "." char buf[2048]; const char *currentDir = getcwd(buf, 2048); if( !currentDir ) { std::cerr << "Path was too long to fit on 2048 bytes ?!?" << std::endl; - /// \todo : what else? + // \todo : what else? // How abort a constructor and warn the caller function? + // LG : throw an exception } std::string configXmlFullPathName = currentDir + slash + "bbtk_config.xml"; @@ -123,15 +150,15 @@ void ConfigurationFile::CreateConfigXML( char *rootDirectory ) bbtkMessage("Config",1, "in CreateConfigXML[" << configXml << "]" << std::endl); fp = fopen (configXml, "w"); fprintf(fp, "\n"); - fprintf(fp, "\n"); + // fprintf(fp, "\n"); fprintf(fp, "\n"); fprintf(fp, " \n"); - fprintf(fp, " http://www.creatis.insa-lyon.fr/software/bbtk \n"); - fprintf(fp, " \n"); + // fprintf(fp, " http://www.creatis.insa-lyon.fr/software/bbtk \n"); + // fprintf(fp, " \n"); fprintf(fp, " \n"); // fprintf(fp, " \n"); fprintf(fp, " \n"); - fprintf(fp, " %s \n", BBTK_DATA_PATH); + fprintf(fp, " \n");//, BBTK_DATA_PATH); /// \todo find a decent default value ! ///fprintf(fp, " %s \n", " "); // when $ will be found, default_temp_dir value will be replaced @@ -376,13 +403,15 @@ void ConfigurationFile::Read(const std::string& filename) GetTextOrClear(BB.getChildNode((XMLCSTR)"data_path"),mData_path); // install_path - if( BB.nChildNode((XMLCSTR)"install_path") ) - GetTextOrClear(BB.getChildNode((XMLCSTR)"install_path"),mInstall_path); + // if( BB.nChildNode((XMLCSTR)"install_path") ) + // GetTextOrClear(BB.getChildNode((XMLCSTR)"install_path"),mInstall_path); // always add "." (current working directory) at the begining - // bbs_paths mBbs_paths.push_back("."); + // add system bbs path + mBbs_paths.push_back(mBbs_path); + for (i=0,j=0; i& Get_bbs_paths() const { return mBbs_paths;} inline const std::vector& Get_package_paths() const @@ -105,12 +113,35 @@ public: std::string mDescription; /// Where is the file bbtk_config.xml std::string mConfig_xml_full_path; - /// Where the doc is - std::string mUrl; + + /// Set automatically : + /// The path to the executable (usually bbi) + std::string mBin_path; + /// The path to the install prefix (=mBinPath+"/..") std::string mInstall_path; + /// The relative path to the doc folder (=BBTK_DOC_REL_PATH) + std::string mDoc_rel_path; + /// The path to the doc folder (=mInstall_path+"/"+mDoc_rel_path) + std::string mDoc_path; + /// The relative path to the doc folder (=BBTK_BBS_REL_PATH) + std::string mBbs_rel_path; + /// The path to the bbs folder (=mInstall_path+"/"+mBbs_rel_path) + std::string mBbs_path; + /// The relative path to the rsc folder (=BBTK_RSC_REL_PATH) + std::string mRsc_rel_path; + /// The path to the rsc folder (=mInstall_path+"/"+mRsc_rel_path) + std::string mRsc_path; + /// The path to the bbtk data folder + /// Initialized to mInstall_path+"/"+BBTK_DATA_REL_PATH + /// But can be overriden by value read from bbtk_config.xml std::string mData_path; + /// / or \, depending on the OS std::string mFile_separator; + + /// Read from bbtk_config.xml file + /// Where the doc is + std::string mUrl; /// Scripts std::vector mBbs_paths; /// Package dlls -- 2.47.1