diff --git a/ChangeLog b/ChangeLog index 1962a3ca..e6848883 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ ================= version 2.0.4 ( yet to be released) ============ +* Uninstall script works better +* Is now distributed as a python package. This makes things easier +for maintanence * Is now installable * Disabled gamepad GUI until joystick support can be completed * Initial joystick config support: supports buttons, but hot hats and axes diff --git a/INSTALL b/INSTALL index 7577c89f..e5bc51bb 100644 --- a/INSTALL +++ b/INSTALL @@ -1,31 +1,18 @@ -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! IMPORTANT NOTE -! The setup script is broken right now. -! To workaround, just run gfceux out of the source directory. -! -! $ python ./gfceux -! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - You can install gfceux with setup.py: $ sudo python setup.py install --prefix=/usr/local You can change the prefix to whatever you like. -FIXME - 12/5/2008 - You can only run gfceux out of its source folder. - Requirements: Python (tested with 2.5); (Ubuntu package name: python) NOTE: gfceux is not yet compatible with python 3.x PyGTK and GTK; (Ubuntu package name: (python-gtk2 libgtk2.0-0) Fceux 2.x -Recommended dependencies -Pygame (Ubuntu package name: python-pygame) - This will allow graphical conifguraion of input - NOTE: fceu 1.x is no longer supported in the gfceu 2.x series. If you still want/need a front-end for gfceu use gfceu 0.x - +ALSO NOTE: you can no longer run gfceux from the source directory. + You need to run the install script and then run the app. diff --git a/MANIFEST b/MANIFEST deleted file mode 100644 index 25967b61..00000000 --- a/MANIFEST +++ /dev/null @@ -1,12 +0,0 @@ -gfceux -get_key.py -config_parse.py -setup.py -COPYING -ChangeLog -INSTALL -TODO -gfceux.xml -gfceux.desktop -gfceux.png -gfceux_big.png diff --git a/TODO b/TODO index 446927d8..df749269 100644 --- a/TODO +++ b/TODO @@ -1,9 +1,7 @@ TODO: -* clean setup.py * implement UI for --special (combo box) * use combo box for bpp * use combo box to select gamepad to configure, simply UI -* update build scripts to reflect new files * joystick input support * hotkey config * resolution diff --git a/generate_ui.sh b/data/generate_ui.sh similarity index 100% rename from generate_ui.sh rename to data/generate_ui.sh diff --git a/gfceux.1 b/data/gfceux.1 similarity index 100% rename from gfceux.1 rename to data/gfceux.1 diff --git a/gfceux.desktop b/data/gfceux.desktop similarity index 100% rename from gfceux.desktop rename to data/gfceux.desktop diff --git a/gfceux.glade b/data/gfceux.glade similarity index 100% rename from gfceux.glade rename to data/gfceux.glade diff --git a/gfceux.png b/data/gfceux.png similarity index 100% rename from gfceux.png rename to data/gfceux.png diff --git a/gfceux.xml b/data/gfceux.xml similarity index 100% rename from gfceux.xml rename to data/gfceux.xml diff --git a/gfceux_big.png b/data/gfceux_big.png similarity index 100% rename from gfceux_big.png rename to data/gfceux_big.png diff --git a/mockup_test.py b/mockup_test.py deleted file mode 100644 index c29b0bb7..00000000 --- a/mockup_test.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python -# displays mockup of gamepad config -import gtk - -glade_file = 'gfceux.xml' -print "Using: " + glade_file -widgets = gtk.Builder() -widgets.add_from_file(glade_file) - -widgets.get_object('gamepad_config_window').show_all() -gtk.main () - diff --git a/setup.py b/setup.py index 4677784d..14dce8bf 100755 --- a/setup.py +++ b/setup.py @@ -1,12 +1,22 @@ #!/usr/bin/env python + from distutils.core import setup + setup(name="gfceux", version="2.0.4", scripts = ['gfceux'], - data_files=[('share/gfceux/',['gfceux.xml', 'gfceux_big.png', 'gfceux.png']), - ('share/pixmaps/', ['gfceux.png']), - ('share/man/man1/', ['gfceux.1']), - ('share/applications/', ['gfceux.desktop'])], + packages = ['gfceux'], + package_dir = {'gfceux': 'src'}, + data_files=[ + ('share/gfceux/', + ['data/gfceux.xml', 'data/gfceux_big.png', 'data/gfceux.png', + 'COPYING']), + ('share/pixmaps/', + ['data/gfceux.png']), + ('share/man/man1/', + ['data/gfceux.1']), + ('share/applications/', + ['data/gfceux.desktop'])], author = "Lukas Sabota", author_email = "ltsmooth42 _at_ gmail.com", url = "http://dietschnitzel.com/gfceu" diff --git a/config_parse.py b/src/config_parse.py similarity index 100% rename from config_parse.py rename to src/config_parse.py diff --git a/get_key.py b/src/get_key.py similarity index 100% rename from get_key.py rename to src/get_key.py diff --git a/gfceux b/src/main.py similarity index 99% rename from gfceux rename to src/main.py index 9f08229f..d9dfd72b 100755 --- a/gfceux +++ b/src/main.py @@ -28,9 +28,9 @@ import sys import os import pickle import shutil -from optparse import OptionParser +#from optparse import OptionParser #from config_parse import FceuxConfigParser -import get_key +#import get_key #from subprocess import Popen try: @@ -659,7 +659,4 @@ class GfceuxApp: gtk.main_quit() if __name__ == '__main__': - parser = OptionParser(version='%prog '+ version) - parser.parse_args() - app = GfceuxApp() diff --git a/uninstall.py b/uninstall.py index 423963df..75b56b5a 100755 --- a/uninstall.py +++ b/uninstall.py @@ -5,19 +5,33 @@ # # sudo ./uninstall.py [prefix] # +# prefix must include slash at end +#TODO: fix that +#TODO: remove python package? (site-package/gfceux/etc) import os import dircache -prefix = "/usr/" -if sys.argv[1]: - prefix == sys.argv[1] +import sys -files = ['share/pixmaps/gfceux.png', 'share/man/man1/gfceux.1', - 'share/applications/gfceux.desktop', 'bin/gfceux'] -for x in dircache.listdir(prefix+"share/gfceux"): - files.append("share/gfceux/"+x) +prefix = "/usr/" +try: + if sys.argv[1]: + prefix = sys.argv[1] +except IndexError: + pass + +# first include data places scattered in /usr +files = [ + "share/pixmaps/gfceux.png", + "share/man/man1/gfceux.1", + "share/applications/gfceux.desktop", + "bin/gfceux"] +# then include the files in our /usr/share/gfceux +for x in dircache.listdir(prefix + "share/gfceux"): + files.append("share/gfceux/" + x) for x in files: os.remove(prefix+x) - + +# go ahead and remove our shared folder if its empty os.rmdir(prefix+"share/gfceux")