Statistics
| Revision:

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

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