From ggrothendieck at myway.com  Mon Nov 22 05:11:41 2004
From: ggrothendieck at myway.com (Gabor Grothendieck)
Date: Mon Nov 22 05:11:56 2004
Subject: [Rd] Building Packages on Windows using .Rbuildignore (PR#7379)
References: <20041119212202.83F221043D@slim.kubism.ku.dk>
	<loom.20041120T012822-611@post.gmane.org>
	<dpctp0ll0129kt8fpj62ev0ciir0ch4m5m@4ax.com>
	<loom.20041120T043535-913@post.gmane.org>
	<tngtp0pqoek5891k4aq6m160jfj9i0dkb0@4ax.com>
	<loom.20041120T055240-88@post.gmane.org>
	<loom.20041122T025237-324@post.gmane.org>
	<r3i2q05cs6vk0pflcbauq6v06proas0js3@4ax.com>
Message-ID: <loom.20041122T050518-223@post.gmane.org>

Duncan Murdoch <murdoch <at> stats.uwo.ca> writes:

: 
: On Mon, 22 Nov 2004 01:54:53 +0000 (UTC), Gabor Grothendieck
: <ggrothendieck <at> myway.com> wrote:
: 
: >Assuming that the behavior of the R CMD commands is changed
: >so that they respect .Rbuildignore but that no flag or
: >switch is immediately implemented to turn on and off
: >.Rbuildignore processing
: > I have the following workaround
: >to allow the user to implement either situation.
: >It is simple enough that it does not require a script.  
: >I have not actually tried it out yet since the changed
: >commands are not yet available.
: 
: >It applies to Windows or UNIX but is described below relative
: >to Windows and to an assumed folder tree called mypkg
: >which is the folder that contains .Rbuildignore.
: >
: >1. in Windows Explorer create a second folder called
: >mypkg-shortcuts
: >
: >2. select all files and folders directly within mypkg except
: >.Rbuildignore and right-click drag them to mypkg-shortcuts
: >selecting Create ShortCut after letting up on the right
: >mouse button.  That will create a shortcut to each file and 
: >folder in mypkg.  (Note that the files and folders dragged
: >include DESCRIPTION, R, man, etc. directly in mypkg but 
: >not the .files another level deep such as the .R and .Rd
: >files within R and man.)
: 
: I don't think it will work in Windows.  Windows shortcuts aren't soft
: links, they're just files that the shell sometimes interprets that
: way.  Most other programs just see them as regular files, and won't
: know to use them as links.


Good point although I think it could still be made to work with
Folder Shortcuts (not to be confused with Shortcuts to Folders)
which are real folders that point to other folders and are
described at the thread at:

	http://www.annoyances.org/exec/forum/winxp/1076436311

Folder Shortcuts are not the same as Shortcuts to
Folders.  For example, if you delete a Folder Shortcut it 
deletes the target folder so you have to undo it in by
reversing the creation procedure.

What one would do is to copy the files directly under mypkg,
i.e. DESCRIPTION, etc.  to a new folder mypkg2.  These
files don't normally change much anyways as they do not include
either the source or the documentation so it should be ok in
most situations that they are copied rather than linked. Then 
create folder shortcuts as described in the link in mypkg2 which 
point to the corresponding folders in mypkg.

In a small test I found that the Folder Shortcut worked with a 
small gawk program while the Shortcut to the Folder did not.

Unfortunately this all increases complexity so one might
have to go back to creating a script after all.    Thus it
would be nice if there were some built in way to turn it on
and off.

Of course the best solution would be to be able to avoid this
all in the first place and if it came to this I would probably
just make copies since I already have scripts that do that.


[Rd] Building Packages on Windows using .Rbuildignore (PR#7379)
Gabor Grothendieck