Esempio n. 1
0
        // need to convert to Tool_API format (this will uninstall
        public bool install()
        {
            "Installing {0}".info(ToolName);
            var downloadUrl = "http://downloads.sourceforge.net/project/gitextensions/Git%20Extensions/Version%202.17/GitExtensions217Setup.msi?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fgitextensions%2Ffiles%2FGit%2520Extensions%2FVersion%25202.17%2F&ts=1300699408&use_mirror=netcologne";
            var targetDir   = @"..\_O2Downloads".tempDir(false).fullPath();
            var targetFile  = targetDir.pathCombine(downloadUrl.uri().Segments.Last());

            downloadUrl.download(targetFile);
            var process       = targetFile.startProcess();
            var guiAutomation = new API_GuiAutomation(process);

            guiAutomation.button("Next").click();
            if (guiAutomation.hasButton("Repair"))
            {
                "App is already installed".error();
                if (unInstallIfAlreadyInstalled)
                {
                    guiAutomation.button("Repair").click();
                    guiAutomation.button("Next").click();
                    guiAutomation.button("Finish", 20).click();
                }
            }
            else
            {
                guiAutomation.button("Next").click();
                guiAutomation.button("Next").click();
                guiAutomation.button("Next").click();
                guiAutomation.button("Next").click();
                guiAutomation.button("Install").click();
                guiAutomation.button("Finish", 20).click();
            };
            return(false);
        }