dirkschumacher / rcbc

COIN-OR branch and cut (CBC) bindings for R
https://dirkschumacher.github.io/rcbc/
Other
19 stars 5 forks source link

Fix Windows installation #43

Closed jeffreyhanson closed 3 years ago

jeffreyhanson commented 3 years ago

This PR fixes enables successful installation on Windows platforms (tested both locally and with GitHub Actions CI). As such, it should fix #4 and #34.The specific changes and their rationale are as follows:

  1. The Makevars.win file was updated to include the specific version of CBC available on RWinLib (i.e. 4.9.3). This update is based on a similar Makevars.win file for the sf package (see https://github.com/r-spatial/sf/blob/master/src/Makevars.win).
  2. Since installing an R package from source without a configure.win fdile on a Windows system will print a message that could be confused with an error message (even though the installation is successful), this PR also include a dummy configure.win file to suppress the error message. For a similar example of this, see the rgl package (https://github.com/dmurdoch/rgl/blob/master/configure.win).
  3. To ensure successful installation for both i385 and x64 plaforms on Windows when a configure.win file is present, I have added Biarch: true to the DESCRIPTION (see https://github.com/dmurdoch/rgl/issues/19). This is mainly relevant for ensuring that any packages that (might in the future?) depend on rcbc can easily use GitHub Action workflows for continuous integration.

To test this branch on your own computer, you should be able to use the following code:

if (!require(remotes)) install.packages("remotes")
remotes::install_github("jeffreyhanson/rcbc@win2")
dirkschumacher commented 3 years ago

Thanks a lot . According to the windows checks this seems to resolve Windows issues.

jeffreyhanson commented 3 years ago

Awesome - thanks!