From 589c97cb31c94cdbe34d5208ecd2f40000ead09c Mon Sep 17 00:00:00 2001 From: Simon Garnier Date: Sun, 31 Dec 2023 08:35:50 +0100 Subject: [PATCH] Fix check note and update documentation --- NEWS.md | 2 +- R/install.R | 8 +- cran-comments.md | 4 +- docs/articles/install.html | 191 +++++++++++++++++++++++++------------ docs/articles/usage.html | 1 - docs/news/index.html | 2 +- docs/pkgdown.yml | 2 +- vignettes/install.R | 4 +- vignettes/install.Rmd | 117 +++++++++++++++-------- vignettes/install.html | 179 +++++++++++++++++++++------------- vignettes/usage.Rmd | 1 - vignettes/usage.html | 1 - 12 files changed, 333 insertions(+), 179 deletions(-) diff --git a/NEWS.md b/NEWS.md index 5feb1d3..e5eeac2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ ## New features -* Upgrade to OpenCV 4.9.0. +* Upgrade package to OpenCV 4.9.0. * Remove support for R < 4.0.0. ## Minor improvements and fixes diff --git a/R/install.R b/R/install.R index 09034f5..db4d4ee 100644 --- a/R/install.R +++ b/R/install.R @@ -29,12 +29,12 @@ defaultOpenCVPath <- function() { config$os_type <- .Platform$OS.type if (config$os_type == "windows") { - config$install_path <- shortPathName(install_path) - config$pkg_path <- shortPathName(find.package("ROpenCVLite")) + config$install_path <- utils::shortPathName(install_path) + config$pkg_path <- utils::shortPathName(find.package("ROpenCVLite")) config$os <- gsub("\r", "", gsub("Caption=", "", system('wmic os get Caption,CSDVersion /value', intern = TRUE)[3])) config$core <- paste0("https://github.com/opencv/opencv/archive/", version, ".tar.gz") config$contrib <- paste0("https://github.com/opencv/opencv_contrib/archive/", version, ".tar.gz") - config$rtools_path <- shortPathName(pkgbuild::rtools_path()[1]) + config$rtools_path <- utils::shortPathName(pkgbuild::rtools_path()[1]) if (is.null(config$rtools_path)) stop("Rtools is missing.") @@ -49,7 +49,7 @@ defaultOpenCVPath <- function() { stop("Unsupported Rtools version.") if (config$rtools_version < "4.2") { - config$cmake_path <- shortPathName(system("where cmake.exe", intern = TRUE)) + config$cmake_path <- utils::shortPathName(system("where cmake.exe", intern = TRUE)) if (length(config$cmake_path) > 1) { v <- sapply(config$cmake_path, function(cmake) gsub("cmake version ", "", system(paste0(cmake, " --version"), intern = TRUE)[1])) diff --git a/cran-comments.md b/cran-comments.md index a4571d1..1b46f94 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -16,7 +16,9 @@ ## R CMD check results -There were no ERRORs or WARNINGs. +* Version jumps in minor (submitted: 4.90.0, existing: 4.80.1) + +This is normal. The package numbering scheme is based on the OpenCV version number. ## Downstream dependencies diff --git a/docs/articles/install.html b/docs/articles/install.html index 1ae8579..af0c179 100644 --- a/docs/articles/install.html +++ b/docs/articles/install.html @@ -94,7 +94,9 @@

Simon should go smoothly on all major operating systems (Mac, Windows, and most major Linux distributions). There are a few steps to follow before installing the package itself in order to prepare all the necessary -external (i.e. non-R) dependencies for OpenCV.

+external (i.e. non-R) dependencies for OpenCV. You should also make +sure that your R version is 4.0 or higher. Support for older versions of +R has been removed.

All installation steps are described below.


Use your distribution’s package management system. For instance on -Ubuntu-like systems, you can install Cmake by typing the following -command in your terminal:

-
sudo apt install cmake
+Ubuntu-like systems, you can install Cmake by typing the +following command in your terminal:

+
sudo apt install cmake

Other distributions will have different package managers. Refer to the documentation of your distribution for finding the proper way to -install Cmake on your system.

+install Cmake on your system.

@@ -239,7 +305,7 @@

1.4 - Mac, Linux and Windows

Before installing ROpenCVLite, you will need to install the devtools package in R.

-
+
 install.packages("devtools")

@@ -248,25 +314,26 @@

1.4 - Mac, Linux and Windows2 - Installing ROpenCVLite

You can install ROpenCVLite from CRAN as follows:

-
-install.packages("ROpenCVLite")
-

Or you can install the latest latest development version (not -recommended) as follows:

+install.packages("ROpenCVLite")
+

Or you can install the latest development version (not recommended) +as follows:

+
 devtools::install_github("swarm-lab/ROpenCVLite")

This will not install OpenCV yet. You will be asked whether you want to install it the first time you load the package.

-
+
 

This step can take some time. Go make yourself a cup of coffee or two while ROpenCVLite downloads, compiles and installs OpenCV on your system.

In addition, you can also request the (re)installation of OpenCV at any time as follows:

-
+
 ROpenCVLite::installOpenCV()

ROpenCVLite will also automatically detect when a new -version of OpenCV is available and will offer to update it for you.

+version of OpenCV is available and will offer to update it +for you.

diff --git a/docs/articles/usage.html b/docs/articles/usage.html index 55b5a87..ffac5d1 100644 --- a/docs/articles/usage.html +++ b/docs/articles/usage.html @@ -124,7 +124,6 @@

Create a package using DESCRIPTION
  • Makevars
  • Makevars.win
  • -
  • Makevars.win