When CRAN checks this package, they builds vignettes, run tests and examples but without MuseScore installed. To prevent errors in this situation:
-
Add
eval = identical(Sys.getenv("gm_vignette"), "true")
inknitr::opts_chunk$set()
in vignettes that need MuseScore. -
Add
gm_vignette=true
in .Renviron before callingdevtools::build()
orR CMD build
to build these vignettes locally. -
Comment
gm_vignette=true
out before callingR CMD check --as-cran
to simulate the environment where CRAN tests this package. These vignettes are not built again. -
Also set
MUSESCORE_PATH=<wrong path>
in .Renviron to make MuseScore unavailable whenR CMD check --as-cran
runs tests, for the same reason.
Can't add audio file in Github README, so let pkgdown use index.md
rather than README.md
to generate the home page. The only difference is:
<audio controls>
<source src="reference/figures/readme_audio.mp3" type="audio/mpeg">
</audio>