Commit 439e3ef7 authored by Savanni D'Gerinel's avatar Savanni D'Gerinel

Do some packaging work

I changed the code so that it gets the data directory (specified in cabal) from the relevant package and uses that to find the glade file.
parent 793b224b
This program is released into the public domain by Savanni D'Gerinel. No rights reserved.
\ No newline at end of file
......@@ -14,6 +14,8 @@ category: Graphics
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
data-dir: resources
executable color-temp
main-is: Main.hs
......@@ -7,6 +7,8 @@ import Data.Text.Format (format)
import Data.Text.Lazy (unpack)
import Graphics.UI.Gtk
import Paths_color_temp
import ColorTemp
main :: IO ()
......@@ -14,7 +16,7 @@ main = do
void initGUI
builder <- builderNew
builderAddFromFile builder "resources/"
getDataFileName "" >>= builderAddFromFile builder
window <- builderGetObject builder castToWindow "main-window"
void $ on window deleteEvent $ liftIO (mainQuit >> return False)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment