Explorar el Código

Added irc:// handler support to Linux installers

Linux scripts now use kdialog/zenity where appropriate to show error messages. No longer expect users to have a terminal open


git-svn-id: http://svn.dmdirc.com/trunk@2763 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5.5
Shane Mc Cormack hace 16 años
padre
commit
976b44b047

+ 31
- 12
installer/linux/makeInstallerLinux.sh Ver fichero

@@ -273,12 +273,35 @@ fi
273 273
 
274 274
 ###ADDITIONAL_STUFF###
275 275
 
276
+errordialog() {
277
+	# Send message to console.
278
+	echo ""
279
+	echo "-----------------------------------------------------------------------"
280
+	echo "Error: ${1}"
281
+	echo "-----------------------------------------------------------------------"
282
+	echo "${2}"
283
+	echo "-----------------------------------------------------------------------"
284
+
285
+	# Now try to use the GUI Dialogs.
286
+	ISKDE=`pidof -x -s kdeinit`
287
+	KDIALOG=`which kdialog`
288
+	ISGNOME=`pidof -x -s gnome-panel`
289
+	ZENITY=`which zenity`
290
+	if [ "" != "${ISKDE}" -a "" != "${KDIALOG}" -a "" != "${DISPLAY}" ]; then
291
+		echo "Dialog on Display: ${DISPLAY}"
292
+		${KDIALOG} --title "DMDirc: ${1}" --error "${1}\n\n${2}"
293
+	elif [ "" != "${ISGNOME}" -a "" != "${ZENITY}" -a "" != "${DISPLAY}" ]; then
294
+		echo "Dialog on Display: ${DISPLAY}"
295
+		${ZENITY} --error --title "DMDirc: ${1}" --text "${1}\n\n${2}"
296
+	fi
297
+}
298
+
276 299
 # Location of .run stub end
277 300
 ENDLINE=`grep -na "^###END INCLUDE###$" $0`
278 301
 ENDLINE=$((${ENDLINE%%:*} + 1))
279 302
 
280 303
 if [ "" = "${ENDLINE}" ]; then
281
-	echo "End of stub not found. Aborting.";
304
+	errordialog "DMDirc Setup" "End of stub not found. Aborting.";
282 305
 	exit 0;
283 306
 fi
284 307
 
@@ -330,7 +353,7 @@ random() {
330 353
 				DIR=${BASEDIR}${RND}
331 354
 				if [ -e "${DIR}" ]; then
332 355
 					# Lets hope this never happens.
333
-					echo "Unable to create random directory";
356
+					errordialog "DMDirc Setup" "Unable to create random directory";
334 357
 					exit 0;
335 358
 				fi;
336 359
 			fi;
@@ -410,11 +433,9 @@ if [ "${MD5BIN}" != "" ]; then
410 433
 			if [ $? = 0 ]; then
411 434
 				echo "MD5 Check Passed!"
412 435
 			else
413
-				echo ""
414
-				echo "MD5 Check Failed!"
415
-				echo "--------------------------"
416
-				echo "This copy of the DMDirc installer appears to be damaged and will now exit.";
417
-				echo "You may choose to skip this check and run it anyway by passing the --nomd5 parameter";
436
+				ERROR="This copy of the DMDirc installer appears to be damaged and will now exit.";
437
+				ERROR=${ERROR}"\nYou may choose to skip this check and run it anyway by passing the --nomd5 parameter";
438
+				errordialog "DMDirc Setup: MD5 Check Failed!" "${ERROR}";
418 439
 				exit 1;
419 440
 			fi
420 441
 		elif [ "${MD5}" != ""  ]; then
@@ -428,11 +449,9 @@ if [ "${MD5BIN}" != "" ]; then
428 449
 				if [ "${MD5SUM}" = "${MD5}" ]; then
429 450
 					echo "MD5 Check Passed!"
430 451
 				else
431
-					echo ""
432
-					echo "MD5 Check Failed!"
433
-					echo "--------------------------"
434
-					echo "This copy of the DMDirc installer appears to be damaged and will now exit.";
435
-					echo "You may choose to skip this check and run it anyway by passing the --nomd5 parameter";
452
+					ERROR="This copy of the DMDirc installer appears to be damaged and will now exit.";
453
+					ERROR=${ERROR}"\nYou may choose to skip this check and run it anyway by passing the --nomd5 parameter";
454
+					errordialog "DMDirc Setup: MD5 Check Failed!" "${ERROR}";
436 455
 					exit 1;
437 456
 				fi;
438 457
 			else

+ 35
- 20
installer/linux/setup.sh Ver fichero

@@ -23,6 +23,29 @@
23 23
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 24
 # SOFTWARE.
25 25
 
26
+errordialog() {
27
+	# Send message to console.
28
+	echo ""
29
+	echo "-----------------------------------------------------------------------"
30
+	echo "Error: ${1}"
31
+	echo "-----------------------------------------------------------------------"
32
+	echo "${2}"
33
+	echo "-----------------------------------------------------------------------"
34
+
35
+	# Now try to use the GUI Dialogs.
36
+	ISKDE=`pidof -x -s kdeinit`
37
+	KDIALOG=`which kdialog`
38
+	ISGNOME=`pidof -x -s gnome-panel`
39
+	ZENITY=`which zenity`
40
+	if [ "" != "${ISKDE}" -a "" != "${KDIALOG}" -a "" != "${DISPLAY}" ]; then
41
+		echo "Dialog on Display: ${DISPLAY}"
42
+		${KDIALOG} --title "DMDirc: ${1}" --error "${1}\n\n${2}"
43
+	elif [ "" != "${ISGNOME}" -a "" != "${ZENITY}" -a "" != "${DISPLAY}" ]; then
44
+		echo "Dialog on Display: ${DISPLAY}"
45
+		${ZENITY} --error --title "DMDirc: ${1}" --text "${1}\n\n${2}"
46
+	fi
47
+}
48
+
26 49
 echo ""
27 50
 echo "---------------------"
28 51
 echo "Setup.sh"
@@ -35,15 +58,11 @@ if [ "" != "${JAVA}" ]; then
35 58
 else
36 59
 	echo "Failed!"
37 60
 	# This should in future offer to download and install the JVM automatically.
38
-	echo ""
39
-	echo "-----------------------------------------------------------------------"
40
-	echo "Unable to complete setup!"
41
-	echo "-----------------------------------------------------------------------"
42
-	echo "Sorry, java is not installed on this machine."
43
-	echo ""
44
-	echo "DMDirc requires a 1.6.0 compatible JVM, you can get one from:"
45
-	echo "http://jdl.sun.com/webapps/getjava/BrowserRedirect"
46
-	echo "-----------------------------------------------------------------------"
61
+	ERROR="Sorry, java is not installed on this machine.";
62
+	ERROR=${ERROR}"\n"
63
+	ERROR=${ERROR}"\nDMDirc requires a 1.6.0 compatible JVM, you can get one from:";
64
+	ERROR=${ERROR}"\nhttp://jdl.sun.com/webapps/getjava/BrowserRedirect";
65
+	errordialog "Unable to complete setup!" "${ERROR}";
47 66
 	exit 1;
48 67
 fi
49 68
 
@@ -102,21 +121,17 @@ if [ -e "installer.jar" ]; then
102 121
 		echo "Running installer.."
103 122
 		${JAVA} -cp DMDirc.jar -jar installer.jar ${isRoot}${isRelease}
104 123
 		if [ $? -ne 0 ]; then
105
-			echo ""
106
-			echo "-----------------------------------------------------------------------"
107
-			echo "Unable to complete setup!"
108
-			echo "-----------------------------------------------------------------------"
109
-			echo "Sorry, the currently installed version of java is not compatible with"
110
-			echo "DMDirc."
111
-			echo ""
112
-			echo "DMDirc requires a 1.6.0 compatible JVM, you can get one from:"
113
-			echo "http://jdl.sun.com/webapps/getjava/BrowserRedirect"
114
-			echo "-----------------------------------------------------------------------"
124
+			ERROR="Sorry, the currently installed version of java is not compatible with";
125
+			ERROR=${ERROR}"\nDMDirc.";
126
+			ERROR=${ERROR}"\n";
127
+			ERROR=${ERROR}"\nDMDirc requires a 1.6.0 compatible JVM, you can get one from:";
128
+			ERROR=${ERROR}"\nhttp://jdl.sun.com/webapps/getjava/BrowserRedirect";
129
+			errordialog "Unable to complete setup!" "${ERROR}";
115 130
 			exit 1;
116 131
 		fi
117 132
 		exit 0;
118 133
 	fi
119
-else 
134
+else
120 135
 	echo "No installer found!"
121 136
 fi
122 137
 

+ 36
- 20
launcher/linux/DMDirc.sh Ver fichero

@@ -37,6 +37,29 @@ while test -n "$1"; do
37 37
 	shift
38 38
 done
39 39
 
40
+errordialog() {
41
+	# Send message to console.
42
+	echo ""
43
+	echo "-----------------------------------------------------------------------"
44
+	echo "Error: ${1}"
45
+	echo "-----------------------------------------------------------------------"
46
+	echo "${2}"
47
+	echo "-----------------------------------------------------------------------"
48
+
49
+	# Now try to use the GUI Dialogs.
50
+	ISKDE=`pidof -x -s kdeinit`
51
+	KDIALOG=`which kdialog`
52
+	ISGNOME=`pidof -x -s gnome-panel`
53
+	ZENITY=`which zenity`
54
+	if [ "" != "${ISKDE}" -a "" != "${KDIALOG}" -a "" != "${DISPLAY}" ]; then
55
+		echo "Dialog on Display: ${DISPLAY}"
56
+		${KDIALOG} --title "DMDirc: ${1}" --error "${1}\n\n${2}"
57
+	elif [ "" != "${ISGNOME}" -a "" != "${ZENITY}" -a "" != "${DISPLAY}" ]; then
58
+		echo "Dialog on Display: ${DISPLAY}"
59
+		${ZENITY} --error --title "DMDirc: ${1}" --text "${1}\n\n${2}"
60
+	fi
61
+}
62
+
40 63
 jar=`dirname $0`/DMDirc.jar
41 64
 
42 65
 echo "---------------------"
@@ -65,15 +88,11 @@ if [ "" != "${JAVA}" ]; then
65 88
 else
66 89
 	echo "Failed!"
67 90
 	# This should in future offer to download and install the JVM automatically.
68
-	echo ""
69
-	echo "-----------------------------------------------------------------------"
70
-	echo "Unable to launch dmdirc!"
71
-	echo "-----------------------------------------------------------------------"
72
-	echo "Sorry, java is not installed on this machine."
73
-	echo ""
74
-	echo "DMDirc requires a 1.6.0 compatible JVM, you can get one from:"
75
-	echo "http://jdl.sun.com/webapps/getjava/BrowserRedirect"
76
-	echo "-----------------------------------------------------------------------"
91
+	ERROR="Sorry, java is not installed on this machine.";
92
+	ERROR=${ERROR}"\n"
93
+	ERROR=${ERROR}"\nDMDirc requires a 1.6.0 compatible JVM, you can get one from:";
94
+	ERROR=${ERROR}"\nhttp://jdl.sun.com/webapps/getjava/BrowserRedirect";
95
+	errordialog "Unable to launch dmdirc!" "${ERROR}";
77 96
 	exit 1;
78 97
 fi
79 98
 
@@ -85,16 +104,12 @@ if [ -e "${jar}" ]; then
85 104
 	${JAVA} -jar ${jar} --help >/dev/null 2>&1
86 105
 	if [ $? -ne 0 ]; then
87 106
 		echo "Failed."
88
-		echo ""
89
-		echo "-----------------------------------------------------------------------"
90
-		echo "Unable to launch DMDirc!"
91
-		echo "-----------------------------------------------------------------------"
92
-		echo "Sorry, the currently installed version of java is not compatible with"
93
-		echo "DMDirc."
94
-		echo ""
95
-		echo "DMDirc requires a 1.6.0 compatible JVM, you can get one from:"
96
-		echo "http://jdl.sun.com/webapps/getjava/BrowserRedirect"
97
-		echo "-----------------------------------------------------------------------"
107
+		ERROR="Sorry, the currently installed version of java is not compatible with";
108
+		ERROR=${ERROR}"\nDMDirc.";
109
+		ERROR=${ERROR}"\n";
110
+		ERROR=${ERROR}"\nDMDirc requires a 1.6.0 compatible JVM, you can get one from:";
111
+		ERROR=${ERROR}"\nhttp://jdl.sun.com/webapps/getjava/BrowserRedirect";
112
+		errordialog "Unable to launch dmdirc!" "${ERROR}";
98 113
 		exit 1;
99 114
 	fi
100 115
 	
@@ -103,5 +118,6 @@ if [ -e "${jar}" ]; then
103 118
 	${JAVA} -jar ${jar} ${params}
104 119
 	exit $?;
105 120
 else 
106
-	echo "Failed: No jar file found!"
121
+	echo "Failed.";
122
+	errordialog "Unable to launch dmdirc!" "No jar file found";
107 123
 fi

+ 8
- 0
src/com/dmdirc/installer/Installer.java Ver fichero

@@ -146,4 +146,12 @@ public abstract class Installer extends Thread {
146 146
 			throw new IOException(srcFile+" does not exist.");
147 147
 		}
148 148
 	}
149
+	
150
+	
151
+	/**
152
+	 * Any post-install tasks should be done here.
153
+	 *
154
+	 * @param location Location where app was installed to.
155
+	 */
156
+	public void postInstall(final String location) { }
149 157
 }

+ 140
- 5
src/com/dmdirc/installer/LinuxInstaller.java Ver fichero

@@ -69,9 +69,10 @@ public class LinuxInstaller extends Installer {
69 69
 			case DESKTOP:
70 70
 				// No desktop for root
71 71
 				return !isRoot();
72
+			case PROTOCOL:
72 73
 			case UNINSTALLER:
73 74
 			case MENU:
74
-				// Both root and non-root have a menu and uninstaller
75
+				// Both root and non-root have a menu, uninstaller, and protocol
75 76
 				return true;
76 77
 			default:
77 78
 				// Anything else that gets added should be false until the relevent
@@ -94,7 +95,8 @@ public class LinuxInstaller extends Installer {
94 95
 		
95 96
 		PrintWriter writer = null;
96 97
 		try {
97
-			String filename;
98
+			String filename = "";
99
+			String command = "";
98 100
 
99 101
 			switch (shortcutType) {
100 102
 				case DESKTOP:
@@ -102,7 +104,7 @@ public class LinuxInstaller extends Installer {
102 104
 					break;
103 105
 					
104 106
 				case MENU:
105
-					if (CLIParser.getCLIParser().getParamNumber("-isroot") > 0) {
107
+					if (isRoot()) {
106 108
 						filename = "/usr/share/applications/DMDirc.desktop";
107 109
 					} else {
108 110
 						filename = System.getProperty("user.home")+"/.local/share/applications/DMDirc.desktop";
@@ -112,20 +114,144 @@ public class LinuxInstaller extends Installer {
112 114
 				case UNINSTALLER:
113 115
 					writer = new PrintWriter(location+"/uninstall.sh");
114 116
 					writer.println("#!/bin/sh");
117
+					writer.println("# DMDirc Uninstaller");
118
+					writer.println("ISKDE=`pidof -x -s kdeinit`");
119
+					writer.println("KDIALOG=`which kdialog`");
120
+					writer.println("ISGNOME=`pidof -x -s gnome-panel`");
121
+					writer.println("ZENITY=`which zenity`");
122
+					writer.println("DIALOG=`which dialog`");
123
+					
124
+					if (isRoot()) {
125
+						writer.println("USER=`whoami`");
126
+						writer.println("if [ \"${USER}\" != \"root\" ]; then");
127
+						writer.println("if [ ${result} -eq 1 ]; then");
128
+						writer.println("\t\tif [ \"\" != \"${ISKDE}\" -a \"\" != \"${KDIALOG}\" -a \"\" != \"${DISPLAY}\" ]; then");
129
+						writer.println("\t\t	${KDIALOG} --title \"DMDirc Uninstaller\" --error \"Uninstall Aborted. Only root can use this script\"");
130
+						writer.println("\t\telif [ \"\" != \"${ISGNOME}\" -a \"\" != \"${ZENITY}\" -a \"\" != \"${DISPLAY}\" ]; then");
131
+						writer.println("\t\t	${ZENITY} --info --title \"DMDirc Uninstaller\" --text \"Uninstall Aborted. Only root can use this script\"");
132
+						writer.println("\t\tfi");
133
+						writer.println("\t\techo \"Uninstall Aborted. Only root can use this script\"");
134
+						writer.println("\tfi");
135
+						writer.println("exit 1;");
136
+						writer.println("fi");
137
+					}
138
+					
139
+					writer.println("if [ \"\" != \"${ISKDE}\" -a \"\" != \"${KDIALOG}\" -a \"\" != \"${DISPLAY}\" ]; then");
140
+					writer.println("	echo \"Dialog Prompt on: ${DISPLAY}\"");
141
+					writer.println("	${KDIALOG} --title \"DMDirc Uninstaller\" --yesno \"Are you sure you want to uninstall DMDirc?\"");
142
+					writer.println("elif [ \"\" != \"${ISGNOME}\" -a \"\" != \"${ZENITY}\" -a \"\" != \"${DISPLAY}\" ]; then");
143
+					writer.println("	echo \"Dialog Prompt on: ${DISPLAY}\"");
144
+					writer.println("	${ZENITY} --question --title \"DMDirc Uninstaller\" --text \"Are you sure you want to uninstall DMDirc?\"");
145
+					writer.println("elif [ \"\" != \"${DIALOG}\" ]; then");
146
+					writer.println("	${DIALOG} --title \"DMDirc Uninstaller\" --yesno \"Are you sure you want to uninstall DMDirc?\" 8 40");
147
+					writer.println("fi");
148
+					
149
+					writer.println("if [ $? -ne 0 ]; then");
150
+					writer.println("\tif [ \"\" != \"${ISKDE}\" -a \"\" != \"${KDIALOG}\" -a \"\" != \"${DISPLAY}\" ]; then");
151
+					writer.println("\t	${KDIALOG} --title \"DMDirc Uninstaller\" --msgbox \"Uninstall Aborted\"");
152
+					writer.println("\telif [ \"\" != \"${ISGNOME}\" -a \"\" != \"${ZENITY}\" -a \"\" != \"${DISPLAY}\" ]; then");
153
+					writer.println("\t	${ZENITY} --info --title \"DMDirc Uninstaller\" --text \"Uninstall Aborted\"");
154
+					writer.println("\tfi");
155
+					writer.println("\techo \"Uninstall Aborted\"");
156
+					writer.println("\texit 1;");
157
+					writer.println("fi");
158
+					
115 159
 					writer.println("echo \"Uninstalling dmdirc\"");
116 160
 					writer.println("echo \"Removing Shortcuts..\"");
117
-					if (CLIParser.getCLIParser().getParamNumber("-isroot") > 0) {
161
+					if (isRoot()) {
162
+						command = "${TOOL} --config-source=`${TOOL} --get-default-source`";
163
+						filename = "/usr/share/services/irc.protocol";
118 164
 						writer.println("rm -Rfv /usr/share/applications/DMDirc.desktop");
119 165
 					} else {
166
+						command = "${TOOL}";
167
+						filename = "~/.kde/share/services/irc.protocol";
120 168
 						writer.println("rm -Rfv "+System.getProperty("user.home")+"/.local/share/applications/DMDirc.desktop");
121 169
 						writer.println("rm -Rfv "+System.getProperty("user.home")+"/Desktop/DMDirc.desktop");
122 170
 					}
171
+					writer.println("TOOL=`which gconftool-2`");
172
+					writer.println("if [ \"${TOOL}\" != \"\" ]; then");
173
+					writer.println("\tCURRENT=`"+command+" --get /desktop/gnome/url-handlers/irc/command`");
174
+					writer.println("\tif [ \"${CURRENT}\" = \"\\\""+location+"/DMDirc.sh\\\" -c %s\" ]; then");
175
+					writer.println("\t\techo \"Removing Gnome Protocol Handler\"");
176
+					writer.println("\t\t"+command+" --unset /desktop/gnome/url-handlers/irc/enabled");
177
+					writer.println("\t\t"+command+" --unset /desktop/gnome/url-handlers/irc/command");
178
+					writer.println("\telse");
179
+					writer.println("\t\techo \"Not Removing Gnome Protocol Handler\"");
180
+					writer.println("\tfi");
181
+					writer.println("fi");
182
+					
183
+					writer.println("if [ -e \""+filename+"\" ]; then");
184
+					writer.println("\tCURRENT=`grep DMDirc "+filename+"`");
185
+					writer.println("\tif [ \"\" != \"${CURRENT}\" ]; then");
186
+					writer.println("\t\techo \"Removing KDE Protocol Handler\"");
187
+					writer.println("\t\trm -Rfv "+filename);
188
+					writer.println("\telse");
189
+					writer.println("\t\techo \"Not Removing KDE Protocol Handler\"");
190
+					writer.println("\tfi");
191
+					writer.println("fi");
192
+					
123 193
 					writer.println("echo \"Removing Installation Directory\"");
124
-					writer.println("rm -Rfv "+location);
194
+					writer.println("rm -Rfv \""+location+"\"");
195
+
196
+					writer.println("if [ \"\" != \"${ISKDE}\" -a \"\" != \"${KDIALOG}\" -a \"\" != \"${DISPLAY}\" ]; then");
197
+					writer.println("	${KDIALOG} --title \"DMDirc Uninstaller\" --msgbox \"DMDirc Uninstalled Successfully\"");
198
+					writer.println("elif [ \"\" != \"${ISGNOME}\" -a \"\" != \"${ZENITY}\" -a \"\" != \"${DISPLAY}\" ]; then");
199
+					writer.println("	${ZENITY} --info --title \"DMDirc Uninstaller\" --text \"DMDirc Uninstalled Successfully\"");
200
+					writer.println("fi");
201
+					
125 202
 					writer.println("echo \"Done.\"");
126 203
 					
127 204
 					(new File(location+"/uninstall.sh")).setExecutable(true);
128 205
 					return;
206
+				
207
+				case PROTOCOL:
208
+					if (isRoot()) {
209
+						command = "${TOOL} --config-source=`${TOOL} --get-default-source`";
210
+						filename = "/usr/share/services/";
211
+					} else {
212
+						command = "${TOOL}";
213
+						filename = "~/.kde/share/services/";
214
+					}
215
+					
216
+					writer = new PrintWriter(location+"/protocolHandlers.sh");
217
+					writer.println("#!/bin/sh");
218
+					writer.println("TOOL=`which gconftool-2`");
219
+					writer.println("if [ \"${TOOL}\" != \"\" ]; then");
220
+					writer.println("\t"+command+" --set --type=bool /desktop/gnome/url-handlers/irc/enabled true");
221
+					writer.println("\t"+command+" --set --type=string /desktop/gnome/url-handlers/irc/command \"\\\""+location+"/DMDirc.sh\\\" -c %s\"");
222
+					writer.println("fi");
223
+					writer.println("exit 0;");
224
+					writer.close();
225
+					
226
+					(new File(location+"/protocolHandlers.sh")).setExecutable(true);
227
+					
228
+					try {
229
+						final Process gconfProcess = Runtime.getRuntime().exec(new String[]{"/bin/sh", location+"/protocolHandlers.sh"});
230
+						new StreamReader(gconfProcess.getInputStream()).start();
231
+						new StreamReader(gconfProcess.getErrorStream()).start();
232
+						gconfProcess.waitFor();
233
+						(new File(location+"/protocolHandlers.sh")).delete();
234
+					} catch (Exception e) {
235
+						step.addText(" - Error adding gnome Protocol Handler: "+e.getMessage());
236
+					}
237
+					
238
+					if (filename != "") {
239
+						if ((new File(filename)).exists()) {
240
+							writer = new PrintWriter(filename+"irc.protocol");
241
+							writer.println("[Protocol]");
242
+							writer.println("Exec="+location+"/DMDirc.sh -c %u");
243
+							writer.println("protocol=irc");
244
+							writer.println("input=none");
245
+							writer.println("output=none");
246
+							writer.println("helper=true");
247
+							writer.println("listing=false");
248
+							writer.println("reading=false");
249
+							writer.println("writing=false");
250
+							writer.println("makedir=false");
251
+							writer.println("deleting=false");
252
+						}
253
+					}
254
+					return;
129 255
 					
130 256
 				default:
131 257
 					step.addText(" - Error creating shortcut. Not applicable to this Operating System");
@@ -168,4 +294,13 @@ public class LinuxInstaller extends Installer {
168 294
 		writer.println("TerminalOptions=");
169 295
 		writer.println("Type=Application");
170 296
 	}
297
+	
298
+	/**
299
+	 * Any post-install tasks should be done here.
300
+	 *
301
+	 * @param location Location where app was installed to.
302
+	 */
303
+	public void postInstall(final String location) {
304
+		(new File(location+"/DMDirc.sh")).setExecutable(true);
305
+	}
171 306
 }

+ 2
- 0
src/com/dmdirc/installer/StepInstall.java Ver fichero

@@ -137,6 +137,8 @@ public final class StepInstall extends Step implements StepListener {
137 137
 			}
138 138
 		}
139 139
 		
140
+		myInstaller.postInstall(location);
141
+		
140 142
 		addText("");
141 143
 		addText("Installation finished\n");
142 144
 		Main.getWizardDialog().enableNextStep(true);

Loading…
Cancelar
Guardar