Statistics
| Revision:

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

History | View | Annotate | Download (2.3 kB)

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