forked from IndySockets/Indy
-
Notifications
You must be signed in to change notification settings - Fork 6
/
getindy.sh
61 lines (54 loc) · 1.65 KB
/
getindy.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
54
55
56
57
#!/bin/sh
OS=`uname -s`
if [ "$OS" = 'Darwin' ]
then
S_PREFIX='/Volumes/E$/source/indy10/trunk'
FPCSRC=/Developer/FreePascalCompiler/$(fpc -iV)/Source
else
S_PREFIX='/mnt/hgfs/IndyTiburon'
FPCSRC=/usr/share/fpcsrc/$(fpc -iV)
if [ ! -d $FPCSRC ]
then
FPCSRC=/usr/share/fpcsrc
fi
fi
DOS2_UNIX='tr -d ''\r'
INDYVERSION=`cat $S_PREFIX/lib/System/IdVers.inc | grep ' *gsIdVersion *=.*;' | sed -e 's/[^0-9.]//g'`
INDYDIR=indy-$INDYVERSION
FPCINDYDIR=$INDYDIR/fpc
LAZINDYDIR=$INDYDIR/lazarus
echo parameter 1 = $1
if [ "$1" != "buildonly" ]
then
rm -rf $INDYDIR
mkdir -p $INDYDIR/fpc
cp -p $S_PREFIX/lib/fpcnotes/* $INDYDIR
cp -p $S_PREFIX/lib/makeindyrpm.sh $INDYDIR
cp -p $S_PREFIX/lib/indy-fpc.spec.template $INDYDIR
FILENAMES=$(cat $S_PREFIX/lib/RTFileList.txt | $DOS2_UNIX | tr '\\' '/')
for i in $FILENAMES
do
cp -p $S_PREFIX//lib/$i $FPCINDYDIR
done
cp -p $S_PREFIX/lib/System/IdCompilerDefines.inc $FPCINDYDIR
cp -p $S_PREFIX/lib/System/IdVers.inc $FPCINDYDIR
cp -p $S_PREFIX/lib/System/indysystemfpc.pas $FPCINDYDIR
cp -p $S_PREFIX/lib/Core/indycorefpc.pas $FPCINDYDIR
cp -p $S_PREFIX/lib/Protocols/indyprotocolsfpc.pas $FPCINDYDIR
cp -p $S_PREFIX/lib/indymaster-Makefile.fpc $FPCINDYDIR/Makefile.fpc
mkdir -p $FPCINDYDIR/examples
cp -rp $S_PREFIX/lib/Examples/* $FPCINDYDIR/examples
find $FPCINDYDIR/examples -type d -name ".svn" -exec rm -rf '{}' \;
mkdir -p $FPCINDYDIR/debian
cp -rp $S_PREFIX/lib/debian/* $FPCINDYDIR/debian
find $FPCINDYDIR/debian -type d -name ".svn" -exec rm -rf '{}' \;
fi
make
FPCDIR=$FPCSRC;export FPCDIR
cd $FPCINDYDIR
echo $(pwd)
fpcmake -rTall
make
cd examples
fpcmake -rTall
cd ..