Gifcurry 0.1.0.5 → 0.1.0.6
raw patch · 3 files changed
+46/−11 lines, 3 files
Files
- Gifcurry.cabal +1/−1
- README.md +32/−0
- gui_src/Main.hs +13/−10
Gifcurry.cabal view
@@ -1,5 +1,5 @@ name: Gifcurry-version: 0.1.0.5+version: 0.1.0.6 synopsis: Create animated GIFs, overlaid with optional text, from video files. description: GIF creation utility. homepage: https://github.com/lettier/gifcurry
README.md view
@@ -88,10 +88,41 @@ gifcurry_cli ``` +### Mac OS X El Capitan++```+brew update+brew install xcode+brew install git+brew install ghc+sudo chown -R $(whoami):admin /usr/local/bin+brew link ghc+brew install cabal-install+brew install pkg-config+brew install glib+brew install gtk+3+brew install cairo+brew install pango+brew install ffmpeg+brew install imagemagick+git clone git@github.com:lettier/gifcurry.git+cd gifcurry+cabal sandbox init+cabal update+cabal configure+cabal install alex happy -j+cabal install gtk2hs-buildtools -j+cabal install gifcurry -j --enable-relocatable+cd .cabal-sandbox/bin/+./gifcurry_gui+./gifcurry_cli+```+ ### Hackage ``` # Install ghc and cabal-install+# Install ffmpeg and imagemagick cabal update cabal configure cabal install gtk2hs-buildtools -j@@ -105,6 +136,7 @@ ``` # Install ghc and cabal-install+# Install ffmpeg and imagemagick git clone git@github.com:lettier/gifcurry.git cd gifcurry/ cabal sandbox init
gui_src/Main.hs view
@@ -3,6 +3,9 @@ import System.Environment import System.Directory import System.Process+import System.Info+import Data.Char+import Data.List import Control.Concurrent import Graphics.UI.Gtk import Graphics.UI.Gtk.Builder@@ -71,15 +74,14 @@ top_text, bottom_text ] if result == 1- then do- entrySetText status_entry "Did not work. Check your settings."- else do entrySetText status_entry "Ready."+ then entrySetText status_entry "Did not work. Check your settings."+ else entrySetText status_entry "Ready." forkIO $ do open_gif output_file_path_name return () return () return ()- else do entrySetText status_entry "File paths are wrong. Check your settings."+ else entrySetText status_entry "File paths are wrong. Check your settings." return () @@ -93,7 +95,7 @@ open_gif output_file_path_name return () return ()- else do entrySetText status_entry "GIF does not exist. Check your settings."+ else entrySetText status_entry "GIF does not exist. Check your settings." return () @@ -101,13 +103,13 @@ widgetShowAll window mainGUI -load_window b id = builderGetObject b castToWindow id+load_window b = builderGetObject b castToWindow -load_entry b id = builderGetObject b castToEntry id+load_entry b = builderGetObject b castToEntry -load_fc_button b id = builderGetObject b castToFileChooserButton id+load_fc_button b = builderGetObject b castToFileChooserButton -load_button b id = builderGetObject b castToButton id+load_button b = builderGetObject b castToButton build_builder = do builder <- builderNew@@ -128,4 +130,5 @@ return (output_gif_file_name, output_file_path_name) -open_gif output_file_path_name = spawnCommand $ "xdg-open " ++ output_file_path_name+open_gif output_file_path_name = spawnCommand $ command ++ output_file_path_name+ where command = if "linux" `isInfixOf` (fmap toLower System.Info.os) then "xdg-open " else "open "