From ee1e742261d543cd8d1a6f83d774d9e8972e944e Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 2 Jul 2008 17:30:06 +0000 Subject: [PATCH] gfceu now looks in the script directory for fceux this will make it easy to pump out (g)fceux sdl builds for testing --- ChangeLog | 2 ++ gfceu | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 877407c4..de742509 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ +* Supports autoscale * No longer requires GnomeVFS * Major code cleanup +* Supports fceux command line options (different syntax from fceu) * Now requires pygtk >= 2.12 * Transitioned from gtk.glade to gtk.Builder. * Changed some strings to reflect new email and website diff --git a/gfceu b/gfceu index abfc1b54..accaaf03 100644 --- a/gfceu +++ b/gfceu @@ -166,12 +166,12 @@ def set_options(): options.host_pass = widgets.get_object("host_pass").get_text() - - - - def find_binary(file): + # first check the script directory + if os.path.isfile(os.path.join(os.path.dirname(sys.argv[0]),file)): + return os.path.join(os.path.dirname(sys.argv[0]), file) + # if not in the script directory, check the $PATH path = os.getenv('PATH') directories= [] directory = '' @@ -187,8 +187,7 @@ def find_binary(file): if os.path.isfile(os.path.join(x, file)): return os.path.join(x,file) - if os.path.isfile(os.path.join(os.curdir,file)): - return os.path.join(os.curdir, file) + return None