Révision 3628 TXM/trunk/org.txm.setups/BuildWin64bit.sh

BuildWin64bit.sh (revision 3628)
1
VERSION=`cat ../org.txm.rcp/VERSION`
2
SUBVERSION=`cat ../org.txm.rcp/SUBVERSION`
1
DIRNAME=`dirname $0`
2
VERSION=`cat $DIRNAME/../bundles/org.txm.rcp/VERSION`
3
SUBVERSION=`cat $DIRNAME/../bundles/org.txm.rcp/SUBVERSION`
3 4
FULLVERSION=${VERSION}${SUBVERSION}
4 5
STEP=$1
5 6
ARCH="64"
6 7
ARCHCODE="x86_64"
7 8
TIMESTAMP=`date +"%Y-%m-%d"`
8
APP="TXM_${FULLVERSION}_${TIMESTAMP}_Win${ARCH}_installer"
9
APP="$DIRNAME/TXM_${FULLVERSION}_${TIMESTAMP}_Win${ARCH}_installer"
10
BUILDDIR="$DIRNAME/../products/org.txm.rcp.product/target/products/org.txm.rcp.app/win32/win32/$ARCHCODE"
9 11

  
12

  
10 13
echo "BUILDING $APP..."
11 14
echo "Make dir"
12 15
rm -rf "${APP}"
13 16
mkdir "${APP}"
14 17

  
15 18
echo "copy shared files: css, xsl, scripts, samples..."
16
rsync -r  --exclude '.svn' "shared/all"/* "${APP}"
19
rsync -r  --exclude '.svn' "$DIRNAME/shared/all"/* "${APP}"
17 20

  
18 21
if [ $? != 0 ]; then
19 22
	echo "** ${APP}: copy Win shared files failed"
......
21 24
fi
22 25

  
23 26
echo "convert licence files encoding to Windows-1252"
24
iconv -f utf8 -t WINDOWS-1252 shared/all/license_agreement_fr.txt > "$APP/license_agreement_fr.txt"
25
iconv -f utf8 -t WINDOWS-1252 shared/all/license_agreement.txt > "$APP/license_agreement.txt"
26
iconv -f utf8 -t WINDOWS-1252 shared/all/LICENSE_FR.TXT > "$APP/LICENSE_FR.TXT"
27
iconv -f utf8 -t WINDOWS-1252 shared/all/LICENSE.TXT > "$APP/LICENSE.TXT"
27
iconv -f utf8 -t WINDOWS-1252 $DIRNAME/shared/all/license_agreement_fr.txt > "$APP/license_agreement_fr.txt"
28
iconv -f utf8 -t WINDOWS-1252 $DIRNAME/shared/all/license_agreement.txt > "$APP/license_agreement.txt"
29
iconv -f utf8 -t WINDOWS-1252 $DIRNAME/shared/all/LICENSE_FR.TXT > "$APP/LICENSE_FR.TXT"
30
iconv -f utf8 -t WINDOWS-1252 $DIRNAME/shared/all/LICENSE.TXT > "$APP/LICENSE.TXT"
28 31

  
29 32
echo "copy win shared files: *.ico, TestPreInstall.jar..."
30
rsync -r  --exclude '.svn' "shared/win"/* "${APP}"
33
rsync -r  --exclude '.svn' "$DIRNAME/shared/win"/* "${APP}"
31 34

  
32 35
if [ $? != 0 ]; then
33 36
	echo "** ${APP}: copy Win arch files failed"
34 37
	exit 1;
35 38
fi
36 39

  
37
# ensure JRE files are here
38
if [ ! -d "${APP}/jre/bin" ]; then
39
	echo "** $APP: JRE files are missing."
40
	exit 1;
41
fi
42 40

  
43
rm -f "exportRCP/win32.win32.${ARCHCODE}/TXM/p2/org.eclipse.equinox.p2.engine/.settings/*" &&
44
rm -f "exportRCP/win32.win32.${ARCHCODE}/TXM/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/*"
41
rm -f "$BUILDDIR/p2/org.eclipse.equinox.p2.engine/.settings/*" &&
42
rm -f "$BUILDDIR/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/*"
45 43
if [ $? != 0 ]; then
46 44
	echo "** $APP: failed to remove p2 preferences"
47 45
	exit 1;
48 46
fi
49 47

  
50 48
echo "copy eclipse arch dependent build"
51
rsync -r  --exclude '.svn' "exportRCP/win32.win32.${ARCHCODE}/TXM/"* "${APP}"
49
rsync -r --exclude '.svn' "$BUILDDIR/"* "${APP}"
52 50

  
53 51
if [ $? != 0 ]; then
54 52
	echo "** ${APP}: copy Win build files failed"
......
57 55

  
58 56
#echo "copy cqp JNI libs near TXM executable"
59 57
echo "copy CQP binary files"
60
cp "../org.txm.libs.cqp.win32/res/win64"/*.dll "${APP}/" &&
61
cp "../org.txm.libs.cqp.win32/res/win64"/*.dll "${APP}/TXM"
58
cp "$DIRNAME/../bundles/org.txm.libs.cqp.win32/res/win64"/*.dll "${APP}/" &&
59
cp "$DIRNAME/../bundles/org.txm.libs.cqp.win32/res/win64"/*.dll "${APP}/TXM"
62 60

  
63 61
if [ $? != 0 ]; then
64 62
	echo "** ${APP}: copy Win lib files failed"
65 63
	exit 1;
66 64
fi
67 65

  
68

  
69 66
echo "clean"
70
bash directoryCleaner.sh "$APP"
67
bash $DIRNAME/directoryCleaner.sh "$APP"
71 68
if [ $? != 0 ]; then
72 69
	echo "** $APP: failed to clean win64 setup $APP"
73 70
	exit 1;
......
79 76
find "$APP/TXM.bat" -type f -exec sed -i "s/TXMVERSION/${VERSION}/g" {} \;
80 77

  
81 78
echo "build executable"
82
wine nsis/makensis.exe -V1 ${APP}/txm.nsi 2> logs64
79
wine $DIRNAME/nsis/makensis.exe -V1 ${APP}/txm.nsi 2> logs64
83 80

  
84 81
if [ ! -e "${APP}.exe" ]; then
85 82
	echo "** ${APP}.exe : not builded"

Formats disponibles : Unified diff