| 4 |
4 |
echo "Prepare redirections in $HOME/TXMPostInstallOutputLogs.txt and $HOME/TXMPostInstallErrorLogs.txt files"
|
| 5 |
5 |
|
| 6 |
6 |
LOGFILESMSG=", see $HOME/TXMPostInstallOutputLogs.txt and $HOME/TXMPostInstallErrorLogs.txt output and error messages files."
|
| 7 |
|
|
|
7 |
VERSION=0.8.0
|
| 8 |
8 |
exec 3>$HOME/TXMPostInstallOutputLogs.txt
|
| 9 |
9 |
exec 4>$HOME/TXMPostInstallErrorLogs.txt
|
| 10 |
10 |
|
| ... | ... | |
| 17 |
17 |
|
| 18 |
18 |
echo "Creating all necessary directories"
|
| 19 |
19 |
|
| 20 |
|
DIR="$HOME/TXM"
|
| 21 |
|
echo "DIR='$DIR'"
|
| 22 |
|
if [ ! -d "$DIR" ]; then
|
| 23 |
|
mkdir "$DIR"
|
|
20 |
TXMHOME="$HOME/TXM_$VERSION"
|
|
21 |
echo "TXMHOME='$TXMHOME'"
|
|
22 |
if [ ! -d "$TXMHOME" ]; then
|
|
23 |
mkdir "$TXMHOME"
|
| 24 |
24 |
fi
|
| 25 |
|
if [ ! -d "$DIR" ]; then
|
| 26 |
|
zenity --info --text="TXM: Impossible to access '$DIR' directory. Aborting$LOGFILESMSG"
|
|
25 |
if [ ! -d "$TXMHOME" ]; then
|
|
26 |
zenity --info --text="TXM: Impossible to access '$TXMHOME' directory. Aborting$LOGFILESMSG"
|
| 27 |
27 |
echo "TXM: Impossible to access '$DIR' directory. Aborting$LOGFILESMSG"
|
| 28 |
28 |
exit 1
|
| 29 |
29 |
fi
|
| 30 |
30 |
|
| 31 |
|
DIR="$HOME/TXM/.txm"
|
|
31 |
DIR="$TXMHOME/.txm"
|
| 32 |
32 |
echo "DIR='$DIR'"
|
| 33 |
33 |
if [ ! -d "$DIR" ]; then
|
| 34 |
34 |
mkdir "$DIR"
|
| ... | ... | |
| 87 |
87 |
fi
|
| 88 |
88 |
|
| 89 |
89 |
echo "TXM: if .txm folder does not contain the STAMP file, its a new install."
|
| 90 |
|
if [ ! -e "$HOME/TXM/.txm/$STAMP" ]; then
|
|
90 |
if [ ! -e "$TXMHOME/.txm/$STAMP" ]; then
|
| 91 |
91 |
|
| 92 |
92 |
echo "New TXM install: it's the first launch after the installation"
|
| 93 |
93 |
if [ -f "/tmp/org.txm.rcpapplication.prefs" ]; then
|
| ... | ... | |
| 113 |
113 |
fi
|
| 114 |
114 |
|
| 115 |
115 |
echo "TXM: Installing up to date TXM directories."
|
| 116 |
|
rm -rf "$HOME/TXM/.txm"
|
| 117 |
|
if [ -d "$HOME/TXM/.txm" ]; then
|
| 118 |
|
zenity --info --text="TXM: Failed to remove $HOME/TXM/.txm directory$LOGFILESMSG"
|
| 119 |
|
echo "TXM: Failed to remove $HOME/TXM/.txm directory$LOGFILESMSG"
|
|
116 |
rm -rf "$TXMHOME/.txm"
|
|
117 |
if [ -d "$TXMHOME/.txm" ]; then
|
|
118 |
zenity --info --text="TXM: Failed to remove $TXMHOME/.txm directory$LOGFILESMSG"
|
|
119 |
echo "TXM: Failed to remove $TXMHOME/.txm directory$LOGFILESMSG"
|
| 120 |
120 |
exit 1 ;
|
| 121 |
121 |
fi
|
| 122 |
122 |
|
| 123 |
|
mkdir "$HOME/TXM/.txm"
|
| 124 |
|
mkdir "$HOME/TXM/.txm/user"
|
| 125 |
|
mkdir "$HOME/TXM/.txm/data"
|
|
123 |
mkdir "$TXMHOME/.txm"
|
|
124 |
mkdir "$TXMHOME/.txm/user"
|
|
125 |
mkdir "$TXMHOME/.txm/data"
|
| 126 |
126 |
|
| 127 |
|
if [ ! -d "$HOME/TXM/.txm" ]; then
|
| 128 |
|
echo "TXM: Impossible to access '$HOME/TXM/.txm' directory. Aborting$LOGFILESMSG"
|
|
127 |
if [ ! -d "$TXMHOME/.txm" ]; then
|
|
128 |
echo "TXM: Impossible to access '$TXMHOME/.txm' directory. Aborting$LOGFILESMSG"
|
| 129 |
129 |
exit 1
|
| 130 |
130 |
fi
|
| 131 |
131 |
|
| 132 |
|
echo "TXM: getting '/Applications/TXM/TXM.ini' and set write permission of '$HOME/TXM/.txm/TXM.ini'"
|
| 133 |
|
cp /Applications/TXM/.main.app/Contents/MacOS/TXM.ini "$HOME/TXM/.txm/TXM.ini" &&
|
| 134 |
|
chmod +w "$HOME/TXM/.txm/TXM.ini";
|
|
132 |
echo "TXM: getting '/Applications/TXM/TXM.ini' and set write permission of '$TXMHOME/.txm/TXM.ini'"
|
|
133 |
cp /Applications/TXM/.main.app/Contents/MacOS/TXM.ini "$TXMHOME/.txm/TXM.ini" &&
|
|
134 |
chmod +w "$TXMHOME/.txm/TXM.ini";
|
| 135 |
135 |
|
| 136 |
136 |
if [ $? != 0 ]; then
|
| 137 |
137 |
echo "TXM: Can't launch TXM: failed to set TXM.ini file$LOGFILESMSG"
|
| 138 |
138 |
exit 1
|
| 139 |
139 |
fi
|
| 140 |
140 |
|
| 141 |
|
echo "TXM: creating the $HOME/TXM/.txm/$STAMP install STAMP file."
|
| 142 |
|
touch "$HOME/TXM/.txm/$STAMP"
|
|
141 |
echo "TXM: creating the $TXMHOME/.txm/$STAMP install STAMP file."
|
|
142 |
touch "$TXMHOME/.txm/$STAMP"
|
| 143 |
143 |
|
| 144 |
144 |
if [ $? != 0 ]; then
|
| 145 |
|
echo "TXM: Can't launch TXM: failed to create the $HOME/TXM/.txm/$STAMP install STAMP file$LOGFILESMSG"
|
|
145 |
echo "TXM: Can't launch TXM: failed to create the $TXMHOME/.txm/$STAMP install STAMP file$LOGFILESMSG"
|
| 146 |
146 |
exit 1
|
| 147 |
147 |
fi
|
| 148 |
148 |
fi
|
| ... | ... | |
| 168 |
168 |
if [ $i == "-vmargs" ]; then
|
| 169 |
169 |
STARTVMARGS=1
|
| 170 |
170 |
fi
|
| 171 |
|
done < "$HOME/TXM/.txm/TXM.ini";
|
|
171 |
done < "$TXMHOME/.txm/TXM.ini";
|
| 172 |
172 |
|
| 173 |
173 |
echo "TXM INI ARGS = $TXMINIARGS"
|
| 174 |
174 |
echo "TXM INI VM ARGS = $TXMINIARGSVM"
|
| ... | ... | |
| 179 |
179 |
|
| 180 |
180 |
if [ $? != 0 ];then
|
| 181 |
181 |
echo "TXM: Running TXM for Mac OS X $OSVERSION with the binary launcher..."
|
| 182 |
|
open /Applications/TXM/.main.app --args -run --launcher.ini "$HOME/TXM/.txm/TXM.ini" -data "$HOME/TXM/.txm/data" -user "$HOME/TXM/.txm/user" -install "/Applications/TXM" &
|
|
182 |
open /Applications/TXM/.main.app --args -run --launcher.ini "$TXMHOME/.txm/TXM.ini" -data "$TXMHOME/.txm/data" -user "$TXMHOME/.txm/user" -install "/Applications/TXM" &
|
| 183 |
183 |
else
|
| 184 |
184 |
echo "TXM: Running TXM for Mac OS X $OSVERSION with the JAR launcher..."
|
| 185 |
|
/Applications/TXM/jre/Contents/Home/bin/java -Djava.library.path="$(echo /Applications/TXM/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_*/eclipse_*.so)" -XX:MaxPermSize=256m -XstartOnFirstThread $TXMINIARGSVM -jar "$(echo /Applications/TXM/TXM/plugins/org.eclipse.equinox.launcher_*.jar)" -os macosx -ws cocoa -arch x86_64 -showsplash -run -data "$HOME/TXM/.txm/data" -user "$HOME/TXM/.txm/user" -install "/Applications/TXM/TXM"
|
|
185 |
/Applications/TXM/jre/Contents/Home/bin/java -Djava.library.path="$(echo /Applications/TXM/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_*/eclipse_*.so)" -XX:MaxPermSize=256m -XstartOnFirstThread $TXMINIARGSVM -jar "$(echo /Applications/TXM/TXM/plugins/org.eclipse.equinox.launcher_*.jar)" -os macosx -ws cocoa -arch x86_64 -showsplash -run -data "$TXMHOME/.txm/data" -user "$TXMHOME/.txm/user" -install "/Applications/TXM/TXM"
|
| 186 |
186 |
fi
|