[GRASS-dev] Re: [GRASS GIS] #1149: WinGrass - load
R-installation-path dynamically into PATH
GRASS GIS
trac at osgeo.org
Sun Nov 7 12:55:10 EST 2010
#1149: WinGrass - load R-installation-path dynamically into PATH
-------------------------------+--------------------------------------------
Reporter: hellik | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: Startup | Version: svn-trunk
Keywords: wingrass, path, R | Platform: MSWindows Vista
Cpu: x86-32 |
-------------------------------+--------------------------------------------
Comment(by hellik):
Replying to [comment:2 hellik]:
> Replying to [comment:1 glynn]:
{{{
set RegCommandHKCU32=reg query "HKCU\Software\R-core\R32" /v "InstallPath"
>nul 2>&1
FOR /f "tokens=1-2* delims= " %%a IN ('%RegCommandHKCU32% ^| find
"InstallPath"') do set R_HKCU32_INSTALL_PATH=%%c >nul 2>&1
IF "%R_HKCU32_INSTALL_PATH%" NEQ ""
(PATH=%PATH%;%R_HKCU32_INSTALL_PATH%\bin\i386) >nul 2>&1
set RegCommandHKCU64=reg query "HKCU\Software\R-core\R64" /v "InstallPath"
>nul 2>&1
FOR /f "tokens=1-2* delims= " %%a IN ('%RegCommandHKCU64% ^| find
"InstallPath"') do set R_HKCU64_INSTALL_PATH=%%c >nul 2>&1
IF "%R_HKCU64_INSTALL_PATH%" NEQ ""
(PATH=%PATH%;%R_HKCU64_INSTALL_PATH%\bin\x64) >nul 2>&1
rem Test if R is registered in HKLM
set RegCommandHKLM32=reg query "HKLM\Software\R-core\R32" /v "InstallPath"
>nul 2>&1
FOR /f "tokens=1-2* delims= " %%a IN ('%RegCommandHKLM32% ^| find
"InstallPath"') do set R_HKLM32_INSTALL_PATH=%%c >nul 2>&1
IF "%R_HKLM32_INSTALL_PATH%" NEQ ""
(PATH=%PATH%;%R_HKLM32_INSTALL_PATH%\bin\i386) >nul 2>&1
set RegCommandHKLM64=reg query "HKLM\Software\R-core\R64" /v "InstallPath"
>nul 2>&1
FOR /f "tokens=1-2* delims= " %%a IN ('%RegCommandHKLM64% ^| find
"InstallPath"') do set R_HKLM64_INSTALL_PATH=%%c >nul 2>&1
IF "%R_HKLM64_INSTALL_PATH%" NEQ ""
(PATH=%PATH%;%R_HKLM64_INSTALL_PATH%\bin\x64) >nul 2>&1
}}}
sorry above isn't really working.
I've attached instead a simple working bat-file to check dynamically if
and where R is installed and added to the path.
but if these lines are added to grass70svn.bat, they are not working
correctly.
any hints what have to be changed?
Helmut
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1149#comment:3>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list