JuliaInterop / JuliaCall

Embed Julia in R
https://non-contradiction.github.io/JuliaCall/index.html
Other
267 stars 36 forks source link

added a way to find Julia.exe on Windows when JULIA_HOME is not set #115

Closed xiaodaigh closed 5 years ago

xiaodaigh commented 5 years ago

added a way to find Julia.exe on Windows when JULIA_HOME is not set and Sys.which("julia") fails to find Julia

Description

I couldn't find my julia.exe using setup_julia() so I've provided a way to find the julia.exe in the most common install path which is c:/Users/Login/AppData/Local. Sure enough I found the one I am looking

Related Issue

None

Example

This is not really testable.

Non-Contradiction commented 5 years ago

Thank you very much! I always want to add a way to locate Julia on windows! The code works perfectly on my computer and looks good to me overall. But the new code returns an empty string if there is no folder satisfying all criterion, eg., in R documentation, Sys.info()[["login"]] could return "unknown," or maybe there is no subfolder starting with "Julia." Would you mind adding a special case for this?

xiaodaigh commented 5 years ago

See update

Non-Contradiction commented 5 years ago

Thanks a lot! I just found Sys.getenv("LOCALAPPDATA") returns the local app data folder directly on my computer. Maybe we can use this if the login is "unknown" instead of stop directly?