build assistant and watcher on windows (doesn't work yet)

This commit is contained in:
Joey Hess 2013-11-12 14:54:02 -04:00
parent 472d9376b6
commit b9b5e3370d
7 changed files with 118 additions and 22 deletions

View file

@ -69,6 +69,7 @@ startDaemon assistant foreground startdelay listenhost startbrowser = do
pidfile <- fromRepo gitAnnexPidFile
logfile <- fromRepo gitAnnexLogFile
logfd <- liftIO $ openLog logfile
#ifndef mingw32_HOST_OS
if foreground
then do
origout <- liftIO $ catchMaybeIO $
@ -86,6 +87,13 @@ startDaemon assistant foreground startdelay listenhost startbrowser = do
Just a -> Just $ a origout origerr
else
start (Utility.Daemon.daemonize logfd (Just pidfile) False) Nothing
#else
-- Windows is always foreground, and has no log file.
start id $
case startbrowser of
Nothing -> Nothing
Just a -> Just $ a Nothing Nothing
#endif
where
desc
| assistant = "assistant"
@ -99,7 +107,6 @@ startDaemon assistant foreground startdelay listenhost startbrowser = do
flip runAssistant (go webappwaiter)
=<< newAssistantData st dstatus
#ifdef WITH_WEBAPP
go webappwaiter = do
d <- getAssistant id