Пример #1
0
 public bool install(Action <string> onDownload)
 {
     if (Install_File.valid().isFalse())
     {
         "in Install for Tool {0} , a valid InstallFile must be provided: {1}".error(ToolName, Install_File);
         return(false);
     }
     "Installing: {0}".debug(ToolName);
     if (isInstalled())
     {
         return(true);
     }
     DownloadedInstallerFile = download(Install_File);
     if (DownloadedInstallerFile.fileExists())
     {
         onDownload(DownloadedInstallerFile);
     }
     if (isInstalled())
     {
         "{0} installed ok".info(Version);
         return(true);
     }
     "There was a problem installing the {0}".error(Version);
     return(false);
 }
Пример #2
0
 public void config()
 {
     if (!Install_Dir.valid())
     {
         Install_Dir = toolsDir.pathCombine(ToolName);
     }
     if (!Executable.valid() && Executable_Name.valid())
     {
         Executable = Install_Dir.pathCombine(Executable_Name);
     }
     if (!Install_File.valid() && Install_Uri.notNull() && this.Install_Uri.Segments.size() > 0)
     {
         Install_File = Install_Uri.Segments.Last();
     }
 }