root / tmp / org.txm.setups / BuildWin64bit.sh @ 1214
History | View | Annotate | Download (2.3 kB)
1 |
VERSION=`cat VERSION` |
---|---|
2 |
STEP=$1 |
3 |
ARCH="64" |
4 |
ARCHCODE="x86_64" |
5 |
APP="TXM_${VERSION}_Win${ARCH}_installer" |
6 |
|
7 |
echo "Make dir" |
8 |
rm -rf "${APP}" |
9 |
mkdir "${APP}" |
10 |
|
11 |
# ensure JRE files are here |
12 |
if [ ! -d "../org.txm.rcp.feature/win/jre/bin" ]; then |
13 |
echo "** $APP: JRE files are missing." |
14 |
exit 1; |
15 |
fi |
16 |
|
17 |
echo "copy shared files: css, xsl, scripts, samples..." |
18 |
rsync -r --exclude '.svn' "shared/all"/* "${APP}" |
19 |
|
20 |
if [ $? != 0 ]; then |
21 |
echo "** ${APP}: copy Win shared files failed" |
22 |
exit 1; |
23 |
fi |
24 |
|
25 |
echo "convert licence files encoding to Windows-1252" |
26 |
iconv -f utf8 -t WINDOWS-1252 shared/all/license_agreement_fr.txt > "$APP/license_agreement_fr.txt" |
27 |
iconv -f utf8 -t WINDOWS-1252 shared/all/license_agreement.txt > "$APP/license_agreement.txt" |
28 |
iconv -f utf8 -t WINDOWS-1252 shared/all/LICENSE_FR.TXT > "$APP/LICENSE_FR.TXT" |
29 |
iconv -f utf8 -t WINDOWS-1252 shared/all/LICENSE.TXT > "$APP/LICENSE.TXT" |
30 |
|
31 |
echo "copy win shared files: *.ico, TestPreInstall.jar..." |
32 |
rsync -r --exclude '.svn' "shared/win"/* "${APP}" |
33 |
|
34 |
if [ $? != 0 ]; then |
35 |
echo "** ${APP}: copy Win arch files failed" |
36 |
exit 1; |
37 |
fi |
38 |
|
39 |
rm -f "exportRCP/win32.win32.${ARCHCODE}/TXM/p2/org.eclipse.equinox.p2.engine/.settings/*" && |
40 |
rm -f "exportRCP/win32.win32.${ARCHCODE}/TXM/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/*" |
41 |
if [ $? != 0 ]; then |
42 |
echo "** $APP: failed to remove p2 preferences" |
43 |
exit 1; |
44 |
fi |
45 |
|
46 |
echo "copy eclipse arch dependent build" |
47 |
rsync -r --exclude '.svn' "exportRCP/win32.win32.${ARCHCODE}/TXM" "${APP}" |
48 |
|
49 |
if [ $? != 0 ]; then |
50 |
echo "** ${APP}: copy Win build files failed" |
51 |
exit 1; |
52 |
fi |
53 |
|
54 |
#echo "copy cqp JNI libs near TXM executable" |
55 |
echo "copy CQP binary files" |
56 |
cp "../../org.txm.libs.cqp.win32/res/win64"/*.dll "${APP}/" && |
57 |
cp "../../org.txm.libs.cqp.win32/res/win64"/*.dll "${APP}/TXM" && |
58 |
cp "../../org.txm.libs.cqp.win32/res/win32"/* "${APP}/cwb/bin/win32" && |
59 |
cp "../../org.txm.libs.cqp.win32/res/win64"/* "${APP}/cwb/bin" |
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 "build executable" |
75 |
wine nsis/makensis.exe -V1 ${APP}/txm.nsi 2> logs64 |
76 |
|
77 |
if [ ! -e "${APP}/${APP}.exe" ]; then |
78 |
echo "** ${APP}/${APP}.exe : not builded" |
79 |
gedit logs64 |
80 |
exit 1; |
81 |
fi |
82 |
|
83 |
chmod +x "${APP}/${APP}.exe" |
84 |
mv "${APP}/${APP}.exe" . |