Statistiques
| Révision :

root / tmp / org.txm.setups / BuildWin64bit.sh @ 3087

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

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