Jump to content

Vista's mklink for XP?


Recommended Posts

Guest Fernando Cacciola
Posted

As some of you may know, NTFS reparse points have all that is needed to

implement file symlinks on Windows XP:

 

http://wesnerm.blogs.com/net_undocumented/2006/10/symbolic_links__1.html

 

As you can see in that blog entry, there is utility called "fsutil":

 

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/fsutil.mspx?mfr=true

 

that explotis that.

 

However, I was wondering if there is any "simpler" utility besides fsutil to

do that?

 

 

Here's why I ask, in case you have something to suggest:

 

I work (among other things) in an open source project. We use svn and most

developers are linuxers.

I was assigned the task of porting the build system to CMake. While on that

I couldn't help but to try fixing some longstanding issues.

One of the most annoying ones is this: the svn tree structure is different

from the build tree structure (a bash script is run to create the build-tree

out of the svn-tree).

The only "real" fix here is to unify the svn and build structures, but this

is so far from trivial (for a number of reasons) that is just impractical

for the time being.

However, along the discussion an interesting "hack" came about: create the

build-tree as a "shallow" rearrangement of the files in the svn-tree via

symlinks. This is trivial in posix... it is also equally trivial in Vista

thanks to mklink, but is not in XP and we need to support all three

platforms (being a platform indepenent open source project).

I posposed to use hardlinks, but that makes things complicated as I need to

make sure the "link" in the shallow folder doesn't outlive the "original"

file in the svn folder (otherwise it will silently go out of sync). Some svn

operations (revert, rename, etc) in the working folder could break the hard

link silently leaving an outdated source in the shallow build tree.

 

I know XP developers could have "fsutil" installed, and use it to generate

the shallow build tree with real symlinks, but I don't see how that can be

integrated into a transparent and platform-independent build enviroment

(which is the goal).

 

TIA

 

Fernando Cacciola

SciSoft

http://fcacciola.50webs.com

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...