Statistics
| Revision:

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

History | View | Annotate | Download (2.3 kB)

1
VERSION=`cat VERSION``cat SUBVERSION`
2
STEP=$1
3
ARCH="64"
4
ARCHCODE="x86_64"
5
APP="TXM_${VERSION}_Win${ARCH}_installer"
6

    
7
echo "BUILDING $APP..."
8
echo "Make dir"
9
rm -rf "${APP}"
10
mkdir "${APP}"
11

    
12
# ensure JRE files are here
13
if [ ! -d "../org.txm.rcp.feature/win/jre/bin" ]; then
14
	echo "** $APP: JRE files are missing."
15
	exit 1;
16
fi
17

    
18
echo "copy shared files: css, xsl, scripts, samples..."
19
rsync -r  --exclude '.svn' "shared/all"/* "${APP}"
20

    
21
if [ $? != 0 ]; then
22
	echo "** ${APP}: copy Win shared files failed"
23
	exit 1;
24
fi
25

    
26
echo "convert licence files encoding to Windows-1252"
27
iconv -f utf8 -t WINDOWS-1252 shared/all/license_agreement_fr.txt > "$APP/license_agreement_fr.txt"
28
iconv -f utf8 -t WINDOWS-1252 shared/all/license_agreement.txt > "$APP/license_agreement.txt"
29
iconv -f utf8 -t WINDOWS-1252 shared/all/LICENSE_FR.TXT > "$APP/LICENSE_FR.TXT"
30
iconv -f utf8 -t WINDOWS-1252 shared/all/LICENSE.TXT > "$APP/LICENSE.TXT"
31

    
32
echo "copy win shared files: *.ico, TestPreInstall.jar..."
33
rsync -r  --exclude '.svn' "shared/win"/* "${APP}"
34

    
35
if [ $? != 0 ]; then
36
	echo "** ${APP}: copy Win arch files failed"
37
	exit 1;
38
fi
39

    
40
rm -f "exportRCP/win32.win32.${ARCHCODE}/TXM/p2/org.eclipse.equinox.p2.engine/.settings/*" &&
41
rm -f "exportRCP/win32.win32.${ARCHCODE}/TXM/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/*"
42
if [ $? != 0 ]; then
43
	echo "** $APP: failed to remove p2 preferences"
44
	exit 1;
45
fi
46

    
47
echo "copy eclipse arch dependent build"
48
rsync -r  --exclude '.svn' "exportRCP/win32.win32.${ARCHCODE}/TXM/"* "${APP}"
49

    
50
if [ $? != 0 ]; then
51
	echo "** ${APP}: copy Win build files failed"
52
	exit 1;
53
fi
54

    
55
#echo "copy cqp JNI libs near TXM executable"
56
echo "copy CQP binary files"
57
cp "../org.txm.libs.cqp.win32/res/win64"/*.dll "${APP}/" &&
58
cp "../org.txm.libs.cqp.win32/res/win64"/*.dll "${APP}/TXM"
59

    
60
if [ $? != 0 ]; then
61
	echo "** ${APP}: copy Win lib files failed"
62
	exit 1;
63
fi
64

    
65

    
66
echo "clean"
67
bash directoryCleaner.sh "$APP"
68
if [ $? != 0 ]; then
69
	echo "** $APP: failed to clean win64 setup $APP"
70
	exit 1;
71
fi
72

    
73
echo "set TXMVERSION in build files"
74
find "$APP/txm.nsi" -type f -exec sed -i "s/TXMVERSION/${VERSION}/g" {} \;
75

    
76
echo "build executable"
77
wine nsis/makensis.exe -V1 ${APP}/txm.nsi 2> logs64
78

    
79
if [ ! -e "${APP}.exe" ]; then
80
	echo "** ${APP}.exe : not builded"
81
	gedit logs64
82
	exit 1;
83
fi
84

    
85
chmod +x "${APP}.exe"