Can it be built on Windows?

short answer: not yet

First, you need to get some unix utilities for windows. Git of course. Also rsync, and a cp command that understands at least cp -p, and uuid, and xargs and sha1sum. Note that some of these could be replaced with haskell libraries to some degree.

There are probably still some places where it assumes / as a path separator, although I fixed probably almost all by now.

Then windows versions of these functions could be found, which are all the ones that need POSIX, I think. A fair amount of this, the stuff to do with signals and users, could be empty stubs in windows. The file manipulation, particularly symlinks, would probably be the main challenge.

addSignal
blockSignals
changeWorkingDirectory
createLink
createSymbolicLink
emptySignalSet
executeFile
fileMode
fileSize
forkProcess
getAnyProcessStatus
getEffectiveUserID
getEnvDefault
getFileStatus
getProcessID
getProcessStatus
getSignalMask
getSymbolicLinkStatus
getUserEntryForID
getUserEntryForName
groupWriteMode
homeDirectory
installHandler
intersectFileModes
isRegularFile
isSymbolicLink
modificationTime
otherWriteMode
ownerWriteMode
readSymbolicLink
setEnv
setFileMode
setSignalMask
sigCHLD
sigINT
unionFileModes

A good starting point is http://hackage.haskell.org/package/unix-compat-0.3.0.1. However, note that its implementations of stuff like createSymbolicLink are stubs. --Joey

What about Cygwin? It emulates POSIX fairly well under Windows (including signals, forking, fs (also things like /dev/null, /proc), unix file permissions), has all standard gnu utilities. It also emulates symlinks, but they are unfortunately incompatible with NTFS symlinks introduced in Vista due to some stupid restrictions on Windows.

If git-annex could be modified to not require symlinks to work, the it would be a pretty neat solution (and you get a real shell, not some command.com on drugs (aka cmd.exe))

Windows support is a must. In my experience, binary file means proprietary editor, which means Windows.

Unfortunately, there's not much overlap between people who use graphical editors in Windows all day vs. people who are willing to tolerate Cygwin's setup.exe, compile a Haskell program, learn git and git-annex's 90-odd subcommands, and use a mintty terminal to manage their repository, especially now that there's a sexy GitHub app for Windows.

That aside, I think Windows-based content producers are still the audience for git-annex. First Windows support, then a GUI, then the world.

Comments on this page are closed.