Statistics
| Revision:

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

History | View | Annotate | Download (2.4 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
echo "copy shared files: css, xsl, scripts, samples..."
14 728 mdecorde
rsync -r  --exclude '.svn' "shared/all"/* "${APP}"
15 728 mdecorde
16 728 mdecorde
if [ $? != 0 ]; then
17 728 mdecorde
	echo "** ${APP}: copy Win shared files failed"
18 728 mdecorde
	exit 1;
19 728 mdecorde
fi
20 728 mdecorde
21 728 mdecorde
echo "convert licence files encoding to Windows-1252"
22 728 mdecorde
iconv -f utf8 -t WINDOWS-1252 shared/all/license_agreement_fr.txt > "$APP/license_agreement_fr.txt"
23 728 mdecorde
iconv -f utf8 -t WINDOWS-1252 shared/all/license_agreement.txt > "$APP/license_agreement.txt"
24 728 mdecorde
iconv -f utf8 -t WINDOWS-1252 shared/all/LICENSE_FR.TXT > "$APP/LICENSE_FR.TXT"
25 728 mdecorde
iconv -f utf8 -t WINDOWS-1252 shared/all/LICENSE.TXT > "$APP/LICENSE.TXT"
26 728 mdecorde
27 728 mdecorde
echo "copy win shared files: *.ico, TestPreInstall.jar..."
28 728 mdecorde
rsync -r  --exclude '.svn' "shared/win"/* "${APP}"
29 728 mdecorde
30 728 mdecorde
if [ $? != 0 ]; then
31 728 mdecorde
	echo "** ${APP}: copy Win arch files failed"
32 728 mdecorde
	exit 1;
33 728 mdecorde
fi
34 728 mdecorde
35 2750 mdecorde
# ensure JRE files are here
36 2750 mdecorde
if [ ! -d "${APP}/jre/bin" ]; then
37 2750 mdecorde
	echo "** $APP: JRE files are missing."
38 2750 mdecorde
	exit 1;
39 2750 mdecorde
fi
40 2750 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 2750 mdecorde
echo "set TXMVERSION and TIMESTAMP in build files"
75 2750 mdecorde
find "$APP/txm.nsi" -type f -exec sed -i "s/TXMDATEVERSION/${VERSION}_${TIMESTAMP}/g" {} \;
76 2750 mdecorde
find "$APP/txm.nsi" -type f -exec sed -i "s/TXMVERSION/${VERSION}/g" {} \;
77 1566 mdecorde
78 728 mdecorde
echo "build executable"
79 728 mdecorde
wine nsis/makensis.exe -V1 ${APP}/txm.nsi 2> logs64
80 728 mdecorde
81 1566 mdecorde
if [ ! -e "${APP}.exe" ]; then
82 1566 mdecorde
	echo "** ${APP}.exe : not builded"
83 728 mdecorde
	exit 1;
84 728 mdecorde
fi
85 728 mdecorde
86 1566 mdecorde
chmod +x "${APP}.exe"