#! /usr/bin/env python
# Copyright (c) 2005 Tom Hinkle You may use and distribute this
# software under the terms of the GNU General Public License, version
# 2 or later

# Setup bugbuddy to report unhandled exceptions.
try: 
  import bugbuddy
  bugbuddy.install('gnome-sudoku')
except:
  #No bugbuddy support
  pass 

try:
    from gnome_sudoku.gnome_sudoku import start_game
except ImportError:
    import sys
    if "/home/thomas/john6/test/lib/python2.5/site-packages" not in sys.path:
        sys.path.insert(0, "/home/thomas/john6/test/lib/python2.5/site-packages")

    try:
        from gnome_sudoku.gnome_sudoku import start_game
    except ImportError:
        import gtk
        
        title = 'Sudoku not correctly installed'
        description = """Sudoku is not able to start because required application files are not installed.
If you are currently upgrading your system please wait until the upgrade has completed."""
        dialog = gtk.MessageDialog(type = gtk.MESSAGE_ERROR, message_format = title)
        dialog.format_secondary_text(description)
        dialog.add_button(gtk.STOCK_QUIT, gtk.RESPONSE_CLOSE)
        dialog.run()
        sys.exit(0)

start_game()
