Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added install.Cygwin

  • Loading branch information...
commit 3eb711cd02cd8ec8d4e0af861d6e67ecee5c3519 1 parent a1e4773
Tal Galili authored
1  NAMESPACE
@@ -5,6 +5,7 @@ export(create.global.library)
5 5 export(file.name.from.url)
6 6 export(get.installed.R.folders)
7 7 export(install.7zip)
  8 +export(install.Cygwin)
8 9 export(install.FFmpeg)
9 10 export(install.git)
10 11 export(install.GitHub)
2  NEWS
@@ -3,7 +3,7 @@ installR 0.8.8 (2013-03-22)
3 3 NEW FUNCTIONS ADDED:
4 4 * install.notepadpp
5 5 * install.npptor
6   -
  6 + * install.Cygwin
7 7
8 8 installR 0.8.7 (2013-03-16)
9 9 ---------------------------
42 R/install.r
@@ -731,6 +731,44 @@ install.SWFTools <- function(page_with_download_url="http://swftools.org/downlo
731 731
732 732
733 733
  734 +
  735 +
  736 +
  737 +
  738 +#' @title Downloads and installs Cygwin for windows
  739 +#' @description Allows the user to downloads and install the latest version of Cygwin for Windows.
  740 +#' @details
  741 +#' Cygwin is a collection of tools which provide a Linux look and feel environment for Windows.
  742 +#' @param URL the URL of the Cygwin setup.exe file.
  743 +#' @param ... extra parameters to pass to \link{install.URL}
  744 +#' @return TRUE/FALSE - was the installation successful or not.
  745 +#' @export
  746 +#' @references
  747 +#' \itemize{
  748 +#' \item Cygwin homepage: \url{http://cygwin.com/}
  749 +#' }
  750 +#' @examples
  751 +#' \dontrun{
  752 +#' install.Cygwin() # installs the latest version of SWFTools
  753 +#' }
  754 +install.Cygwin <- function(URL = "http://cygwin.com/setup.exe",...) {
  755 +# # get download URL:
  756 +# page <- readLines(page_with_download_url, warn = FALSE)
  757 +# # http://swftools.org/swftools-0.9.0.exe
  758 +# pat <- "swftools-[0-9.]+.exe"
  759 +# target_line <- grep(pat, page, value = TRUE);
  760 +# m <- regexpr(pat, target_line);
  761 +# URL <- regmatches(target_line, m) # (The http still needs to be prepended.
  762 + # install.
  763 + install.URL(URL,...)
  764 +}
  765 +
  766 +
  767 +
  768 +
  769 +
  770 +
  771 +
734 772 #' @title Downloads and installs 7-Zip for windows
735 773 #' @description Allows the user to downloads and install the latest version of 7-Zip for Windows.
736 774 #' @details
@@ -829,6 +867,8 @@ install.FFmpeg <- function(page_with_download_url="http://ffmpeg.zeranoe.com/b
829 867
830 868
831 869
  870 +
  871 +
832 872 #' @title Returns the search path for executable files
833 873 #' @export
834 874 #' @description Returns the search path for executable files based on %PATH%
@@ -982,6 +1022,7 @@ installr <- function(use_GUI = TRUE, ...) {
982 1022 "7-zip",
983 1023 "NotePad++",
984 1024 "NppToR (R extension to NotePad++)",
  1025 + "Cygwin",
985 1026 "Cancel")
986 1027
987 1028 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, ...) {
1002 1043 install.7zip(),
1003 1044 install.notepadpp(),
1004 1045 install.npptor(),
  1046 + install.Cygwin(),
1005 1047 return(FALSE)
1006 1048 )
1007 1049 }
33 man/install.Cygwin.Rd
... ... @@ -0,0 +1,33 @@
  1 +\name{install.Cygwin}
  2 +\alias{install.Cygwin}
  3 +\title{Downloads and installs Cygwin for windows}
  4 +\usage{
  5 + install.Cygwin(URL = "http://cygwin.com/setup.exe", ...)
  6 +}
  7 +\arguments{
  8 + \item{URL}{the URL of the Cygwin setup.exe file.}
  9 +
  10 + \item{...}{extra parameters to pass to
  11 + \link{install.URL}}
  12 +}
  13 +\value{
  14 + TRUE/FALSE - was the installation successful or not.
  15 +}
  16 +\description{
  17 + Allows the user to downloads and install the latest
  18 + version of Cygwin for Windows.
  19 +}
  20 +\details{
  21 + Cygwin is a collection of tools which provide a Linux
  22 + look and feel environment for Windows.
  23 +}
  24 +\examples{
  25 +\dontrun{
  26 +install.Cygwin() # installs the latest version of SWFTools
  27 +}
  28 +}
  29 +\references{
  30 + \itemize{ \item Cygwin homepage: \url{http://cygwin.com/}
  31 + }
  32 +}
  33 +

0 comments on commit 3eb711c

Please sign in to comment.
Something went wrong with that request. Please try again.