HGamer3D-Data 0.3.0 → 0.3.1
raw patch · 2 files changed
+7/−3 lines, 2 files
Files
- HGamer3D-Data.cabal +1/−1
- HGamer3D/Util/FileLocation.hs +6/−2
HGamer3D-Data.cabal view
@@ -1,5 +1,5 @@ Name: HGamer3D-Data -Version: 0.3.0 +Version: 0.3.1 Synopsis: Game Engine for the Haskell Programmer - Data Definitions and Utilities Description: HGamer3D is a game engine for developing 3D games in the programming
HGamer3D/Util/FileLocation.hs view
@@ -42,6 +42,7 @@ where import Control.Monad+import Control.Exception import System.Directory import System.FilePath import System.Environment.FindBin@@ -62,8 +63,11 @@ getAppLibDirectory = _getHG3DDirectory "lib" _getBinDir subdir = do- bdir <- getProgPath- let ndir = bdir ++ [pathSeparator] ++ ".HGamer3D" ++ [pathSeparator] ++ subdir+ bdir <- try getProgPath :: IO (Either SomeException FilePath)+ let bdir' = case bdir of+ Left _ -> "."+ Right path -> path+ let ndir = bdir' ++ [pathSeparator] ++ ".HGamer3D" ++ [pathSeparator] ++ subdir return ndir -- | path of media, relative to executable