source: snovis/trunk/obuild/sh/build_darwin_app_prog_snovis @ 268

Last change on this file since 268 was 268, checked in by barrand, 16 years ago
  • Property svn:executable set to *
File size: 10.4 KB
Line 
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_prog_snovis )
12#   UNIX> sh/build_prog_snovis
13#
14#////////////////////////////////////////////////
15
16obuild_verbose=no
17obuild_debug=no
18obuild_optimize=yes
19obuild_do_not_compile=no
20obuild_dir_bin_o_cleanup=yes
21
22obuild_set_x=no
23while 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
44done
45
46if [ ${obuild_set_x} = yes ] ; then
47  set -x
48fi
49
50if [ ${obuild_debug} = yes ] ; then
51  obuild_optimize=no
52fi
53
54if [  "${OBUILD_PLATFORM}" = "" ] ; then
55  obuild_platform=`uname`
56else
57  obuild_platform=${OBUILD_PLATFORM}
58fi
59
60if [ "${obuild_platform}" = "" ] ; then
61  echo "obuild_platform variable not defined."
62  exit
63fi
64
65if [  "${OBUILD_DIR_BIN}" = "" ] ; then
66  obuild_dir_bin=${obuild_platform}_obuild
67else
68  obuild_dir_bin=${OBUILD_DIR_BIN}
69fi
70
71if [ "${obuild_dir_bin}" = "" ] ; then
72  echo "obuild_dir_bin variable not defined."
73  exit
74fi
75
76obuild_pwd=`pwd`
77obuild_snovis_path=`dirname "${obuild_pwd}"`
78unset obuild_pwd
79
80# Create the bin directory :
81/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}"
82
83if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
84  if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp" ] ; then
85    echo "Program source obuild_platform.cpp not found."
86    exit
87  fi
88  if [ "${obuild_cxx_command}" = "" ] ; then 
89    if [  "${OBUILD_CXX}" != "" ] ; then
90      obuild_platform_compiler=${OBUILD_CXX}
91    else
92      obuild_platform_compiler=c++
93    fi
94  else
95    obuild_platform_compiler=${obuild_cxx_command} 
96  fi
97  ${obuild_platform_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" "${obuild_snovis_path}/obuild/cpp/obuild_platform.cpp"
98  unset obuild_platform_compiler
99  if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform" ] ; then
100    echo "Program obuild_platform not found."
101    exit
102  fi
103fi
104obuild_platform_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_platform"
105if [ "${obuild_platform_exe}" = "" ] ; then
106  echo "Variable obuild_platform_exe not defined."
107  exit
108fi
109obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
110if [ ${obuild_platform_result} = yes ] ; then
111CLHEP_home="/usr/local/CLHEP/2.0.3.1"
112fi
113unset obuild_platform_result
114if [ "${obuild_platform_exe}" = "" ] ; then
115  echo "Variable obuild_platform_exe not defined."
116  exit
117fi
118obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
119if [ ${obuild_platform_result} = yes ] ; then
120Geant4_home="/usr/local/geant4/8.2"
121fi
122unset obuild_platform_result
123if [ "${obuild_platform_exe}" = "" ] ; then
124  echo "Variable obuild_platform_exe not defined."
125  exit
126fi
127obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
128if [ ${obuild_platform_result} = yes ] ; then
129HDF5_home="/usr/local/HDF5/1.6.5"
130fi
131unset obuild_platform_result
132if [ "${obuild_platform_exe}" = "" ] ; then
133  echo "Variable obuild_platform_exe not defined."
134  exit
135fi
136obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
137if [ ${obuild_platform_result} = yes ] ; then
138OSC_home="/usr/local/OpenScientist/v16r0"
139fi
140unset obuild_platform_result
141if [ "${obuild_platform_exe}" = "" ] ; then
142  echo "Variable obuild_platform_exe not defined."
143  exit
144fi
145obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
146if [ ${obuild_platform_result} = yes ] ; then
147./sh/build_Darwin_app prog_snovis "${obuild_snovis_path}/${obuild_dir_bin}/snovis.bundle" "${obuild_snovis_path}/${obuild_dir_bin}/G4Lab.bundle" "${OSC_home}/bin/OnXLabInventor.bundle" "${OSC_home}/bin/OnXLabKUIP.bundle" "${OSC_home}/bin/OnXLab.bundle" "${OSC_home}/bin/OnXLab_SWIG_Python.so" "${OSC_home}/bin/BatchLabXML.bundle" "${OSC_home}/bin/BatchLabRio.bundle" "${OSC_home}/bin/BatchLabHDF5.bundle" "${OSC_home}/bin/OnXTestDLD.bundle" "${OSC_home}/bin/OnXKUIP.bundle" "${OSC_home}/bin/OnX.bundle" "${OSC_home}/bin/OnXQt.bundle" "${OSC_home}/bin/OnXPython.bundle" "${OSC_home}/bin/OnX_SWIG_Python.so" "${OSC_home}/bin/HEPVis_SWIG_Python.so" "${OSC_home}/bin/_CoinPython.so"
148
149/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/snovis/."
150if [ -d "${obuild_snovis_path}/scripts" ] ; then
151  /bin/cp -R "${obuild_snovis_path}/scripts" "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/snovis/."
152else
153  echo "Directory ${obuild_snovis_path}/scripts not found."
154fi
155find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/snovis/." -depth -name CVS -exec /bin/rm -R -f {} \;
156find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/snovis/." -depth -name .svn -exec /bin/rm -R -f {} \;
157/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/."
158if [ -d "${obuild_snovis_path}/Resources/G4Lab" ] ; then
159  /bin/cp -R "${obuild_snovis_path}/Resources/G4Lab" "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/."
160else
161  echo "Directory ${obuild_snovis_path}/Resources/G4Lab not found."
162fi
163find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/." -depth -name CVS -exec /bin/rm -R -f {} \;
164find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/." -depth -name .svn -exec /bin/rm -R -f {} \;
165/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/OnXLab/."
166if [ -d "${OSC_home}/Resources/OnXLab/scripts" ] ; then
167  /bin/cp -R "${OSC_home}/Resources/OnXLab/scripts" "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/OnXLab/."
168else
169  echo "Directory ${OSC_home}/Resources/OnXLab/scripts not found."
170fi
171find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/OnXLab/." -depth -name CVS -exec /bin/rm -R -f {} \;
172find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/OnXLab/." -depth -name .svn -exec /bin/rm -R -f {} \;
173/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/OnXLab/."
174if [ -d "${OSC_home}/Resources/OnXLab/examples" ] ; then
175  /bin/cp -R "${OSC_home}/Resources/OnXLab/examples" "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/OnXLab/."
176else
177  echo "Directory ${OSC_home}/Resources/OnXLab/examples not found."
178fi
179find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/OnXLab/." -depth -name CVS -exec /bin/rm -R -f {} \;
180find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/OnXLab/." -depth -name .svn -exec /bin/rm -R -f {} \;
181/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/BatchLab/."
182if [ -d "${OSC_home}/Resources/BatchLab/scripts" ] ; then
183  /bin/cp -R "${OSC_home}/Resources/BatchLab/scripts" "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/BatchLab/."
184else
185  echo "Directory ${OSC_home}/Resources/BatchLab/scripts not found."
186fi
187find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/BatchLab/." -depth -name CVS -exec /bin/rm -R -f {} \;
188find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/BatchLab/." -depth -name .svn -exec /bin/rm -R -f {} \;
189/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/OnX/."
190if [ -d "${OSC_home}/Resources/OnX/scripts" ] ; then
191  /bin/cp -R "${OSC_home}/Resources/OnX/scripts" "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/OnX/."
192else
193  echo "Directory ${OSC_home}/Resources/OnX/scripts not found."
194fi
195find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/OnX/." -depth -name CVS -exec /bin/rm -R -f {} \;
196find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/OnX/." -depth -name .svn -exec /bin/rm -R -f {} \;
197/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/HEPVis/."
198if [ -d "${OSC_home}/Resources/HEPVis/fonts" ] ; then
199  /bin/cp -R "${OSC_home}/Resources/HEPVis/fonts" "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/HEPVis/."
200else
201  echo "Directory ${OSC_home}/Resources/HEPVis/fonts not found."
202fi
203find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/HEPVis/." -depth -name CVS -exec /bin/rm -R -f {} \;
204find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/HEPVis/." -depth -name .svn -exec /bin/rm -R -f {} \;
205/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/HEPVis/."
206if [ -d "${OSC_home}/Resources/HEPVis/scripts" ] ; then
207  /bin/cp -R "${OSC_home}/Resources/HEPVis/scripts" "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/HEPVis/."
208else
209  echo "Directory ${OSC_home}/Resources/HEPVis/scripts not found."
210fi
211find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/HEPVis/." -depth -name CVS -exec /bin/rm -R -f {} \;
212find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/HEPVis/." -depth -name .svn -exec /bin/rm -R -f {} \;
213/bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/CoinPython/."
214if [ -d "${OSC_home}/Resources/CoinPython/scripts" ] ; then
215  /bin/cp -R "${OSC_home}/Resources/CoinPython/scripts" "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/CoinPython/."
216else
217  echo "Directory ${OSC_home}/Resources/CoinPython/scripts not found."
218fi
219find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/CoinPython/." -depth -name CVS -exec /bin/rm -R -f {} \;
220find "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app/Contents/Resources/CoinPython/." -depth -name .svn -exec /bin/rm -R -f {} \;
221
222fi
223unset obuild_platform_result
224/bin/rm -f "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find"
225
Note: See TracBrowser for help on using the repository browser.