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