CUAHSI / HydroDesktop

HydroDesktop is a free and open source GIS enabled desktop application that helps you search for, download, visualize, and analyze hydrologic and climate data registered with the CUAHSI Hydrologic Information System. HydroDesktop is part of the legacy CUAHSI toolkit and is not under active development. Click the "releases" link below to download the latest installer for Microsoft Windows.
73 stars 20 forks source link

HydroR auto-detect path to R #174

Open xhqiao89 opened 7 years ago

xhqiao89 commented 7 years ago

jirikadlec2[CodePlex]
When the user installs HydroDesktop and Runs HydroR for the first time, HydroR asks to quotset path to R.exequot.

Most R Windows installations come with three different R.exe files: For example, R 3.0.1 is installed as:

C:\Program Files\R\R-3.0.1\bin\R.exe C:\Program Files\R\R-3.0.1\bin\i386\R.exe C:\Program Files\R\R-3.0.1\bin\x64\R.exe

The only R.exe that works with HydroR is the C:\Program Files\R\R-{X.Y.Z}\bin\i386\R.exe

The other two R.exe executables don't work. It's easy for the user to confuse the path to R.

Suggested Fix:

If the user chooses the wrong R.exe such as: C:\Program Files\R\R-3.0.1\bin\R.exe

or C:\Program Files\R\R-3.0.1\bin\x64\R.exe, try to check if the correct path C:\Program Files\R\R-{X.Y.Z}\bin\i386\R.exe exists and automatically set the path to R to the correct R.exe path.