forked from dronemapper-io/micmac
-
Notifications
You must be signed in to change notification settings - Fork 1
/
make_binaries_package.sh
executable file
·53 lines (44 loc) · 1.25 KB
/
make_binaries_package.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# compile micmac
rm -rf build
mkdir build
cd build
if [ "$1" == "serveur" ]
then
SERVER_PARAMS="-DWITH_KAKADU=1 -DKAKADU_DIR=$PWD/../../kakadu -DWITH_HEADER_PRECOMP=0 -DNO_X11=ON"
fi
cmake .. $SERVER_PARAMS
OS=$(uname -s)
REV_NUMBER=$(hg log -r tip --template "{rev}")
NBRP=$(cat /proc/cpuinfo | grep processor | wc -l)
echo "number of cores : $NBRP"
make install -j$NBRP
# créer un répertoire pour l'archive
BIN_DIR=micmac
rm -fr $BIN_DIR
mkdir $BIN_DIR
if [ "$1" != "serveur" ]
then
# la création d'archive sur le serveur est gérée par maven
# copie les XML nécessaires à l'execution
cp -r ../bin $BIN_DIR
cp -r ../data $BIN_DIR
mkdir $BIN_DIR/include
cp -r ../include/XML_GEN $BIN_DIR/include
cp -r ../include/XML_MicMac $BIN_DIR/include
cp ../README $BIN_DIR
cp ../LISEZMOI $BIN_DIR
# copie les outils tiers
if [ $OS = "Linux" ]
then
mkdir $BIN_DIR/binaire-aux
cp ../binaire-aux/siftpp_tgi.LINUX $BIN_DIR/binaire-aux
cp ../binaire-aux/ann_mec_filtre.LINUX $BIN_DIR/binaire-aux
else
mkdir $BIN_DIR/binaire-aux
cp ../binaire-aux/ann_samplekey200filtre.OSX $BIN_DIR/binaire-aux
cp ../binaire-aux/siftpp_tgi.OSX $BIN_DIR/binaire-aux
fi
# créer l'archive
ARCH=${OS}_$(uname -p)
tar -czf bin_${ARCH}_rev${REV_NUMBER}.tar.gz $BIN_DIR
fi