From bd7cb1ab41cd9b873ddc619bd5e74507366d26f6 Mon Sep 17 00:00:00 2001 From: hallgren Date: Wed, 12 Oct 2011 19:00:42 +0000 Subject: [PATCH] Show version & configuration info when gf -server starts --- src/compiler/GFServer.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compiler/GFServer.hs b/src/compiler/GFServer.hs index 4b796efce..8fe0c3294 100644 --- a/src/compiler/GFServer.hs +++ b/src/compiler/GFServer.hs @@ -24,7 +24,9 @@ import Codec.Binary.UTF8.String(encodeString) import GF.Infra.UseIO(readBinaryFile,writeBinaryFile) import qualified PGFService as PS import qualified ExampleService as ES -import Paths_gf(getDataDir) +import Data.Version(showVersion) +import Paths_gf(getDataDir,version) +import GF.Infra.BuildInfo (buildInfo) import RunHTTP(cgiHandler) -- * HTTP server @@ -34,6 +36,9 @@ server execute1 state0 = datadir <- getDataDir let root = datadir"www" port = 41296 + putStrLn $ "This is GF version "++showVersion version++"." + putStrLn buildInfo + putStrLn $ "Document root = "++root putStrLn $ "Starting HTTP server, open http://localhost:" ++show port++"/ in your web browser." setCurrentDirectory root