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