Revision 2241 tmp/org.txm.setups/BuildMacOSXIntel.sh
BuildMacOSXIntel.sh (revision 2241) | ||
---|---|---|
2 | 2 |
subversion=`cat SUBVERSION` |
3 | 3 |
fullversion="${version}${subversion}" |
4 | 4 |
STEP=$1 |
5 |
TIMESTAMP=`date +"%Y-%m-%d"` |
|
5 | 6 |
|
6 |
rm -f "TXM_${fullversion}_MacOSX.tar.gz" |
|
7 |
rm -rf "TXM_${fullversion}_MacOSX" |
|
8 |
mkdir "TXM_${fullversion}_MacOSX" |
|
7 |
rm -f "TXM_${fullversion}_${TIMESTAMP}_MacOSX.tar.gz"
|
|
8 |
rm -rf "TXM_${fullversion}_${TIMESTAMP}_MacOSX"
|
|
9 |
mkdir "TXM_${fullversion}_${TIMESTAMP}_MacOSX"
|
|
9 | 10 |
|
10 | 11 |
# ensure INSTALL CLEAN file rights |
11 | 12 |
chmod 775 shared/mac/INSTALL shared/mac/CLEAN |
... | ... | |
15 | 16 |
fi |
16 | 17 |
|
17 | 18 |
echo " copy mac shared files: R" |
18 |
rsync -r --exclude '.svn' shared/mac/* "TXM_${fullversion}_MacOSX" |
|
19 |
rsync -r --exclude '.svn' shared/mac/* "TXM_${fullversion}_${TIMESTAMP}_MacOSX"
|
|
19 | 20 |
if [ $? != 0 ]; then |
20 | 21 |
echo "** MacOSXIntel.sh : failed to copy Mac shared files" |
21 | 22 |
exit 1; |
22 | 23 |
fi |
23 | 24 |
|
24 | 25 |
echo " copy shared files: css, xsl, scripts, samples..." |
25 |
rsync -r --exclude '.svn' shared/all/* "TXM_${fullversion}_MacOSX/Applications/TXM.app/Contents/TXM" |
|
26 |
rsync -r --exclude '.svn' shared/all/* "TXM_${fullversion}_${TIMESTAMP}_MacOSX/Applications/TXM.app/Contents/TXM"
|
|
26 | 27 |
if [ $? != 0 ]; then |
27 | 28 |
echo "** MacOSXIntel.sh : failed to copy shared files" |
28 | 29 |
exit 1; |
29 | 30 |
fi |
30 | 31 |
|
31 | 32 |
echo " convert licence files encoding to MacRoman" |
32 |
iconv -f utf8 -t MAC shared/all/license_agreement_fr.txt > "TXM_${fullversion}_MacOSX/Applications/TXM.app/Contents/TXM/license_agreement_fr.txt" |
|
33 |
iconv -f utf8 -t MAC shared/all/license_agreement.txt > "TXM_${fullversion}_MacOSX/Applications/TXM.app/Contents/TXM/license_agreement.txt" |
|
34 |
iconv -f utf8 -t MAC shared/all/LICENSE_FR.TXT > "TXM_${fullversion}_MacOSX/Applications/TXM.app/Contents/TXM/LICENSE_FR.TXT" |
|
35 |
iconv -f utf8 -t MAC shared/all/LICENSE.TXT > "TXM_${fullversion}_MacOSX/Applications/TXM.app/Contents/TXM/LICENSE.TXT" |
|
33 |
iconv -f utf8 -t MAC shared/all/license_agreement_fr.txt > "TXM_${fullversion}_${TIMESTAMP}_MacOSX/Applications/TXM.app/Contents/TXM/license_agreement_fr.txt"
|
|
34 |
iconv -f utf8 -t MAC shared/all/license_agreement.txt > "TXM_${fullversion}_${TIMESTAMP}_MacOSX/Applications/TXM.app/Contents/TXM/license_agreement.txt"
|
|
35 |
iconv -f utf8 -t MAC shared/all/LICENSE_FR.TXT > "TXM_${fullversion}_${TIMESTAMP}_MacOSX/Applications/TXM.app/Contents/TXM/LICENSE_FR.TXT"
|
|
36 |
iconv -f utf8 -t MAC shared/all/LICENSE.TXT > "TXM_${fullversion}_${TIMESTAMP}_MacOSX/Applications/TXM.app/Contents/TXM/LICENSE.TXT"
|
|
36 | 37 |
|
37 | 38 |
echo " remove parasite settings" |
38 | 39 |
rm -f "exportRCP/macosx.cocoa.x86_64/TXM/p2/org.eclipse.equinox.p2.engine/.settings/*" && |
... | ... | |
44 | 45 |
|
45 | 46 |
echo " rename TXM eclipse launcher" |
46 | 47 |
if [ ! -f "exportRCP/macosx.cocoa.x86_64/MacOS/launcher" ]; then |
47 |
|
|
48 | 48 |
mv "exportRCP/macosx.cocoa.x86_64/MacOS/TXM" "exportRCP/macosx.cocoa.x86_64/MacOS/launcher" |
49 | 49 |
if [ $? != 0 ]; then |
50 | 50 |
echo "** MacOSXIntel.sh : failed to binaries files" |
... | ... | |
53 | 53 |
fi |
54 | 54 |
|
55 | 55 |
echo " copy eclipse arch dependent build" |
56 |
rsync -r --exclude '.svn' "exportRCP/macosx.cocoa.x86_64/"* "TXM_${fullversion}_MacOSX/Applications/TXM.app/Contents" |
|
56 |
rsync -r --exclude '.svn' "exportRCP/macosx.cocoa.x86_64/"* "TXM_${fullversion}_${TIMESTAMP}_MacOSX/Applications/TXM.app/Contents"
|
|
57 | 57 |
if [ $? != 0 ]; then |
58 | 58 |
echo "** MacOSXIntel.sh : failed to binaries files" |
59 | 59 |
exit 1; |
60 | 60 |
fi |
61 | 61 |
|
62 |
chmod +x "TXM_${fullversion}_MacOSX/INSTALL" && |
|
63 |
chmod +x "TXM_${fullversion}_MacOSX/CLEAN" |
|
62 |
chmod +x "TXM_${fullversion}_${TIMESTAMP}_MacOSX/INSTALL" &&
|
|
63 |
chmod +x "TXM_${fullversion}_${TIMESTAMP}_MacOSX/CLEAN"
|
|
64 | 64 |
if [ $? != 0 ]; then |
65 | 65 |
echo "** MacOSXIntel.sh : failed to chmod +x INSTALL & CLEAN files" |
66 | 66 |
exit 1; |
67 | 67 |
fi |
68 | 68 |
|
69 | 69 |
#echo "set LSUIElement to 1" |
70 |
#find ./TXM_${fullversion}_MacOSX/Applications/TXM.app/.main.app/Contents/Info.plist -type f -exec sed -i 's/<dict>/<dict><key>LSUIElement<\/key><string>1<\/string>/g' {} \; |
|
70 |
#find ./TXM_${fullversion}_${TIMESTAMP}_MacOSX/Applications/TXM.app/.main.app/Contents/Info.plist -type f -exec sed -i 's/<dict>/<dict><key>LSUIElement<\/key><string>1<\/string>/g' {} \;
|
|
71 | 71 |
#if [ $? != 0 ]; then |
72 | 72 |
# echo "** MacOSXIntel.sh : failed to fix Info.plist" |
73 | 73 |
# exit 1; |
74 | 74 |
#fi |
75 | 75 |
|
76 | 76 |
echo " clean" |
77 |
bash directoryCleaner.sh "TXM_${fullversion}_MacOSX" |
|
77 |
bash directoryCleaner.sh "TXM_${fullversion}_${TIMESTAMP}_MacOSX"
|
|
78 | 78 |
if [ $? != 0 ]; then |
79 |
echo "** $APP: failed to clean mac setup TXM_${fullversion}_MacOSX" |
|
79 |
echo "** $APP: failed to clean mac setup TXM_${fullversion}_${TIMESTAMP}_MacOSX"
|
|
80 | 80 |
exit 1; |
81 | 81 |
fi |
82 | 82 |
|
83 | 83 |
echo " search&replace in files TXMVERSION" |
84 |
find "TXM_${fullversion}_MacOSX/CLEAN" -type f -exec sed -i "s/TXMVERSION/$fullversion/g" {} \; |
|
85 |
find "TXM_${fullversion}_MacOSX/finish_en.txt" -type f -exec sed -i "s/TXMVERSION/$fullversion/g" {} \; |
|
86 |
find "TXM_${fullversion}_MacOSX/INSTALL" -type f -exec sed -i "s/TXMVERSION/$fullversion/g" {} \; |
|
87 |
find "TXM_${fullversion}_MacOSX/BUILDPKG.pkgproj" -type f -exec sed -i "s/TXMVERSION/$fullversion/g" {} \; |
|
88 |
find "TXM_${fullversion}_MacOSX/BUILDPKG.pkgproj" -type f -exec sed -i "s/TXMMAJORVERSION/$version/g" {} \; |
|
89 |
find "TXM_${fullversion}_MacOSX/Applications/TXM.app" -type f -exec sed -i "s/TXMVERSION/$fullversion/g" {} \; |
|
84 |
find "TXM_${fullversion}_${TIMESTAMP}_MacOSX/CLEAN" -type f -exec sed -i "s/TXMVERSION/$fullversion/g" {} \; |
|
85 |
find "TXM_${fullversion}_${TIMESTAMP}_MacOSX/finish_en.txt" -type f -exec sed -i "s/TXMVERSION/$fullversion/g" {} \; |
|
86 |
find "TXM_${fullversion}_${TIMESTAMP}_MacOSX/INSTALL" -type f -exec sed -i "s/TXMVERSION/$fullversion/g" {} \; |
|
87 |
find "TXM_${fullversion}_${TIMESTAMP}_MacOSX/BUILDPKG.pkgproj" -type f -exec sed -i "s/TXM_TXMVERSION_MacOSX_installer/TXM_${version}_${TIMESTAMP}_MacOSX_installer/g" {} \; |
|
88 |
find "TXM_${fullversion}_${TIMESTAMP}_MacOSX/BUILDPKG.pkgproj" -type f -exec sed -i "s/TXMVERSION/$fullversion/g" {} \; |
|
89 |
find "TXM_${fullversion}_${TIMESTAMP}_MacOSX/BUILDPKG.pkgproj" -type f -exec sed -i "s/TXMMAJORVERSION/$version/g" {} \; |
|
90 |
find "TXM_${fullversion}_${TIMESTAMP}_MacOSX/Applications/TXM.app" -type f -exec sed -i "s/TXMVERSION/$fullversion/g" {} \; |
|
90 | 91 |
|
91 | 92 |
echo " rename files to add version=$version" |
92 |
mv "TXM_${fullversion}_MacOSX/Applications/TXM.app" "TXM_${fullversion}_MacOSX/Applications/TXM-${fullversion}.app"
|
|
93 |
mv "TXM_${fullversion}_${TIMESTAMP}_MacOSX/Applications/TXM.app" "TXM_${fullversion}_${TIMESTAMP}_MacOSX/Applications/TXM-${fullversion}.app"
|
|
93 | 94 |
|
94 |
echo "Tar gz TXM_${fullversion}_MacOSX" |
|
95 |
tar -zcf "TXM_${fullversion}_MacOSX.tar.gz" "TXM_${fullversion}_MacOSX"
|
|
95 |
echo "Tar gz TXM_${fullversion}_${TIMESTAMP}_MacOSX"
|
|
96 |
tar -zcf "TXM_${fullversion}_${TIMESTAMP}_MacOSX.tar.gz" "TXM_${fullversion}_${TIMESTAMP}_MacOSX"
|
|
96 | 97 |
if [ $? != 0 ]; then |
97 |
echo "** MacOSXIntel.sh : failed to tar gz TXM_${fullversion}_MacOSX" |
|
98 |
echo "** MacOSXIntel.sh : failed to tar gz TXM_${fullversion}_${TIMESTAMP}_MacOSX"
|
|
98 | 99 |
exit 1; |
99 | 100 |
fi |
100 | 101 |
|
... | ... | |
102 | 103 |
echo "Local test: The archive is not sent to shared files." |
103 | 104 |
else |
104 | 105 |
echo "Sending to ensldfs.ens-lyon.fr/services/labo_ana_corpus/PartageTemp" |
105 |
smbclient -A auth.txt "//ensldfs.ens-lyon.fr/services" -c "cd \"/Laboratoires/labo_ana_corpus/Projets/Textométrie/Logiciel/TXM/$STEP\" ; put TXM_${fullversion}_MacOSX.zip ; exit" |
|
106 |
smbclient -A auth.txt "//ensldfs.ens-lyon.fr/services" -c "cd \"/Laboratoires/labo_ana_corpus/Projets/Textométrie/Logiciel/TXM/$STEP\" ; put TXM_${fullversion}_${TIMESTAMP}_MacOSX.zip ; exit"
|
|
106 | 107 |
if [ $? != 0 ]; then |
107 |
echo "** MacOSXIntel.sh : failed to send TXM_${fullversion}_MacOSX to labo_ana_corpus" |
|
108 |
echo "** MacOSXIntel.sh : failed to send TXM_${fullversion}_${TIMESTAMP}_MacOSX to labo_ana_corpus"
|
|
108 | 109 |
exit 1; |
109 | 110 |
fi |
110 | 111 |
fi |
111 | 112 |
|
112 |
#cp "TXM_${fullversion}_MacOSX.tar.gz" /run/user/1001/gvfs/smb-share\:server\=ensldfs.ens-lyon.fr\,share\=services\,user\=$USER/Laboratoires/labo_ana_corpus/PartageTemp |
|
113 |
#cp "TXM_${fullversion}_${TIMESTAMP}_MacOSX.tar.gz" /run/user/1001/gvfs/smb-share\:server\=ensldfs.ens-lyon.fr\,share\=services\,user\=$USER/Laboratoires/labo_ana_corpus/PartageTemp
|
|
113 | 114 |
#if [ $? != 0 ]; then |
114 |
# echo "** $APP: TXM_${fullversion}_MacOSX.tar.gz not copied PartageTemp" |
|
115 |
# echo "** $APP: TXM_${fullversion}_${TIMESTAMP}_MacOSX.tar.gz not copied PartageTemp"
|
|
115 | 116 |
# exit 1; |
116 | 117 |
#fi |
Also available in: Unified diff