mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-19 16:12:52 -06:00
minibar & cloud service: minor style changes
Also include the GF logo on the cloud service start page.
This commit is contained in:
15
WebSetup.hs
15
WebSetup.hs
@@ -10,10 +10,9 @@ import Distribution.Simple.LocalBuildInfo(datadir,buildDir,absoluteInstallDirs)
|
||||
{-
|
||||
To test the GF web services, the minibar and the grammar editor, use
|
||||
"cabal install" (or "runhaskell Setup.hs install") to install gf as usual.
|
||||
Then start the server with the command "gf -server" and
|
||||
open http://localhost:41296/minibar/minibar.html in your web browser
|
||||
(Firefox, Safari, Opera or Chrome). The example grammars listed below will
|
||||
be available in the minibar.
|
||||
Then start the server with the command "gf -server" and open
|
||||
http://localhost:41296/ in your web browser (Firefox, Safari, Opera or
|
||||
Chrome). The example grammars listed below will be available in the minibar.
|
||||
-}
|
||||
|
||||
example_grammars = -- :: [(pgf, tmp, src)]
|
||||
@@ -45,9 +44,11 @@ setupWeb gf args dest pkg lbi =
|
||||
do putStrLn "setupWeb"
|
||||
mapM_ (createDirectoryIfMissing True) [grammars_dir,cloud_dir]
|
||||
mapM_ build_pgf example_grammars
|
||||
copyGFLogo
|
||||
where
|
||||
grammars_dir = www_dir </> "grammars"
|
||||
cloud_dir = www_dir </> "tmp" -- hmm
|
||||
logo_dir = www_dir </> "Logos"
|
||||
www_dir = datadir (absoluteInstallDirs pkg lbi dest) </> "www"
|
||||
gfo_dir = buildDir lbi </> "gfo"
|
||||
|
||||
@@ -64,6 +65,12 @@ setupWeb gf args dest pkg lbi =
|
||||
-- " --output-dir="++grammars_dir++ -- has no effect?!
|
||||
" "++src
|
||||
|
||||
gf_logo = "gf0.png"
|
||||
|
||||
copyGFLogo =
|
||||
do createDirectoryIfMissing True logo_dir
|
||||
copyFile ("doc"</>"Logos"</>gf_logo) (logo_dir</>gf_logo)
|
||||
|
||||
execute command =
|
||||
do putStrLn command
|
||||
e <- system command
|
||||
|
||||
Reference in New Issue
Block a user