Change website address to www.geda-project.org.
[geda-xgsch2pcb.git] / xgsch2pcb.in
blobb66b04e15ed9684cbdd5096b5e666ec99d57e404
1 #!@PYTHON@
2 # -*-Python-*-
4 # xgsch2pcb - a GUI for gsch2pcb
5 # Copyright (C) 2006 University of Cambridge
6 # Copyright (C) 2006-2009 xgsch2pcb contributors (See ChangeLog for details)
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License along
19 # with this program; if not, write to the Free Software Foundation, Inc.,
20 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 import pygtk
23 pygtk.require('2.0')
25 import sys, gtk, os.path
27 # The installation prefix is automatically updated by 'make install'
28 # xgsch2pcb needs to know its installation prefix in order to find its files
29 prefix = '@prefix@'
30 pkglibdir = '@pkglibdir@'
31 localedir = '@prefix@/share/locale'
33 libpath = os.path.abspath(pkglibdir)
34 if libpath not in sys.path:
35     sys.path.insert(0, libpath)
37 # Check i18n
38 import gettext
39 try:
40     t = gettext.translation('@PACKAGE@', localedir)
41 except:
42     pass
44 from gui import *
46 gtk.window_set_default_icon_name('geda-xgsch2pcb')
48 if len(sys.argv) > 1:
49     window = MonitorWindow(sys.argv[1])
50 else:
51     window = MonitorWindow()
52 window.show_all()
54 gtk.main()