mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
check the presence of the .NET framwork before attempting the service installation
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@12953 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
a14c83637c
commit
4b6758b89b
2 files changed
+13
No files matched your search
@@ -5,6 +5,7 @@ import hudson.model.Hudson;
|
||||
import hudson.AbortException;
|
||||
import hudson.FilePath;
|
||||
import hudson.util.StreamTaskListener;
|
||||
import hudson.util.jna.DotNet;
|
||||
import hudson.Launcher.LocalLauncher;
|
||||
import org.kohsuke.stapler.QueryParameter;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
@@ -77,6 +78,10 @@ public class WindowsInstallerLink extends ManagementLink {
|
||||
sendError("Installation is already complete",req,rsp);
|
||||
return;
|
||||
}
|
||||
if(!DotNet.isInstalled(2,0)) {
|
||||
sendError(".NET Framework 2.0 or later is required for this feature",req,rsp);
|
||||
return;
|
||||
}
|
||||
|
||||
Hudson.getInstance().checkPermission(Hudson.ADMINISTER);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import hudson.remoting.Engine;
|
||||
import hudson.remoting.jnlp.MainDialog;
|
||||
import hudson.remoting.jnlp.MainMenu;
|
||||
import hudson.util.StreamTaskListener;
|
||||
import hudson.util.jna.DotNet;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
@@ -75,6 +76,13 @@ public class WindowsSlaveInstaller implements Callable<Void,RuntimeException>, A
|
||||
JOptionPane.OK_CANCEL_OPTION);
|
||||
if(r!=JOptionPane.OK_OPTION) return;
|
||||
|
||||
if(!DotNet.isInstalled(2,0)) {
|
||||
JOptionPane.showMessageDialog(dialog,".NET Framework 2.0 or later is required for this feature",
|
||||
Messages.WindowsInstallerLink_DisplayName(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
final File dir = new File(rootDir);
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user