Skip to content

Instantly share code, notes, and snippets.

@573
Created October 29, 2012 12:18
Show Gist options
  • Save 573/3973225 to your computer and use it in GitHub Desktop.
Save 573/3973225 to your computer and use it in GitHub Desktop.
environment variables for haskell wx bindings (~/.bashrc.d/wxhaskell.bashrc)
#!/bin/env bash
# for 2.9 at the moment
# wx-config (http://sourceforge.net/projects/wxhaskell/files/wx-config-win/wx-config.exe/download) is in /usr/local/bin
case $PATH in *\/h\/mingw\/msys\/1.0\/local\/bin*) PATH=${PATH//\/h\/mingw\/msys\/1.0\/local\/bin/};; esac
# the built wx-based haskell-bound exe should find the DLL's
case $PATH in *\/z\/wxWidgets\/lib\/gcc_dll*) PATH=${PATH//\/z\/wxWidgets\/lib\/gcc_dll/};; esac
# some of the built wx-based haskell-bound exe might need the wxc.dll from the hackage-package wxc, TODO make more generic
case $PATH in *\/c\/Users\/daniel\/AppData\/Roaming\/cabal\/wxc-0.90.0.4\/ghc-7.4.1*) PATH=${PATH//\/c\/Users\/daniel\/AppData\/Roaming\/cabal\/wxc-0.90.0.4\/ghc-7.4.1/};; esac
# h:/mingw/bin is assumed to already be on PATH
case $PATH in *) PATH=${PATH:+${PATH}:/z/wxWidgets/lib/gcc_dll:/c/Users/daniel/AppData/Roaming/cabal/wxc-0.90.0.4/ghc-7.4.1};; esac
case $PATH in *::*) PATH=${PATH//::/:};; esac
case $CPLUS_INCLUDE_PATH in \
'') CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH:-h:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\;h:/MinGW/lib/gcc/mingw32/4.6.2/include/c++/mingw32\;h:/mingw/msys/1.0/local/include\;z:/wxWidgets/lib/gcc_dll/mswu\;z:/wxWidgets/include\;z:/wxWidgets\;h:/mingw/include};; \
*) CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH:+${CPLUS_INCLUDE_PATH}\;h:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\;h:/MinGW/lib/gcc/mingw32/4.6.2/include/c++/mingw32/\;h:/mingw/msys/1.0/local/include\;z:/wxWidgets/lib/gcc_dll/mswu\;z:/wxWidgets/include\;z:/wxWidgets\;h:/mingw/include};; \
esac
case $WXWIN in \
'') export WXWIN=${WXWIN:-z:\\wxwidgets};; \
*) export WXWIN=z:\\wxwidgets;; \
esac
case $WXCFG in \
'') export WXCFG=${WXCFG:-gcc_dll\\mswu};; \
*) export WXCFG=gcc_dll\\mswu;; \
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment