Permalink
Browse files

Package split of roguestar-gl into roguestar, roguestar-gtk, and rogu…

…estar-glut.
  • Loading branch information...
1 parent f2c518e commit ce068906ca731aff6723bdc00f6d8b361d55e794 @clanehin committed Jan 5, 2011
View
@@ -5,17 +5,17 @@ warning:
install-deps:
cabal --version
- cabal install Vec ${OPTS}
- cabal install MaybeT ${OPTS}
- cabal install MonadRandom ${OPTS}
- cabal install data-inttrie ${OPTS}
- cabal install data-memocombinators ${OPTS}
- cabal install PSQueue ${OPTS}
- cabal install vector ${OPTS}
- cabal install statistics ${OPTS}
- cabal install priority-sync ${OPTS}
- cabal install Vec-OpenGLRaw ${OPTS}
- cabal install hslogger ${OPTS}
+ cabal install --reinstall Vec ${OPTS}
+ cabal install --reinstall MaybeT ${OPTS}
+ cabal install --reinstall MonadRandom ${OPTS}
+ cabal install --reinstall data-inttrie ${OPTS}
+ cabal install --reinstall data-memocombinators ${OPTS}
+ cabal install --reinstall PSQueue ${OPTS}
+ cabal install --reinstall vector ${OPTS}
+ cabal install --reinstall statistics ${OPTS}
+ cabal install --reinstall priority-sync ${OPTS}
+ cabal install --reinstall Vec-OpenGLRaw ${OPTS}
+ cabal install --reinstall hslogger ${OPTS}
clean:
(cd rsagl-math && cabal clean ${OPTS})
@@ -24,6 +24,9 @@ clean:
(cd rsagl-demos && cabal clean ${OPTS})
(cd roguestar-engine && cabal clean ${OPTS})
(cd roguestar-gl && cabal clean ${OPTS})
+ (cd roguestar-glut && cabal clean ${OPTS})
+ (cd roguestar-gtk && cabal clean ${OPTS})
+ (cd roguestar && cabal clean ${OPTS})
rm -rf roguestar-sdist
install:
@@ -33,6 +36,9 @@ install:
(cd rsagl-demos && cabal install --reinstall ${OPTS})
(cd roguestar-engine && cabal install --reinstall ${OPTS})
(cd roguestar-gl && cabal install --reinstall ${OPTS})
+ (cd roguestar-glut && cabal install --reinstall ${OPTS})
+ (cd roguestar-gtk && cabal install --reinstall ${OPTS})
+ (cd roguestar && cabal install --reinstall ${OPTS})
dev:
${MAKE} install -e "OPTS=${CONFIG_OPTS}"
@@ -47,15 +53,24 @@ sdist:
(cd rsagl-demos && cabal check && cabal sdist ${OPTS})
(cd roguestar-engine && cabal check && cabal sdist ${OPTS})
(cd roguestar-gl && cabal check && cabal sdist ${OPTS})
+ (cd roguestar-glut && cabal check && cabal sdist ${OPTS})
+ (cd roguestar-gtk && cabal check && cabal sdist ${OPTS})
+ (cd roguestar && cabal check && cabal sdist ${OPTS})
mkdir -p ./roguestar-sdist
cp rsagl-math/dist/*.tar.gz ./roguestar-sdist
cp rsagl-frp/dist/*.tar.gz ./roguestar-sdist
cp rsagl/dist/*.tar.gz ./roguestar-sdist
cp rsagl-demos/dist/*.tar.gz ./roguestar-sdist
cp roguestar-engine/dist/*.tar.gz ./roguestar-sdist
cp roguestar-gl/dist/*.tar.gz ./roguestar-sdist
+ cp roguestar-glut/dist/*.tar.gz ./roguestar-sdist
+ cp roguestar-gtk/dist/*.tar.gz ./roguestar-sdist
+ cp roguestar/dist/*.tar.gz ./roguestar-sdist
(cd roguestar-sdist && tar xzf roguestar-engine-${VERSION}.tar.gz)
(cd roguestar-sdist && tar xzf roguestar-gl-${VERSION}.tar.gz)
+ (cd roguestar-sdist && tar xzf roguestar-glut-${VERSION}.tar.gz)
+ (cd roguestar-sdist && tar xzf roguestar-gtk-${VERSION}.tar.gz)
+ (cd roguestar-sdist && tar xzf roguestar-${VERSION}.tar.gz)
(cd roguestar-sdist && tar xzf rsagl-math-${VERSION}.tar.gz)
(cd roguestar-sdist && tar xzf rsagl-frp-${VERSION}.tar.gz)
(cd roguestar-sdist && tar xzf rsagl-${VERSION}.tar.gz)
@@ -66,5 +81,8 @@ sdist:
(cd roguestar-sdist/rsagl-${VERSION} && cabal configure && cabal install)
(cd roguestar-sdist/rsagl-demos-${VERSION} && cabal configure && cabal install)
(cd roguestar-sdist/roguestar-gl-${VERSION} && cabal configure && cabal install)
+ (cd roguestar-sdist/roguestar-glut-${VERSION} && cabal configure && cabal install)
+ (cd roguestar-sdist/roguestar-gtk-${VERSION} && cabal configure && cabal install)
+ (cd roguestar-sdist/roguestar-${VERSION} && cabal configure && cabal install)
ls roguestar-sdist
@@ -18,26 +18,9 @@ homepage: http://roguestar.downstairspeople.org/
build-type: Simple
tested-with: GHC==6.12.1
---Flag GLUT
--- Description: Enable GLUT widget toolkit.
-
---Flag GTK
--- Description: Enable GTK widget toolkit.
-
-Executable roguestar
- main-is: Main.hs
- build-depends: process, old-time, bytestring
- ghc-options: -threaded
- --if flag(GLUT)
- cpp-options: -D__ROGUESTAR_SUPPORTS_GLUT__
- --if flag(GTK)
- -- cpp-options: -D__ROGUESTAR_SUPPORTS_GTK__
- --if !flag(GLUT) && !flag(GTK)
- -- buildable: False
-
Library
hs-source-dirs: src
- exposed-modules: Processes, Initialization, DrawString, Config, KeyStroke, PrintText
+ exposed-modules: Processes, Initialization, DrawString, Config, KeyStroke, PrintText, Globals
other-modules: Quality, ProtocolTypes, VisibleObject,
Strings, WordGenerator, Driver,
PrintTextData, Animation,
@@ -48,11 +31,11 @@ Library
Models.Tree, Models.Encephalon, Models.PhaseWeapons, RenderingControl,
Keymaps.BuiltinKeymaps, Keymaps.CommonKeymap, Keymaps.NumpadKeymap,
Keymaps.Keymaps, Keymaps.VIKeymap, AnimationBuildings, Models.Node,
- Models.Stargate, Statistics, Globals, Models.Sky, Scene, Models.Spheres,
+ Models.Stargate, Statistics, Models.Sky, Scene, Models.Spheres,
Models.EnergySwords, Models.EnergyThings, Models.CyborgType4,
AnimationEvents, AnimationMenus, AnimationTerrain, AnimationTools,
AnimationExtras, AnimationCreatures, AnimationBuildings, MaybeArrow,
- EventUtils, Sky
+ EventUtils, Sky, Paths_roguestar_gl
build-depends: base>=4&&<5,
rsagl==0.5,
rsagl-math==0.5,
@@ -67,15 +50,6 @@ Library
bytestring>=0.9.1.5 && < 0.10,
stm>=2.1.1.2 && < 2.2,
priority-sync>=0.2.1.0 && < 0.2.2
- --if flag(GLUT)
- cpp-options: -D__ROGUESTAR_SUPPORTS_GLUT__
- build-depends: GLUT>=2.2.2.0 && < 2.3
- --if flag(GTK)
- -- cpp-options: -D__ROGUESTAR_SUPPORTS_GTK__
- -- build-depends: gtk>=0.11.0 && < 0.12,
- -- gtkglext>=0.11.0&& < 0.12
- --if !flag(GLUT) && !flag(GTK)
- -- buildable: False
ghc-options: -threaded -fno-warn-type-defaults -fexcess-precision
ghc-prof-options: -prof -auto-all
View
@@ -1,28 +0,0 @@
-{-# LANGUAGE CPP #-}
-module Main
- (main)
- where
-
-import System.Exit
-import System.IO
-
-#ifdef __ROGUESTAR_SUPPORTS_GLUT__
-import MainGLUT
-#endif
-
-#ifdef __ROGUESTAR_SUPPORTS_GTK__
-import MainGTK
-#endif
-
-main :: IO ()
-main = do
-#ifdef __ROGUESTAR_SUPPORTS_GTK__
- mainGTK
- exitWith ExitSuccess
-#endif
-#ifdef __ROGUESTAR_SUPPORTS_GLUT__
- mainGLUT
- exitWith ExitSuccess
-#endif
- hPutStrLn stderr "roguestar-gl was apparently not compiled with any GUI support!"
- exitWith (ExitFailure 1)
@@ -1,111 +0,0 @@
-{-# LANGUAGE Arrows, OverloadedStrings #-}
-
-module MainGLUT
- (mainGLUT)
- where
-
-import System.IO
-import PrintText
-import Data.Maybe
-import Graphics.UI.GLUT as GLUT hiding (initialize)
-import Control.Monad
-import Actions
-import Keymaps.Keymaps
-import Driver
-import System.Timeout
-import System.Exit
-import Globals
-import Control.Concurrent.STM
-import Statistics
-import Config
-import Initialization
-import Processes
-import RSAGL.Scene
-import KeyStroke as KeyStroke
-import DrawString
-
-display_mode :: [DisplayMode]
-display_mode = [RGBAMode,
- WithDepthBuffer,
- DoubleBuffered]
-
-mainGLUT :: IO ()
-mainGLUT =
- do (_, args) <- getArgsAndInitialize
- init_vars <- initialize glutDrawString args
- let (width,height) = default_window_size
- initialWindowSize $= Size width height
- initialDisplayMode $= display_mode
- window <- createWindow window_name
- displayCallback $= theDisplayCallback init_vars
- perWindowKeyRepeat $= PerWindowKeyRepeatOff
- keyboardMouseCallback $=
- (Just $ keyCallback $ init_print_text_object init_vars)
- addTimerCallback timer_callback_millis $
- roguestarTimerCallback init_vars
- window
- sceneLoop init_vars
- mainLoop
-
-theDisplayCallback :: Initialization -> IO ()
-theDisplayCallback init_vars =
- do sz <- get windowSize
- display sz init_vars
- swapBuffers
-
-roguestarTimerCallback :: Initialization -> Window -> IO ()
-roguestarTimerCallback init_vars window =
- do addTimerCallback timer_callback_millis $
- roguestarTimerCallback init_vars window
- postRedisplay $ Just window
- watchQuit init_vars
-
-keyCallback :: PrintTextObject -> KeyboardMouseCallback
-keyCallback pto (Char ' ') Down _ _ =
- pushInputBuffer pto KeyActivate
-keyCallback pto (Char '\n') Down _ _ =
- pushInputBuffer pto KeyActivate
-keyCallback pto (Char '\r') Down _ _ =
- pushInputBuffer pto KeyActivate
-keyCallback pto (Char '\ESC') Down _ _ =
- pushInputBuffer pto KeyEscape
-keyCallback pto (Char '&') Down _ _ =
- pushInputBuffer pto KeyAmpersand
-keyCallback pto (Char ';') Down _ _ =
- pushInputBuffer pto KeySemicolon
-keyCallback pto (Char '\t') Down _ _ =
- pushInputBuffer pto KeyTab
-keyCallback pto (Char '1') Down _ _ =
- pushInputBuffer pto NumPad1
-keyCallback pto (Char '2') Down _ _ =
- pushInputBuffer pto NumPad2
-keyCallback pto (Char '3') Down _ _ =
- pushInputBuffer pto NumPad3
-keyCallback pto (Char '4') Down _ _ =
- pushInputBuffer pto NumPad4
-keyCallback pto (Char '5') Down _ _ =
- pushInputBuffer pto NumPad5
-keyCallback pto (Char '6') Down _ _ =
- pushInputBuffer pto NumPad6
-keyCallback pto (Char '7') Down _ _ =
- pushInputBuffer pto NumPad7
-keyCallback pto (Char '8') Down _ _ =
- pushInputBuffer pto NumPad8
-keyCallback pto (Char '9') Down _ _ =
- pushInputBuffer pto NumPad9
-keyCallback pto (Char '0') Down _ _ =
- pushInputBuffer pto NumPad0
-keyCallback pto (Char char) Down _ _ =
- pushInputBuffer pto (Stroke char)
-keyCallback pto (SpecialKey GLUT.KeyDown) Down _ _ =
- pushInputBuffer pto KeyStroke.KeyDown
-keyCallback pto (SpecialKey GLUT.KeyUp) Down _ _ =
- pushInputBuffer pto KeyStroke.KeyUp
-keyCallback pto (SpecialKey GLUT.KeyLeft) Down _ _ =
- pushInputBuffer pto KeyStroke.KeyLeft
-keyCallback pto (SpecialKey GLUT.KeyRight) Down _ _ =
- pushInputBuffer pto KeyStroke.KeyRight
-keyCallback _ (SpecialKey s) Down _ _ =
- hPutStrLn stderr $ "Unrecognized key (GLUT): " ++ show s
-keyCallback _ _ _ _ _ = return ()
-
@@ -30,7 +30,7 @@ main =
let (width,height) = default_window_size
initialWindowSize $= Size width height
initialDisplayMode $= display_mode
- window <- createWindow window_name
+ window <- createWindow (window_name ++ " (GLUT client)")
displayCallback $= theDisplayCallback init_vars
perWindowKeyRepeat $= PerWindowKeyRepeatOff
keyboardMouseCallback $=
Oops, something went wrong.

0 comments on commit ce06890

Please sign in to comment.