| 1 |
#!/bin/sh |
| 2 |
# |
| 3 |
# build imapcopy for win32 and linux |
| 4 |
# create bin zip/gz and source zip |
| 5 |
# |
| 6 |
[ -f DistSrc/IMAPCopySrc.zip ] && rm -f DistSrc/IMAPCopySrc.zip |
| 7 |
zip DistSrc/IMAPCopySrc.zip *.dpr *.pp *.pas *.inc *.dof Delphi/*.pas Dist/*.cfg Mkdistsrc |
| 8 |
|
| 9 |
[ -d Dist/imapcopy ] || mkdir Dist/imapcopy |
| 10 |
echo "Compiling for Linux" |
| 11 |
fpc -g -gl -B imapcopy.pp || exit 1 |
| 12 |
echo "Compiling for Win32" |
| 13 |
fpc -Twin32 -g -gl -B imapcopy.pp || exit 1 |
| 14 |
#strip imapcopy || exit 1 |
| 15 |
cp imapcopy Dist/imapcopy || exit 1 |
| 16 |
cp Dist/ImapCopy.cfg Dist/imapcopy || exit 1 |
| 17 |
dos2unix Dist/imapcopy/ImapCopy.cfg |
| 18 |
cd Dist |
| 19 |
tar c imapcopy > imapcopy.tar || exit 1 |
| 20 |
gzip -f imapcopy.tar || exit 1 |
| 21 |
echo "linux source and binary created" |
| 22 |
|
| 23 |
[ -f IMAPCopy.zip ] && rm -f IMAPCopy.zip |
| 24 |
cp ../imapcopy.exe . |
| 25 |
zip IMAPCopy.zip *.exe *.cfg || exit 1 |
| 26 |
cd .. |
| 27 |
echo "Windows binary created" |
| 28 |
|