Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added install.Cygwin

  • Loading branch information...
commit 3eb711cd02cd8ec8d4e0af861d6e67ecee5c3519 1 parent a1e4773
@talgalili authored
Showing with 77 additions and 1 deletion.
  1. +1 −0  NAMESPACE
  2. +1 −1  NEWS
  3. +42 −0 R/install.r
  4. +33 −0 man/install.Cygwin.Rd
View
1  NAMESPACE
@@ -5,6 +5,7 @@ export(create.global.library)
export(file.name.from.url)
export(get.installed.R.folders)
export(install.7zip)
+export(install.Cygwin)
export(install.FFmpeg)
export(install.git)
export(install.GitHub)
View
2  NEWS
@@ -3,7 +3,7 @@ installR 0.8.8 (2013-03-22)
NEW FUNCTIONS ADDED:
* install.notepadpp
* install.npptor
-
+ * install.Cygwin
installR 0.8.7 (2013-03-16)
---------------------------
View
42 R/install.r
@@ -731,6 +731,44 @@ install.SWFTools <- function(page_with_download_url="http://swftools.org/downlo
+
+
+
+
+#' @title Downloads and installs Cygwin for windows
+#' @description Allows the user to downloads and install the latest version of Cygwin for Windows.
+#' @details
+#' Cygwin is a collection of tools which provide a Linux look and feel environment for Windows.
+#' @param URL the URL of the Cygwin setup.exe file.
+#' @param ... extra parameters to pass to \link{install.URL}
+#' @return TRUE/FALSE - was the installation successful or not.
+#' @export
+#' @references
+#' \itemize{
+#' \item Cygwin homepage: \url{http://cygwin.com/}
+#' }
+#' @examples
+#' \dontrun{
+#' install.Cygwin() # installs the latest version of SWFTools
+#' }
+install.Cygwin <- function(URL = "http://cygwin.com/setup.exe",...) {
+# # get download URL:
+# page <- readLines(page_with_download_url, warn = FALSE)
+# # http://swftools.org/swftools-0.9.0.exe
+# pat <- "swftools-[0-9.]+.exe"
+# target_line <- grep(pat, page, value = TRUE);
+# m <- regexpr(pat, target_line);
+# URL <- regmatches(target_line, m) # (The http still needs to be prepended.
+ # install.
+ install.URL(URL,...)
+}
+
+
+
+
+
+
+
#' @title Downloads and installs 7-Zip for windows
#' @description Allows the user to downloads and install the latest version of 7-Zip for Windows.
#' @details
@@ -829,6 +867,8 @@ install.FFmpeg <- function(page_with_download_url="http://ffmpeg.zeranoe.com/b
+
+
#' @title Returns the search path for executable files
#' @export
#' @description Returns the search path for executable files based on %PATH%
@@ -982,6 +1022,7 @@ installr <- function(use_GUI = TRUE, ...) {
"7-zip",
"NotePad++",
"NppToR (R extension to NotePad++)",
+ "Cygwin",
"Cancel")
the_answer <- menu(choices, graphics = use_GUI, title = "Which software (for Windows) would you like to install?")
@@ -1002,6 +1043,7 @@ installr <- function(use_GUI = TRUE, ...) {
install.7zip(),
install.notepadpp(),
install.npptor(),
+ install.Cygwin(),
return(FALSE)
)
}
View
33 man/install.Cygwin.Rd
@@ -0,0 +1,33 @@
+\name{install.Cygwin}
+\alias{install.Cygwin}
+\title{Downloads and installs Cygwin for windows}
+\usage{
+ install.Cygwin(URL = "http://cygwin.com/setup.exe", ...)
+}
+\arguments{
+ \item{URL}{the URL of the Cygwin setup.exe file.}
+
+ \item{...}{extra parameters to pass to
+ \link{install.URL}}
+}
+\value{
+ TRUE/FALSE - was the installation successful or not.
+}
+\description{
+ Allows the user to downloads and install the latest
+ version of Cygwin for Windows.
+}
+\details{
+ Cygwin is a collection of tools which provide a Linux
+ look and feel environment for Windows.
+}
+\examples{
+\dontrun{
+install.Cygwin() # installs the latest version of SWFTools
+}
+}
+\references{
+ \itemize{ \item Cygwin homepage: \url{http://cygwin.com/}
+ }
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.