Statistiques
| Révision :

root / TXM / trunk / org.txm.setups / BuildWin64bit.sh @ 3422

Historique | Voir | Annoter | Télécharger (2,54 ko)

1 3298 mdecorde
VERSION=`cat ../org.txm.rcp/VERSION`
2 3298 mdecorde
SUBVERSION=`cat ../org.txm.rcp/SUBVERSION`
3 3298 mdecorde
FULLVERSION=${VERSION}${SUBVERSION}
4 728 mdecorde
STEP=$1
5 728 mdecorde
ARCH="64"
6 728 mdecorde
ARCHCODE="x86_64"
7 2241 mdecorde
TIMESTAMP=`date +"%Y-%m-%d"`
8 2831 mdecorde
APP="TXM_${FULLVERSION}_${TIMESTAMP}_Win${ARCH}_installer"
9 728 mdecorde
10 1566 mdecorde
echo "BUILDING $APP..."
11 728 mdecorde
echo "Make dir"
12 728 mdecorde
rm -rf "${APP}"
13 728 mdecorde
mkdir "${APP}"
14 728 mdecorde
15 728 mdecorde
echo "copy shared files: css, xsl, scripts, samples..."
16 728 mdecorde
rsync -r  --exclude '.svn' "shared/all"/* "${APP}"
17 728 mdecorde
18 728 mdecorde
if [ $? != 0 ]; then
19 728 mdecorde
	echo "** ${APP}: copy Win shared files failed"
20 728 mdecorde
	exit 1;
21 728 mdecorde
fi
22 728 mdecorde
23 728 mdecorde
echo "convert licence files encoding to Windows-1252"
24 728 mdecorde
iconv -f utf8 -t WINDOWS-1252 shared/all/license_agreement_fr.txt > "$APP/license_agreement_fr.txt"
25 728 mdecorde
iconv -f utf8 -t WINDOWS-1252 shared/all/license_agreement.txt > "$APP/license_agreement.txt"
26 728 mdecorde
iconv -f utf8 -t WINDOWS-1252 shared/all/LICENSE_FR.TXT > "$APP/LICENSE_FR.TXT"
27 728 mdecorde
iconv -f utf8 -t WINDOWS-1252 shared/all/LICENSE.TXT > "$APP/LICENSE.TXT"
28 728 mdecorde
29 728 mdecorde
echo "copy win shared files: *.ico, TestPreInstall.jar..."
30 728 mdecorde
rsync -r  --exclude '.svn' "shared/win"/* "${APP}"
31 728 mdecorde
32 728 mdecorde
if [ $? != 0 ]; then
33 728 mdecorde
	echo "** ${APP}: copy Win arch files failed"
34 728 mdecorde
	exit 1;
35 728 mdecorde
fi
36 728 mdecorde
37 2750 mdecorde
# ensure JRE files are here
38 2750 mdecorde
if [ ! -d "${APP}/jre/bin" ]; then
39 2750 mdecorde
	echo "** $APP: JRE files are missing."
40 2750 mdecorde
	exit 1;
41 2750 mdecorde
fi
42 2750 mdecorde
43 728 mdecorde
rm -f "exportRCP/win32.win32.${ARCHCODE}/TXM/p2/org.eclipse.equinox.p2.engine/.settings/*" &&
44 728 mdecorde
rm -f "exportRCP/win32.win32.${ARCHCODE}/TXM/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/*"
45 728 mdecorde
if [ $? != 0 ]; then
46 728 mdecorde
	echo "** $APP: failed to remove p2 preferences"
47 728 mdecorde
	exit 1;
48 728 mdecorde
fi
49 728 mdecorde
50 728 mdecorde
echo "copy eclipse arch dependent build"
51 1566 mdecorde
rsync -r  --exclude '.svn' "exportRCP/win32.win32.${ARCHCODE}/TXM/"* "${APP}"
52 728 mdecorde
53 728 mdecorde
if [ $? != 0 ]; then
54 728 mdecorde
	echo "** ${APP}: copy Win build files failed"
55 728 mdecorde
	exit 1;
56 728 mdecorde
fi
57 728 mdecorde
58 728 mdecorde
#echo "copy cqp JNI libs near TXM executable"
59 728 mdecorde
echo "copy CQP binary files"
60 1566 mdecorde
cp "../org.txm.libs.cqp.win32/res/win64"/*.dll "${APP}/" &&
61 1566 mdecorde
cp "../org.txm.libs.cqp.win32/res/win64"/*.dll "${APP}/TXM"
62 728 mdecorde
63 728 mdecorde
if [ $? != 0 ]; then
64 728 mdecorde
	echo "** ${APP}: copy Win lib files failed"
65 728 mdecorde
	exit 1;
66 728 mdecorde
fi
67 728 mdecorde
68 728 mdecorde
69 1189 mdecorde
echo "clean"
70 728 mdecorde
bash directoryCleaner.sh "$APP"
71 728 mdecorde
if [ $? != 0 ]; then
72 728 mdecorde
	echo "** $APP: failed to clean win64 setup $APP"
73 728 mdecorde
	exit 1;
74 728 mdecorde
fi
75 728 mdecorde
76 2750 mdecorde
echo "set TXMVERSION and TIMESTAMP in build files"
77 2831 mdecorde
find "$APP/txm.nsi" -type f -exec sed -i "s/TXMDATEVERSION/${FULLVERSION}_${TIMESTAMP}/g" {} \;
78 2831 mdecorde
find "$APP/txm.nsi" -type f -exec sed -i "s/TXMVERSION/${FULLVERSION}/g" {} \;
79 2784 mdecorde
find "$APP/TXM.bat" -type f -exec sed -i "s/TXMVERSION/${VERSION}/g" {} \;
80 1566 mdecorde
81 728 mdecorde
echo "build executable"
82 728 mdecorde
wine nsis/makensis.exe -V1 ${APP}/txm.nsi 2> logs64
83 728 mdecorde
84 1566 mdecorde
if [ ! -e "${APP}.exe" ]; then
85 1566 mdecorde
	echo "** ${APP}.exe : not builded"
86 728 mdecorde
	exit 1;
87 728 mdecorde
fi
88 728 mdecorde
89 1566 mdecorde
chmod +x "${APP}.exe"