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