| 1 | #!/bin/sh -f
|
|---|
| 2 |
|
|---|
| 3 | #
|
|---|
| 4 | # File produced by the obuild tool version 1.0
|
|---|
| 5 | # for the package snovis with version v1r1.
|
|---|
| 6 | #
|
|---|
| 7 |
|
|---|
| 8 | #////////////////////////////////////////////////
|
|---|
| 9 | # Usage :
|
|---|
| 10 | # UNIX> cd some_path/pack/version/obuild
|
|---|
| 11 | # ( UNIX> chmod a+x sh/build_snovis_session )
|
|---|
| 12 | # UNIX> sh/build_snovis_session
|
|---|
| 13 | #
|
|---|
| 14 | #////////////////////////////////////////////////
|
|---|
| 15 |
|
|---|
| 16 | obuild_verbose=no
|
|---|
| 17 | obuild_debug=no
|
|---|
| 18 | obuild_optimize=yes
|
|---|
| 19 | obuild_do_not_compile=no
|
|---|
| 20 | obuild_dir_bin_o_cleanup=yes
|
|---|
| 21 |
|
|---|
| 22 | obuild_set_x=no
|
|---|
| 23 | while test $# -ge 1 ; do
|
|---|
| 24 | case $1 in
|
|---|
| 25 | -h)
|
|---|
| 26 | echo "Options :"
|
|---|
| 27 | echo " -v : verbose."
|
|---|
| 28 | echo " -d : build in debug mode."
|
|---|
| 29 | echo " -g : build in debug mode."
|
|---|
| 30 | echo " -x : execute script with set -x."
|
|---|
| 31 | echo " -l : link only, do not (re)compile."
|
|---|
| 32 | echo " -k : do not remove result of compilations (.o, .obj)."
|
|---|
| 33 | echo ""
|
|---|
| 34 | exit ;;
|
|---|
| 35 | -v) obuild_verbose=yes ;;
|
|---|
| 36 | -x) obuild_set_x=yes ;;
|
|---|
| 37 | -d) obuild_debug=yes ;;
|
|---|
| 38 | -g) obuild_debug=yes ;;
|
|---|
| 39 | -l) obuild_do_not_compile=yes ;;
|
|---|
| 40 | -k) obuild_dir_bin_o_cleanup=no ;;
|
|---|
| 41 | *) echo "unknown option : $1";exit ;;
|
|---|
| 42 | esac
|
|---|
| 43 | shift
|
|---|
| 44 | done
|
|---|
| 45 |
|
|---|
| 46 | if [ ${obuild_set_x} = yes ] ; then
|
|---|
| 47 | set -x
|
|---|
| 48 | fi
|
|---|
| 49 |
|
|---|
| 50 | if [ ${obuild_debug} = yes ] ; then
|
|---|
| 51 | obuild_optimize=no
|
|---|
| 52 | fi
|
|---|
| 53 |
|
|---|
| 54 | if [ "${OBUILD_PLATFORM}" = "" ] ; then
|
|---|
| 55 | obuild_platform=`uname`
|
|---|
| 56 | else
|
|---|
| 57 | obuild_platform=${OBUILD_PLATFORM}
|
|---|
| 58 | fi
|
|---|
| 59 |
|
|---|
| 60 | if [ "${obuild_platform}" = "" ] ; then
|
|---|
| 61 | echo "obuild_platform variable not defined."
|
|---|
| 62 | exit
|
|---|
| 63 | fi
|
|---|
| 64 |
|
|---|
| 65 | if [ "${OBUILD_DIR_BIN}" = "" ] ; then
|
|---|
| 66 | obuild_dir_bin=${obuild_platform}_obuild
|
|---|
| 67 | else
|
|---|
| 68 | obuild_dir_bin=${OBUILD_DIR_BIN}
|
|---|
| 69 | fi
|
|---|
| 70 |
|
|---|
| 71 | if [ "${obuild_dir_bin}" = "" ] ; then
|
|---|
| 72 | echo "obuild_dir_bin variable not defined."
|
|---|
| 73 | exit
|
|---|
| 74 | fi
|
|---|
| 75 |
|
|---|
| 76 | obuild_pwd=`pwd`
|
|---|
| 77 | obuild_snovis_path=`dirname "${obuild_pwd}"`
|
|---|
| 78 | unset obuild_pwd
|
|---|
| 79 |
|
|---|
| 80 | # Create the bin directory :
|
|---|
| 81 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}"
|
|---|
| 82 |
|
|---|
| 83 | if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
|
|---|
| 84 | if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" ] ; then
|
|---|
| 85 | echo "Program source obuild_find.cpp not found."
|
|---|
| 86 | exit
|
|---|
| 87 | fi
|
|---|
| 88 | if [ "${obuild_cxx_command}" = "" ] ; then
|
|---|
| 89 | if [ "${OBUILD_CXX}" != "" ] ; then
|
|---|
| 90 | obuild_find_compiler=${OBUILD_CXX}
|
|---|
| 91 | else
|
|---|
| 92 | obuild_find_compiler=c++
|
|---|
| 93 | fi
|
|---|
| 94 | else
|
|---|
| 95 | obuild_find_compiler=${obuild_cxx_command}
|
|---|
| 96 | fi
|
|---|
| 97 | ${obuild_find_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp"
|
|---|
| 98 | unset obuild_find_compiler
|
|---|
| 99 | if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then
|
|---|
| 100 | echo "Program obuild_find not found."
|
|---|
| 101 | exit
|
|---|
| 102 | fi
|
|---|
| 103 | fi
|
|---|
| 104 | obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
|
|---|
| 105 | if [ "${obuild_find_exe}" = "" ] ; then
|
|---|
| 106 | echo "Variable obuild_find_exe not defined."
|
|---|
| 107 | exit
|
|---|
| 108 | fi
|
|---|
| 109 | obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'`
|
|---|
| 110 | if [ "${obuild_G4Lab_path}" = "" ] ; then
|
|---|
| 111 | echo "Can't find G4Lab package."
|
|---|
| 112 | exit
|
|---|
| 113 | fi
|
|---|
| 114 | if [ "${obuild_find_exe}" = "" ] ; then
|
|---|
| 115 | echo "Variable obuild_find_exe not defined."
|
|---|
| 116 | exit
|
|---|
| 117 | fi
|
|---|
| 118 | obuild_OnXLab_path=`"${obuild_find_exe}" OnXLab 'v1r0'`
|
|---|
| 119 | if [ "${obuild_OnXLab_path}" = "" ] ; then
|
|---|
| 120 | echo "Can't find OnXLab package."
|
|---|
| 121 | exit
|
|---|
| 122 | fi
|
|---|
| 123 | if [ "${obuild_find_exe}" = "" ] ; then
|
|---|
| 124 | echo "Variable obuild_find_exe not defined."
|
|---|
| 125 | exit
|
|---|
| 126 | fi
|
|---|
| 127 | obuild_BatchLab_path=`"${obuild_find_exe}" BatchLab 'v1r*'`
|
|---|
| 128 | if [ "${obuild_BatchLab_path}" = "" ] ; then
|
|---|
| 129 | echo "Can't find BatchLab package."
|
|---|
| 130 | exit
|
|---|
| 131 | fi
|
|---|
| 132 | if [ "${obuild_find_exe}" = "" ] ; then
|
|---|
| 133 | echo "Variable obuild_find_exe not defined."
|
|---|
| 134 | exit
|
|---|
| 135 | fi
|
|---|
| 136 | obuild_OnX_path=`"${obuild_find_exe}" OnX 'v17r*'`
|
|---|
| 137 | if [ "${obuild_OnX_path}" = "" ] ; then
|
|---|
| 138 | echo "Can't find OnX package."
|
|---|
| 139 | exit
|
|---|
| 140 | fi
|
|---|
| 141 | if [ "${obuild_find_exe}" = "" ] ; then
|
|---|
| 142 | echo "Variable obuild_find_exe not defined."
|
|---|
| 143 | exit
|
|---|
| 144 | fi
|
|---|
| 145 | obuild_HEPVis_path=`"${obuild_find_exe}" HEPVis 'v6r*'`
|
|---|
| 146 | if [ "${obuild_HEPVis_path}" = "" ] ; then
|
|---|
| 147 | echo "Can't find HEPVis package."
|
|---|
| 148 | exit
|
|---|
| 149 | fi
|
|---|
| 150 | if [ "${obuild_find_exe}" = "" ] ; then
|
|---|
| 151 | echo "Variable obuild_find_exe not defined."
|
|---|
| 152 | exit
|
|---|
| 153 | fi
|
|---|
| 154 | obuild_CoinPython_path=`"${obuild_find_exe}" CoinPython 'v1r*'`
|
|---|
| 155 | if [ "${obuild_CoinPython_path}" = "" ] ; then
|
|---|
| 156 | echo "Can't find CoinPython package."
|
|---|
| 157 | exit
|
|---|
| 158 | fi
|
|---|
| 159 |
|
|---|
| 160 | if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
|
|---|
| 161 | if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp" ] ; then
|
|---|
| 162 | echo "Program source obuild_platform.cpp not found."
|
|---|
| 163 | exit
|
|---|
| 164 | fi
|
|---|
| 165 | if [ "${obuild_cxx_command}" = "" ] ; then
|
|---|
| 166 | if [ "${OBUILD_CXX}" != "" ] ; then
|
|---|
| 167 | obuild_platform_compiler=${OBUILD_CXX}
|
|---|
| 168 | else
|
|---|
| 169 | obuild_platform_compiler=c++
|
|---|
| 170 | fi
|
|---|
| 171 | else
|
|---|
| 172 | obuild_platform_compiler=${obuild_cxx_command}
|
|---|
| 173 | fi
|
|---|
| 174 | ${obuild_platform_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp"
|
|---|
| 175 | unset obuild_platform_compiler
|
|---|
| 176 | if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
|
|---|
| 177 | echo "Program obuild_platform not found."
|
|---|
| 178 | exit
|
|---|
| 179 | fi
|
|---|
| 180 | fi
|
|---|
| 181 | obuild_platform_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform"
|
|---|
| 182 | if [ "${obuild_platform_exe}" = "" ] ; then
|
|---|
| 183 | echo "Variable obuild_platform_exe not defined."
|
|---|
| 184 | exit
|
|---|
| 185 | fi
|
|---|
| 186 | obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
|
|---|
| 187 | if [ ${obuild_platform_result} = yes ] ; then
|
|---|
| 188 | ./sh/build_Darwin_app snovis_session "${obuild_snovis_path}/${obuild_dir_bin}/snovis.bundle" "${obuild_G4Lab_path}/${obuild_dir_bin}/G4Lab.bundle" "${obuild_OnXLab_path}/${obuild_dir_bin}/OnXLabInventor.bundle" "${obuild_OnXLab_path}/${obuild_dir_bin}/OnXLabKUIP.bundle" "${obuild_OnXLab_path}/${obuild_dir_bin}/OnXLab.bundle" "${obuild_OnXLab_path}/${obuild_dir_bin}/OnXLab_SWIG_Python.so" "${obuild_BatchLab_path}/${obuild_dir_bin}/BatchLabXML.bundle" "${obuild_BatchLab_path}/${obuild_dir_bin}/BatchLabRio.bundle" "${obuild_BatchLab_path}/${obuild_dir_bin}/BatchLabHDF5.bundle" "${obuild_OnX_path}/${obuild_dir_bin}/OnXTestDLD.bundle" "${obuild_OnX_path}/${obuild_dir_bin}/OnXKUIP.bundle" "${obuild_OnX_path}/${obuild_dir_bin}/OnX.bundle" "${obuild_OnX_path}/${obuild_dir_bin}/OnXQt.bundle" "${obuild_OnX_path}/${obuild_dir_bin}/OnXPython.bundle" "${obuild_OnX_path}/${obuild_dir_bin}/OnX_SWIG_Python.so" "${obuild_HEPVis_path}/${obuild_dir_bin}/HEPVis_SWIG_Python.so" "${obuild_CoinPython_path}/${obuild_dir_bin}/_CoinPython.so"
|
|---|
| 189 |
|
|---|
| 190 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/snovis/."
|
|---|
| 191 | if [ -d "${obuild_snovis_path}/scripts" ] ; then
|
|---|
| 192 | /bin/cp -R "${obuild_snovis_path}/scripts" "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/snovis/."
|
|---|
| 193 | else
|
|---|
| 194 | echo "Directory ${obuild_snovis_path}/scripts not found."
|
|---|
| 195 | fi
|
|---|
| 196 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/snovis/." -depth -name CVS -exec /bin/rm -R -f {} \;
|
|---|
| 197 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/snovis/." -depth -name .svn -exec /bin/rm -R -f {} \;
|
|---|
| 198 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/G4Lab/."
|
|---|
| 199 | if [ -d "${obuild_G4Lab_path}/scripts" ] ; then
|
|---|
| 200 | /bin/cp -R "${obuild_G4Lab_path}/scripts" "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/G4Lab/."
|
|---|
| 201 | else
|
|---|
| 202 | echo "Directory ${obuild_G4Lab_path}/scripts not found."
|
|---|
| 203 | fi
|
|---|
| 204 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/G4Lab/." -depth -name CVS -exec /bin/rm -R -f {} \;
|
|---|
| 205 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/G4Lab/." -depth -name .svn -exec /bin/rm -R -f {} \;
|
|---|
| 206 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/OnXLab/."
|
|---|
| 207 | if [ -d "${obuild_OnXLab_path}/scripts" ] ; then
|
|---|
| 208 | /bin/cp -R "${obuild_OnXLab_path}/scripts" "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/OnXLab/."
|
|---|
| 209 | else
|
|---|
| 210 | echo "Directory ${obuild_OnXLab_path}/scripts not found."
|
|---|
| 211 | fi
|
|---|
| 212 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/OnXLab/." -depth -name CVS -exec /bin/rm -R -f {} \;
|
|---|
| 213 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/OnXLab/." -depth -name .svn -exec /bin/rm -R -f {} \;
|
|---|
| 214 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/OnXLab/."
|
|---|
| 215 | if [ -d "${obuild_OnXLab_path}/examples" ] ; then
|
|---|
| 216 | /bin/cp -R "${obuild_OnXLab_path}/examples" "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/OnXLab/."
|
|---|
| 217 | else
|
|---|
| 218 | echo "Directory ${obuild_OnXLab_path}/examples not found."
|
|---|
| 219 | fi
|
|---|
| 220 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/OnXLab/." -depth -name CVS -exec /bin/rm -R -f {} \;
|
|---|
| 221 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/OnXLab/." -depth -name .svn -exec /bin/rm -R -f {} \;
|
|---|
| 222 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/BatchLab/."
|
|---|
| 223 | if [ -d "${obuild_BatchLab_path}/scripts" ] ; then
|
|---|
| 224 | /bin/cp -R "${obuild_BatchLab_path}/scripts" "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/BatchLab/."
|
|---|
| 225 | else
|
|---|
| 226 | echo "Directory ${obuild_BatchLab_path}/scripts not found."
|
|---|
| 227 | fi
|
|---|
| 228 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/BatchLab/." -depth -name CVS -exec /bin/rm -R -f {} \;
|
|---|
| 229 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/BatchLab/." -depth -name .svn -exec /bin/rm -R -f {} \;
|
|---|
| 230 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/OnX/."
|
|---|
| 231 | if [ -d "${obuild_OnX_path}/scripts" ] ; then
|
|---|
| 232 | /bin/cp -R "${obuild_OnX_path}/scripts" "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/OnX/."
|
|---|
| 233 | else
|
|---|
| 234 | echo "Directory ${obuild_OnX_path}/scripts not found."
|
|---|
| 235 | fi
|
|---|
| 236 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/OnX/." -depth -name CVS -exec /bin/rm -R -f {} \;
|
|---|
| 237 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/OnX/." -depth -name .svn -exec /bin/rm -R -f {} \;
|
|---|
| 238 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/HEPVis/."
|
|---|
| 239 | if [ -d "${obuild_HEPVis_path}/fonts" ] ; then
|
|---|
| 240 | /bin/cp -R "${obuild_HEPVis_path}/fonts" "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/HEPVis/."
|
|---|
| 241 | else
|
|---|
| 242 | echo "Directory ${obuild_HEPVis_path}/fonts not found."
|
|---|
| 243 | fi
|
|---|
| 244 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/HEPVis/." -depth -name CVS -exec /bin/rm -R -f {} \;
|
|---|
| 245 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/HEPVis/." -depth -name .svn -exec /bin/rm -R -f {} \;
|
|---|
| 246 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/HEPVis/."
|
|---|
| 247 | if [ -d "${obuild_HEPVis_path}/scripts" ] ; then
|
|---|
| 248 | /bin/cp -R "${obuild_HEPVis_path}/scripts" "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/HEPVis/."
|
|---|
| 249 | else
|
|---|
| 250 | echo "Directory ${obuild_HEPVis_path}/scripts not found."
|
|---|
| 251 | fi
|
|---|
| 252 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/HEPVis/." -depth -name CVS -exec /bin/rm -R -f {} \;
|
|---|
| 253 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/HEPVis/." -depth -name .svn -exec /bin/rm -R -f {} \;
|
|---|
| 254 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/CoinPython/."
|
|---|
| 255 | if [ -d "${obuild_CoinPython_path}/scripts" ] ; then
|
|---|
| 256 | /bin/cp -R "${obuild_CoinPython_path}/scripts" "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/CoinPython/."
|
|---|
| 257 | else
|
|---|
| 258 | echo "Directory ${obuild_CoinPython_path}/scripts not found."
|
|---|
| 259 | fi
|
|---|
| 260 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/CoinPython/." -depth -name CVS -exec /bin/rm -R -f {} \;
|
|---|
| 261 | find "${obuild_snovis_path}/${obuild_dir_bin}/snovis_session.app/Contents/Resources/CoinPython/." -depth -name .svn -exec /bin/rm -R -f {} \;
|
|---|
| 262 |
|
|---|
| 263 | fi
|
|---|
| 264 | unset obuild_platform_result
|
|---|
| 265 | /bin/rm -f "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
|
|---|
| 266 |
|
|---|