Browse Source

Fix OSX Launcher a bit


git-svn-id: http://svn.dmdirc.com/trunk@3558 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6
Shane Mc Cormack 16 years ago
parent
commit
7ead8517fd
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      launcher/osx/DMDirc.sh

+ 7
- 7
launcher/osx/DMDirc.sh View File

65
 
65
 
66
 	if [ "" != "${OSASCRIPT}" ]; then
66
 	if [ "" != "${OSASCRIPT}" ]; then
67
 		echo "Displaying dialog.."
67
 		echo "Displaying dialog.."
68
-		${OSASCRIPT} -e 'tell application \"System Events\"' -e "activate" -e "display dialog \"${1}\n${2}\" with icon stop" -e 'end tell'
68
+		${OSASCRIPT} -e 'tell application "System Events"' -e "activate" -e "display dialog \"${1}\n${2}\" buttons {\"Ok\"} with icon stop" -e 'end tell'
69
 	fi;
69
 	fi;
70
 }
70
 }
71
 
71
 
80
 
80
 
81
 	if [ "" != "${OSASCRIPT}" ]; then
81
 	if [ "" != "${OSASCRIPT}" ]; then
82
 		echo "Displaying dialog.."
82
 		echo "Displaying dialog.."
83
-		${OSASCRIPT} -e 'tell application \"System Events\"' -e "activate" -e "display dialog \"${1}\n${2}\" with giving up after 120" -e 'end tell'
83
+		${OSASCRIPT} -e 'tell application "System Events"' -e "activate" -e "display dialog \"${1}\n${2}\" buttons {\"Ok\"} giving up after 120 with icon note" -e 'end tell'
84
 	fi;
84
 	fi;
85
 }
85
 }
86
 
86
 
114
 		
114
 		
115
 			if [ "" != "${OSASCRIPT}" ]; then
115
 			if [ "" != "${OSASCRIPT}" ]; then
116
 				echo "Displaying dialog.."
116
 				echo "Displaying dialog.."
117
-				${OSASCRIPT} -e 'tell application \"System Events\"' -e "activate" -e "display dialog \"\${1}\n\${2}\" with icon stop" -e 'end tell'
117
+				${OSASCRIPT} -e 'tell application "System Events"' -e "activate" -e "display dialog \"${1}\n${2}\" buttons {\"Ok\"} with icon stop" -e 'end tell'
118
 			fi;
118
 			fi;
119
 		}
119
 		}
120
 		
120
 		
129
 		
129
 		
130
 			if [ "" != "${OSASCRIPT}" ]; then
130
 			if [ "" != "${OSASCRIPT}" ]; then
131
 				echo "Displaying dialog.."
131
 				echo "Displaying dialog.."
132
-				${OSASCRIPT} -e 'tell application \"System Events\"' -e "activate" -e "display dialog \"\${1}\n\${2}\" with giving up after 120" -e 'end tell'
132
+				${OSASCRIPT} -e 'tell application "System Events"' -e "activate" -e "display dialog \"${1}\n${2}\" buttons {\"Ok\"} giving up after 120 with icon note" -e 'end tell'
133
 			fi;
133
 			fi;
134
 		}
134
 		}
135
 
135
 
142
 				UID=`id -u`;
142
 				UID=`id -u`;
143
 			fi
143
 			fi
144
 			if [ "0" != "${UID}" ]; then
144
 			if [ "0" != "${UID}" ]; then
145
-				messagedialog "DMDirc" "DMDirc Client Updater requires root access to modify the installation"
145
+				messagedialog "DMDirc" "The DMDirc Client Updater was unable to modify the client installation, trying again with administrator access"
146
 				if [ $? -eq 0 ]; then
146
 				if [ $? -eq 0 ]; then
147
 					echo "Password dialog on display"
147
 					echo "Password dialog on display"
148
 					osascript -e do shell script "mv -fv \"${profiledir}/.launcher.sh\" \"${0}\"" with administrator privileges
148
 					osascript -e do shell script "mv -fv \"${profiledir}/.launcher.sh\" \"${0}\"" with administrator privileges
183
 			UID=`id -u`;
183
 			UID=`id -u`;
184
 		fi
184
 		fi
185
 		if [ "0" != "${UID}" ]; then
185
 		if [ "0" != "${UID}" ]; then
186
-			messagedialog "DMDirc" "DMDirc Client Updater requires root access to modify the installation"
186
+			messagedialog "DMDirc" "The DMDirc Client Updater was unable to modify the client installation, trying again with administrator access"
187
 			if [ $? -eq 0 ]; then
187
 			if [ $? -eq 0 ]; then
188
 				echo "Password dialog on display"
188
 				echo "Password dialog on display"
189
-				osascript -e do shell script "mv -fv \"${profiledir}/.launcher.sh\" \"${0}\"" with administrator privileges
189
+				osascript -e "do shell script \"mv -fv \\\"${profiledir}/.launcher.sh\\\" \\\"${0}\\\"\" with administrator privileges"
190
 			fi;
190
 			fi;
191
 		fi
191
 		fi
192
 		if [ ! -e "${profiledir}/.DMDirc.jar" ]; then
192
 		if [ ! -e "${profiledir}/.DMDirc.jar" ]; then

Loading…
Cancel
Save