added empty GTK-Hello-World-Project

This commit is contained in:
Nicole Dresselhaus 2013-12-22 23:29:11 +01:00
parent 2fa501e272
commit c46e24befd
6 changed files with 50 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/.dist-buildwrapper
/.project
/.settings

15
COMPILING Normal file
View File

@ -0,0 +1,15 @@
set up external dependencies:
> cabal install gtk2hs-buildtools
make sure these are in your PATH (e.g. include $HOME/.cabal/bin in your $PATH)
install dependencies & configure app
> cabal install --only-dependencies
> cabal configure
build
> cabal build
run file from dist/build/Pioneers/Pioneers

1
Pioneers Symbolic link
View File

@ -0,0 +1 @@
dist/build/Pioneers/Pioneers

14
Pioneers.cabal Normal file
View File

@ -0,0 +1,14 @@
name: Pioneers
version: 0.1
cabal-version: >=1.2
build-type: Simple
author: sdressel
executable Pioneers
hs-source-dirs: src
main-is: Main.hs
build-depends:
base >= 4,
gtk
ghc-options: -Wall

2
Setup.hs Normal file
View File

@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain

15
src/Main.hs Normal file
View File

@ -0,0 +1,15 @@
import Graphics.UI.Gtk
main :: IO ()
main = do
initGUI
window <- windowNew
button <- buttonNew
set window [ containerBorderWidth := 10,
containerChild := button ]
set button [ buttonLabel := "Hello World" ]
onClicked button (putStrLn "Hello World")
onDestroy window mainQuit
widgetShowAll window
mainGUI