diff --git a/DESCRIPTION b/DESCRIPTION index f8945cc9..190294c3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,9 @@ Package: rSharp Type: Package Title: Accessing .NET from R -Version: 1.0.0.9000 -Authors@R: c(person(given = "Open-Systems-Pharmacology Community", +Version: 1.0.1 +Authors@R: c( + person(given = "Open-Systems-Pharmacology Community", role = "cph"), person("esqLABS GmbH", role = "fnd"), person(given = "Pavel", @@ -15,16 +16,22 @@ Authors@R: c(person(given = "Open-Systems-Pharmacology Community", comment = c(ORCID = "0000-0001-6922-588X")), person(given = "Michael", family = "Sevestre", - role = c("aut"), + role = "aut", email = "michael@design2code.ca"), person(given = "Robert", family = "McIntosh", - role = c("aut")), + role = "aut"), + person(given = "Felix", + family = "Mil", + role = "aut"), + person(given = "Jean-Michel", + family = "Perraud", + email ="jean-michel.perraud@csiro.au", + role = "aut"), person(given = "Ian Peter", family = "Du", - role = c("aut")), - person("Jean-Michel", "Perraud", email = - "jean-michel.perraud@csiro.au", role = "aut")) + role = "ctb") + ) Description: Enable low-level access to .NET runtime from R. Provides a set of functions to create and manipulate .NET objects, call methods, and access properties and fields. URL: https://github.com/Open-Systems-Pharmacology/rsharp/, http://www.open-systems-pharmacology.org/rSharp/ Encoding: UTF-8 @@ -40,6 +47,6 @@ Suggests: knitr, rmarkdown License: file LICENSE -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 VignetteBuilder: knitr Config/testthat/edition: 3 diff --git a/NEWS.md b/NEWS.md index 79852663..e9bcab81 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,10 @@ -# rSharp (development version) +# rSharp 1.0.1 + +## Minor improvements and bug fixes + +- Fixed a bug that prevented rSharp installation when the user had a R library +path containing special characters. + # rSharp 1.0.0 @@ -9,11 +15,13 @@ - github actions implementation for windows and Ubuntu R package builds. - github actions for C# binary builds for windows and Ubuntu. - diff --git a/R/rSharp-env.R b/R/rSharp-env.R index 83c88604..fc121ef5 100644 --- a/R/rSharp-env.R +++ b/R/rSharp-env.R @@ -25,7 +25,7 @@ rSharpEnv$testMethodBindingTypeName <- "ClrFacade.TestMethodBinding" rSharpSettingNames <- names(rSharpEnv) #' @title getRSharpSetting -#' @description Get the value of a global `{rSharp}` setting. +#' @description Get the value of a global rSharp setting. #' #' @param settingName String name of the setting #' diff --git a/inst/extdata/rSharp.Examples.dll b/inst/extdata/rSharp.Examples.dll index f6bff38b..0af259fe 100644 Binary files a/inst/extdata/rSharp.Examples.dll and b/inst/extdata/rSharp.Examples.dll differ diff --git a/inst/lib/ClrFacade.dll b/inst/lib/ClrFacade.dll index 9b4faca7..11e409dc 100644 Binary files a/inst/lib/ClrFacade.dll and b/inst/lib/ClrFacade.dll differ diff --git a/inst/lib/DynamicInterop.dll b/inst/lib/DynamicInterop.dll index a0c3b080..7bcf78d6 100644 Binary files a/inst/lib/DynamicInterop.dll and b/inst/lib/DynamicInterop.dll differ diff --git a/inst/lib/RDotNet.dll b/inst/lib/RDotNet.dll index 8437aa08..aa630e62 100644 Binary files a/inst/lib/RDotNet.dll and b/inst/lib/RDotNet.dll differ diff --git a/inst/lib/rSharp.dll b/inst/lib/rSharp.dll index ab8d77d5..184c2493 100644 Binary files a/inst/lib/rSharp.dll and b/inst/lib/rSharp.dll differ diff --git a/inst/lib/rSharp.so b/inst/lib/rSharp.so index cec97958..7e3c2df1 100755 Binary files a/inst/lib/rSharp.so and b/inst/lib/rSharp.so differ diff --git a/man/getRSharpSetting.Rd b/man/getRSharpSetting.Rd index 0401c0d9..8cc0a344 100644 --- a/man/getRSharpSetting.Rd +++ b/man/getRSharpSetting.Rd @@ -13,7 +13,7 @@ getRSharpSetting(settingName) Value of the setting stored in rSharpEnv. If the setting does not exist, an error is thrown. } \description{ -Get the value of a global `{rSharp}` setting. +Get the value of a global rSharp setting. } \examples{ getRSharpSetting("nativePkgName") diff --git a/shared/rSharp.cpp b/shared/rSharp.cpp index 48e21a55..b5abeeea 100644 --- a/shared/rSharp.cpp +++ b/shared/rSharp.cpp @@ -79,12 +79,8 @@ SEXP rSharp_create_domain(SEXP args) #ifdef WINDOWS // STEP 2: Initialize and start the .NET Core runtime - size_t lengthInWideFormat = 0; - //Gets the length of libPath in terms of a wide string. - mbstowcs_s(&lengthInWideFormat, nullptr, 0, libraryPath, 0); - char_t* wideStringLibraryPath = new char_t[lengthInWideFormat + 1]; - //Copies the libraryPath to a wchar_t with the size lengthInWideFormat - mbstowcs_s(nullptr, wideStringLibraryPath, lengthInWideFormat + 1, libraryPath, lengthInWideFormat); + std::wstring_convert> converter; + const char_t* wideStringLibraryPath = converter.from_bytes(libraryPath).c_str(); #else const char_t* wideStringLibraryPath = libraryPath; #endif @@ -102,9 +98,6 @@ SEXP rSharp_create_domain(SEXP args) } delete[] wideStringPath; -#ifdef WINDOWS - delete[] wideStringLibraryPath; -#endif } catch (const std::exception& ex) { diff --git a/shared/rSharp.h b/shared/rSharp.h index 5e41b50f..dd380d0f 100644 --- a/shared/rSharp.h +++ b/shared/rSharp.h @@ -27,7 +27,7 @@ typedef bool RSHARP_BOOL; #define FALSE_BOOL false; #ifdef WINDOWS - +#include #include #include