Opened 6 years ago

Closed 4 years ago

#578 closed defect (fixed)

R detection fails, preventing QGIS.bat from launching desktop app

Reported by: belg4mit Owned by: osgeo4w-dev@…
Priority: major Component: Package
Version: Keywords:
Cc:

Description

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

Change History (3)

comment:1 by belg4mit, 6 years ago

Originally QGIS #16441

comment:2 by ndawson, 5 years ago

This can be closed - R support is now plugin based and not part of osgeo4w

comment:3 by jef, 4 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.