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,7 +65,7 @@ errordialog() {
65 65
 
66 66
 	if [ "" != "${OSASCRIPT}" ]; then
67 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 69
 	fi;
70 70
 }
71 71
 
@@ -80,7 +80,7 @@ messagedialog() {
80 80
 
81 81
 	if [ "" != "${OSASCRIPT}" ]; then
82 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 84
 	fi;
85 85
 }
86 86
 
@@ -114,7 +114,7 @@ elif [ -e "${profiledir}/.launcher.sh" ]; then
114 114
 		
115 115
 			if [ "" != "${OSASCRIPT}" ]; then
116 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 118
 			fi;
119 119
 		}
120 120
 		
@@ -129,7 +129,7 @@ elif [ -e "${profiledir}/.launcher.sh" ]; then
129 129
 		
130 130
 			if [ "" != "${OSASCRIPT}" ]; then
131 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 133
 			fi;
134 134
 		}
135 135
 
@@ -142,7 +142,7 @@ elif [ -e "${profiledir}/.launcher.sh" ]; then
142 142
 				UID=`id -u`;
143 143
 			fi
144 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 146
 				if [ $? -eq 0 ]; then
147 147
 					echo "Password dialog on display"
148 148
 					osascript -e do shell script "mv -fv \"${profiledir}/.launcher.sh\" \"${0}\"" with administrator privileges
@@ -183,10 +183,10 @@ if [ -e "${profiledir}/.DMDirc.jar" ]; then
183 183
 			UID=`id -u`;
184 184
 		fi
185 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 187
 			if [ $? -eq 0 ]; then
188 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 190
 			fi;
191 191
 		fi
192 192
 		if [ ! -e "${profiledir}/.DMDirc.jar" ]; then

Loading…
Cancel
Save