gfceux now runs from its source directory without being installed

This commit is contained in:
punkrockguy318 2009-04-29 04:39:47 +00:00
parent 66a5dc8a94
commit 9e3b6195d6
3 changed files with 10 additions and 6 deletions

View File

@ -1,4 +1,6 @@
================= version 2.1 ( yet to be released) ============ * Gfceux now runs properly from the source directory without
being installed
================= version 2.1 ====================== ============
* Increased the width of the sdl inputcfg window to be more visible * Increased the width of the sdl inputcfg window to be more visible
with larger font sizes with larger font sizes
* Uninstall script works better * Uninstall script works better

4
gfceux
View File

@ -5,8 +5,10 @@
# Lukas Sabota <ltsmooth42 _at_ gmail _dot_ com> # Lukas Sabota <ltsmooth42 _at_ gmail _dot_ com>
# #
# <http://fceux.com> # <http://fceux.com>
try:
from gfceux import main from gfceux import main
except:
from src import main
app = main.GfceuxApp() app = main.GfceuxApp()

View File

@ -280,14 +280,14 @@ class GfceuxApp:
global widgets global widgets
""" Search for the glade XML file and load it """ """ Search for the glade XML file and load it """
# Check first in the directory of this script. # Check first in the directory of this script.
if os.path.isfile('gfceux.xml'): if os.path.isfile('data/gfceux.xml'):
glade_file = 'gfceux.xml' glade_file = 'data/gfceux.xml'
# Then check to see if its installed on a *nix system # Then check to see if its installed on a *nix system
elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml')): elif os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml')):
glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml') glade_file = os.path.join(os.path.dirname(sys.argv[0]), '../share/gfceux/gfceux.xml')
else: else:
print 'ERROR.' print 'ERROR.'
print 'Could not find the ' + glade_file + ' file.' print 'Could not find the glade UI file.'
print 'Try reinstalling the application.' print 'Try reinstalling the application.'
sys.exit(1) sys.exit(1)