From murdoch at stats.uwo.ca  Thu May  8 22:33:50 2008
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Thu, 08 May 2008 16:33:50 -0400
Subject: [Rd] build packages with vignettes in Windows
In-Reply-To: <DE668E91-0693-42C4-B1B0-2657018F9A59@r-project.org>
References: <6vprs88uu6.fsf@gmail.com>
	<481768EC.50008@stats.uwo.ca>	<y763u08l14.fsf@gmail.com>
	<48178B5E.80603@stats.uwo.ca> <8vtzhj5oac.fsf@gmail.com>
	<4818BB09.6070205@stats.uwo.ca>
	<078E26DF-5AA8-4ADE-A33E-EA640817781A@r-project.org>
	<4818D6AE.5030401@stats.uwo.ca>
	<DE668E91-0693-42C4-B1B0-2657018F9A59@r-project.org>
Message-ID: <482363AE.7080802@stats.uwo.ca>

On 4/30/2008 5:02 PM, Simon Urbanek wrote:
> On Apr 30, 2008, at 4:29 PM, Duncan Murdoch wrote:
>> On 4/30/2008 4:01 PM, Simon Urbanek wrote:
>>> On Apr 30, 2008, at 2:31 PM, Duncan Murdoch wrote:
>>>> On 4/30/2008 11:56 AM, Michael wrote:
>>>>> On 29 Apr 2008, Duncan Murdoch wrote:
>>>>>
>>>>>> Right, you don't need to set the system path for everything,  
>>>>>> but  you do
>>>>>> need to set it in CMD (or other shell) before running Rcmd.
>>>>> For Win 2K/XP/Vista, the system path can be set (through the GUI   
>>>>> interface,
>>>>> not sure how to do it with scripts) without restarting, for new CMD
>>>>> processes started afterwards.
>>>>
>>>> Sure, but the installer doesn't know how to do that.  It just  
>>>> sets  the path in the registry; it doesn't know how to give  
>>>> Explorer a  kick to get it to reload from there.  As far as I know  
>>>> there's no  documented way to do that.
>>>>
>>> FWIW the PATH setting is effective immediately (at least on 2k/  
>>> XP ...). Any new shell you start (e.g. using Run..) will have the   
>>> updated PATH already.
>>
>> Does that happen with the Rtools installer?  I didn't know that.  I  
>> thought explorer only changes the PATH at startup, or when you edit  
>> it from the control panel.
>>
> 
> 
> Hmm I thought it did, but a subsequent test shows it doesn't.  
> Apparently I must have triggered a change in the Control Panel so PATH  
> was updated even before reboot.
> 
> Anyway, there are free tools with source that show how to send a  
> broadcast message to make that change active immediately, e.g.:
> http://www.codeproject.com/KB/applications/SetEnv.aspx?fid=230498&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=1531752&fr=48
> 
> BTW: By testing this I found out that the Rtools installer is not as  
> smart as it could be - when you run it a second time it will duplicate  
> the paths.

Inno Setup supports no-reboot for PATH changes, and Rtools 2.8 now uses 
that.  So no more reboots necessary.

And the installer is a little bit smarter now than it was:  it is now 
idempotent in its PATH mods.  It's not as smart as it could be, still 
allowing lots of duplication there, but it won't add the same head twice 
in a row.

Duncan Murdoch



[Rd] build packages with vignettes in Windows
Duncan Murdoch