wxgui 819 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/sh
  2. #% Module
  3. #% description: wxPython-based GUI for GRASS GIS
  4. #% keywords: general, gui
  5. #% End
  6. #%option
  7. #% key: workspace
  8. #% type: string
  9. #% description: Name of workspace file (.grc)
  10. #% required : no
  11. #%End
  12. if [ -z "$GISBASE" ] ; then
  13. echo "You must be in GRASS GIS to run this program." 1>&2
  14. exit 1
  15. fi
  16. if [ -z "$GRASS_PYTHON" ] ; then
  17. g.message -e "GRASS_PYTHON environment variable not set"
  18. exit 1
  19. fi
  20. if [ $# -eq 0 ] ; then
  21. "$GRASS_PYTHON" "$GISBASE/etc/wxpython/wxgui.py" &
  22. exit 0
  23. fi
  24. if [ "$1" != "@ARGS_PARSED@" ] ; then
  25. exec g.parser "$0" "$@"
  26. fi
  27. if test -n "$GIS_OPT_WORKSPACE" ; then
  28. # load workspace file
  29. "$GRASS_PYTHON" "$GISBASE/etc/wxpython/wxgui.py" "--workspace" "$GIS_OPT_WORKSPACE" &
  30. else
  31. "$GRASS_PYTHON" "$GISBASE/etc/wxpython/wxgui.py" &
  32. fi
  33. exit 0