[osgeo4w-dev] [osgeo4w] #578: R detection fails, preventing QGIS.bat from launching desktop app
OSGeo4W
trac_osgeo4w at osgeo.org
Wed Sep 5 12:41:02 PDT 2018
#578: R detection fails, preventing QGIS.bat from launching desktop app
---------------------+---------------------------
Reporter: belg4mit | Owner: osgeo4w-dev@…
Type: defect | Status: new
Priority: major | Component: Package
Version: | Keywords:
---------------------+---------------------------
etc\ini\batchfiles.bat emits the follow uncaught error, causing qgis.bat
and other wrappers to bail
C:\PROGRA~1\QGIS2~1.18>IF EXIST "C:\Program Files\R\"
C:\PROGRA~1\QGIS2~1.18\apps\batchfiles\R path
\R\R-2.15.0 was unexpected at this time.
Swapping the order of these two clauses at ''':: 4a''' in etc\ini\R.bat
from the current order (below) allows things to work:
if not defined R_HOME for /f "tokens=2*" %%a in (
'reg query hklm\software\wow6432Node\r-core\r /v !InstallPath 2!^>NUL
!^| findstr !InstallPath'
) do set R_HOME=%%~b
if not defined R_HOME for /f "tokens=2*" %%a in (
'reg query hklm\software\R-core\R /v !InstallPath 2!^>NUL !^| findstr
!InstallPath'
) do set R_HOME=%%~b
I don't know why the first one fails, but since it seems to detect older
versions of R, it should probably be the fallback and not the first choice
anyhow.
C:\Program Files\QGIS 3.2>reg query hklm\software\wow6432Node\r-core\r
/v !InstallPath
HKEY_LOCAL_MACHINE\software\wow6432Node\r-core\r
!InstallPath REG_SZ C:\Program Files (x86)\R\R-2.15.0
C:\Program Files\QGIS 3.2>reg query hklm\software\R-core\R /v
!InstallPath
HKEY_LOCAL_MACHINE\software\R-core\R
!InstallPath REG_SZ C:\Program Files\R\R-3.3.1
--
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/578>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.
More information about the osgeo4w-dev
mailing list